/* ==========================================================================
   StenVal Consult — Stylesheet
   Eine Schrift (Josefin Sans, selbst gehostet), helle Apple-Anmutung.
   Geometrie des Lockups ist 1:1 aus stenval-consult-lockup.svg abgeleitet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · Schrift (selbst gehostet, variabel, woff2)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Josefin Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/josefin-sans-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Josefin Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/josefin-sans-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Josefin Sans";
  font-style: italic;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/josefin-sans-var-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Josefin Sans";
  font-style: italic;
  font-weight: 100 700;
  font-display: swap;
  src: url("../fonts/josefin-sans-var-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2 · Tokens
   -------------------------------------------------------------------------- */
:root {
  --font: "Josefin Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  /* Marke */
  --val: #002fa6;      /* Yves-Klein-Blau — Akzent, Buttons, Links */
  --sten: #1c3f74;     /* Tiefes Navy — Überschriften */
  --consult: #8394a8;  /* Graublau — gedämpft, Trenner */

  /* Flächen & Text */
  --paper: #ffffff;
  --mist: #f5f5f7;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --hair: rgba(28, 63, 116, 0.12);
  --hair-strong: rgba(28, 63, 116, 0.2);
  --error: #b3261e;

  /* Rhythmus */
  --pad-x: clamp(20px, 5vw, 56px);

  /* Sichere Bereiche (Notch, Dynamic Island, Home-Indikator).
     Nur mit viewport-fit=cover ungleich null – am Desktop immer 0. */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --measure: 46rem;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);

  /* Lockup-Geometrie (abgeleitet aus stenval-consult-lockup.svg) --------------
     Bezugsgröße F = font-size der Wortmarke „stenVal".
       Zeichen-Box   : links  2.2604F · oben 0 · 4.3313F × 2.5875F
       Grundlinie sten: 1.5271F unter Container-Oberkante
       Gesamt        : 6.5917F × 2.5875F
     Die Wortmarke liegt als Pfad-SVG mit viewBox "46 82 162 73" vor; alle
     folgenden Werte sind daraus exakt abgeleitet (erzeugt aus Josefin Sans
     Regular, siehe DEPLOY.md · „Wortmarke als Pfade").                       */
  --wm-base: 0.7917em;   /* Oberkante .wm -> Grundlinie „sten"                */
  --wm-w: 3.375em;       /* Breite der Wortmarken-SVG                         */
  --wm-h: 1.5208em;      /* Höhe der Wortmarken-SVG                           */
  --wm-ink-cx: 1.684em;  /* optische Mitte „stenVal", ab linker .wm-Kante     */
  --sub-ink-cx: 1.2108em;/* optische Mitte „CONSULT", ab linker .wm-Kante     */
  --lock-w: 6.5917em;
  --lock-h: 2.5875em;
  --mark-x: 2.2604em;
  --mark-w: 4.3313em;
  --mark-h: 2.5875em;
  --base-y: 1.5271em;
}

/* --------------------------------------------------------------------------
   3 · Grundlagen
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* Seitengerüst: Inhalt und Fußzeile teilen sich genau eine Bildschirmhöhe,
   die Fußzeile ist damit ohne Scrollen sichtbar. */
body {
  margin: 0;
  min-height: 100vh;    /* Rückfall für iOS vor 15.4 und ältere Browser */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--val); text-decoration: none; }
@media (hover: hover) { a:hover { text-decoration: underline; text-underline-offset: 3px; } }

img, svg { max-width: 100%; }

::selection { background: rgba(0, 47, 166, 0.14); }

:focus-visible {
  outline: 2px solid var(--val);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -320%);
  z-index: 100;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 980px;
  padding: 10px 20px;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(28, 63, 116, 0.14);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   4 · Kopfzeile
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(14px + var(--safe-t)) calc(var(--pad-x) + var(--safe-r))
           14px calc(var(--pad-x) + var(--safe-l));
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease,
    border-color 0.4s ease;
}
.nav.is-solid {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--hair);
}

/* Mini-Lockup: gleiche Reihenfolge wie die Marke – erst Wortmarke, dann Zeichen */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
}
@media (hover: hover) { .nav-brand:hover { text-decoration: none; } }
/* Das vollständige Lockup als Pfad — Wortmarke, CONSULT und Zeichen in der
   Originalanordnung (viewBox 48 60 306.5 96.2 -> 3.1861 : 1). */
.nav-lockup {
  height: 38px;
  width: calc(38px * 306.5 / 96.2);
  display: block;
  flex: none;
}

