/* Formeta — kaydirmali 3D sahne. Tek tema (gece maci), bilerek koyu. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --night: #05080F;
  --ink: #EEF2F7;
  --muted: #8592A8;
  --dim: #5E6A80;
  --line: rgba(238, 242, 247, 0.12);
  --teal: #2FD1C6;
  --draw: #5B6880;
  --away: #3A4A68;
  --gold: #F5B94D;
  --red: #FF6B6B;
  --green: #34C38F;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px), 4vw);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 17px/1.55 var(--display);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--teal); text-underline-offset: 3px; }
p, h1, h2, ul, dl, dd { margin: 0; }
b { font-weight: 650; color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- sahne katmanlari ---------- */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(5, 8, 15, 0.85) 100%),
    linear-gradient(180deg, rgba(5, 8, 15, 0.55) 0%, transparent 18%, transparent 78%, rgba(5, 8, 15, 0.7) 100%);
}
html.no-webgl #stage { display: none; }
html.no-webgl body {
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(47, 209, 198, 0.10), transparent 70%),
    var(--night);
}

/* ---------- ust bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter) 16px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em;
}
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.mark img { border-radius: 6px; }
.hud { color: var(--muted); font-variant-numeric: tabular-nums; }
.hud span { color: var(--teal); }
.join-link { color: var(--night); background: var(--teal); text-decoration: none; padding: 9px 14px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.join-link:hover { background: var(--ink); }
@media (max-width: 560px) { .hud { display: none; } }

.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 2px; z-index: 20; background: var(--line); }
.progress i { display: block; height: 100%; width: 100%; background: var(--teal); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- bolumler ---------- */
#story { position: relative; z-index: 10; }
.chapter { position: relative; height: 230vh; }
.ch-hero { height: 170vh; }
.ch-end { height: auto; min-height: 100vh; }
.panel {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: 96px var(--gutter) 72px;
  opacity: var(--vis, 1);
  transform: translate3d(0, calc((1 - var(--vis, 1)) * 28px), 0);
  will-change: opacity, transform;
}
.panel-left { max-width: min(560px, 100%); }
.panel-right { margin-left: auto; max-width: min(600px, 100%); }
.panel-center { align-items: center; text-align: center; max-width: 980px; margin: 0 auto; justify-content: flex-end; padding-bottom: 9vh; }
.panel-end { position: relative; height: auto; min-height: 100vh; justify-content: flex-end; gap: 64px; padding-top: 140px; }

