/* ==========================================================================
   Lukas Klein · lukasklein.dev
   Dark, Klein-blue light, Geist variable (self-hosted)
   ========================================================================== */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-ext-var.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin-var.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;
}

/* Metric-matched fallback so the swap to Geist does not shift layout */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 103.7%;
  ascent-override: 96.9%;
  descent-override: 28.4%;
  line-gap-override: 0%;
}

:root {
  --bg: #07080b;
  --bg-2: #0a0c11;
  --surface: #0e1117;
  --surface-2: #141822;
  --surface-3: #1b2030;
  --line: rgba(222, 230, 255, 0.08);
  --line-2: rgba(222, 230, 255, 0.14);
  --text: #f1f3f8;
  --text-2: #a2a9b8;
  --text-3: #7d8496;
  --klein: #002fa7;
  --blue: #2a4dff;
  --blue-2: #6f8cff;
  --blue-ice: #b9c8ff;
  --amber: #f0c674;

  --font: "Geist", "Geist Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1280px;
  --radius: 22px;
  --nav-h: 68px;

  color-scheme: dark;
}

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

html {
  background: var(--bg);
  scroll-padding-top: calc(var(--nav-h) + 24px);
  scrollbar-color: #2a3040 var(--bg);
  scrollbar-width: thin;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #262b38; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #343b4d; }

::selection { background: var(--blue); color: #fff; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-feature-settings: "ss01" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  caret-color: var(--blue-2);
}

h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
img, canvas { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 3px;
  border-radius: 8px;
}
.btn:focus-visible { border-radius: 999px; outline-offset: 4px; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; font-weight: 550;
  transition: top .2s var(--ease);
}
.skip:focus { top: 16px; }

.dim { color: var(--text-3); }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.6875rem; font-weight: 520; letter-spacing: 0.02em;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  line-height: 1;
}
.tag--warn { color: var(--amber); border-color: rgba(240, 198, 116, 0.35); background: rgba(240, 198, 116, 0.06); }

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px;
  border-radius: 999px;
  font: 550 0.9875rem/1 var(--font);
  letter-spacing: -0.005em;
  white-space: nowrap;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform .6s var(--ease), background-color .3s var(--ease), box-shadow .4s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  will-change: transform;
}
.btn > span, .btn > svg { transition: transform .6s var(--ease); transform: translate3d(calc(var(--mx) * .35), calc(var(--my) * .35), 0); }
.btn__icon { width: 18px; height: 18px; flex: none; }
.btn--light {
  background: #f3f5fa; color: #07080b;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 6px -2px rgba(0,0,0,.6), 0 12px 24px -12px rgba(0,0,0,.7);
}
.btn--light:hover { background: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 6px -2px rgba(0,0,0,.6), 0 18px 32px -14px rgba(0,0,0,.8); }
.btn--light:hover .btn__icon { transform: translate3d(calc(var(--mx) * .35 + 2px), calc(var(--my) * .35 - 2px), 0); }
.btn--ghost {
  color: var(--text);
  border: 1px solid var(--line-2);
  background: rgba(255,255,255,0.025);
}
.btn--ghost:hover { background: rgba(255,255,255,0.07); border-color: rgba(222,230,255,.24); }
.btn--small { height: 38px; padding: 0 16px; font-size: 0.875rem; }
.btn--large { height: 60px; padding: 0 30px; font-size: 1.0625rem; }
.btn:active { transition-duration: .15s; transform: translate3d(var(--mx), var(--my), 0) scale(.97); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7, 8, 11, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}
.nav__inner {
  height: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -0.015em; font-size: 1rem; }
.brand__mark { width: 31px; height: 21px; color: var(--text); }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 0.9rem; color: var(--text-2);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav__links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav .btn { margin-left: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 3; }
.hero::before, .cap::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: -30% 0 -40% -20%;
  background: radial-gradient(60% 65% at 30% 45%, rgba(7, 8, 11, 0.9), rgba(7, 8, 11, 0.5) 50%, rgba(7, 8, 11, 0) 78%);
}
.hero__title {
  font-size: clamp(2.6rem, 0.9rem + 5.6vw, 5.25rem);
  line-height: 0.98;
  font-weight: 580;
  letter-spacing: -0.04em;
  max-width: 11.6em;
  text-wrap: balance;
}
.hero__row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 28px;
  margin-top: clamp(24px, 3.2vw, 40px);
  flex-wrap: wrap;
}
.hero__sub {
  max-width: 46ch;
  font-size: clamp(1.0625rem, 0.95rem + 0.35vw, 1.25rem);
  line-height: 1.55; color: var(--text-2); text-wrap: pretty;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.1em 0.02em 0.14em; margin: -0.1em -0.02em -0.14em; }
