:root {
    --maxw: 1240px;
    --gut: clamp(20px, 5vw, 64px);
    --sec-y: clamp(80px, 11vh, 150px);
  }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--brand-deep); overflow-x: hidden; }

  /* ---- Fixed scroll-driven background layer ---- */
  #bg {
    position: fixed; inset: 0; z-index: -2;
    background: var(--brand); /* set by JS */
    will-change: background-color;
  }
  /* faint signet watermark drifting in the paper */
  #bg::after {
    content: ""; position: absolute; right: -8vw; top: 12vh;
    width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
    background: url("../../logos/Mave-Signet-farbe.svg") no-repeat center/contain;
    opacity: 0; transition: opacity .8s var(--ease-out);
  }
  #bg.paper::after { opacity: .04; }

  .wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gut); }
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
  .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
  }

  /* ---- Eyebrow motif ---- */
  .eyebrow { display: flex; align-items: center; gap: 14px; font-family: var(--font-sans);
    font-size: var(--text-overline); font-weight: 600; letter-spacing: var(--tracking-overline);
    text-transform: uppercase; color: var(--brand); margin: 0 0 22px; }
  .eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; flex: none; }
  .on-dark .eyebrow { color: var(--offwhite); }

  h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: var(--tracking-display);
    margin: 0; text-wrap: balance; }

  /* ---- Header ---- */
  header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; padding: 18px var(--gut);
    color: var(--offwhite);
    transition: background-color .4s var(--ease-out), color .4s var(--ease-out),
                box-shadow .4s var(--ease-out), padding .4s var(--ease-out);
  }
  header.scrolled { background: rgba(249,249,246,0.92); backdrop-filter: blur(8px);
    color: var(--text-primary); box-shadow: 0 1px 0 var(--hairline); padding-block: 13px; }
  .brand { display: flex; align-items: center; text-decoration: none; color: inherit; }
  .brand svg { height: 34px; width: auto; display: block; }
  .brand .logo path { fill: var(--offwhite); transition: fill .4s var(--ease-out); }
  header.scrolled .brand .logo path { fill: var(--brand); }
  header.scrolled .brand .logo .consulting path { fill: var(--text-primary); }
  footer .brand .logo path { fill: var(--offwhite); }
  nav.main { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); }
  nav.main a { color: inherit; text-decoration: none; font-size: 15px; letter-spacing: .01em;
    opacity: .92; position: relative; padding: 4px 0; transition: opacity .2s; }
  nav.main a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
    background: currentColor; transition: right .28s var(--ease-out); }
  nav.main a:hover { opacity: 1; }
  nav.main a:hover::after { right: 0; }
  nav.main a.cta {
    border: 1.5px solid currentColor; padding: 9px 20px; opacity: 1; font-weight: 600;
    transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
  }
  nav.main a.cta::after { display: none; }
  header:not(.scrolled) nav.main a.cta:hover { background: var(--offwhite); color: var(--brand); }
  header.scrolled nav.main a.cta { border-color: var(--brand); color: var(--brand); }
  header.scrolled nav.main a.cta:hover { background: var(--brand); color: var(--offwhite); }
  .menu-btn { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; }

  /* ---- Buttons ---- */
  .btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-sans);
    font-size: 16px; font-weight: 600; letter-spacing: .01em; text-decoration: none;
    padding: 15px 30px; border: 1.5px solid transparent; cursor: pointer;
    transition: background-color .25s var(--ease-out), color .25s var(--ease-out), transform .12s var(--ease-out); }
  .btn:active { transform: translateY(1px); }
  .btn-primary { background: var(--brand); color: var(--offwhite); }
  .btn-primary:hover { background: var(--brand-strong); }
  .btn-ghost-light { border-color: rgba(249,249,246,.55); color: var(--offwhite); }
  .btn-ghost-light:hover { background: var(--offwhite); color: var(--brand); }
  .btn-ghost-dark { border-color: var(--brand); color: var(--brand); }
  .btn-ghost-dark:hover { background: var(--brand); color: var(--offwhite); }
  .btn .ar { width: 18px; height: 18px; transition: transform .25s var(--ease-out); }
  .btn:hover .ar { transform: translateX(4px); }

  /* ---- HERO ---- */
  .hero { min-height: 100svh; display: grid; grid-template-columns: 1.05fr .95fr;
    align-items: center; gap: var(--gut); color: var(--offwhite);
    padding: 150px var(--gut) 80px; max-width: var(--maxw); margin: 0 auto; }
  .hero h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; font-weight: 300; }
  .hero .lead { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.55; max-width: 30ch;
    margin: 30px 0 38px; color: rgba(249,249,246,.86); }
  .hero-rule { width: 90px; height: 2px; background: rgba(249,249,246,.5); border: 0; margin: 0 0 30px; }
  .hero-figure { position: relative; align-self: stretch; min-height: 60vh; }
  .hero-figure img { position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; filter: saturate(.96) contrast(1.02); }
  .hero-figure::after { content: ""; position: absolute; inset: 0;
    box-shadow: inset 0 0 0 1px rgba(249,249,246,.18); }
  .hero-mobile-figure { display: none; }

  /* ---- Generic section ---- */
  section.band { padding-block: var(--sec-y); position: relative; }
  .statement { max-width: 18ch; font-size: clamp(30px, 4.6vw, 56px); line-height: 1.08; font-weight: 300;
    color: var(--text-primary); }
  .statement em { font-style: normal; color: var(--brand); }
  .lede { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.7; color: var(--text-secondary); max-width: 60ch; }
  .lede + .lede { margin-top: 1.1em; }

  /* ---- Prozess ---- */
  .prozess { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(36px, 6vw, 90px); align-items: start; }
  .prozess .intro h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.06; margin-bottom: 26px; color: var(--text-primary); }
  .prozess-figure { margin-top: 32px; position: relative; aspect-ratio: 3/4; }
  .prozess-figure img { width: 100%; height: 100%; object-fit: cover; }
  .prozess-figure::after { content:""; position:absolute; inset:0; box-shadow: inset 0 0 0 1px var(--hairline); }
  .steps { display: flex; flex-direction: column; }
  .step { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 30px 0 34px;
    border-top: 1px solid var(--border-default); border-left: 3px solid var(--bordeaux-100); padding-left: 26px; }
  .step:first-child { border-top: 0; }
  .step .num { font-family: var(--font-display); font-size: clamp(34px, 4vw, 52px); font-weight: 500;
    line-height: .9; color: var(--brand); }
  .step h3 { font-size: clamp(22px, 2.2vw, 30px); color: var(--text-primary); margin-bottom: 12px; }
  .step p { margin: 0 0 8px; color: var(--text-secondary); line-height: 1.6; }
  .step p strong { color: var(--text-primary); font-weight: 600; }

  /* ---- Struktur ---- */
  .two-col { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(36px, 6vw, 96px); align-items: center; }
  .two-col h2 { font-size: clamp(30px, 4vw, 50px); color: var(--text-primary); margin-bottom: 28px; line-height: 1.05; }

  /* ---- Passt Mave ---- */
  .fit-head { max-width: 60ch; margin-bottom: clamp(40px, 6vh, 64px); }
  .fit-head h2 { font-size: clamp(30px, 4vw, 50px); color: var(--text-primary); margin-bottom: 18px; }
  .fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .fit-card { background: var(--surface-card); border: 1px solid var(--border-default); padding: clamp(28px, 3vw, 44px); }
  .fit-card.good { border-top: 3px solid var(--brand); }
  .fit-card h3 { font-size: 24px; color: var(--text-primary); margin-bottom: 22px; }
  .fit-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
  .fit-card li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--text-secondary); line-height: 1.5; }
  .fit-card li .ic { width: 19px; height: 19px; margin-top: 3px; color: var(--brand); flex: none; }
  .fit-card.less li .ic { color: var(--ink-400); }

  /* ---- Über Mave ---- */
  .about { display: grid; grid-template-columns: 1fr .82fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
  .about h2 { font-size: clamp(32px, 4vw, 52px); color: var(--text-primary); margin-bottom: 30px; }
  .about p { color: var(--text-secondary); line-height: 1.72; margin: 0 0 1.05em; max-width: 52ch; }
  .about p strong { color: var(--text-primary); }
  .sig { font-family: var(--font-script); color: var(--brand); font-size: 30px; line-height: 1; margin: 26px 0 30px; }
  .about-link { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600;
    text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
  .about-link .ar { width: 17px; height: 17px; transition: transform .25s var(--ease-out); }
  .about-link:hover .ar { transform: translateX(4px); }
  .about-figure { position: relative; aspect-ratio: 4/5; }
  .about-figure img { width: 100%; height: 100%; object-fit: cover; }
  .about-figure::after { content:""; position:absolute; inset:0; box-shadow: inset 0 0 0 1px var(--hairline); }

  /* ---- Final CTA — text colors flip when bordeaux arrives (.lit) ---- */
  .cta-band { background: transparent; position: relative;
    color: var(--text-primary); transition: color .5s var(--ease-out); }
  .cta-band .wrap { position: relative; z-index: 1; max-width: 880px; text-align: center;
    padding-block: clamp(70px, 12vh, 130px); }
  .cta-band h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 300; line-height: 1.04;
    color: var(--text-primary); transition: color .5s var(--ease-out); }
  .cta-band p { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--text-secondary);
    max-width: 56ch; margin: 26px auto 40px; transition: color .5s var(--ease-out); }
  .cta-band .eyebrow { color: var(--brand); transition: color .5s var(--ease-out); }
  .cta-band .btn-ghost-light { border-color: var(--brand); color: var(--brand);
    transition: background-color .25s var(--ease-out), color .5s var(--ease-out), border-color .5s var(--ease-out); }
  .cta-band .btn-ghost-light:hover { background: var(--brand); color: var(--offwhite); }
  .cta-band.lit { color: var(--offwhite); }
  .cta-band.lit h2 { color: var(--offwhite); }
  .cta-band.lit p { color: rgba(249,249,246,.85); }
  .cta-band.lit .eyebrow { color: var(--offwhite); }
  .cta-band.lit .btn-ghost-light { border-color: rgba(249,249,246,.55); color: var(--offwhite); }
  .cta-band.lit .btn-ghost-light:hover { background: var(--offwhite); color: var(--brand); }
  .cta-band .signet { position: absolute; left: 50%; top: 50%; width: 56vw; max-width: 600px; transform: translate(-50%, -50%);
    opacity: .07; pointer-events: none; }

  /* ---- Footer ---- */
  footer { background: var(--ink-900); color: rgba(249,249,246,.78); padding: clamp(56px,8vh,84px) 0 34px; }
  footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
  footer .brand svg { height: 34px; }
  footer .blurb { margin: 22px 0 0; max-width: 34ch; line-height: 1.6; font-size: 15px; color: rgba(249,249,246,.6); }
  footer h4 { font-family: var(--font-sans); font-size: 12px; font-weight: 600; letter-spacing: .18em;
    text-transform: uppercase; color: rgba(249,249,246,.5); margin: 0 0 18px; }
  footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
  footer a { color: rgba(249,249,246,.78); text-decoration: none; font-size: 15px; transition: color .2s; }
  footer a:hover { color: var(--offwhite); }
  .foot-bottom { display: flex; flex-wrap: wrap; gap: 12px 26px; justify-content: space-between;
    align-items: center; margin-top: clamp(44px,7vh,72px); padding-top: 24px;
    border-top: 1px solid rgba(249,249,246,.12); font-size: 13px; color: rgba(249,249,246,.5); }
  .foot-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

  /* ---- Mobile nav ---- */
  #mobnav { position: fixed; inset: 0; z-index: 49; background: var(--brand-gradient); color: var(--offwhite);
    display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 0 var(--gut);
    transform: translateY(-100%); transition: transform .45s var(--ease-out); }
  #mobnav.open { transform: none; }
  #mobnav a { color: inherit; text-decoration: none; font-family: var(--font-display); font-size: 32px; font-weight: 300;
    padding: 12px 0; border-bottom: 1px solid rgba(249,249,246,.16); }
  #mobnav .close { position: absolute; top: 22px; right: var(--gut); background: none; border: 0; color: inherit; cursor: pointer; }

  @media (max-width: 920px) {
    .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 112px; min-height: auto; align-items: start; }
    .hero h1,
    .hero .lead,
    .hero-rule,
    .hero .wp-block-button__link {
      transition: color .35s var(--ease-out), background-color .35s var(--ease-out), border-color .35s var(--ease-out);
    }
    .hero-figure { display: none; }
    .hero-mobile-figure {
      display: block;
      position: relative;
      width: 100%;
      height: clamp(220px, 34svh, 320px);
      margin: 24px 0 0;
      background: url("../../imagery/web/hero-staircase-mobile.webp") center 40% / cover no-repeat;
    }
    .hero-mobile-figure::after {
      content: "";
      position: absolute;
      inset: 0;
      box-shadow: inset 0 0 0 1px rgba(249,249,246,.18);
      pointer-events: none;
    }
    .hero .lead { margin: 24px 0 30px; }
    body.hero-on-light .hero { color: var(--text-primary); }
    body.hero-on-light .hero .lead { color: var(--text-secondary); }
    body.hero-on-light .hero-rule { background: rgba(138, 21, 56, .45); }
    body.hero-on-light .hero .btn-ghost-light .wp-block-button__link {
      border-color: var(--brand);
      color: var(--brand);
    }
    body.hero-on-light .hero .btn-ghost-light .wp-block-button__link:hover {
      background: var(--brand);
      color: var(--offwhite);
    }
    .prozess, .two-col, .about, .fit-grid, footer .cols { grid-template-columns: 1fr; }
    .about-figure { order: -1; max-width: 440px; }
    .prozess-figure { max-width: 380px; }
    nav.main { display: none; }
    .menu-btn { display: inline-flex; }
  }
  @media (max-width: 560px) {
    .hero { gap: 24px; padding-top: 104px; }
    .hero-mobile-figure { height: clamp(210px, 32svh, 300px); margin-top: 20px; }
    .step { grid-template-columns: 1fr; gap: 4px; }
    .step .num { margin-bottom: 6px; }
  }