.idx, .eyebrow, .meta-row, .scroll-cue, .fine, .readout, .lab, .league-index, .wl-consent, .foot {
  font-family: var(--mono);
}
.idx, .eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; color: var(--teal); text-transform: uppercase; }
h2 {
  font-size: clamp(2.6rem, 6.4vw, 5.6rem);
  line-height: 0.92;
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
}
.body { color: #C3CBD8; max-width: 34em; font-size: clamp(1rem, 1.3vw, 1.12rem); }
.body.dim { color: var(--muted); }
.fine { font-size: 0.72rem; color: var(--dim); letter-spacing: 0.06em; }

/* hero */
.ch-hero .panel { justify-content: flex-end; gap: 18px; padding-bottom: 12vh; }
.wordmark {
  font-size: clamp(3.2rem, 13.2vw, 15rem);
  line-height: 0.8;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.045em;
  margin-left: -0.04em;
  color: var(--ink);
}
.hero-line { font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1.08; font-weight: 300; font-stretch: 90%; }
.hero-line em { font-style: normal; font-weight: 700; color: var(--teal); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.75rem; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.meta-row span + span::before { content: "/"; margin-right: 22px; color: var(--dim); }
.scroll-cue { position: absolute; right: var(--gutter); bottom: 10vh; display: flex; align-items: center; gap: 12px; font-size: 0.68rem; letter-spacing: 0.24em; color: var(--muted); }
.cue-line { display: block; width: 64px; height: 1px; background: var(--muted); transform-origin: 0 50%; animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: 100% 50%; } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

/* 02 */
.readout { display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 30em; font-size: 0.8rem; }
.readout div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.readout dt { color: var(--muted); }
.readout dd { color: var(--teal); font-variant-numeric: tabular-nums; }

/* 03 */
.triple { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 36px; }
.triple div { display: flex; flex-direction: column; gap: 6px; }
.big {
  font-size: clamp(3.4rem, 8vw, 7rem); line-height: 0.85; font-weight: 800; font-stretch: 70%;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em;
}
.big::before { content: "%"; font-size: 0.42em; font-weight: 500; vertical-align: 0.95em; margin-right: 0.06em; color: var(--muted); }
.triple div:nth-child(1) .big { color: var(--teal); }
.triple div:nth-child(2) .big { color: #9AA6BC; }
.triple div:nth-child(3) .big { color: #7084A6; }
.lab { font-size: 0.68rem; letter-spacing: 0.14em; color: var(--muted); }

/* 04 */
.tally { display: flex; align-items: baseline; gap: 14px; }
.tally #tally { font-size: clamp(4rem, 10vw, 8.5rem); line-height: 0.85; font-weight: 800; font-stretch: 70%; color: var(--teal); font-variant-numeric: tabular-nums; }
.tally .of { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); letter-spacing: 0.1em; }

/* 05 */
.panel-center h2 .num { color: var(--teal); }
.league-index { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; max-width: 760px; font-size: 0.74rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.league-index li.cup { color: var(--gold); }

/* 06 */
.end-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.end-main, .end-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.end-main h2 { font-size: clamp(2.2rem, 4.8vw, 4.2rem); }
.nots { list-style: none; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.nots li { padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line); position: relative; color: #C3CBD8; }
.nots li::before { content: "×"; position: absolute; left: 0; top: 9px; font-family: var(--mono); color: var(--red); font-size: 1.1rem; }
.rg-h { margin-top: 10px; }
@media (max-width: 860px) { .end-grid { grid-template-columns: 1fr; } }

.wl-form { display: flex; flex-direction: column; gap: 14px; max-width: 36rem; }
.wl-row { display: flex; border: 1px solid rgba(238, 242, 247, 0.28); background: rgba(5, 8, 15, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.wl-row:focus-within { border-color: var(--teal); }
.wl-row input {
  flex: 1 1 auto; min-width: 0; height: 58px; padding: 0 18px;
  border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem;
}
.wl-row input::placeholder { color: var(--dim); }
.wl-row input:focus { outline: none; }
.wl-row button {
  flex: 0 0 auto; height: 58px; padding: 0 26px; border: 0; cursor: pointer;
  background: var(--teal); color: var(--night);
  font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
}
.wl-row button:hover { background: var(--ink); }
.wl-row button:disabled { opacity: 0.6; cursor: progress; }
.wl-consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.72rem; line-height: 1.6; color: var(--muted); cursor: pointer; }
.wl-consent input { margin: 2px 0 0; width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--teal); }
.wl-status { min-height: 1.5em; font-family: var(--mono); font-size: 0.8rem; }
.wl-status.ok { color: var(--green); }
.wl-status.err { color: var(--red); }
.wl-form.done .wl-row, .wl-form.done .wl-consent { display: none; }
@media (max-width: 480px) {
  .wl-row { flex-direction: column; }
  .wl-row button { width: 100%; }
}

.foot { display: flex; flex-direction: column; gap: 14px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--dim); line-height: 1.7; padding-bottom: env(safe-area-inset-bottom, 0px); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--teal); }

/* ---------- hareketsiz mod ---------- */
@media (prefers-reduced-motion: reduce) {
  .cue-line { animation: none; transform: scaleX(1); }
}
html.static .chapter { height: auto; }
html.static .panel { position: relative; height: auto; min-height: 100vh; opacity: 1; transform: none; }
html.static .panel-end { min-height: 0; }

@media (max-width: 700px) {
  .panel::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 78%; z-index: -1; pointer-events: none;
    background: linear-gradient(0deg, rgba(5, 8, 15, 0.96) 0%, rgba(5, 8, 15, 0.86) 55%, rgba(5, 8, 15, 0) 100%);
  }
  .panel-end::before { height: 100%; background: rgba(5, 8, 15, 0.9); }
  h2 { font-size: clamp(2.1rem, 10.5vw, 2.8rem); }
  .big { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .tally #tally { font-size: 3.6rem; }
  .panel { gap: 16px; }
  .chapter { height: 200vh; }
  .ch-hero { height: 150vh; }
  .panel { justify-content: flex-end; padding-bottom: 64px; }
  .panel-right { margin-left: 0; }
  .triple { gap: 8px 22px; }
}

html.static .hud, html.static .progress { display: none; }
