:root {
  --accent: #ff8a3d;
  --bg: #07080b;
  --text: #f2f1ec;
  --muted: #8d9099;
  --dim: #c4c6cc;
  --line: rgba(242, 241, 236, .14);
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --read: "Inter", system-ui, sans-serif;
  --gutter: clamp(20px, 5vw, 96px);
  --rail: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, p, ul { margin: 0; }
.mono { font-family: var(--mono); }

/* tło: horyzont w CSS, nad nim canvas; canvas wjeżdża dopiero, gdy scena ma co pokazać */
.horizon { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(90% 60% at 50% 118%, rgba(255, 138, 61, .34), rgba(255, 138, 61, .08) 42%, transparent 62%); }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0; transition: opacity 1.2s ease; }
.scene-on #scene { opacity: 1; }
.scene-on .horizon { opacity: 0; transition: opacity 1.2s ease; }
.no-webgl #scene { display: none; }
header, main, footer, .rail, .readout { position: relative; z-index: 1; }

.top { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gutter); background: linear-gradient(rgba(7, 8, 11, .92), rgba(7, 8, 11, 0)); }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.top-link { font-size: 13px; letter-spacing: .06em; text-decoration: none; color: var(--dim); }
.top-link:hover { color: var(--accent); }

/* szyna sekcji: pionowa linia przy lewym marginesie, wypełnia się w miarę przewijania */
.rail { position: fixed; left: calc(var(--gutter) - 8px); top: 50%; transform: translateY(-50%); z-index: 5; display: none; flex-direction: column; gap: 34px; padding-left: 22px; }
.rail-line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.rail-line i { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--p, 0) * 100%); background: var(--accent); }
.rail a { position: relative; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: var(--muted); font: 500 12px/1.2 var(--read); letter-spacing: .02em; transition: color .3s; }
.rail a b { font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .08em; transition: color .3s; }
.rail a::before { content: ""; position: absolute; left: -25px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1px solid var(--muted); transition: background .3s, border-color .3s; }
.rail a.on, .rail a:hover { color: var(--text); }
.rail a.on b, .rail a.done b { color: var(--accent); }
.rail a.on::before, .rail a.done::before { background: var(--accent); border-color: var(--accent); }

/* odczyt strumienia: prawy dolny róg, znika na telefonie */
.readout { position: fixed; right: var(--gutter); bottom: 26px; z-index: 5; display: none; gap: 14px; align-items: baseline; font-size: 12px; color: var(--muted); letter-spacing: .04em; opacity: var(--vis, 0); transition: opacity .4s; }
.readout .byte { color: var(--accent); }
.readout .text { white-space: nowrap; color: var(--dim); }

main { padding-inline: calc(var(--gutter) + var(--rail)) var(--gutter); }
section { max-width: 1240px; }

.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 3.6vh, 44px); padding-top: max(10vh, 120px); padding-bottom: 40vh; }
.eyebrow { display: flex; justify-content: space-between; gap: 24px; font-size: 12px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
h1 { font-size: clamp(42px, 7.6vw, 116px); line-height: .94; letter-spacing: -.045em; font-weight: 500; max-width: 14ch; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; gap: 32px; align-items: end; }
.lead { font-size: clamp(19px, 1.7vw, 24px); line-height: 1.35; letter-spacing: -.015em; }
@media (min-width: 1200px) { .lead { white-space: nowrap; } }
.sub { font: 400 17px/1.6 var(--read); color: var(--dim); max-width: 46ch; }
.scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.scroll-hint i { width: 1px; height: 56px; background: linear-gradient(var(--accent), transparent); }
.scroll-hint:hover { color: var(--text); }

/* stacja = sekcja: numer, tytuł na całą szerokość, pod nim opis i korzyści w dwóch kolumnach */
.station { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding-block: 12vh; }
.station .eyebrow { justify-content: flex-start; gap: 14px; color: var(--dim); }
.station .eyebrow b { color: var(--accent); font-weight: 500; }
h2 { font-size: clamp(34px, 4.8vw, 72px); line-height: .98; letter-spacing: -.04em; font-weight: 500; max-width: 16ch; text-wrap: balance; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px clamp(32px, 6vw, 120px); margin-top: 12px; padding-bottom: 56px; }
.cols > p { font: 400 17px/1.6 var(--read); color: var(--dim); max-width: 44ch; }
.benefits { list-style: none; padding: 0; display: flex; flex-direction: column; font: 500 14.5px/1.5 var(--read); }
.benefits li { padding: 11px 0 11px 26px; border-top: 1px solid var(--line); position: relative; }
.benefits li:last-child { border-bottom: 1px solid var(--line); }
.benefits li::before { content: ""; position: absolute; left: 2px; top: 1.2em; width: 7px; height: 7px; background: var(--accent); }
.refs { font-size: 12px; letter-spacing: .04em; color: var(--muted); }

/* tekst stacji wyłania się, gdy wjeżdża w kadr; o postępie decyduje main.js (--k) */
.station > * { opacity: calc(.15 + .85 * var(--k, 1)); transform: translateY(calc((1 - var(--k, 1)) * 24px)); }

form { display: flex; flex-direction: column; gap: 18px; }
label { display: flex; flex-direction: column; gap: 8px; font: 500 13px var(--read); color: var(--dim); letter-spacing: .02em; }
input, textarea { font: 400 16px var(--read); color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; border-radius: 0; }
input:focus, textarea:focus { outline: 0; border-bottom-color: var(--accent); }
textarea { resize: vertical; }
button { align-self: flex-start; display: inline-flex; gap: 12px; align-items: center; font: 500 15px var(--sans); color: var(--bg); background: var(--text); border: 0; padding: 14px 22px; cursor: pointer; }
button:hover { background: var(--accent); }
.note { font: 400 12px/1.5 var(--read); color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.foot { padding: 40px var(--gutter) 36px calc(var(--gutter) + var(--rail)); display: flex; flex-direction: column; gap: 22px; font-size: 13px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.owner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.owner b { font-weight: 600; font-size: 15px; color: var(--dim); letter-spacing: -.01em; }
.owner small { font-size: 11.5px; font-style: italic; color: color-mix(in srgb, var(--muted) 72%, transparent); letter-spacing: .01em; }

@media (min-width: 900px) {
  :root { --rail: 220px; }
  .rail, .readout { display: flex; }
}
.cookies { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 9px var(--gutter); background: rgba(7, 8, 11, .94); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.cookies p { margin: 0; flex: 1 1 520px; font: 400 12px/1.4 var(--read); color: var(--muted); }
.cookies strong { color: var(--text); font-weight: 600; }
.cookies a { color: var(--accent); }
.cookies-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cookies button { all: unset; cursor: pointer; padding: 7px 13px; background: var(--accent); color: #141008; font: 500 12px/1 var(--read); letter-spacing: .01em; }
.cookies button.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.cookies button:hover, .cookies button:focus-visible { filter: brightness(1.1); outline: none; box-shadow: inset 0 0 0 1px var(--accent); }
@media (max-width: 760px) {
  .hero { padding-bottom: 40vh; }
  .hero-foot { grid-template-columns: 1fr; gap: 20px; }
  .scroll-hint { display: none; }
  .eyebrow { flex-direction: column; gap: 6px; }
  .station { min-height: 0; padding-block: 10vh; }
  .cols { grid-template-columns: 1fr; gap: 24px; }
  .cols > p { font-size: 17px; }
  .top { padding: 18px 20px; }
  .logo span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .station > * { opacity: 1; transform: none; }
  #scene, .horizon, .readout, .rail a, .rail a b, .rail a::before { transition: none; }
}
