/* Funnel mockups, shared base (the same file in every mockup): fonts, tokens, surfaces, controls.
   Built on mockup B "Satz". Each mockup adds its own stylesheet on top. */

/* ---------- Fonts: Chivo variable, upright and italic of one family ---------- */
@font-face {
  font-family: "Chivo";
  src: url("/fonts/chivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Chivo";
  src: url("/fonts/chivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Chivo";
  src: url("/fonts/chivo-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Chivo Fallback";
  src: local("Arial");
  size-adjust: 108%;
  ascent-override: 88%;
  descent-override: 23%;
}

/* ---------- Tokens ---------- */
:root {
  /* Palette "Vollfarb", light set plus the dark set (brand brief section 3). No #000, no #fff. */
  --blau: #2238b8;
  --gelb: #ffe344;
  --koralle: #fb794a;
  --creme: #faf4dd;
  --rosa: #fab0d9;
  --nacht: #09105b;
  --tiefnacht: #07072a;
  --petrol: #004947;
  --wein: #780022;

  /* Motion tokens of B (Material 3 values; out is about 70 % of in). */
  --dur-fast: 150ms;
  --dur-fast-out: 100ms;
  --dur-moderate: 300ms;
  --dur-moderate-out: 200ms;
  --dur-slow: 500ms;
  --dur-slow-out: 350ms;
  --dur-hero: 900ms;
  --ease-move: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-exit: cubic-bezier(0.3, 0, 0.8, 0.15);

  /* Grid on an 8 px baseline: 12 columns, margin and gutter as in B. */
  --margin: clamp(32px, 4.45vw, 80px);
  --gap: 24px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 128px;
  --bar-h: 80px;
  --foot-h: 56px;

  /* Type scale 1.333 on 18 px. */
  --t-label: 0.8125rem;
  --t-small: 0.9375rem;
  --t-body: 1.125rem;
  --t-l: 1.5rem;
  --t-xl: 2rem;
  --t-title: clamp(2.25rem, 1.4rem + 2.6vw, 3.75rem);

  --font: "Chivo", "Chivo Fallback", system-ui, sans-serif;
  --round: 999px;
}

/* Surfaces: one Vollfarb colour each; text, accent and action follow the brand rules (Koralle = action). */
[data-surface="blau"] { --bg: var(--blau); --fg: var(--creme); --accent: var(--gelb); --muted: color-mix(in oklab, var(--creme) 80%, var(--blau)); --line: color-mix(in oklab, var(--creme) 34%, var(--blau)); --tint: color-mix(in oklab, var(--creme) 9%, var(--blau)); --action-bg: var(--koralle); --action-fg: var(--nacht); --action-hover: var(--gelb); --action-hover-fg: var(--nacht); --logo-ring: var(--creme); --logo-core: var(--creme); --logo-big: var(--creme); --logo-small: var(--creme); }
[data-surface="nacht"] { --bg: var(--nacht); --fg: var(--creme); --accent: var(--gelb); --muted: color-mix(in oklab, var(--creme) 76%, var(--nacht)); --line: color-mix(in oklab, var(--creme) 28%, var(--nacht)); --tint: color-mix(in oklab, var(--creme) 8%, var(--nacht)); --action-bg: var(--koralle); --action-fg: var(--nacht); --action-hover: var(--gelb); --action-hover-fg: var(--nacht); --logo-ring: var(--creme); --logo-core: var(--creme); --logo-big: var(--creme); --logo-small: var(--creme); }
[data-surface="creme"] { --bg: var(--creme); --fg: var(--nacht); --accent: var(--blau); --muted: color-mix(in oklab, var(--nacht) 76%, var(--creme)); --line: color-mix(in oklab, var(--nacht) 24%, var(--creme)); --tint: color-mix(in oklab, var(--nacht) 5%, var(--creme)); --action-bg: var(--koralle); --action-fg: var(--nacht); --action-hover: var(--nacht); --action-hover-fg: var(--creme); --logo-ring: var(--blau); --logo-core: var(--koralle); --logo-big: var(--nacht); --logo-small: var(--koralle); }
[data-surface="gelb"] { --bg: var(--gelb); --fg: var(--nacht); --accent: var(--blau); --muted: color-mix(in oklab, var(--nacht) 80%, var(--gelb)); --line: color-mix(in oklab, var(--nacht) 26%, var(--gelb)); --tint: color-mix(in oklab, var(--nacht) 6%, var(--gelb)); --action-bg: var(--koralle); --action-fg: var(--nacht); --action-hover: var(--nacht); --action-hover-fg: var(--creme); --logo-ring: var(--blau); --logo-core: var(--koralle); --logo-big: var(--nacht); --logo-small: var(--koralle); }
[data-surface="rosa"] { --bg: var(--rosa); --fg: var(--nacht); --accent: var(--blau); --muted: color-mix(in oklab, var(--nacht) 82%, var(--rosa)); --line: color-mix(in oklab, var(--nacht) 28%, var(--rosa)); --tint: color-mix(in oklab, var(--nacht) 6%, var(--rosa)); --action-bg: var(--koralle); --action-fg: var(--nacht); --action-hover: var(--nacht); --action-hover-fg: var(--creme); --logo-ring: var(--blau); --logo-core: var(--koralle); --logo-big: var(--nacht); --logo-small: var(--koralle); }
[data-surface="koralle"] { --bg: var(--koralle); --fg: var(--nacht); --accent: var(--nacht); --muted: color-mix(in oklab, var(--nacht) 86%, var(--koralle)); --line: color-mix(in oklab, var(--nacht) 32%, var(--koralle)); --tint: color-mix(in oklab, var(--nacht) 7%, var(--koralle)); --action-bg: var(--nacht); --action-fg: var(--creme); --action-hover: var(--creme); --action-hover-fg: var(--nacht); --logo-ring: var(--nacht); --logo-core: var(--nacht); --logo-big: var(--nacht); --logo-small: var(--nacht); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg, var(--creme)); }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.55;
  font-weight: 350;
  background: var(--bg);
  color: var(--fg);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset, legend { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: italic; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }
::selection { background: var(--gelb); color: var(--nacht); }

.accent { color: var(--accent); font-style: italic; }
.label { display: block; font-size: var(--t-label); line-height: 1.3; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.label__dot { display: inline-block; width: 10px; height: 10px; margin-right: 12px; vertical-align: 0.02em; border-radius: var(--round); background: currentColor; }
.micro { font-size: var(--t-small); line-height: 1.45; color: var(--muted); }

.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 20px; border-radius: var(--round); background: var(--gelb); color: var(--nacht); font-weight: 600; transform: translateY(-160%); transition: transform var(--dur-fast-out) var(--ease-exit); }
.skip-link:focus-visible { transform: none; outline-color: var(--nacht); transition: transform var(--dur-fast) var(--ease-enter); }

/* Text link: line under, which wipes away on hover. */
.text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-position: 0 calc(50% + 0.8em); background-repeat: no-repeat; transition: background-size var(--dur-fast-out) var(--ease-exit); }
.text-link .icon { transition: transform var(--dur-fast-out) var(--ease-exit); }
.text-link:hover { background-size: 0% 1px; background-position: 100% calc(50% + 0.8em); transition-duration: var(--dur-fast); transition-timing-function: var(--ease-enter); }
.text-link:hover .icon { transform: translateX(4px); transition: transform var(--dur-fast) var(--ease-enter); }

/* Main action: Koralle, the colour of the Orbit core. With JS a circle of the hover colour grows from the pointer. */
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 24px; border-radius: var(--round); font-size: 1rem; font-weight: 600; letter-spacing: 0.005em; white-space: nowrap; isolation: isolate; overflow: hidden; }
.button--main { background: var(--action-bg); color: var(--action-fg); transition: color var(--dur-fast-out) var(--ease-exit); }
.button--large { min-height: 64px; padding: 0 32px; font-size: 1.0625rem; }
.button__fill { position: absolute; inset: 0; z-index: -1; background: var(--action-hover); clip-path: circle(0 at 50% 50%); pointer-events: none; }
.button.is-filled { color: var(--action-hover-fg); transition: color var(--dur-fast) var(--ease-enter) 60ms; }
.button .icon { transition: transform var(--dur-fast-out) var(--ease-exit); }
.button:hover .icon { transform: translateX(4px); transition: transform var(--dur-fast) var(--ease-enter); }
@media (hover: hover) { .no-js .button--main:hover, .button--main.no-fill:hover { background: var(--action-hover); color: var(--action-hover-fg); } }
.button[aria-busy="true"] { cursor: progress; }
.button[aria-busy="true"] > span { opacity: 0.6; }