/* Auf der Startseite blendet die Kopfzeile erst nach dem Morph ein */
.nav.is-deferred .nav-brand {
  opacity: 0;
  transform: translateY(-4px);
}
.nav.is-deferred.is-revealed .nav-brand {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s var(--ease);
}

/* --------------------------------------------------------------------------
   5 · Bühne / Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
  padding: calc(clamp(84px, 12vh, 116px) + var(--safe-t))
           calc(20px + var(--safe-r))
           clamp(40px, 6vh, 64px)
           calc(20px + var(--safe-l));
  background: radial-gradient(
    120% 90% at 50% 6%,
    #ffffff 0%,
    #fbfbfd 55%,
    #f3f5f8 100%
  );
  overflow: hidden;
}

/* Die Bühne zentriert Lockup und Nutzlast unabhängig von deren Breite */
.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ---- Lockup ------------------------------------------------------------- */
.lockup {
  position: relative;
  font-size: clamp(34px, 12.5vw, 84px);
  font-weight: 400;
  line-height: 1;
  margin: 0;
  width: var(--lock-w);
  height: var(--lock-h);
  flex: none;
}

/* Die Wortmarke ist Vektor, keine Schrift: sie sieht überall gleich aus,
   auch wenn Josefin Sans nicht geladen werden kann. */
.wm {
  position: absolute;
  left: 0;
  top: calc(var(--base-y) - var(--wm-base));
  width: var(--wm-w);
  height: var(--wm-h);
  margin: 0;
  font-size: 1em;   /* h1-Vorgabe (2em) zurücksetzen – sonst skaliert die em-Geometrie falsch */
  line-height: 1;
  transform-origin: 0 0;
}
/* Die Wortmarke setzt sich erst in Phase B (gestapelt) – .wm bleibt für FLIP frei */
.wm-inner {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(14px);
}
.stage.is-stacked .wm-inner {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s var(--ease);
}

/* „stenVal" und „CONSULT" liegen deckungsgleich übereinander; so lässt sich
   CONSULT für die gestapelte Form unabhängig verschieben. */
.wm-part {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.markwrap {
  position: absolute;
  left: var(--mark-x);
  top: 0;
  width: var(--mark-w);
  height: var(--mark-h);
  transform-origin: 50% 50%;
  cursor: pointer;
  border-radius: 12px;
}
.markwrap:focus-visible { outline: 2px solid var(--val); outline-offset: 8px; }
.mark { display: block; width: 100%; height: 100%; overflow: visible; }

/* Nach dem Aufbau: dezentes Schweben */
.stage.is-morphed .mark {
  animation: breathe 6.5s ease-in-out 1.4s infinite;
}
@keyframes breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Schmale Screens: Lockup gestapelt (Geometrie aus …-gestapelt.svg) */
@media (max-width: 430px) {
  .lockup {
    font-size: clamp(40px, 19vw, 76px);
    --lock-w: 3.5292em;
    --lock-h: 4.0208em;
    --mark-x: 0em;
    --mark-w: 3.5292em;
    --mark-h: 2.1083em;
    --base-y: 3.3958em;
  }
  /* Wortmarke mittig unter dem Zeichen – an der optischen Mitte ausgerichtet */
  .wm { left: calc(50% - var(--wm-ink-cx)); }
}

/* ---- Wortwolke (Flugbegriffe) ------------------------------------------- */
.words {
  position: absolute;
  inset: 0;
  perspective: 1000px;
  /* Fluchtpunkt = Mitte des Zeichens, damit die Begriffe genau dort auftreffen */
  perspective-origin: var(--cx, 50%) var(--cy, 50%);
  pointer-events: none;
  z-index: 2;
}
.word {
  position: absolute;
  left: var(--cx, 50%);
  top: var(--cy, 50%);
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translate(-50%, -50%);
  will-change: transform, opacity, filter;
}
@keyframes flyword {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%)
      translate3d(var(--fx), var(--fy), var(--fz));
    filter: blur(5px);
  }
  10% { opacity: 1; }
  24% { filter: blur(0); }
  /* Lesefenster: groß, scharf, nur langsames Driften */
  52% {
    opacity: 1;
    transform: translate(-50%, -50%)
      translate3d(calc(var(--fx) * 0.38), calc(var(--fy) * 0.38),
        calc(var(--fz) * 0.8));
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translate3d(0, 0, -46px);
    filter: blur(3px);
  }
}

