/* Fonts are self-hosted (SIL Open Font License 1.1, see fonts/OFL-*.txt): Barlow Condensed 500 and IBM Plex Sans
   (variable, 400-500, and italic 400), latin + latin-ext subsets for ő and ű. No third-party request. */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/barlow-condensed-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/barlow-condensed-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: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-italic-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-italic-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: "IBM Plex Sans"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-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; }
:root {
  --bg: #0b0b0a;
  --panel: rgba(11, 11, 10, 0.94);
  --ink: #e8e2d4;
  --muted: #a39e93;
  --faint: #6c685f;
  --line: #2a2925;
  --accent: #d6a04c;
  --neutral: #87827a;
  /* the three sources' outlines in the sources diagram */
  --set1: #d6a04c; --set2: #8fb0cc; --set4: #a7bf8f;
  --num: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--sans); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration-color: var(--faint); text-underline-offset: 3px; }
.nw { white-space: nowrap; }
.num { font-family: var(--num); font-weight: 500; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }


/* the sticky stage under the scrolling text */
#story { position: relative; }
#stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 0; }
#squares { display: block; width: 100%; height: 100%; }
#labels, #labels .lset { position: absolute; inset: 0; pointer-events: none; }
#labels .lset { opacity: 0; visibility: hidden; }
.lab { position: absolute; white-space: nowrap; font-size: 12px; line-height: 17px; color: var(--muted); }
.lab.al-r { transform: translateX(-100%); }
.lab.al-c { transform: translateX(-50%); }
.lab.band-l { color: var(--ink); }
.lab.band-r { font-family: var(--num); font-size: 15px; letter-spacing: 0.02em; color: var(--ink); }
.lab.aside { color: var(--faint); }
.lab.axis { font-family: var(--num); font-size: 14px; color: var(--muted); }
.lab.peak, .lab.colval { font-family: var(--num); font-size: 15px; color: var(--ink); }
.lab.place { color: var(--ink); text-shadow: 0 0 6px var(--bg), 0 0 2px var(--bg); }
.lab.vset { font-size: 13px; padding: 0 5px; border-radius: 2px; background: rgba(11, 11, 10, 0.86); }
.lab.vset.s1 { color: var(--set1); } .lab.vset.s2 { color: var(--set2); } .lab.vset.s4 { color: var(--set4); }
.lab.vnum { font-family: var(--num); font-size: 15px; color: var(--ink); text-shadow: 0 0 6px var(--bg), 0 0 3px var(--bg); }
.lsvg { position: absolute; left: 0; top: 0; overflow: visible; }
.lsvg .map { fill: rgba(232, 226, 212, 0.03); stroke: var(--faint); stroke-width: 1; stroke-linejoin: round; }
.lsvg .ring { fill: none; stroke-width: 1.5; }
.lsvg .ring.s1 { stroke: var(--set1); } .lsvg .ring.s2 { stroke: var(--set2); } .lsvg .ring.s4 { stroke: var(--set4); }
.lab.colval.accent::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 4px; background: var(--accent); vertical-align: 2px; }
.slot {
  position: absolute; border: 1px solid var(--neutral);
  background: repeating-linear-gradient(135deg, #e8e2d461 0 1px, transparent 1px 4px);
}
.slot.accent { border-color: var(--accent); background: repeating-linear-gradient(135deg, #d6a04c8c 0 1px, transparent 1px 4px); }

#walk { position: absolute; left: 16px; right: 16px; top: calc(20px + env(safe-area-inset-top)); max-width: 560px; margin: 0 auto; opacity: 0; pointer-events: none; }
#walk p { margin: 0; }
#walk .year { font-family: var(--num); font-weight: 500; font-size: 76px; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
#walk .count { margin-top: 6px; font-size: 15px; color: var(--muted); }
#walk .count .num { color: var(--ink); font-size: 17px; }
#walk .line { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 300px; }
#counter {
  position: absolute; left: 16px; right: 16px; bottom: 14svh; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px;
  font-family: var(--num); color: var(--ink); text-shadow: 0 0 18px var(--bg), 0 0 4px var(--bg);
  opacity: 0; transition: opacity 0.4s ease;   /* hidden until the first square lights: no "0 ember" flash on load */
}
#counter .n { font-size: 64px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
#counter .u { font-size: 22px; color: var(--muted); }
#counter .pg { flex-basis: 100%; margin-top: 4px; font-size: 20px; letter-spacing: 0.02em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* the scrolling text */
#steps { position: relative; z-index: 2; margin-top: -100vh; margin-top: -100svh; }
#reveal { height: 560vh; height: 560svh; padding: 72px 16px 0; }
/* the title and what the project is, over the still-dark field; it scrolls away as the first squares light */
#reveal .intro { max-width: 560px; margin: 0 auto; padding-top: 14svh; }
#reveal .title { font-size: 46px; line-height: 1; margin: 0 0 20px; }
#reveal .intro p { margin: 0 0 14px; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 30em; }
/* the entry to the page: a little larger than the body text, in ink */
#reveal .intro p.lede { margin: 0 0 8px; font-size: 19px; line-height: 1.6; color: var(--ink); }
#reveal .intro p.source { margin: 0 0 24px; font-size: 13px; line-height: 1.5; color: var(--faint); }
#reveal .intro .updated { margin-top: 22px; font-size: 13px; letter-spacing: 0.04em; }
/* HU · EN, under the update line: the current language in ink, the other a quiet link */
#reveal .langs { margin: -6px 0 0; font-size: 13px; line-height: 1.55; letter-spacing: 0.08em; color: var(--muted); }
#reveal .langs .cur { color: var(--ink); }
#reveal .langs .sep { color: var(--faint); }
#reveal .langs a { color: var(--muted); text-decoration-color: var(--line); }

/* the opening: nothing but the dark field and a small arrow, which goes once the reader scrolls */
#scrollcue {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 6; margin-left: -20px;
  line-height: 0; pointer-events: none; transition: opacity 0.7s ease;
}
#scrollcue path { fill: none; stroke: var(--ink); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
#scrollcue svg { animation: cue-drop 2.2s ease-in-out infinite; }
#scrollcue .c1 { animation: cue-light 2.2s ease-in-out infinite; }
#scrollcue .c2 { animation: cue-light 2.2s ease-in-out 0.25s infinite; }
@keyframes cue-drop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes cue-light { 0%, 100% { opacity: 0.3; } 45% { opacity: 1; } }
body:not(.unstarted) #scrollcue { opacity: 0; }
/* under the arrow, while it shows: the opening's text fades out before it reaches the arrow (the opening is taller than
   a phone screen), so the arrow never sits on text; it goes with the arrow. --scrim-solid: where the band turns opaque,
   above the arrow's top (26px + 34px + its 7px drop from the bottom) */
#cuescrim {
  --scrim-solid: 48px;
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(120px + env(safe-area-inset-bottom)); z-index: 5; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 11, 10, 0), var(--bg) var(--scrim-solid)); transition: opacity 0.7s ease;
}
body:not(.unstarted) #cuescrim { opacity: 0; }
.step { margin-top: 175vh; margin-top: 175svh; padding: 0 16px; }
.step.long { margin-top: 260svh; }
.step.hero { margin-top: 40svh; }
.step.walk { margin-top: 70svh; }
.step.walk + .step { margin-top: 150svh; }
.card {
  max-width: 560px; margin: 0 auto; padding: 22px 20px 24px;
  background: var(--panel); border-top: 1px solid var(--line);
}
.kicker { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h1, h2 { font-family: var(--num); font-weight: 500; margin: 0 0 12px; line-height: 1.05; letter-spacing: 0.005em; }
h2 { font-size: 30px; }
.big { display: flex; align-items: baseline; gap: 12px; }
.big .num { font-size: 72px; line-height: 0.95; }
.big .unit { font-family: var(--num); font-size: 26px; color: var(--muted); }
.card p.sub { margin: 2px 0 12px; font-family: var(--num); font-size: 22px; color: var(--muted); }
.card p.sub .num { color: var(--ink); }
.card p { margin: 0 0 12px; }
.card p .num { font-size: 1.12em; }
.framing { border-left: 2px solid var(--line); padding-left: 14px; color: var(--muted); font-style: italic; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.sw { display: inline-block; width: 9px; height: 9px; margin-right: 6px; vertical-align: 0; background: var(--ink); }
.sw.accent { background: var(--accent); }
.sw.neutral { background: var(--neutral); }
.sw.slot { position: static; width: 12px; height: 9px; border: 1px solid var(--neutral); background: repeating-linear-gradient(135deg, #e8e2d480 0 1px, transparent 1px 3px); }
.step.next .card { color: var(--muted); }


/* the footer is a screen of its own, like every other section; its text is still to be written */
#foot {
  position: relative; z-index: 2; box-sizing: border-box; min-height: 100vh; min-height: 100svh; max-width: 592px; margin: 0 auto;
  padding: 48px 16px calc(48px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: center;
  font-size: 16px; line-height: 1.55; color: var(--muted);
}
#foot p { margin: 0 0 14px; max-width: 30em; }
#foot strong { color: var(--ink); }
#foot strong { font-weight: 500; }

/* "Powered by AIDepartment": at the very top, above the opening, it scrolls away with it; and in the footer.
   Quiet: the faint and muted greys, AIDepartment's own mark the only colour */
.aid-mark { width: 1.65em; height: 1em; margin-right: 0.5em; vertical-align: -0.12em; }
#aid-mark .walls, #aid-mark .gap { fill: none; stroke-miterlimit: 8; }
#aid-mark .walls { stroke: var(--ink); }
#aid-mark .gap { stroke: var(--bg); }
#poweredTop {
  position: absolute; z-index: 3; top: calc(24px + env(safe-area-inset-top)); left: 16px; right: 16px; max-width: 560px;
  margin: 0 auto; font-size: 13px; line-height: 1.55; letter-spacing: 0.04em; color: var(--faint);
}
#poweredTop a { color: var(--muted); text-decoration-color: var(--line); }
#poweredTop a:hover, #poweredTop a:focus-visible { color: var(--ink); text-decoration-color: var(--faint); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
@media (prefers-reduced-motion: reduce) { #walk { position: absolute; left: 16px; right: 16px; top: calc(20px + env(safe-area-inset-top)); max-width: 560px; margin: 0 auto; opacity: 0; pointer-events: none; }
#walk p { margin: 0; }
#walk .year { font-family: var(--num); font-weight: 500; font-size: 76px; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
#walk .count { margin-top: 6px; font-size: 15px; color: var(--muted); }
#walk .count .num { color: var(--ink); font-size: 17px; }
#walk .line { margin-top: 8px; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 300px; }
#counter { transition: none; }
#scrollcue svg, #scrollcue path { animation: none; } }

/* gaps: what is missing, as an outlined empty space */
.gap { position: absolute; border: 1px solid #4a4741; }
.foot { font-size: 14px; color: var(--muted); }

/* cover names: all on one screen, one square size for every name; the bars are stage squares, these labels sit beside them */
.lab.nkick { font-size: 12px; line-height: 19px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lab.nhead { white-space: normal; font-size: 14px; line-height: 1.4; color: var(--muted); }
.lab.nm { overflow: hidden; text-overflow: clip; font-size: 13px; color: var(--ink); }
.lab.ncount { font-family: var(--num); font-weight: 500; font-size: 14px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; color: var(--muted); }
.step.names-all { margin-top: 50svh; }   /* the bars have formed in the step before: a short hold to read them */
.nrest { margin-top: 60svh; }
.namelist { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; font-size: 15px; color: var(--muted); }
.namelist li { display: flex; justify-content: space-between; gap: 8px; break-inside: avoid; padding: 2px 0; }
.namelist li span { color: var(--ink); }
.themes { list-style: none; margin: 0 0 8px; padding: 0; font-size: 14px; color: var(--muted); }
.themes li { padding: 3px 0; }
.themes b { font-weight: 500; color: var(--ink); margin-right: 6px; }