/* Quiet back control. */
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 4px; font-size: var(--t-small); font-weight: 500; color: var(--fg); }
.back .icon { transition: transform var(--dur-fast-out) var(--ease-exit); }
.back:hover .icon { transform: translateX(-4px); transition: transform var(--dur-fast) var(--ease-enter); }

/* ---------- Logo ---------- */
.orbit__ring { stroke: var(--logo-ring, var(--blau)); }
.orbit__core { fill: var(--logo-core, var(--koralle)); }
.orbit__big { fill: var(--logo-big, var(--nacht)); }
.orbit__small { fill: var(--logo-small, var(--koralle)); }
.logo-mark { width: 40px; height: 40px; flex: none; overflow: visible; }
.wordmark { display: inline-flex; gap: 0.28em; font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1; }
.wordmark__a { font-weight: 700; }
.wordmark__b { font-weight: 400; }

/* ---------- Bar: logo home, progress, quiet exit (no site navigation in a funnel) ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--bar-h); padding-inline: var(--margin); color: var(--fg); transition: color var(--dur-fast) linear; }
.bar__logo { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; justify-self: start; }
.bar__exit { justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; font-size: var(--t-small); font-weight: 450; color: var(--fg); opacity: 0.86; transition: opacity var(--dur-fast-out) var(--ease-exit); }
.bar__exit:hover { opacity: 1; transition-duration: var(--dur-fast); }
.bar__exit .icon { width: 18px; height: 18px; }
.bar__progress { display: flex; align-items: center; gap: 16px; font-size: var(--t-label); letter-spacing: 0.08em; font-weight: 500; }
.no-js .bar__progress, html[data-screen="intro"] .bar__progress, html[data-screen="ende"] .bar__progress { visibility: hidden; }
[data-step-title]:focus { outline: none; }
.nojs-note { margin-bottom: var(--space-5); padding: var(--space-2) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.nojs-note a { text-decoration: underline; text-underline-offset: 3px; }
.dots { display: flex; gap: 10px; }
.dots__dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--fg); transition: background-color var(--dur-moderate) var(--ease-move), transform var(--dur-moderate) var(--ease-move); }

/* ---------- Legal line at the bottom ---------- */
.legal { display: flex; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-3) var(--margin); font-size: var(--t-label); color: var(--muted); }
.legal a { display: inline-flex; align-items: center; min-height: 32px; color: var(--fg); }
.legal a:hover { text-decoration: underline; text-underline-offset: 3px; }
.legal .sep { margin: 0 0.6em; }

