/* polyformal — tokens: siehe www.polyformal.de-design/COMMIT-SHEET.md */

@font-face {
  font-family: "Urbanist";
  src: url("fonts/urbanist-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f5f6f6;
  --ink: #16222a;
  --ink-soft: #3c4a51;
  --petrol: #0298b2;
  --petrol-ink: #03697b;
  --orange: #ff9b46;
  --stage: #0c3640;
  --stage-ink: #eaf4f6;
  --stage-soft: #a7c6cc;
  --rule: #d5dcde;

  --display: "Urbanist", "Avenir Next", "Futura", system-ui, sans-serif;
  --text: "Atkinson Next", "Segoe UI", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 68ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--display);
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.015em;
}
p { margin: 0; text-wrap: pretty; }

a { color: var(--petrol-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; border-radius: 2px; }

/* Szene 1 — Hook */
.hero {
  min-height: 88svh;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(5rem, 12vh, 9rem);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  row-gap: 1.75rem;
}
.hero-brand { display: flex; align-items: flex-start; gap: 1.25rem; margin: 0; }
.hero-logo { width: clamp(96px, 10vw, 128px); height: auto; }
.hero-brand span {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1;
  padding-top: 0.15em;
}
.hero-title {
  align-self: end;
  font-weight: 640;
  font-size: clamp(3.25rem, 11vw, 9.5rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-kerning: none;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-title .line > span { display: inline-block; }
.hero-lede {
  max-width: 36ch;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.45;
  color: var(--ink-soft);
}
.hero-sign { font-size: 0.95rem; color: var(--ink-soft); }

/* Grid-Break: Orange Band läuft in die Leistungen hinein */
.band-orange {
  height: clamp(3.5rem, 10vh, 6rem);
  background: var(--orange);
  margin-bottom: clamp(-3rem, -5vh, -1.75rem);
  position: relative;
  z-index: 0;
}

/* Szene 2 — Leistungen, 7/5 */
.work {
  position: relative;
  z-index: 1;
  margin-inline: var(--gutter);
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.25rem, 4vw, 4rem) clamp(4rem, 10vw, 8rem);
  background: var(--paper);
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2.5rem, 6vw, 6rem);
}
.work-lead h2 {
  font-size: clamp(2.25rem, 5vw, 4.25rem);
  font-weight: 620;
  line-height: 1.02;
  margin-bottom: 1.75rem;
}
.work-lead p { max-width: 56ch; font-size: 1.15rem; }
.work-lead p + p { margin-top: 1rem; color: var(--ink-soft); }
.work-list { list-style: none; margin: 0; padding: 0; align-self: end; }
.work-list li { padding-block: 1.1rem; border-top: 1px solid var(--rule); }
.work-list li:last-child { border-bottom: 1px solid var(--rule); }
.work-list h3 { font-size: 1.3rem; font-weight: 640; margin-bottom: 0.25rem; }
.work-list p { color: var(--ink-soft); }
.work-list .minor h3 { font-size: 1.05rem; color: var(--petrol-ink); }
.work-list .minor p { font-size: 0.95rem; }

/* Szene 3 — Peak */
.film {
  background: var(--stage);
  color: var(--stage-ink);
}
.film-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 5fr 7fr;
  align-items: center;
  padding: clamp(3rem, 8vh, 6rem) var(--gutter);
  gap: 3rem;
}
.film-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.film-still {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 640px;
  justify-self: center;
}
.film-copy { grid-column: 1; grid-row: 1; position: relative; z-index: 1; }
.film-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  color: var(--orange);
}
.film-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.film-steps h3 { font-size: 1.4rem; font-weight: 620; margin-bottom: 0.3rem; }
.film-steps p { color: var(--stage-soft); max-width: 40ch; }

/* WebGL läuft: Schritte liegen übereinander und werden per Scroll gewechselt */
.film.is-live .film-still { visibility: hidden; }
.film.is-live .film-steps { grid-template-areas: "s"; }
.film.is-live .film-steps li { grid-area: s; opacity: 0; transition: opacity 260ms ease-out; }
.film.is-live .film-steps li.is-on { opacity: 1; }

/* Szene 4 — Arbeitsweise */
.method {
  position: relative;
  padding: clamp(5rem, 12vw, 10rem) var(--gutter) clamp(4rem, 9vw, 8rem);
  overflow: hidden;
}
.method h2 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 560;
  margin-bottom: 2.5rem;
  max-width: 14ch;
}
.method-cols {
  columns: 2 30ch;
  column-gap: clamp(2rem, 5vw, 5rem);
  max-width: 70rem;
}
.method-cols p { break-inside: avoid; margin-bottom: 1.5rem; max-width: var(--measure); }
.method-cols strong { font-weight: 700; color: var(--ink); }
.method-mark {
  position: absolute;
  top: clamp(4rem, 10vw, 8rem);
  right: calc(var(--gutter) * -1);
  width: min(36vw, 420px);
  display: grid;
  gap: 10px;
  opacity: 0.9;
  pointer-events: none;
}
.method-mark span { display: block; height: clamp(18px, 2.4vw, 34px); }
.mark-o { background: var(--orange); }
.mark-p { background: var(--petrol); }

/* Szene 5 — Tür */
.door {
  background: var(--orange);
  color: var(--ink);
  padding: clamp(4rem, 10vw, 8rem) var(--gutter);
}
.door h2 {
  font-size: clamp(2.25rem, 6vw, 5rem);
  font-weight: 680;
  line-height: 1;
  max-width: 16ch;
  margin-bottom: 1.5rem;
}
.door-lede { font-size: 1.2rem; max-width: 46ch; margin-bottom: 3rem; }
.door-contact { display: flex; flex-wrap: wrap; gap: 1.5rem clamp(2rem, 6vw, 5rem); margin: 0; }
.door-contact dt { font-size: 0.9rem; margin-bottom: 0.2rem; }
.door-contact dd { margin: 0; font-family: var(--display); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 620; }
.door a { color: var(--ink); }

.foot {
  padding: 2rem var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.foot a { color: var(--ink); }

/* Reveal-Anfangszustände nur mit JS und Bewegung */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title .line > span { transform: translateY(105%); }
  .js .hero-lede, .js .hero-sign { opacity: 0; }
  .js .reveal { opacity: 0; transform: translateY(14px); }
  .js .reveal-item { opacity: 0; transform: translateX(-10px); }
}

@media (max-width: 760px) {
  .work { grid-template-columns: 1fr; margin-inline: 0.75rem; }
  .film-stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-content: center;
  }
  .film-still { grid-column: 1; grid-row: 1; }
  .film-copy { grid-row: 2; }
  .film.is-live .film-stage { grid-template-rows: 1fr auto; align-content: stretch; }
  .method-mark { width: 44vw; top: 2.5rem; }
  .method h2 { padding-top: 2rem; }
}