/* ---- Nutzlast unter dem Lockup ------------------------------------------ */
.hero-payload {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
/* Flex-Kinder sind sonst „shrink to fit" und laufen auf schmalen Screens über */
.hero-payload > * { max-width: 100%; }

.services {
  margin-top: clamp(28px, 5.5vh, 58px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}
.services li {
  position: relative;
  padding: 2px clamp(12px, 2.2vw, 24px);
  font-size: clamp(14px, 1.7vw, 19px);
  letter-spacing: 0.05em;
  color: var(--sten);
  opacity: 0;
  transform: translateY(12px);
}
.services li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 15px;
  background: var(--hair-strong);
  transform: translateY(-50%);
}
.stage.is-payload .services li {
  animation: rise 0.7s var(--ease) both;
}

.comingsoon {
  margin: clamp(24px, 4.8vh, 48px) 0 0;
  font-size: clamp(21px, 2.8vw, 32px);
  font-weight: 400;
  letter-spacing: 0.015em;
  color: var(--val);
  opacity: 0;
  transform: translateY(12px);
}
.stage.is-coming .comingsoon { animation: rise 0.85s var(--ease) both; }

.actions {
  margin-top: clamp(20px, 3.4vh, 34px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.actions--start { justify-content: flex-start; }
.hero .actions .btn { opacity: 0; transform: translateY(10px); }
.stage.is-acts .actions .btn { animation: rise 0.6s var(--ease) both; }
.stage.is-acts .actions .btn:nth-child(2) { animation-delay: 0.09s; }
.stage.is-acts .actions .btn:nth-child(3) { animation-delay: 0.18s; }
.stage.is-acts .actions .btn:nth-child(4) { animation-delay: 0.27s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   6 · Schaltflächen
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 980px;
  background: var(--val);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) { .btn:hover { filter: brightness(1.1); text-decoration: none; } }
.btn:active { transform: scale(0.975); }
.btn[disabled] { opacity: 0.55; cursor: default; filter: none; }

.btn--ghost {
  background: transparent;
  color: var(--sten);
  border-color: var(--hair-strong);
}
@media (hover: hover) {
  .btn--ghost:hover {
    color: var(--val);
    border-color: var(--val);
    filter: none;
    background: rgba(0, 47, 166, 0.03);
  }
}

/* --------------------------------------------------------------------------
   7 · Inhaltsseiten
   -------------------------------------------------------------------------- */
.page {
  flex: 1 0 auto;
  width: 100%;
  padding: calc(clamp(110px, 15vh, 150px) + var(--safe-t))
           calc(var(--pad-x) + var(--safe-r))
           clamp(56px, 8vh, 88px)
           calc(var(--pad-x) + var(--safe-l));
  max-width: calc(var(--measure) + 2 * 56px + var(--safe-l) + var(--safe-r));
  margin: 0 auto;
}
.page-head { margin-bottom: clamp(32px, 5vh, 52px); }
.page-eyebrow {
  font-size: 13px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--consult);
  margin: 0 0 10px;
}
.page h1 {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 52px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: var(--sten);
}
.page-lead {
  margin: 14px 0 0;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--ink-soft);
  max-width: 38rem;
}

.prose { max-width: var(--measure); }
.prose h2 {
  margin: clamp(34px, 5vh, 48px) 0 10px;
  font-size: clamp(21px, 2.6vw, 25px);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--sten);
}
.prose h3 {
  margin: 26px 0 6px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.prose p, .prose li { color: #3a3a3c; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose hr {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: clamp(34px, 5vh, 48px) 0;
}
.prose address { font-style: normal; }

.note {
  margin: 28px 0 0;
  padding: 16px 20px;
  border-left: 2px solid var(--hair-strong);
  background: var(--mist);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  color: var(--ink-soft);
}
.todo { color: var(--consult); font-style: italic; }

/* --------------------------------------------------------------------------
   8 · Kontaktformular
   -------------------------------------------------------------------------- */
.form { max-width: 34rem; }
.field { margin-top: 20px; }
.field > label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--sten);
}
.field .opt { color: var(--consult); font-weight: 400; letter-spacing: 0.02em; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--hair-strong);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 132px; }
@media (hover: hover) { .field input:hover, .field textarea:hover { border-color: var(--consult); } }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--val);
  box-shadow: 0 0 0 3px rgba(0, 47, 166, 0.14);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field .err {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--error);
  min-height: 0;
}
.field .err:empty { display: none; }

