/* =========================================================
   VCA26 Starter · styles.css
   0. Schriften
   1. TOKENS  ← am Sprinttag nur hier Marke einsetzen
   2. Scaling System (Osmo, unverändert)
   3. Typo-Skala (Rollen)
   4. Reset
   5. Layout
   6. Typografie
   7. Komponenten
   8. Sektionen
   9. Osmo-Anpassungen (Farben, Schriften der Osmo-Komponenten auf unsere Tokens)
  10. Motion und reduzierte Bewegung
   Osmo-CSS wird in site/index.html VOR dieser Datei geladen, damit unsere Regeln gewinnen.
   ========================================================= */

/* ---------- 0. SCHRIFTEN ----------
   Alle @font-face stehen in schriften.css (wird in index.html vor dieser Datei geladen).
   Dateien in site/assets/fonts/, Eigenschaften und die 15 getesteten Paare in site/assets/fonts/README.md.
   Ein Paar aktivieren: die fünf Zeilen aus README Abschnitt 4 unten bei "Schrift" einsetzen,
   in site/index.html den preload für die Display-Datei einkommentieren. Sonst nichts. */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Farbe: Hintergrund, Fläche, Text, Gedämpft, Linie, Akzent */
  --c-bg: #f4efe4;
  --c-surface: #eae3d4;
  --c-text: #211f1b;
  --c-muted: #5c564a;     /* Kontrast auf --c-bg mindestens 4.5:1 prüfen */
  --c-line: #cdc4b2;
  --c-accent: #1e4f56;    /* Buttons, Links, Fokus */
  --c-on-accent: #f4efe4; /* Text auf Akzent */
  --c-error: #b3261e;
  --c-success: #2f6b3a;

  /* Schrift */
  --f-display: "Instrument Serif", Georgia, serif;            /* Paar 01 Ruhig, siehe assets/fonts/README.md */
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --w-display: 400;          /* Gewicht der Display-Schrift */
  --tracking-display: -0.02em;

  /* Skala: Faktor auf dem Handy fest 1,2. Desktop je Richtung:
     1.2 kompakt · 1.25 ausgewogen · 1.333 editorial (Ruhig) · 1.5 dramatisch (Laut) */
  --r-desktop: 1.333;

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-body: 1.6;

  /* Form */
  /* Form (aus marke/marke.html, Block formen): Radius, Linien, Abstandsfaktor, Button-Form */
  --radius: 2px;          /* Buttons, Felder, Fokus */
  --radius-card: 2px;     /* Karten, Accordion, Tabellen */
  --radius-img: 0px;      /* Bilder */
  --radius-btn: var(--radius); /* Buttons: eckig = var(--radius), rund = 10px, pill = 999px */
  --radius-pill: 999px;
  --line-w: 1px;          /* Trenner, Rahmen */
  --space: 1;             /* Faktor auf alle Abstände, 0.85 eng, 1 normal, 1.15 weit */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-osmo: cubic-bezier(0.625, 0.05, 0, 1);
  --dur-fast: 180ms;
  --dur: 420ms;
}

/* ---------- 2. Scaling System by Osmo (unverändert) ---------- */
/* ------------------------- Scaling System by Osmo [https://osmo.supply/] -------------------------  */

/* Desktop */
:root {
  --size-unit: 16; /* body font-size in design - no px */
  --size-container-ideal: 1440; /* screen-size in design - no px */
  --size-container-min: 992px;
  --size-container-max: 1920px;
  --size-container: clamp(var(--size-container-min), 100vw, var(--size-container-max));
  --size-font: calc(var(--size-container) / (var(--size-container-ideal) / var(--size-unit)));
}

/* Tablet */
@media screen and (max-width: 991px) {
  :root {
    --size-container-ideal: 834; /* screen-size in design - no px */
    --size-container-min: 768px;
    --size-container-max: 991px;
  }
}

/* Mobile Landscape */
@media screen and (max-width: 767px) {
  :root {
    --size-container-ideal: 550; /* screen-size in design - no px */
    --size-container-min: 480px;
    --size-container-max: 767px;
  }
}

/* Mobile Portrait */
@media screen and (max-width: 479px) {
  :root {
    --size-container-ideal: 390; /* screen-size in design - no px */
    --size-container-min: 320px;
    --size-container-max: 479px;
  }
}