.wi { display: inline-block; will-change: transform; }

/* ---------- Story stage: static by default (no JS / reduced motion) ---------- */
:root {
  --bw: min(900px, calc(100vw - 32px));
  --u: calc(var(--bw) / 75);
  --cu: clamp(11.5px, calc(var(--u) * 1.12), 13.5px);
  --glow: 42 77 255;
}
.story { position: relative; overflow-x: clip; padding-top: calc(var(--nav-h) + clamp(48px, 9vw, 120px)); }
.sticky {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(80px, 10vw, 140px);
}
.sticky > .hero, .sticky .cap { width: 100%; }
.captions, .scene { display: contents; }
.hero { order: 0; }
.browser { order: 1; margin-top: -8px; }
.cap:nth-child(1) { order: 2; margin-top: 96px; }
.cap:nth-child(2) { order: 3; margin-top: 48px; }
.flow { order: 4; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 20px; padding-inline: 16px; }
.cap:nth-child(3) { order: 5; margin-top: 48px; }
.sheet { order: 6; }
.cap:nth-child(4) { order: 7; margin-top: 48px; }
.halo, .sheen { display: none; }

.light {
  position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: calc(var(--nav-h) * -1 - 40px); height: 110vh; width: 100%;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, #000 50%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.3) 0%, #000 50%, #000 80%, transparent 100%);
}
.grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.08; mix-blend-mode: overlay;
}

.cap { position: relative; }
.cap h2 {
  font-size: clamp(2rem, 1.1rem + 2.6vw, 3.5rem);
  line-height: 1.04; font-weight: 570; letter-spacing: -0.038em;
  max-width: 15em; text-wrap: balance;
}
.cap__k {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-size: 0.8125rem; font-weight: 560; letter-spacing: 0.02em; color: var(--text-2);
}
.cap__k b { font-weight: 560; font-variant-numeric: tabular-nums; color: rgb(var(--glow)); }
.cap__k b::after { content: ""; display: inline-block; width: 22px; height: 1px; margin-left: 10px; vertical-align: middle; background: currentColor; opacity: .6; }
.cap p { margin-top: 14px; max-width: 62ch; color: var(--text-2); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1875rem); text-wrap: pretty; }