/* ---------- Fields ---------- */
.field { display: grid; gap: 6px; }
.field__label { font-size: var(--t-label); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; color: var(--fg); }
.field__opt { margin-left: 0.5em; text-transform: none; letter-spacing: 0; font-weight: 350; color: var(--muted); }
.field__input { width: 100%; min-height: 52px; padding: 10px 0; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; background: transparent; font-size: var(--t-l); font-weight: 400; line-height: 1.3; transition: border-color var(--dur-fast-out) var(--ease-exit); }
textarea.field__input { resize: vertical; min-height: 96px; font-size: var(--t-body); }
textarea[data-single] { resize: none; overflow: hidden; field-sizing: content; }
textarea.field__input[data-single] { min-height: 52px; font-size: var(--t-l); }
.field__input::placeholder { color: var(--muted); opacity: 0.72; font-weight: 300; }
.field__input:hover { border-bottom-color: var(--muted); }
.field__input:focus { outline: none; border-bottom-color: var(--fg); transition-duration: var(--dur-fast); }
.field__input:focus-visible { outline: none; border-bottom-width: 3px; border-bottom-color: var(--fg); }
.field__input[aria-invalid="true"] { border-bottom-width: 3px; border-bottom-color: var(--fg); }
.is-muted { opacity: 0.45; }