/* ---------- 3. Typo-Skala (Rollen) ----------
   Alles hängt an --size-font aus dem Scaling System: 16 px im Entwurf (1440 / 390 breit),
   wächst und schrumpft mit dem Fenster, stoppt bei 1920 px.
   Stufen = Grundgröße mal Faktor hoch n. Kleine Stufen nie unter 12 px, Fließtext nie unter 15 px. */
:root {
  --r: 1.2;
  --t-0:  max(0.9375rem, var(--size-font));
  --t-1:  calc(var(--size-font) * var(--r));
  --t-2:  calc(var(--t-1) * var(--r));
  --t-3:  calc(var(--t-2) * var(--r));
  --t-4:  calc(var(--t-3) * var(--r));
  --t-5:  calc(var(--t-4) * var(--r));
  --t-6:  calc(var(--t-5) * var(--r));
  --t-n1: max(0.8125rem, calc(var(--size-font) / var(--r)));
  --t-n2: max(0.75rem, calc(var(--size-font) / var(--r) / var(--r)));

  /* Abstand in Einheiten der Grundgröße, skaliert mit */
  --u: calc(var(--size-font) / 16 * var(--space));
  --s-1: calc(var(--u) * 4);
  --s-2: calc(var(--u) * 8);
  --s-3: calc(var(--u) * 12);
  --s-4: calc(var(--u) * 16);
  --s-6: calc(var(--u) * 24);
  --s-8: calc(var(--u) * 32);
  --s-12: calc(var(--u) * 48);
  --s-16: calc(var(--u) * 64);
  --s-24: calc(var(--u) * 96);
  --s-section: calc(var(--u) * 144);

  --max: calc(var(--size-container) * 0.86);
  --gutter: calc(var(--u) * 40);
}
@media screen and (min-width: 992px) {
  :root { --r: var(--r-desktop); }
}
@media screen and (max-width: 767px) {
  :root { --s-section: calc(var(--u) * 96); --gutter: calc(var(--u) * 20); }
}

/* ---------- 4. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: var(--size-font);   /* Osmo: Grundgröße, alle Osmo-Komponenten rechnen in em */
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
img { border-radius: var(--radius-img); }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; border-radius: var(--radius); }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px;
  background: var(--c-accent); color: var(--c-on-accent);
  padding: var(--s-2) var(--s-4); z-index: 100; border-radius: var(--radius);
}
.skip-link:focus { top: var(--s-4); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 5. Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media screen and (max-width: 991px) { .container { max-width: none; } }
.section { padding-block: var(--s-section); }
.section + .section { border-top: var(--line-w) solid var(--c-line); }
.grid { display: grid; gap: var(--s-8); }
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-12 { grid-template-columns: repeat(12, 1fr); }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
  .span-8 { grid-column: span 8; }
  .span-9 { grid-column: span 9; }
}
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-8); }