/* The object */
.browser {
  position: relative;
  width: var(--bw); aspect-ratio: 16 / 10;
  font-size: var(--u);
  border-radius: 14px;
  background: #0f1218;
  border: 1px solid rgba(222, 230, 255, 0.14);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 50px 100px -40px rgba(0, 0, 0, 0.95),
    0 30px 120px -50px rgba(42, 77, 255, 0.55);
}
.chrome {
  flex: none; height: 3em; display: flex; align-items: center; gap: 1em; padding: 0 1.1em;
  background: linear-gradient(#181c28, #10131b);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09);
}
.win__dots { display: inline-flex; gap: .5em; }
.win__dots i { width: .78em; height: .78em; border-radius: 50%; background: #2a3040; }
.url {
  margin: 0 auto; display: inline-flex; align-items: center; gap: .5em;
  background: rgba(255, 255, 255, 0.05); border-radius: .6em; padding: .4em 1.5em;
  font-size: .95em; color: var(--text-2); white-space: nowrap;
}
.url svg { width: 1em; height: 1em; }
.chrome .tag { height: auto; font-size: .75em; padding: .35em .8em; }
.view { position: relative; flex: 1; overflow: hidden; background: #f6efe6; }
.site { flex: none; will-change: transform; color: #2a1d17; line-height: 1.4; }

.s-nav { display: flex; align-items: center; gap: 2em; padding: 1.5em 3.2em; }
.s-logo { display: inline-flex; align-items: center; gap: .55em; font-weight: 650; font-size: 1.15em; letter-spacing: -0.02em; white-space: nowrap; }
.s-logo svg { width: 1.6em; height: 1.6em; }
.s-links { display: flex; gap: 1.8em; margin-left: auto; color: #6f6157; font-size: .95em; }
.s-btn { display: inline-block; background: #2a1d17; color: #f6efe6; font-size: .9em; font-weight: 600; padding: .65em 1.2em; border-radius: 99em; white-space: nowrap; }
.s-btn--warm { background: #c2452d; color: #fff; }
.s-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3em; align-items: center; padding: 1.2em 3.2em 3em; }
.s-copy { display: flex; flex-direction: column; gap: 1.1em; }
.s-h { font-size: 4.1em; font-weight: 640; line-height: 1; letter-spacing: -0.04em; color: #2a1d17; text-wrap: balance; }
.s-p { font-size: 1.2em; color: #6f6157; max-width: 22em; }
.s-row { display: flex; align-items: center; gap: 1.4em; margin-top: .4em; }
.s-link { font-size: .92em; font-weight: 600; color: #a3361f; border-bottom: .12em solid #e8c2b0; white-space: nowrap; }
.s-art { border-radius: 1.4em; overflow: hidden; aspect-ratio: 4 / 3.2; box-shadow: 0 1.2em 2.4em -1.2em rgba(60, 30, 10, .45); }
.s-art svg { width: 100%; height: 100%; }
.s-strip { display: flex; flex-wrap: wrap; gap: .6em 2.4em; padding: 1.5em 3.2em; border-top: 1px solid #e8ddce; border-bottom: 1px solid #e8ddce; font-size: .95em; color: #6f6157; }
.s-strip span { display: inline-flex; align-items: center; gap: .6em; }
.s-strip span::before { content: ""; width: .45em; height: .45em; border-radius: 50%; background: #c2452d; }
.s-h2 { font-size: 2.6em; font-weight: 640; letter-spacing: -0.035em; line-height: 1; color: #2a1d17; }
.s-works { padding: 3.2em 3.2em 3.4em; }
.s-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6em; margin-top: 1.6em; }
.s-tile { display: flex; flex-direction: column; gap: .3em; }
.s-tile i { display: grid; place-items: center; aspect-ratio: 4 / 3.4; border-radius: 1em; margin-bottom: .6em; background: linear-gradient(160deg, var(--t1), var(--t2)); box-shadow: inset 0 -2.4em 0 rgba(0, 0, 0, .06); color: var(--lb); }
.s-tile i svg { width: 42%; height: 78%; filter: drop-shadow(0 .5em .6em rgba(60, 30, 10, .25)); }
.s-tile--a { --t1: #efe2d0; --t2: #dcc3a3; --lb: #2a1d17; }
.s-tile--b { --t1: #f3d9cf; --t2: #dfa999; --lb: #c2452d; }
.s-tile--c { --t1: #e2e4d8; --t2: #b9bea6; --lb: #3d4a35; }
.s-tile b { font-weight: 620; font-size: 1.05em; color: #2a1d17; }
.s-tile small { font-size: .88em; color: #6f6157; }
.s-cta { display: flex; align-items: center; justify-content: space-between; gap: 2em; padding: 3em 3.2em 4em; background: #2a1d17; }
.s-cta .s-h2 { color: #f6efe6; font-size: 2.2em; max-width: 12em; }


/* Automation cards */
.card {
  width: min(25em, calc(100vw - 32px)); font-size: var(--cu); line-height: 1.4; color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.035) 0%, rgba(255,255,255,0) 38%), linear-gradient(180deg, #161b27 0%, #0f121a 100%);
  border: 1px solid rgba(222, 230, 255, 0.13);
  border-top-color: rgba(222, 230, 255, 0.22);
  border-radius: 1.15em; padding: 1.05em 1.15em 1.15em;
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 30px 60px -24px rgba(0,0,0,.9), 0 20px 60px -30px rgba(42,77,255,.55);
}
.c-head { display: flex; align-items: center; gap: .65em; }
.c-ico { width: 2.1em; height: 2.1em; border-radius: .65em; background: rgba(42, 77, 255, .2); color: var(--blue-ice); display: grid; place-items: center; flex: none; }
.c-ico svg { width: 1.2em; height: 1.2em; }
.c-title { font-weight: 600; letter-spacing: -0.01em; }
.c-tag { margin-left: auto; font-size: .78em; height: auto; padding: .3em .7em; }
.c-time { margin-left: auto; font-size: .8em; color: var(--text-3); white-space: nowrap; }
.c-src { list-style: none; margin: .9em 0 0; padding: 0; display: grid; gap: .15em; }
.c-src li { display: flex; align-items: center; gap: .7em; padding: .45em .1em; font-weight: 560; font-size: .96em; }
.c-src small { margin-left: auto; font-weight: 450; font-size: .86em; color: var(--text-2); }
.c-dot { width: 1.4em; height: 1.4em; border-radius: 50%; display: grid; place-items: center; flex: none; background: #1f8a4c; color: #fff; transition: background-color .35s var(--ease), box-shadow .35s var(--ease), color .35s var(--ease); }
.c-dot svg { width: .9em; height: .9em; }
.motion .c-src li:not(.is-on) .c-dot { background: none; box-shadow: inset 0 0 0 .12em #3d4558; color: transparent; }
.c-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6em; margin-top: 1em; }
.c-kpis span { display: flex; flex-direction: column; gap: .1em; padding: .65em .75em; border-radius: .7em; background: rgba(255,255,255,.04); }
.c-kpis small { font-size: .8em; color: var(--text-2); }
.c-kpis b { font-size: 1.2em; font-weight: 620; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-kpis em { font-style: normal; font-size: .8em; font-weight: 600; color: #a8f0c6; }
.c-kpis em.is-down { color: #a9bbff; }
.c-bars { display: flex; align-items: flex-end; gap: .45em; height: 4.2em; margin-top: .9em; padding: 0 .1em; }
.c-bars i { flex: 1; height: 100%; border-radius: .3em .3em .1em .1em; background: linear-gradient(180deg, #5a7bff, rgba(42, 77, 255, .35)); transform-origin: bottom; transform: scaleY(calc(var(--h) * var(--grow, 1))); }
.c-bars i:nth-child(6) { background: linear-gradient(180deg, #8fe8c0, rgba(31, 138, 76, .45)); }
.c-mail b { display: block; font-weight: 580; font-size: .96em; }
.c-mail small { display: block; color: var(--text-2); font-size: .86em; line-height: 1.4; margin-top: .15em; }
.c-mail { margin-top: .9em; padding: .8em .9em; background: rgba(255,255,255,.04); border-radius: .7em; }

/* KI sheet */
.sheet {
  width: min(31em, calc(100vw - 32px)); font-size: var(--cu); line-height: 1.45; color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,0) 34%), linear-gradient(180deg, #171c29 0%, #0f121a 100%);
  border: 1px solid rgba(160, 175, 255, 0.2);
  border-top-color: rgba(200, 210, 255, 0.3);
  border-radius: 1.3em; padding: 1.3em 1.35em 1.2em;
  box-shadow: 0 1px 0 rgba(255,255,255,.11) inset, 0 40px 80px -30px rgba(0,0,0,.95), 0 30px 90px -36px rgba(104, 78, 255, .6);
}
.sh-head { display: flex; align-items: center; gap: .65em; }
.sh-head b { font-weight: 620; }
.sh-head .tag { margin-left: auto; }
.sh-ico { width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.sh-ico svg { width: 1.2em; height: 1.2em; }
.sh-chat { display: flex; flex-direction: column; gap: .9em; margin-top: 1.1em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.sh-q { align-self: flex-end; max-width: 85%; min-height: 2.6em; padding: .6em .95em; border-radius: 1em 1em .3em 1em; background: rgba(42, 77, 255, .28); color: #e6eaff; font-size: .96em; }
.sh-text { font-size: 1.02em; min-height: 4.4em; color: #e6eaff; }
.sh-src { align-self: flex-start; display: inline-flex; align-items: center; gap: .45em; font-size: .82em; font-weight: 540; color: #cdd7ff; background: rgba(104, 78, 255, .2); padding: .35em .8em; border-radius: 99em; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.sh-src svg { width: 1.1em; height: 1.1em; }
.motion .sh-src:not(.is-on) { opacity: 0; transform: translateY(.4em); }
.tcaret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.18em; background: var(--blue-ice); border-radius: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sh-foot { display: flex; align-items: center; gap: .5em; margin-top: 1.1em; flex-wrap: wrap; }
.sh-foot small { font-size: .78em; color: var(--text-2); }

/* ---------- Motion mode: one sticky viewport, choreographed by main.js ---------- */
.motion .story { height: 620vh; padding-top: 0; }
.motion .sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: block; padding: 0;
}
.motion .light { top: 0; height: 100%; }
.motion .hero { position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + 6vh); will-change: transform, opacity; }
.motion .captions { display: block; position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + 3.5vh); z-index: 3; pointer-events: none; }
.motion .cap { position: absolute; left: 0; right: 0; margin: 0 auto; opacity: 0; will-change: transform, opacity; }
.motion .scene {
  display: block; position: absolute; left: 0; right: 0; top: var(--scene-top, 31vh); bottom: 0;
  perspective: 2000px; perspective-origin: 50% 35%;
}
.motion { --bw: min(900px, 66vw, calc((100svh - 320px) * 1.6)); }
/* tablet portrait: plenty of height, so the window can use the width */
@media (min-width: 721px) and (orientation: portrait) {
  .motion { --bw: min(900px, calc(100vw - 64px), calc((100svh - 360px) * 1.6)); }
}
/* short landscape screens get the static story; keep the window within one screen height */
@media (max-height: 499px) {
  :root { --bw: min(900px, calc(100vw - 32px), calc(100svh * 1.45)); }
}
.motion .browser, .motion .card, .motion .sheet, .motion .halo {
  position: absolute; left: 50%; top: 50%; will-change: transform, opacity; backface-visibility: hidden;
}
.motion .browser { transform: translate(-50%, -50%) translateY(30vh) rotateX(22deg) scale(.92); }
.motion .card, .motion .sheet { opacity: 0; }
.motion .flow { display: contents; }
.motion .halo {
  display: block; width: calc(var(--bw) * 1.35); aspect-ratio: 16 / 9; pointer-events: none;
  background: radial-gradient(closest-side, rgb(var(--glow) / .75), rgb(var(--glow) / .26) 55%, rgb(var(--glow) / 0));
  filter: blur(24px);
}
.motion .sheen {
  display: block; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(112deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.16) 50%, rgba(255,255,255,0) 60%);
  background-size: 300% 100%; background-position: var(--sx, 100%) 0;
  mix-blend-mode: screen; opacity: var(--so, 0);
}

/* ---------- Sections ---------- */
.section-title {
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem);
  line-height: 1.02; font-weight: 570; letter-spacing: -0.038em; text-wrap: balance;
}
.summary { padding-block: clamp(96px, 12vw, 160px) clamp(40px, 5vw, 64px); }
.svc { margin-top: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.svc li {
  display: grid; grid-template-columns: 28px minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(16px, 3vw, 40px);
  align-items: baseline; padding-block: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--line);
}
.svc svg { width: 24px; height: 24px; color: var(--blue-2); align-self: center; }
.svc h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); font-weight: 560; letter-spacing: -0.03em; line-height: 1.1; }
.svc p { color: var(--text-2); font-size: clamp(1rem, .95rem + .25vw, 1.125rem); }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: clamp(40px, 5vw, 64px); }
.facts li {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 18px 8px 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: .9375rem; color: var(--text);
  background: rgba(255,255,255,.02);
}
.facts svg { width: 18px; height: 18px; color: var(--blue-2); flex: none; }

/* ---------- Process ---------- */
.process { padding-block: clamp(64px, 8vw, 120px) clamp(96px, 12vw, 160px); }
.timeline {
  --p: 0;
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(48px, 6vw, 80px);
}
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 20px; right: 0; top: 20px; height: 1px;
  background: var(--line-2);
}
.timeline::after {
  background: linear-gradient(90deg, var(--blue), var(--blue-2) 70%, var(--blue-ice));
  transform-origin: left; transform: scaleX(var(--p));
}
.tl { position: relative; z-index: 1; }
.tl__dot {
  display: grid; place-items: center;
  width: 41px; height: 41px; border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  font-size: .9rem; font-weight: 560; color: var(--text-2);
  font-variant-numeric: tabular-nums;
  transition: background-color .6s var(--ease), border-color .6s var(--ease), color .6s var(--ease), box-shadow .6s var(--ease);
}
.tl.is-on .tl__dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.tl h3 { margin-top: 28px; font-size: 1.5rem; font-weight: 570; letter-spacing: -0.03em; line-height: 1.1; }
.tl p { margin-top: 10px; color: var(--text-2); font-size: 1rem; max-width: 24ch; }

/* ---------- Quote ---------- */
.quote { padding-block: clamp(40px, 6vw, 80px) clamp(32px, 5vw, 64px); }
.quote figure {
  max-width: 980px; margin-inline: auto; text-align: center;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 72px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background: radial-gradient(60% 80% at 50% 0%, rgba(42,77,255,.10), transparent 70%);
}
.quote blockquote p {
  font-size: clamp(1.75rem, 1rem + 3vw, 3.5rem);
  line-height: 1.12; font-weight: 500; letter-spacing: -0.035em;
  text-wrap: balance;
}
.quote figcaption { margin-top: 36px; display: inline-flex; align-items: center; gap: 14px; text-align: left; color: var(--text-2); font-size: 1rem; }
.quote__who { display: grid; line-height: 1.35; }
.quote__who strong { color: var(--text); font-weight: 560; }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; background: #141824; border: 1px solid var(--line-2); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .8); }

/* ---------- Contact ---------- */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(56px, 8vw, 112px) clamp(96px, 12vw, 160px);
}
.contact .light { top: 0; bottom: 0; height: 100%; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%, #000 80%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 40%, #000 80%, transparent); opacity: .85; }
.contact .grain { inset: 0; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%); mask-image: linear-gradient(to bottom, transparent, #000 35%); }
.contact__title {
  font-size: clamp(2.6rem, 0.9rem + 6.4vw, 6rem);
  line-height: 0.98; font-weight: 580; letter-spacing: -0.04em;
  max-width: 10em; text-wrap: balance;
}
.contact__links { margin-top: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line-2); max-width: 980px; }
.clink {
  position: relative;
  display: flex; align-items: center; gap: clamp(14px, 2vw, 24px);
  padding-block: clamp(20px, 2.6vw, 30px);
  border-bottom: 1px solid var(--line-2);
  font-size: clamp(1.375rem, 0.9rem + 2.4vw, 2.75rem);
  font-weight: 520; letter-spacing: -0.03em; line-height: 1.1;
}
.clink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--blue-2), var(--blue-ice));
  transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease);
}
.clink:hover::after, .clink:focus-visible::after { transform: scaleX(1); }
.clink__icon { width: clamp(22px, 2.4vw, 32px); height: clamp(22px, 2.4vw, 32px); color: var(--blue-2); flex: none; }
.clink__text { min-width: 0; overflow-wrap: anywhere; transition: transform .6s var(--ease); }
.clink__arrow { margin-left: auto; width: clamp(22px, 2.4vw, 34px); height: clamp(22px, 2.4vw, 34px); color: var(--text-3); flex: none; transition: transform .6s var(--ease), color .3s var(--ease); }
.clink:hover .clink__text { transform: translateX(6px); }
.clink:hover .clink__arrow { transform: translate(4px, -4px); color: var(--text); }
.contact__actions { margin-top: clamp(36px, 5vw, 56px); display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; }
.contact__note { color: var(--text-2); font-size: 1rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; gap: 24px; padding-block: 32px 40px; flex-wrap: wrap; }
.brand--small { font-size: .9375rem; font-weight: 560; color: var(--text-2); }
.brand--small .brand__mark { width: 24px; height: 16px; color: var(--text-2); }
.footer__links { display: flex; gap: 22px; margin-left: auto; }
.footer__links a, .footer__copy { font-size: .9375rem; color: var(--text-2); }
.footer__links a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: color .25s, text-decoration-color .25s; }
.footer__links a:hover { color: var(--text); text-decoration-color: var(--blue-2); }

/* ==========================================================================
   Legal pages: long-form reading
   ========================================================================== */
.legal { position: relative; isolation: isolate; padding: calc(var(--nav-h) + clamp(56px, 9vw, 120px)) 0 clamp(96px, 12vw, 160px); }
.legal__light { position: absolute; inset: 0 0 auto 0; height: min(78vh, 720px); z-index: -1; pointer-events: none; opacity: .55;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent); mask-image: linear-gradient(to bottom, #000 30%, transparent); }
.legal__light .light { position: absolute; inset: 0; top: 0; width: 100%; height: 100%; -webkit-mask-image: none; mask-image: none; }
.prose { max-width: 68ch; font-size: 1.0625rem; line-height: 1.72; color: #c9ceda; }
.prose h1 {
  font-size: clamp(2.5rem, 1.4rem + 4vw, 4.5rem); line-height: 1; font-weight: 580; letter-spacing: -0.04em;
  color: var(--text); text-wrap: balance; overflow-wrap: anywhere; hyphens: manual;
}
.prose .legal-lead { margin-top: 24px; font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); line-height: 1.55; color: var(--text-2); text-wrap: pretty; }
.prose section { margin-top: clamp(40px, 5vw, 56px); padding-top: clamp(28px, 3.5vw, 36px); border-top: 1px solid var(--line); }
.prose h2 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.25; font-weight: 580; letter-spacing: -0.02em; color: var(--text); text-wrap: balance; }
.prose h2 + * { margin-top: 12px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 14px; }
.prose ul { display: grid; gap: 8px; }
.prose li { position: relative; padding-left: 22px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 10px; height: 1.5px; border-radius: 2px; background: var(--blue-2); }
.prose a { color: #a9bbff; text-decoration: underline; text-decoration-color: rgba(169, 187, 255, .45); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; transition: color .2s var(--ease), text-decoration-color .2s var(--ease); }
.prose a:hover { color: #fff; text-decoration-color: currentColor; }
.prose .legal-strong { color: var(--text); font-weight: 550; padding: 18px 20px; border-radius: 14px; background: rgba(42, 77, 255, .08); border: 1px solid rgba(111, 140, 255, .22); }
.prose .legal-date { margin-top: clamp(48px, 6vw, 72px); font-size: .9375rem; color: var(--text-3); }
.footer__links a[aria-current="page"] { color: var(--text); }

/* ==========================================================================
   404
   ========================================================================== */
.lost { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: calc(var(--nav-h) + 48px) 0 72px; }
.lost .light { position: absolute; inset: 0; width: 100%; height: 100%; top: 0; z-index: -1; opacity: .8;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 80%); mask-image: radial-gradient(70% 70% at 50% 45%, #000 30%, transparent 80%); }
.lost .grain { inset: 0; }
.lost__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lost__win {
  width: min(380px, 86vw); font-size: 12px; border-radius: 14px; overflow: hidden;
  background: #0f1218; border: 1px solid rgba(222, 230, 255, .14);
  box-shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 40px 80px -36px rgba(0,0,0,.95), 0 24px 90px -40px rgba(42,77,255,.6);
  transform: perspective(1200px) rotateX(14deg);
}
.lost__title { margin-top: clamp(40px, 6vw, 64px); font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4.25rem); line-height: 1.02; font-weight: 570; letter-spacing: -0.038em; text-wrap: balance; }
.lost__text { margin-top: 16px; max-width: 44ch; color: var(--text-2); font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); text-wrap: pretty; }
.lost__actions { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
/* 404: Adressleiste mit falschem Pfad, darunter Autovervollständigung mit echten Zielen */
.lost__win { width: min(560px, 100%); font-size: 15px; text-align: left; transform: perspective(1400px) rotateX(6deg); }
.url--lost { gap: 0; max-width: calc(100% - 92px); white-space: nowrap; overflow: hidden; }
.url--lost svg { margin-right: 6px; flex: none; }
.url__path { color: #ffb38a; text-decoration: underline wavy rgba(255, 140, 90, .55); text-decoration-thickness: 1px; text-underline-offset: 3px; overflow: hidden; text-overflow: ellipsis; }
.lost__caret { display: inline-block; flex: none; width: 1.5px; height: 1.05em; margin-left: 2px; border-radius: 1px; background: var(--blue-ice); animation: blink 1.1s steps(2) infinite; }
.suggest { display: grid; padding: 8px; background: linear-gradient(180deg, #12151e, #0d1016); }
.suggest__row {
  display: grid; grid-template-columns: 20px auto 1fr; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px; color: var(--text-2); text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.suggest__icon { width: 16px; height: 16px; color: var(--text-3); transition: color .25s var(--ease), transform .35s var(--ease); }
.suggest__label { color: var(--text); font-weight: 520; }
.suggest__url { justify-self: end; font-size: .8125rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.suggest__row:hover, .suggest__row:focus-visible, .suggest:not(:hover):not(:focus-within) .suggest__row.is-active { background: rgba(111, 140, 255, .12); color: var(--text); }
.suggest__row:hover .suggest__icon, .suggest__row:focus-visible .suggest__icon, .suggest:not(:hover):not(:focus-within) .is-active .suggest__icon { color: var(--blue-ice); transform: translate(2px, -2px); }
.suggest__row:focus-visible { outline: 2px solid var(--blue-2); outline-offset: -2px; }
@media (max-width: 520px) { .suggest__url { display: none; } .suggest__row { grid-template-columns: 20px 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .suggest__row { animation: suggest-in .6s var(--ease) both; }
  .suggest__row:nth-child(2) { animation-delay: .06s; } .suggest__row:nth-child(3) { animation-delay: .12s; } .suggest__row:nth-child(4) { animation-delay: .18s; }
  @keyframes suggest-in { from { opacity: 0; transform: translateY(-6px); } }
}
@media (prefers-reduced-motion: reduce) { .lost__caret { animation: none; } }
/* ==========================================================================
   Entrance + reveal states (only with JS; content is visible without it)
   ========================================================================== */
.js .hero__title .wi { transform: translate3d(0, 108%, 0) rotate(3deg); transform-origin: 0 100%; }
.js .hero__title.is-in .wi { transform: none; transition: transform 1.3s var(--ease); transition-delay: calc(var(--i) * 70ms + 120ms); }
.js [data-rise] { opacity: 0; transform: translate3d(0, 18px, 0); filter: blur(6px); }
.js .is-ready [data-rise] { opacity: 1; transform: none; filter: none; transition: opacity 1.1s var(--ease), transform 1.3s var(--ease), filter 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .nav { opacity: 0; transform: translateY(-8px); }
.js .is-ready .nav { opacity: 1; transform: none; transition: opacity 1s var(--ease) .2s, transform 1s var(--ease) .2s, background-color .4s var(--ease), border-color .4s var(--ease); }
.js .story .light { opacity: 0; transition: opacity 2.4s var(--ease) .3s; }
.js .is-ready .story .light { opacity: 1; }
.motion .scene { opacity: 0; transform: translate3d(0, 60px, 0); filter: blur(10px); }
.motion .is-ready .scene { opacity: 1; transform: none; filter: none; transition: opacity 1.4s var(--ease) .5s, transform 1.6s var(--ease) .5s, filter 1.2s var(--ease) .5s; }

.js [data-reveal] { opacity: 0; transform: translate3d(0, 26px, 0); filter: blur(6px); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal-list] > li { opacity: 0; transform: translate3d(0, 18px, 0); }
.js [data-reveal-list].is-in > li { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.js [data-reveal-list].is-in > li:nth-child(2) { transition-delay: .08s; }
.js [data-reveal-list].is-in > li:nth-child(3) { transition-delay: .16s; }
.js [data-reveal-list].is-in > li:nth-child(4) { transition-delay: .24s; }
.js .contact__title .wi { transform: translate3d(0, 108%, 0); }
.js .contact__title.is-in .wi { transform: none; transition: transform 1.2s var(--ease); transition-delay: calc(var(--i) * 60ms); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }
  .hero__row { align-items: flex-start; flex-direction: column; }
  .svc li { grid-template-columns: 24px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; }
  .svc li svg { grid-row: span 2; align-self: start; margin-top: 4px; }
  .svc p { grid-column: 2; }

  .timeline { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .timeline::before, .timeline::after { left: 20px; right: auto; top: 20px; bottom: 20px; width: 1px; height: auto; }
  .timeline::after { transform-origin: top; transform: scaleY(var(--p)); }
  .tl { display: grid; grid-template-columns: 41px 1fr; column-gap: 20px; }
  .tl__dot { grid-row: span 2; }
  .tl h3 { margin-top: 6px; font-size: 1.375rem; }
  .tl p { margin-top: 4px; }
}

/* Phone: the window becomes portrait so its contents stay readable */
@media (max-width: 720px) {
  :root { --bw: calc(100vw - 32px); --u: calc(var(--bw) / 40); --cu: clamp(11.5px, 3.3vw, 13px); }
  .motion { --bw: min(calc(100vw - 32px), calc((100svh - 300px) * 0.8)); }
  .browser { aspect-ratio: 4 / 5; border-radius: 12px; }
  .chrome { height: 3.2em; }
  .chrome { gap: .6em; padding: 0 .9em; }
  .chrome .tag { font-size: .68em; padding: .3em .6em; }
  .url { padding: .4em .9em; }
  .s-nav { padding: 1.2em 1.6em; gap: 1em; }
  .s-links { display: none; }
  .s-btn { margin-left: auto; }
  .s-row .s-btn { margin-left: 0; }
  .s-hero { grid-template-columns: 1fr; gap: 1.6em; padding: .4em 1.6em 2em; }
  .s-h { font-size: 2.6em; }
  .s-p { font-size: 1.1em; }
  .s-art { aspect-ratio: 16 / 10; }
  .s-strip { padding: 1.2em 1.6em; gap: .5em 1.4em; }
  .s-works { padding: 2em 1.6em 2.4em; }
  .s-grid { grid-template-columns: 1fr 1fr; gap: 1.2em; }
  .s-tile--c { display: none; }
  .s-h2 { font-size: 2em; }
  .s-cta { flex-direction: column; align-items: flex-start; gap: 1.2em; padding: 2.2em 1.6em 3em; }
  .s-cta .s-btn { margin-left: 0; }
  .cap__k { margin-bottom: 8px; font-size: .75rem; }
  .motion .scene { --scene-top: 27vh; perspective: 1400px; }
  .motion .hero { top: calc(var(--nav-h) + 3vh); }
  .motion .captions { top: calc(var(--nav-h) + 2vh); }
  .cap h2 { font-size: 1.75rem; }
  .cap p { font-size: .9375rem; margin-top: 8px; }
}

@media (max-width: 520px) {
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 0; padding: 0 16px; }
  .footer__links { margin-left: 0; width: 100%; }
  .facts li { font-size: .875rem; }
}

/* ==========================================================================
   Reduced motion: final states, no movement
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .hero__title .wi, .js .contact__title .wi, .js [data-rise], .js [data-reveal], .js [data-reveal-list] > li, .js .nav {
    opacity: 1 !important; transform: none !important; filter: none !important;
  }
  .js .story .light { opacity: 1 !important; }
  .btn, .btn > span, .btn > svg { transform: none !important; }
  .tcaret { display: none; }
}