.field-error, .step-error { display: flex; align-items: flex-start; gap: 10px; font-size: var(--t-small); line-height: 1.4; font-weight: 600; color: var(--fg); }
.field-error::before, .step-error::before { content: "!"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 0.05em; border-radius: 50%; background: var(--fg); color: var(--bg); font-size: 13px; font-weight: 800; }
.field-error[hidden], .step-error[hidden], .send-error[hidden] { display: none; }
.send-error { padding: var(--space-2) 0; font-size: var(--t-small); font-weight: 500; }
.send-error a { text-decoration: underline; text-underline-offset: 3px; }

/* Consent: a real checkbox, never pre-ticked; the box is drawn, the input stays focusable. */
.consent { display: grid; gap: 8px; }
.consent__label { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; cursor: pointer; font-size: var(--t-small); line-height: 1.5; color: var(--muted); }
.consent__label input { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: 0; opacity: 0; cursor: pointer; }
.consent__box { display: grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--fg); border-radius: 6px; color: var(--bg); transition: background-color var(--dur-fast-out) var(--ease-exit); }
.consent__box .icon { width: 18px; height: 18px; opacity: 0; transform: scale(0.6); transition: opacity var(--dur-fast-out) var(--ease-exit), transform var(--dur-fast-out) var(--ease-exit); }
.consent__label input:checked + .consent__box { background: var(--fg); transition-duration: var(--dur-fast); }
.consent__label input:checked + .consent__box .icon { opacity: 1; transform: none; transition: opacity var(--dur-fast) var(--ease-enter), transform var(--dur-fast) var(--ease-enter); }
.consent__label input:focus-visible + .consent__box { outline: 2px solid var(--fg); outline-offset: 3px; }
.consent__text a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.consent__label input[aria-invalid="true"] + .consent__box { border-width: 3px; }

/* ---------- Live check of the address (honest: only https answer) ---------- */
.probe { display: none; gap: 4px; font-size: var(--t-small); line-height: 1.45; }
.probe:not([data-state="idle"]) { display: grid; }
.probe__line { display: none; align-items: flex-start; gap: 10px; font-weight: 420; max-width: 62ch; }
.probe__line .icon { width: 20px; height: 20px; margin-top: 0.05em; }
.probe[data-state="waiting"] [data-probe-when~="waiting"], .probe[data-state="running"] [data-probe-when~="running"], .probe[data-state="ok"] [data-probe-when~="ok"], .probe[data-state="none"] [data-probe-when~="none"], .probe[data-state="invalid"] [data-probe-when~="invalid"] { display: flex; }
.probe__dot { flex: none; width: 10px; height: 10px; margin: 0.42em 5px 0; border-radius: 50%; background: currentColor; }
.probe__dot--open { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.probe[data-state="running"] .probe__dot { animation: probe-wait 1.2s var(--ease-move) infinite alternate; }
@keyframes probe-wait { from { opacity: 1; } to { opacity: 0.25; } }
.probe__note { color: var(--muted); font-size: var(--t-label); }
.probe[data-state="invalid"] .probe__note, .probe[data-state="waiting"] .probe__note { display: none; }

/* Example data marker (?schritt=), example data must be marked as such. */
.example-badge { position: fixed; right: var(--margin); top: calc(var(--bar-h) + 4px); z-index: 9998; padding: 6px 12px; border-radius: var(--round); background: var(--creme); color: var(--nacht); border: 1px solid var(--nacht); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* Style previews (demo, step "Stil"). */
.style-svg { width: 100%; height: auto; font-family: var(--font); }

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  :root { --margin: 16px; --bar-h: 64px; --t-title: 2rem; }
  .wordmark { font-size: 1.0625rem; }
  .logo-mark { width: 34px; height: 34px; }
  .bar__exit-text, .bar__logo .wordmark { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .legal { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); }
}

/* ---------- Reduced motion: no travel; colour and state changes stay ---------- */
@media (prefers-reduced-motion: reduce) {
  .probe[data-state="running"] .probe__dot { animation: none; opacity: 0.6; }
  .button .icon, .text-link .icon, .back .icon { transition: none; }
}