/* ---------- 6. Typografie ---------- */
h1, h2, .display {
  font-family: var(--f-display);
  font-weight: var(--w-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--lh-tight);
  text-wrap: balance;
  padding-bottom: 0.06em; /* Unterlängen nicht abschneiden */
  overflow-wrap: break-word; /* lange deutsche Wörter auf dem Handy */
  hyphens: auto;
}
h1 { font-size: var(--t-5); /* text-transform: uppercase; */ /* nur bei Versalien-Paaren (Handfest, Laut, Bühne), siehe assets/fonts/README.md */ }
h2 { font-size: var(--t-3); line-height: 1.12; }
h3 { font-family: var(--f-body); font-weight: 600; font-size: var(--t-1); line-height: 1.3; text-wrap: balance; }
p { max-width: 62ch; text-wrap: pretty; font-size: var(--t-0); }
.lead { font-size: var(--t-1); line-height: 1.45; color: var(--c-text); max-width: 44ch; }
.small { font-size: var(--t-n1); }
.muted { color: var(--c-muted); }
.eyebrow {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: var(--t-n2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  display: inline-flex; gap: var(--s-3); align-items: center;
}
.eyebrow .num { color: var(--c-accent); font-variant-numeric: tabular-nums; }

/* Rolle „Riesig“: feste Startgröße, Osmo Fit Text zieht auf volle Breite */
.fit-box { display: block; width: 100%; min-width: 0; }
.r-giant {
  font-family: var(--f-display);
  font-weight: var(--w-display);
  font-size: clamp(3.5rem, 12vw, 15rem);
  line-height: 0.92;
  padding-block: 0.04em 0.14em;
  letter-spacing: -0.03em;
}

/* ---------- 7. Komponenten ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: 48px; padding: var(--s-3) var(--s-6);
  border-radius: var(--radius-btn);
  border: var(--line-w) solid var(--c-accent);
  background: var(--c-accent); color: var(--c-on-accent);
  text-decoration: none; font-size: var(--t-0); font-weight: 600; letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform var(--dur-fast) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--c-text); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-text); }

.card {
  padding: var(--s-8);
  background: var(--c-surface);
  border-radius: var(--radius-card);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.card .num { font-size: var(--t-n2); font-weight: 600; letter-spacing: 0.08em; color: var(--c-muted); }

.media {
  aspect-ratio: 4 / 5;
  background: var(--c-surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 16 / 9; }

/* ---------- 8. Sektionen ---------- */
/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--c-bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: var(--line-w) solid var(--c-line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: calc(var(--u) * 68); gap: var(--s-6); }
.logo { font-family: var(--f-display); font-weight: var(--w-display); font-size: var(--t-2); text-decoration: none; letter-spacing: var(--tracking-display); }
.site-header .btn { min-height: 40px; padding: var(--s-2) var(--s-4); font-size: var(--t-n1); }
.nav { display: none; gap: var(--s-8); font-size: var(--t-n1); }
.nav a { color: var(--c-muted); transition: color var(--dur-fast); }
.nav a:hover { color: var(--c-text); }
@media (min-width: 768px) { .nav { display: flex; } }

/* Hero */
.hero { padding-block: calc(var(--u) * 160) var(--s-section); position: relative; overflow: hidden; }
.hero__inner { display: grid; gap: var(--s-12); }
.hero__title { max-width: 14ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero__visual { position: absolute; inset: 0; z-index: -1; pointer-events: none; } /* Unicorn Studio oder Bild hier */
@media (min-width: 1024px) { .hero__inner { grid-template-columns: 1.4fr 1fr; align-items: end; } }

/* Problem / Statement */
.statement { overflow-wrap: break-word; hyphens: manual; font-family: var(--f-display); font-weight: var(--w-display); font-size: var(--t-3); line-height: 1.15; letter-spacing: var(--tracking-display); max-width: 24ch; }

/* Section head */
.section-head { display: grid; gap: var(--s-6); margin-bottom: var(--s-12); }
@media (min-width: 1024px) { .section-head { grid-template-columns: 1fr 1fr; align-items: end; } }

/* Steps / Ablauf */
.steps { list-style: none; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 4em 1fr; gap: var(--s-6); padding-block: var(--s-6); border-top: 1px solid var(--c-line); counter-increment: step; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--f-display); font-size: var(--t-2); line-height: 1; color: var(--c-accent); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .steps li { grid-template-columns: 6em 1fr 1fr; } }

/* Proof / Zahlen */
.facts { display: grid; gap: var(--s-8); grid-template-columns: repeat(2, 1fr); }
.facts > div { min-width: 0; }
.facts dt, .facts dd { overflow-wrap: anywhere; }
.facts dt { font-size: var(--t-n1); color: var(--c-muted); }
.facts dd { font-family: var(--f-display); font-weight: var(--w-display); font-size: var(--t-4); line-height: 1; margin-top: var(--s-2); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .facts { grid-template-columns: repeat(4, 1fr); } }

/* Preis: eine Rechnung in Zeilen (Keyword zeilenklar) */
.preis { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.preis th, .preis td { text-align: left; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: var(--line-w) solid var(--c-line); vertical-align: baseline; }
.preis th { font-size: var(--t-n2); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
.preis td { font-size: var(--t-0); }
.preis td:first-child, .preis td:last-child { font-family: var(--f-mono); white-space: nowrap; }
.preis td:last-child, .preis th:last-child { text-align: right; padding-right: 0; color: var(--c-accent); }
.preis tbody tr:first-child td { border-top: var(--line-w) solid var(--c-line); }
@media (max-width: 480px) { .preis td.muted { font-size: var(--t-n1); } }

/* CTA */
.cta { background: var(--c-accent); color: var(--c-on-accent); }
.cta .muted, .cta .eyebrow { color: color-mix(in srgb, var(--c-on-accent) 72%, transparent); }
.cta .eyebrow .num { color: var(--c-on-accent); }
.cta h2 { max-width: 16ch; }

/* Footer */
.site-footer { padding-block: var(--s-12); font-size: var(--t-n1); color: var(--c-muted); }
.site-footer a { color: inherit; }
.form-privacy { margin-top: var(--s-3); max-width: 60ch; }
.form-consent { display: flex; gap: var(--s-2); align-items: flex-start; margin-top: var(--s-3); }
.form-consent input { width: 1.1em; height: 1.1em; margin-top: .2em; accent-color: var(--c-accent); flex: none; }
.form-consent a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Stimmen (optional) */
.quotes { display: grid; gap: var(--s-6); }
.quote { margin: 0; padding-left: var(--s-4); border-left: var(--line-w) solid var(--c-accent); }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: var(--t-1); line-height: 1.4; max-width: 44ch; text-wrap: pretty; }
.quote figcaption { margin-top: var(--s-2); font-size: var(--t-n1); font-weight: 600; }
.form-privacy a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Rechtsseiten: impressum.html, datenschutz.html */
.legal .container { max-width: 72ch; }
.legal h2 { font-size: var(--t-1); font-family: var(--f-body); font-weight: 600; text-transform: none; letter-spacing: 0; margin-top: var(--s-4); }
.legal p { max-width: 70ch; }
.legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); }
.site-footer p { font-size: inherit; }
/* Ruhland-Logo: Datei unverändert. Das SVG hat 25/120 Luft oben und unten, sichtbar bleiben mindestens 24 px */
.absender { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); max-width: none; }
.absender img { flex: none; height: max(44px, calc(var(--u) * 44)); width: auto; }
.site-footer .absender { flex-basis: 100%; }

