/* 08 corporate-trust — the original's own palette, kept and cleaned: #0f2f5c
   navy, #336799 steel, the site's #005389 link blue promoted to the CTA. 4px
   radius, subtle shadows, the conventional centred sequence done precisely.
   This is the continuity option — the one that still looks like the same farm. */
@layer tokens, base, layout, components;

@layer tokens {
  :root {
    color-scheme: light dark;

    /* The navy is the *text* in light and cannot be in dark, where it has to
       become a surface instead. That inversion is the whole job here. */
    --navy:    light-dark(#0f2f5c, #cfe0f5);
    --surface: light-dark(#ffffff, #0b131f);
    --panel:   light-dark(#ffffff, #111c2c);
    --tint:    light-dark(#f2f6fa, #0f1927);
    --ink:     light-dark(#152436, #e5edf7);
    --muted:   light-dark(#4d5f77, #9db0c7);
    --steel:   light-dark(#336799, #7ba0c8);
    --cta:     light-dark(#005389, #56a0e0);
    --on-cta:  light-dark(#ffffff, #06121c);
    --line:    light-dark(#dce4ee, #21304a);

    --radius: 4px;
    --shadow-1: light-dark(0 1px 3px rgb(15 47 92 / 0.12), 0 1px 3px rgb(0 0 0 / 0.5));
    --shadow-2: light-dark(0 6px 18px -8px rgb(15 47 92 / 0.30), 0 6px 18px -8px rgb(0 0 0 / 0.7));
    --sans: "Inter", "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  }
  :root:has(#light:target) { color-scheme: light; }
  :root:has(#dark:target)  { color-scheme: dark; }
}

@layer base {
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font: 1rem/1.65 var(--sans);
  }
  h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; color: var(--navy); }
  p { margin: 0; }
  ul { margin: 0; padding: 0; list-style: none; }
  dl, dd { margin: 0; }
  figure { margin: 0; }
  img { display: block; max-inline-size: 100%; block-size: auto; }
  a { color: var(--cta); }
  a:focus-visible { outline: 3px solid var(--cta); outline-offset: 2px;
                    border-radius: var(--radius); }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; }
  }
}

@layer layout {
  .wrap { max-inline-size: 72rem; margin-inline: auto;
          padding-inline: clamp(1rem, 4vw, 2rem); }
  main > section { padding-block: clamp(2.5rem, 6vw, 4rem); }
}

@layer components {
  .masthead {
    border-block-end: 1px solid var(--line);
    background: var(--panel);
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .bar {
    max-inline-size: 72rem;
    margin-inline: auto;
    padding: 0.75rem clamp(1rem, 4vw, 2rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.5rem;
  }
  .brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
  .brand img { inline-size: 2.75rem; }
  .brand-text { display: grid; }
  .name { font-weight: 700; font-size: 1.0625rem; color: var(--navy);
          letter-spacing: -0.02em; }
  .tag { font-size: 0.8125rem; color: var(--muted); }
  .nav { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin-inline: auto;
         font-size: 0.9375rem; }
  .nav a { color: var(--muted); text-decoration: none; padding-block: 0.25rem; }
  .nav a:hover { color: var(--cta); }
  .schemes { display: flex; gap: 0.25rem; }
  .schemes a { font-size: 0.8125rem; padding: 0.3rem 0.7rem; border: 1px solid var(--line);
               border-radius: var(--radius); color: var(--muted); text-decoration: none; }
  .schemes a:hover { border-color: var(--cta); color: var(--cta); }

  .hero { background: var(--tint); border-block-end: 1px solid var(--line); }
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
  }
  @media (max-width: 880px) { .hero .wrap { grid-template-columns: 1fr; } }
  .eyebrow { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em;
             text-transform: uppercase; color: var(--steel); margin-block-end: 0.75rem; }
  .hero h1 { font-size: clamp(1.875rem, 4vw, 2.875rem); line-height: 1.15;
             text-wrap: balance; }
  .lede { margin-block-start: 1rem; color: var(--muted); max-inline-size: 46ch;
          text-wrap: pretty; }
  .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 1.5rem; }
  .btn {
    display: inline-block;
    padding: 0.7rem 1.375rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    box-shadow: var(--shadow-1);
  }
  .btn:hover { border-color: var(--cta); color: var(--cta); }
  .btn-primary { background: var(--cta); border-color: var(--cta); color: var(--on-cta);
                 box-shadow: var(--shadow-2); }
  .btn-primary:hover { filter: brightness(1.1); color: var(--on-cta); }

  .frame {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2);
    overflow: hidden;
  }
  .frame img { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover;
               object-position: 50% 58%; }
  figcaption { padding: 0.625rem 1rem; font-size: 0.8125rem; color: var(--muted);
               border-block-start: 1px solid var(--line); }

  .angebot h2, .kontakt h2 { font-size: clamp(1.375rem, 3vw, 1.875rem);
                             text-align: center; margin-block-end: 1.75rem; }
  .items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .items li {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    padding-block-end: 1.25rem;
  }
  /* The one item with no photograph must not stretch to its row's height —
     a card that is two thirds empty reads as a loading failure. */
  .items li.plain { padding-block-start: 1.25rem; align-self: start; }
  .items figure { margin-block-end: 1rem; }
  .items figure img { inline-size: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
  .items h3 { font-size: 1.0625rem; margin: 0 1.25rem 0.5rem; }
  .items p { color: var(--muted); font-size: 0.9375rem; margin-inline: 1.25rem; }
  @media (max-width: 900px) { .items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 600px) { .items { grid-template-columns: 1fr; } }

  /* One tinted band gives the page its rhythm. */
  .kontakt { background: var(--tint); border-block-start: 1px solid var(--line); }
  .contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .contact > div { padding: 1.25rem; background: var(--panel);
                   border: 1px solid var(--line); border-radius: var(--radius); }
  .contact dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
                color: var(--muted); margin-block-end: 0.5rem; }
  .contact dd { line-height: 1.8; }
  @media (max-width: 640px) { .contact { grid-template-columns: 1fr; } }

  .colophon {
    background: var(--navy);
    color: light-dark(#dbe6f4, #0b131f);
    padding-block: 1.75rem 2.5rem;
    font-size: 0.9375rem;
  }
  .colophon .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
  .sections { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
  .colophon a { color: inherit; text-decoration: none; }
  .colophon a:hover { text-decoration: underline; }
  .up { margin-inline-start: auto; }
}