/* Honeypot – visuell entfernt, für Bots erreichbar */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Hinweis statt Einwilligungshäkchen: Rechtsgrundlage ist Art. 6 Abs. 1
   lit. b bzw. f DSGVO, nicht die Einwilligung. Eine erzwungene Einwilligung
   wäre nach Art. 7 Abs. 4 DSGVO nicht freiwillig. */
.formhinweis {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.consent input { margin: 4px 0 0; flex: none; width: 17px; height: 17px; accent-color: var(--val); }

.form-actions { margin-top: 26px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.formnote { margin: 0; font-size: 15px; }
.formnote.is-err { color: var(--error); }
.formnote.is-ok { color: var(--sten); font-weight: 500; }

/* --------------------------------------------------------------------------
   8b · Overlay („Sheet") — Kontakt und Rechtstexte ohne Seitenwechsel
   Die Buttons bleiben echte Links auf echte Unterseiten; das Overlay ist
   die Verbesserung obendrauf. Ohne JavaScript öffnet ganz normal die Seite.
   -------------------------------------------------------------------------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(clamp(12px, 3vw, 32px) + var(--safe-t))
           calc(clamp(12px, 3vw, 32px) + var(--safe-r))
           calc(clamp(12px, 3vw, 32px) + var(--safe-b))
           calc(clamp(12px, 3vw, 32px) + var(--safe-l));
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.modal.is-open .modal-backdrop { opacity: 1; }

.sheet {
  position: relative;
  width: min(680px, 100%);
  max-height: min(86svh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(28, 63, 116, 0.26);
  padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 44px) clamp(28px, 4vw, 40px);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.28s ease, transform 0.32s var(--ease);
}
.modal.is-open .sheet { opacity: 1; transform: none; }

.sheet-close {
  position: absolute;
  top: clamp(16px, 2.4vw, 24px);
  right: clamp(16px, 2.4vw, 24px);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
@media (hover: hover) { .sheet-close:hover { background: #ebebef; color: var(--val); } }

/* Der eingesetzte Seiteninhalt braucht im Sheet weniger Luft nach oben */
/* Der eingesetzte Inhalt kommt ohne den .page-Wrapper – h1 hier selbst setzen */
.sheet .page-head { margin-bottom: clamp(22px, 3vh, 30px); padding-right: 44px; }
.sheet h1 {
  margin: 0;
  font-size: clamp(29px, 4vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.005em;
  color: var(--sten);
}
.sheet .page-lead { margin: 12px 0 0; }
.sheet .prose h2:first-of-type { margin-top: 0; }
.sheet .form { max-width: none; }
.sheet .note { margin-bottom: 0; }

/* Bei offenem Overlay wird die Seite festgesetzt (overlay.js merkt sich die
   Scrollhöhe und stellt sie beim Schließen wieder her). Nur so bleibt auch
   auf iOS der Hintergrund stehen. */
body.is-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   9 · Fußzeile
   -------------------------------------------------------------------------- */
.foot {
  flex: none;
  background: var(--mist);
  border-top: 1px solid var(--hair);
  padding: clamp(20px, 2.6vh, 30px) calc(var(--pad-x) + var(--safe-r))
           calc(clamp(20px, 2.6vh, 30px) + var(--safe-b)) calc(var(--pad-x) + var(--safe-l));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  flex-wrap: wrap;
}
.foot small { font-size: 14px; letter-spacing: 0.02em; color: var(--ink-soft); }
.foot nav { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.foot nav a {
  font-size: 14px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
@media (hover: hover) { .foot nav a:hover { color: var(--sten); text-decoration: none; } }

/* --------------------------------------------------------------------------
   10 · Responsiv
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .foot { justify-content: center; text-align: center; gap: 10px 22px; }
  .foot nav { justify-content: center; gap: 8px 20px; }
  .foot small, .foot nav a { font-size: 13px; }
  .actions .btn { font-size: 15px; padding: 12px 20px; }
  .nav-lockup { height: 30px; width: calc(30px * 306.5 / 96.2); }
}

/* --------------------------------------------------------------------------
   10b · Touch-Geräte
   Greift nur bei grobem Zeigegerät (Finger). Mauszeiger erfüllt
   `pointer: coarse` nie – die Desktop-Darstellung bleibt unberührt.
   Ziel: Apples Empfehlung von 44 × 44 px für Tippflächen.
   -------------------------------------------------------------------------- */
@media (pointer: coarse) {
  /* Fußzeilen-Links: 21 px hoch -> 44 px Tippfläche, Optik unverändert */
  .foot nav { gap: 4px 18px; }
  .foot nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;      /* kurze Wörter wie „Start" sonst zu schmal */
    padding: 0 4px;
  }

  /* Hero-Buttons: 41 px -> 46 px */
  .actions .btn { min-height: 46px; }

  /* Mini-Lockup in der Kopfzeile: 30 px hoch -> 44 px Tippfläche */
  .nav-brand { min-height: 44px; padding: 3px 0; }

  /* Einwilligungs-Kästchen: 17 px sind mit dem Finger nicht zu treffen */
  .consent { align-items: center; }
  .consent input { width: 26px; height: 26px; margin: 0; }

  /* Schließkreuz im Overlay */
  .sheet-close { width: 44px; height: 44px; }

  /* Textlinks im Fließtext bekommen etwas mehr Luft in der Zeile */
  .prose a, .note a, .page-lead a { padding: 3px 0; }
}

/* --------------------------------------------------------------------------
   10c · Kleine Telefone im Hochformat
   Verdichtet die Startseite so weit, dass die Fußzeile ohne Scrollen
   sichtbar bleibt. Breite und Höhe zusammen ausgewertet, damit ein
   Laptop-Fenster die Regel nicht auslösen kann.
   -------------------------------------------------------------------------- */
@media (max-width: 500px) and (pointer: coarse) and (orientation: portrait) {
  .hero {
    padding-top: calc(clamp(70px, 10vh, 92px) + var(--safe-t));
    padding-bottom: clamp(18px, 2.5vh, 30px);
  }
  .lockup { font-size: clamp(34px, 15.5vw, 62px); }
  .services { margin-top: clamp(18px, 3.4vh, 34px); }
  .services li { font-size: 15px; padding: 2px 10px; }
  .comingsoon { margin: clamp(16px, 3vh, 30px) 0 0; font-size: clamp(19px, 5.6vw, 26px); }
  .actions { margin-top: clamp(14px, 2.4vh, 24px); gap: 9px; }
  .actions .btn { font-size: 14.5px; padding: 11px 17px; }
  .foot { padding-top: 14px; padding-bottom: calc(14px + var(--safe-b)); }
  .foot small, .foot nav a { font-size: 12.5px; }
}

/* Sehr kurze Telefone (iPhone SE): noch einmal enger, sonst passt es nicht */
@media (max-width: 500px) and (max-height: 700px) and (orientation: portrait) {
  .hero {
    padding-top: calc(clamp(62px, 9vh, 78px) + var(--safe-t));
    padding-bottom: 12px;
  }
  .lockup { font-size: clamp(30px, 12.4vw, 48px); }
  .services { margin-top: 14px; }
  .services li { font-size: 14px; }
  .comingsoon { margin-top: 13px; font-size: 19px; }
  .actions { margin-top: 12px; }
  .foot { padding-top: 10px; padding-bottom: calc(10px + var(--safe-b)); }
}

/* --------------------------------------------------------------------------
   10d · Querformat auf Telefonen
   Sehr flaches Fenster: Lockup an der Höhe ausrichten statt an der Breite.
   -------------------------------------------------------------------------- */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding-top: calc(clamp(56px, 14vh, 74px) + var(--safe-t));
    padding-bottom: 10px;
  }
  .lockup { font-size: clamp(26px, 7.6vh, 50px); }
  .services { margin-top: 12px; }
  .services li { font-size: 14px; padding: 2px 12px; }
  .comingsoon { margin-top: 11px; font-size: clamp(17px, 4.6vh, 24px); }
  .actions { margin-top: 11px; gap: 9px; }
  .actions .btn { font-size: 14.5px; padding: 10px 17px; min-height: 44px; }
  .foot { padding-top: 10px; padding-bottom: calc(10px + var(--safe-b)); }
  .foot small, .foot nav a { font-size: 12.5px; }
  .foot nav a { min-height: 36px; }
  .sheet { max-height: calc(100svh - 20px); }
}

/* --------------------------------------------------------------------------
   11 · Reduzierte Bewegung — Endzustand sofort, ohne Animation
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .words { display: none !important; }
  .wm-inner,
  .services li,
  .comingsoon,
  .actions .btn,
  .nav.is-deferred .nav-brand,
  .nav.is-deferred .nav-links {
    opacity: 1 !important;
    transform: none !important;
  }
  .stage.is-morphed .mark { animation: none !important; }
  .markwrap { cursor: default; }
  .modal-backdrop, .sheet { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   12 · Druck
   -------------------------------------------------------------------------- */
@media print {
  .nav, .actions, .words { display: none !important; }
  body { background: #fff; }
  .hero { min-height: auto; background: none; }
}