/* ---------- 9. Osmo-Anpassungen ----------
   Osmo-Code bleibt unverändert. Hier nur Farben, Schriften und Breiten auf unsere Tokens. */

/* Accordion (FAQ): Toggle ist bei uns ein <button>, damit es mit der Tastatur geht */
.accordion-css { max-width: none; }
.accordion-css__item { background-color: var(--c-surface); border-radius: var(--radius-card); }
.accordion-css__item-top { width: 100%; border: 0; background: none; color: inherit; text-align: left; font: inherit; }
.accordion-css__item-h3 { font-family: var(--f-body); font-size: var(--t-1); font-weight: 600; }
.accordion-css__item-icon { background-color: var(--c-bg); color: var(--c-accent); }
.accordion-css__item-p { color: var(--c-muted); font-size: var(--t-0); line-height: var(--lh-body); }

/* Live Form Validation, auf dunkler CTA-Fläche */
.form-group { width: 100%; max-width: 32em; }
.form-label { color: inherit; font-size: var(--t-n1); }
.form-required { color: inherit; opacity: 0.7; }
.form-input { width: 100%; display: block; color: var(--c-text); background-color: var(--c-bg); border-color: var(--c-bg); border-radius: var(--radius); font-size: var(--t-0); }
.form-input::placeholder { color: var(--c-muted); background-color: transparent; }
.form-input:focus { border-color: var(--c-text); }
.form-field-icon { color: var(--c-success); }
.form-field-icon.is--error { color: var(--c-error); }
[data-validate].is--error input,
[data-validate].is--error textarea { border-color: var(--c-error); }
.form-submit-btn { justify-content: center; color: var(--c-accent); background-color: var(--c-on-accent); border-color: var(--c-on-accent); border-radius: var(--radius-pill); }
.form-submit-btn:focus-visible { outline: 2px solid var(--c-on-accent); outline-offset: 3px; }
.form-submit-btn-p { font-size: var(--t-0); font-weight: 600; }
.form-divider { background-color: currentColor; }

/* Underline Link: Textlinks ohne Standard-Unterstrich */
[data-underline-link] { text-decoration: none; }

/* ---------- 10. Motion und reduzierte Bewegung ---------- */
/* Lenis Smooth Scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Zentraler Schalter: Wer in den Bedienungshilfen „Bewegung reduzieren“ an hat,
   bekommt keine Übergänge und CSS-Animationen. main.js spult zusätzlich alle GSAP-Animationen ans Ende. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
