/* ==========================================================================
   Designsprache Portfolio 2026 · Basis v0.1
   Schrift, Reset, Typo-Rollen, Slide-Raster, Sections, Bewegung.
   ========================================================================== */

/* --- Schrift: Google Sans Flex, selbst gehostet (DSGVO), variabel 400–500,
       Achsen opsz 6–144 + wght. Optische Größe wählt der Browser. --------- */
@font-face {
  font-family: "Google Sans Flex";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/google-sans-flex-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: "Google Sans Flex";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/google-sans-flex-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;
}

/* --- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { letter-spacing: 0; text-transform: none; }   /* Regel 3 + 5 */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-weight: var(--w-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  background: var(--surface);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
}
h1, h2, h3, h4, h5, h6, p, dl, dt, dd, figure, blockquote { font: inherit; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }           /* Regel 4: keine Linien */
button, input, textarea, select { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; }
address { font-style: normal; }
::selection { background: var(--on-surface); color: var(--surface); }

/* Fokus: der einzige erlaubte Rahmen (Barrierefreiheit). */
:focus-visible { outline: 2px solid var(--on-surface); outline-offset: 4px; }
:focus:not(:focus-visible) { outline: none; }

/* --- Typo-Rollen (Styleguide 3) ----------------------------------------
   Max. drei Größen pro Section, davon eine dominant. Umbrüche in Headlines
   stehen explizit als <br> im Markup. ---------------------------------- */
.display   { font-size: var(--fs-display);   line-height: var(--lh-display);   font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.h1        { font-size: var(--fs-h1);        line-height: var(--lh-h1);        font-weight: var(--w-medium); }
.h2        { font-size: var(--fs-h2);        line-height: var(--lh-h2);        font-weight: var(--w-medium); }
.num       { font-size: var(--fs-num);       line-height: var(--lh-num);       font-weight: var(--w-medium); font-variant-numeric: tabular-nums; }
.statement { font-size: var(--fs-statement); line-height: var(--lh-statement); font-weight: var(--w-regular); }
.interline { font-size: var(--fs-interline); line-height: var(--lh-interline); font-weight: var(--w-medium); }
.label     { font-size: var(--fs-label);     line-height: var(--lh-label);     font-weight: var(--w-medium); }
.sub       { font-size: var(--fs-sub);       line-height: var(--lh-sub);       font-weight: var(--w-regular); }
.body      { font-size: var(--fs-body);      line-height: var(--lh-body);      font-weight: var(--w-regular); }
.kicker    { font-size: var(--fs-body);      line-height: var(--lh-body);      font-weight: var(--w-regular); }
.meta      { font-size: var(--fs-meta);      line-height: var(--lh-meta);      font-weight: var(--w-regular); }
.medium    { font-weight: var(--w-medium); }
.tabular   { font-variant-numeric: tabular-nums; }

/* Absatzbreite: --w in Slide-px (z. B. 562). Skaliert proportional,
   min. 60 % des Slide-Werts, max. der Slide-Wert. */
.prose { max-width: clamp(calc(var(--w, 620) * 0.6px), calc(var(--w, 620) * var(--su)), calc(var(--w, 620) * 1px)); }

/* Label 40 → Wert 24 darunter */
.label + .body, .label + .sub, .label + .prose { margin-top: var(--sp-12); }
/* Begriff 88 → Satz darunter */
.num + .body, .num + .prose { margin-top: var(--sp-52); }
/* Headline → Absatz darunter */
.h1 + .body, .h1 + .statement, .h2 + .body, .h2 + .statement { margin-top: var(--sp-70); }
/* Kicker → Headline */
.kicker + .h1, .kicker + .h2, .kicker + .display { margin-top: var(--sp-24); }

/* --- Container & Slide-Raster (Styleguide 4) ---------------------------
   Benannte Spaltenlinien = x-Spalten der Slide. fr-Werte sind die Abstände
   in Slide-px, dadurch stimmen die Proportionen bei jeder Breite.
   Platzierung im Markup: style="--col: x100 / x560; --row: 2". --------- */
.container {
  padding-inline: var(--margin);
  max-width: calc(var(--content-max) + 2 * var(--margin));
  margin-inline: auto;
  width: 100%;
}
.grid {
  display: grid;
  grid-template-columns:
    [x100] 311.4fr [x411] 63.6fr [x475] 85fr [x560] 60fr [x620] 40fr [x660] 85fr
    [x745] 95fr [x840] 135fr [x975] 45fr [x1020] 80fr [x1100] 110fr [x1210] 180fr
    [x1390] 80fr [x1470] 350fr [x1820];
  column-gap: 0;
  row-gap: var(--sp-70);
  align-items: start;
}
.grid > * { grid-column: var(--col, x100 / x1820); grid-row: var(--row, auto); min-width: 0; }

/* Unter 1024 px fließt alles einspaltig in Lesereihenfolge. */
@media (max-width: 1023.98px) {
  .grid { grid-template-columns: 1fr; row-gap: var(--sp-52); }
  .grid > * { grid-column: 1 / -1; grid-row: auto; }
}

/* --- Sections -----------------------------------------------------------
   Jede Section = eine Slide: Farbe über data-theme, Inhalt endet mit Luft
   zur Meta-Zeile (Slide: Inhaltsende 930, Meta 996). -------------------- */
.section {
  position: relative;
  background: var(--surface);
  color: var(--on-surface);
  padding-block: max(var(--sp-100), calc(var(--bar-h) + var(--sp-24))) var(--sp-150);
  scroll-margin-top: var(--bar-h);   /* Sprungziele landen unter der festen Nav */
  transition: background var(--dur-micro), color var(--dur-micro);
}
.section--hero { min-height: 100svh; display: flex; flex-direction: column; }
.section--hero > .grid { flex: 1; align-content: space-between; }
.section--tall { min-height: 100svh; display: flex; flex-direction: column; }
.section--tall > .grid { flex: 1; align-content: space-between; }

/* --- Bewegung (Web-Guideline 6) -----------------------------------------
   Nur transform + opacity. Alles respektiert prefers-reduced-motion.
   Einblenden: [data-reveal]; Gruppen versetzt: [data-reveal-group] > *.
   Parallax: [data-parallax="0.12"] – JS setzt transform, misst ohne Feedback. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
[data-parallax] { will-change: transform; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  [data-parallax] { transform: none !important; will-change: auto; }
}

/* --- Hilfsklassen ------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: var(--sp-12); left: var(--margin); z-index: 50; padding: var(--sp-8) var(--sp-20); background: var(--dark); color: var(--light); transform: translateY(-200%); }
.skip-link:focus-visible { transform: none; }
.end { align-self: end; }
.right { justify-self: end; text-align: right; }
.stack > * + * { margin-top: var(--sp-40); }
.stack--tight > * + * { margin-top: var(--sp-24); }
