@font-face { font-family: "Bodoni"; src: url("fonts/bodoni.woff2") format("woff2"); font-weight: 400 900; font-style: normal; }
@font-face { font-family: "Bodoni"; src: url("fonts/bodoni-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; }
@font-face { font-family: "Jost"; src: url("fonts/jost.woff2") format("woff2"); font-weight: 300 600; }

:root {
  /* Field / Form palette */
  --charcoal: #090907;
  --char-2: #12100c;
  --earth: #6c5636;
  --amber: #b99d73;
  --ember: #c9572a;
  --ivory: #ece3cf;
  --ivory-dim: #9d9481;
  --line: rgba(236, 227, 207, .16);

  --fin: #ece3cf;
  --pol: #d9632f;
  --rus: #b99d73;

  --serif: "Bodoni", "Bodoni 72", Didot, Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", sans-serif;
  --ease: cubic-bezier(.22, .7, .12, 1);
  --panel-l: 560px;
  --panel-r: 150px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #000; color: var(--ivory); overflow: hidden; }
body { font-family: var(--sans); font-weight: 300; -webkit-font-smoothing: antialiased; }
b, strong { font-weight: 500; color: var(--ivory); }

#viewport { position: fixed; inset: 0; background: #000; overflow: hidden; }
#stage { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; overflow: hidden; background: var(--charcoal); transform-origin: center; }

/* film grain over everything */
#grain { position: absolute; inset: -50%; pointer-events: none; z-index: 60; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(5) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-2%,1%)} 50%{transform:translate(1%,-2%)} 75%{transform:translate(2%,2%)} 100%{transform:translate(0,0)} }

/* ---------- chrome ---------- */
.chrome { position: absolute; z-index: 40; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--ivory-dim); font-weight: 400; }
#brand { top: 40px; left: 64px; font-size: 14px; letter-spacing: .34em; color: var(--ivory); font-weight: 300; }
#nav { top: 44px; right: 64px; display: flex; gap: 46px; }
#nav span { padding-bottom: 8px; transition: color .5s; }
#nav span.on { color: var(--ivory); border-bottom: 1px solid var(--ember); }
#count { bottom: 40px; left: 64px; display: flex; align-items: center; gap: 22px; letter-spacing: .24em; color: var(--ivory); }
#count .track { width: 70px; height: 1px; background: var(--line); position: relative; }
#count .track i { position: absolute; left: 0; top: 0; height: 1px; background: var(--ember); transition: width .9s var(--ease); }
#crumbs { bottom: 40px; right: 64px; letter-spacing: .26em; }
#crumbs span { transition: color .5s; }
#crumbs span.on { color: var(--ember); }

/* ---------- scenes ---------- */
.scene { position: absolute; inset: 0; z-index: 10; visibility: hidden; pointer-events: none; }
.scene.is-active { visibility: visible; pointer-events: auto; }
.scene.is-leaving { visibility: visible; z-index: 9; }

/* photo panel: wipes in from the left, image settles with a slow push-in */
.panel { position: absolute; left: var(--panel-l); right: var(--panel-r); top: 74px; bottom: 0; overflow: hidden; background: var(--char-2);
  clip-path: inset(0 100% 0 0); transition: clip-path 1.3s var(--ease); }
.scene.is-active .panel { clip-path: inset(0 0 0 0); transition-delay: .1s; }
.scene.is-leaving .panel { clip-path: inset(0 0 0 0); transition: none; }
#stage[data-dir="back"] .scene:not(.is-active):not(.is-leaving) .panel { clip-path: inset(0 0 0 100%); }
.panel .img { position: absolute; inset: -30px; background-size: cover; background-position: center;
  filter: sepia(.6) saturate(.62) contrast(1.16) brightness(.84); transform: scale(1.14); transition: transform 9s cubic-bezier(.2,.6,.2,1); will-change: transform; }
.scene.is-active .panel .img { transform: scale(1.02) translate(var(--mx, 0px), var(--my, 0px)); }
.panel .img.bw { filter: grayscale(1) sepia(.35) contrast(1.15) brightness(.8); }
.panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 170px 36px rgba(9,9,7,.78), inset 0 0 0 1px rgba(205,135,85,.30);
  background: linear-gradient(180deg, rgba(9,9,7,.25) 0%, rgba(9,9,7,0) 30%, rgba(9,9,7,.15) 70%, rgba(9,9,7,.55) 100%),
              radial-gradient(120% 90% at 60% 40%, rgba(201,87,42,.10), rgba(9,9,7,0) 60%); }
.panel:not(.dark)::before { content: ""; position: absolute; inset: -20%; z-index: 1; pointer-events: none; mix-blend-mode: screen; opacity: .22;
  background: radial-gradient(40% 35% at 50% 50%, rgba(232,140,80,.55), rgba(232,140,80,0) 70%); animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { 0% { transform: translate(-22%, -12%); } 50% { transform: translate(18%, 6%); } 100% { transform: translate(-6%, 20%); } }
.panel .img::after { content: ""; position: absolute; inset: 0; opacity: .38; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); background-size: 180px; }
.panel .img::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 45%, rgba(0,0,0,0) 50%, rgba(70,30,12,.55) 100%); }
.panel.dark .img { opacity: .07; filter: grayscale(1) contrast(1.2); }
.panel .credit { position: absolute; left: 24px; bottom: 20px; z-index: 5; font-size: 10px; letter-spacing: .14em; color: rgba(236,227,207,.62); text-transform: uppercase; }
.panel .credit.top { top: auto; bottom: calc(46% + 8px); left: 34px; }
#s10 .panel .credit.top { bottom: auto; top: 24px; left: 70px; }
.panel .credit i { text-transform: none; font-style: italic; font-family: var(--serif); letter-spacing: .02em; font-size: 12px; }

/* ---------- persistent motif: one set of objects that glides between scenes ---------- */
#motif { position: absolute; inset: 0; z-index: 13; pointer-events: none; }
#motif > * { position: absolute; transition: left 1.3s var(--ease), top 1.3s var(--ease), right 1.3s var(--ease), width 1.3s var(--ease),
  height 1.3s var(--ease), transform 1.3s var(--ease), opacity .9s var(--ease); }
#g-rust { left: 550px; top: 0; width: 46px; height: 230px; z-index: 2; transform-origin: top;
  background: linear-gradient(180deg, #a94a22, #c9572a 60%, #8f3d1c); }
#g-rust::after { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply; opacity: .85; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='260'><filter id='w'><feTurbulence type='fractalNoise' baseFrequency='.045 .02' numOctaves='5' seed='5'/><feColorMatrix values='0 0 0 0 .22  0 0 0 0 .08  0 0 0 0 .03  1.9 0 0 0 -.75'/></filter><filter id='k'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='2'/><feColorMatrix values='0 0 0 0 .95  0 0 0 0 .62  0 0 0 0 .42  3 0 0 0 -2.2'/></filter><rect width='100%' height='100%' filter='url(%23w)'/><rect width='100%' height='100%' filter='url(%23k)'/></svg>"); background-size: 160px 260px; }
#g-rust { clip-path: polygon(0 0, 100% 0, 100% 97.5%, 86% 98.6%, 71% 97.2%, 58% 99.4%, 43% 98%, 30% 99.6%, 17% 97.8%, 6% 99%, 0 97.6%); }
#g-arc { left: 350px; top: 690px; width: 420px; height: 420px; border-radius: 50%; border: 1.5px solid var(--ember); clip-path: inset(0 0 50% 50%); opacity: .9; }
#stage[data-layout="chapter"] #g-arc, #stage[data-layout="data"] #g-arc, #stage[data-layout="plain"] #g-arc { opacity: 0; transform: rotate(40deg); }
#g-vline { right: 150px; top: 0; width: 1px; height: 440px; background: var(--ember); opacity: .9; }
#g-num { right: 10px; top: 70px; display: flex; font-family: var(--serif); font-weight: 800; font-variation-settings: "opsz" 96; font-size: 440px; line-height: .8; letter-spacing: -.035em; z-index: 3;
  transform-origin: top right; transform: translate(var(--nx, 0px), var(--ny, 0px)); }
#g-num .dg { display: block; height: .8em; overflow: hidden; }
#g-num .dg + .dg { margin-left: -.06em; }
#g-num .strip { display: flex; flex-direction: column; transition: transform 1.25s cubic-bezier(.6,.05,.2,1); }
#g-num .strip span { display: block; height: .8em; text-align: left; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='.016' numOctaves='5' seed='3'/><feColorMatrix values='0 0 0 0 .40  0 0 0 0 .36  0 0 0 0 .29  2.1 0 0 0 -.78'/></filter><filter id='c'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='8'/><feColorMatrix values='0 0 0 0 .18  0 0 0 0 .16  0 0 0 0 .13  3.4 0 0 0 -1.9'/></filter><filter id='h'><feTurbulence type='fractalNoise' baseFrequency='.05' numOctaves='3' seed='14'/><feColorMatrix values='0 0 0 0 .97  0 0 0 0 .95  0 0 0 0 .9  1.3 0 0 0 -.98'/></filter><rect width='100%' height='100%' fill='%23b5aa92'/><rect width='100%' height='100%' filter='url(%23b)'/><rect width='100%' height='100%' filter='url(%23h)'/><rect width='100%' height='100%' filter='url(%23c)'/></svg>");
  background-size: 420px; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #cdc4ae;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
#g-disc { right: 352px; top: 318px; width: 114px; height: 114px; border-radius: 50%; background: var(--ember); opacity: .95; z-index: 1;
  transform: translate(calc(var(--nx, 0px) * 1.4), calc(var(--ny, 0px) * 1.4)); }

/* first load: draw the motif in */
#stage.intro #g-rust { transform: scaleY(0); }
#stage.intro #g-arc { opacity: 0; transform: rotate(-30deg); }
#stage.intro #g-vline { height: 0; }
#stage.intro #g-num { opacity: 0; transform: translate(60px, 0); }
#stage.intro #g-disc { opacity: 0; transform: scale(.3); }

/* chart scenes: the numeral shrinks into the right margin so it never sits on data */
#stage[data-layout="data"] #g-num { right: 22px; top: 92px; transform: translate(var(--nx, 0px), var(--ny, 0px)) scale(.34); }
#stage[data-layout="data"] #g-disc { width: 40px; height: 40px; right: 40px; top: 230px; }
#stage[data-layout="data"] #g-vline { height: 120px; }
#stage[data-layout="narrow"] #g-rust { left: 1300px; top: 74px; height: 190px; }
#stage[data-layout="narrow"] #g-arc, #stage[data-layout="narrow"] #g-vline { opacity: 0; }
#stage[data-layout="narrow"] #g-num { right: 22px; top: 92px; transform: scale(.34); }
#stage[data-layout="narrow"] #g-disc { width: 40px; height: 40px; right: 40px; top: 230px; }
#stage[data-layout="none"] #motif > * { opacity: 0; }
#stage[data-layout="none"] #g-rust { transform: scaleY(0); }

/* text column */
.col { position: absolute; left: 64px; top: 128px; width: 452px; z-index: 20; }
.eyebrow { display: flex; align-items: center; gap: 16px; font-size: 11.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--ivory-dim); font-weight: 400; }
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--ember); }
h1, h2 { font-family: var(--serif); font-weight: 400; text-transform: uppercase; line-height: .98; letter-spacing: -.005em; color: var(--ivory); }
h1 { font-size: 92px; margin-top: 40px; }
h2 { font-size: 50px; margin-top: 26px; }
h2.sm { font-size: 42px; }
.ln { display: block; overflow: hidden; padding-bottom: .05em; }
.ln > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.scene.is-active .ln > span { transform: none; transition-delay: calc(.25s + var(--i) * .09s); }
.body { font-size: 16.5px; line-height: 1.6; color: #a9a08c; margin-top: 24px; }
.body p + p { margin-top: 12px; }

.fade { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.scene.is-active .fade { opacity: 1; transform: none; transition-delay: calc(.55s + var(--d, 0) * .1s); }
.scene.is-leaving .fade, .scene.is-leaving .ln > span { opacity: 0; transition: opacity .4s; transition-delay: 0s; }

/* build steps */
[data-step] { transition: opacity .8s var(--ease), transform .9s var(--ease); }
[data-step]:not(.shown) { opacity: 0; transform: translateY(10px); }

.cta { display: flex; align-items: center; gap: 20px; margin-top: 40px; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--ivory); font-weight: 400; }
.cta .ring { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(236,227,207,.55); display: grid; place-items: center; }
.cta .ring svg { width: 14px; height: 14px; }

.source { position: absolute; left: 64px; width: 470px; bottom: 74px; z-index: 20; font-size: 10px; line-height: 1.5; color: rgba(236,227,207,.58); letter-spacing: .02em; }
.source b { color: rgba(236,227,207,.62); font-weight: 400; letter-spacing: .2em; text-transform: uppercase; font-size: 8.5px; margin-right: 6px; }
.source i { font-style: italic; }

.fin { color: var(--fin); } .pol { color: var(--pol); } .rus { color: var(--rus); }

/* ---------- 01 title ---------- */
#s1 h1 { font-size: 104px; }
#s1 .body { max-width: 400px; }

/* ---------- 02 map + stats ---------- */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.mini-stats .k { font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; }
.mini-stats .v { font-family: var(--serif); font-size: 34px; margin-top: 6px; }
.mini-stats .u { grid-column: 1 / -1; font-size: 11px; color: var(--ivory-dim); margin-top: -6px; }
.notes { margin-top: 20px; display: grid; gap: 11px; }
.notes div { display: grid; grid-template-columns: 82px 1fr; gap: 14px; font-size: 14px; line-height: 1.5; color: var(--ivory-dim); }
.notes div b { font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; font-weight: 400; padding-top: 4px; }
#map { position: absolute; inset: 0; z-index: 2; }
#map svg { width: 100%; height: 100%; }
#map .other { fill: #1a1712; stroke: rgba(236,227,207,.06); stroke-width: .7; }
#map .empire { fill: rgba(185,157,115,.38); stroke: rgba(236,227,207,.16); stroke-width: .7; }
#map .fin-shape, #map .pol-shape { stroke: rgba(236,227,207,.55); stroke-width: 1; transition: fill 1.1s var(--ease), stroke 1s; }
#map .fin-shape { fill: rgba(236,227,207,.88); }
#map .pol-shape { fill: rgba(217,99,47,.9); }
#map[data-step="0"] .fin-shape, #map[data-step="0"] .pol-shape { fill: rgba(185,157,115,.38); stroke: rgba(236,227,207,.16); }
#map .pol-bloc { fill: url(#hatch); opacity: 0; transition: opacity 1s var(--ease); }
#map[data-step="2"] .pol-bloc { opacity: 1; }
#map .tag { font-family: var(--sans); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; fill: var(--ivory); font-weight: 400; }
#map .tag.sub { font-size: 10px; fill: var(--ivory-dim); letter-spacing: .14em; }
#map .city { fill: var(--ivory); }
#map .city-label { font-family: var(--serif); font-style: italic; font-size: 15px; fill: var(--ivory-dim); }
#map .yearstamp { font-family: var(--serif); font-size: 150px; fill: rgba(236,227,207,.08); }

/* ---------- charts ---------- */
svg.chart text { font-family: var(--sans); fill: var(--ivory-dim); font-size: 12px; font-weight: 300; }
svg.chart .grid line { stroke: var(--line); }
svg.chart .series { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .end-label { font-size: 10.5px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
svg.chart .end-value { font-family: var(--serif); font-size: 26px; }
svg.chart .event line { stroke: rgba(185,157,115,.4); stroke-dasharray: 2 4; }
svg.chart .event text { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; fill: var(--amber); }
svg.chart .band { fill: rgba(201,87,42,.08); }
svg.chart .band-label { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; fill: rgba(217,99,47,.85); }
.chart-box { position: absolute; left: 36px; right: 36px; top: 40px; bottom: 50px; z-index: 2; }
.chart-box svg { width: 100%; height: 100%; }

.captions { position: relative; margin-top: 24px; min-height: 168px; }
.captions p { position: absolute; left: 0; top: 0; font-size: 16.5px; line-height: 1.6; color: var(--ivory-dim); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.captions p:not(.on) { opacity: 0; transform: translateY(10px); }
.captions .yr { display: block; font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--amber); margin-bottom: 6px; }
.pops { display: flex; gap: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ivory-dim); }
.pops b { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; }

.multi { position: absolute; inset: 34px 36px 74px 36px; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 26px 36px; }
.multi .cell { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; min-height: 0; }
.multi h4 { font-family: var(--serif); font-weight: 400; font-size: 21px; }
.multi .u { font-size: 11px; color: var(--ivory-dim); letter-spacing: .06em; }
.multi svg { flex: 1; width: 100%; min-height: 0; margin-top: 4px; }
#s4 svg.chart .end-value { font-family: var(--sans); font-size: 12.5px; font-weight: 500; }
.legend { display: flex; gap: 22px; margin-top: 24px; font-size: 10px; letter-spacing: .26em; text-transform: uppercase; }
.legend i { display: inline-block; width: 20px; height: 2px; vertical-align: middle; margin-right: 9px; }

/* ---------- 05 paradox ---------- */
.ha { margin-top: 24px; }
.ha .row { display: grid; grid-template-columns: 1fr auto; align-items: end; padding: 13px 0 11px; border-top: 1px solid var(--line); }
.ha .who { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; }
.ha .meta { font-size: 13.5px; color: var(--ivory-dim); margin-top: 4px; }
.ha .big { font-family: var(--serif); font-size: 50px; line-height: .9; }
.ha .bar { grid-column: 1 / -1; height: 2px; background: var(--line); margin-top: 10px; position: relative; }
.ha .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transition: width 1.8s var(--ease) .9s; }
.scene.is-active .ha .bar i { width: var(--w); }
.over89 { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 60px 34px 56px; background: linear-gradient(0deg, rgba(9,9,7,.97) 62%, rgba(9,9,7,0)); }
.over89 .t { font-family: var(--serif); font-size: 24px; line-height: 1.25; max-width: 660px; }
.over89 .t em { color: var(--amber); }
.over89 .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 18px; }
.over89 .lab { font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.over89 .r { display: grid; grid-template-columns: 62px 1fr 82px; align-items: center; gap: 10px; font-size: 12px; color: var(--ivory-dim); margin-top: 6px; }
.over89 .r .tr { height: 10px; position: relative; }
.over89 .r .tr i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transition: width 1.4s var(--ease) .3s; }
.over89.shown .r .tr i { width: var(--w); }
.over89 .r b { font-size: 12.5px; text-align: right; }

/* ---------- 06 to 08 chapters ---------- */
.tl { margin-top: 20px; display: grid; }
.tl > div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.38; color: var(--ivory-dim); }
.tl > div.now { color: var(--ivory); }
.tl > div.now .y { color: var(--ember); }
.tl > div.shown.past { opacity: .5; }
.tl > div .y { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--amber); line-height: 1.1; }
.chap-chart { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 4; padding: 40px 34px 58px; background: linear-gradient(0deg, rgba(9,9,7,.96) 70%, rgba(9,9,7,0)); }
.chap-chart h4 { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.chap-chart .u { font-size: 11px; color: var(--ivory-dim); }
.chap-chart svg { width: 100%; height: calc(100% - 44px); }
.people { position: absolute; left: 34px; width: 380px; top: 30px; z-index: 4; display: grid; grid-template-columns: 1fr; gap: 12px; }
.person { background: rgba(9,9,7,.74); padding: 14px 16px; border-left: 2px solid var(--ember); }
.person .tag { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--amber); }
.person .n { font-family: var(--serif); font-size: 21px; margin-top: 4px; }
.person .r { font-size: 13.5px; line-height: 1.4; color: #b3aa96; margin-top: 4px; }

/* ---------- 09 matrix ---------- */
#s9 .col { width: 1180px; }
.matrix { display: grid; grid-template-columns: 200px repeat(3, 1fr); margin-top: 28px; }
.matrix .hd { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; padding-bottom: 12px; font-weight: 400; }
.matrix .row { display: contents; }
.matrix .row > div { padding: 13px 26px 13px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.45; color: var(--ivory-dim);
  transition: opacity .8s var(--ease), transform .9s var(--ease); }
.matrix .row > div:first-child { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--amber); line-height: 1.2; }
.matrix .row:not(.shown) > div { opacity: 0; transform: translateY(10px); }
.matrix .row.past > div { opacity: .55; }
.matrix .row > div:nth-child(3) { transition-delay: .08s; } .matrix .row > div:nth-child(4) { transition-delay: .16s; }
#s9 .panel { left: 1310px; right: 0; }

/* ---------- 10 argument ---------- */
.findings { margin-top: 22px; counter-reset: f; }
.findings p { counter-increment: f; display: grid; grid-template-columns: 34px 1fr; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: var(--ivory-dim); }
.findings p::before { content: counter(f, decimal-leading-zero); font-family: var(--serif); font-size: 18px; color: var(--ember); }
.question { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 80px 40px 60px; background: linear-gradient(0deg, rgba(9,9,7,.96) 60%, rgba(9,9,7,0)); }
.question .lab { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--amber); }
.question .q { font-family: var(--serif); font-style: italic; font-size: 34px; line-height: 1.2; margin-top: 10px; max-width: 640px; }
.question .cav { font-size: 13px; color: var(--ivory-dim); margin-top: 14px; max-width: 620px; line-height: 1.55; }

/* ---------- appendix ---------- */
#sA .col { width: 1470px; }
.rel { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 34px; margin-top: 28px; }
.rel h5 { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; font-weight: 400; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.rel ul { list-style: none; margin-top: 6px; }
.rel li { font-size: 12.5px; line-height: 1.5; color: var(--ivory-dim); padding: 7px 0; border-bottom: 1px solid rgba(236,227,207,.07); }
.rel li i { font-style: italic; }

/* export mode: final state, no motion */
.export *, .export *::before, .export *::after { transition: none !important; animation: none !important; }
#s9 .matrix .row > div { font-size: 16px; padding: 19px 28px 19px 0; }
#s9 .matrix .row > div:first-child { font-size: 22px; }
#s10 .findings p { font-size: 16.5px; padding: 16px 0; }
.rel li { font-size: 15px; padding: 10px 0; }

/* chart: a glowing lead dot on every line while it draws */
svg.chart .halo { transform-box: fill-box; transform-origin: center; animation: halo 1.8s ease-out infinite; }
@keyframes halo { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(3.2); opacity: 0; } }
.scene.is-active svg.chart .grid { animation: gridin 1.2s .5s both var(--ease); }
@keyframes gridin { from { opacity: 0; } to { opacity: 1; } }
/* map: independence pulses */
#map .pulse { fill: none; stroke: var(--ember); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
#map[data-step="1"] .pulse { animation: ring 1.8s ease-out 3; }
@keyframes ring { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(4); opacity: 0; } }

/* ---------- 03: zooming income chart ---------- */
svg.chart .gdp-axis { font-size: 15px; fill: var(--ivory-dim); }
svg.chart .gdp-val { font-family: var(--serif); font-size: 30px; }
svg.chart .gdp-name { font-family: var(--sans); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; font-weight: 400; }
#s3 svg.chart .event text { font-size: 11px; }
#s3 svg.chart .band-label { font-size: 11px; }
.lead { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.lead-k { font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--ivory-dim); }
.lead-row { display: flex; align-items: flex-end; gap: 34px; margin-top: 8px; }
.lead-row b { display: block; font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1; }
.lead-row span { font-size: 12px; color: var(--ivory-dim); }
.lead-yr { font-size: 13px; color: var(--ivory-dim); padding-bottom: 4px; }
.lead-yr i { font-family: var(--serif); font-size: 22px; color: var(--amber); }
#s3 .pops { margin-top: 22px; }
#s3 .captions { min-height: 150px; }
.lead-row b small { font-family: var(--sans); font-size: 24px; margin-left: 3px; vertical-align: 4px; }

/* ---------- archive clippings ---------- */
.clips { position: absolute; right: 26px; top: 470px; width: 112px; z-index: 21; display: flex; flex-direction: column; align-items: center; }
.clips-k { font-size: 9px; letter-spacing: .26em; text-transform: uppercase; color: var(--amber); text-align: center; margin-bottom: 12px; line-height: 1.5; }
.clip { display: block; width: 100px; height: 112px; padding: 5px; border: 0; background: #e6dcc6; cursor: zoom-in; transform: rotate(var(--r, 0deg));
  box-shadow: 0 10px 24px rgba(0,0,0,.55); transition: transform .45s var(--ease), box-shadow .45s; }
.clip + .clip { margin-top: -46px; }
.clip img { width: 100%; height: 100%; object-fit: cover; object-position: top; filter: sepia(.35) contrast(1.05); display: block; }
.clip:hover, .clip:focus-visible { transform: rotate(0deg) translateY(-6px) scale(1.06); box-shadow: 0 16px 34px rgba(0,0,0,.7); z-index: 2; outline: none; }

/* reader: the clipping flies up to readable size */
#reader { position: absolute; inset: 0; z-index: 80; display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: center; padding: 56px 80px;
  visibility: hidden; pointer-events: none; }
#reader.open { visibility: visible; pointer-events: auto; }
#reader .rd-back { position: absolute; inset: 0; background: rgba(9,9,7,.94); opacity: 0; transition: opacity .5s var(--ease); }
#reader.open .rd-back { opacity: 1; }
#reader .rd-img { position: relative; height: 788px; display: flex; align-items: center; justify-content: flex-end; }
#reader .rd-img img { max-height: 788px; max-width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.8); transform-origin: 0 0; background: #e6dcc6; }
#reader .rd-cap { position: relative; opacity: 0; transform: translateX(20px); transition: opacity .6s var(--ease) .25s, transform .7s var(--ease) .25s; }
#reader.open .rd-cap { opacity: 1; transform: none; }
#reader .rd-pub { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--amber); }
#reader h3 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.1; margin-top: 14px; }
#reader p { font-size: 18px; line-height: 1.6; color: #b3aa96; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
#reader .rd-hint { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--ivory-dim); margin-top: 30px; }

/* ---------- overview and overlays ---------- */
.scene { transform-origin: 0 0; transition: transform 1s var(--ease), opacity .6s var(--ease); }
#stage.overview #motif, #stage.overview .chrome { opacity: 0; transition: opacity .4s; pointer-events: none; }
#motif, .chrome { transition: opacity .5s; }
#ovbtn { bottom: 38px; left: 50%; transform: translateX(-50%); background: none; border: 0; color: var(--ivory-dim); font: inherit; font-size: 10px; letter-spacing: .3em;
  text-transform: uppercase; display: flex; align-items: center; gap: 4px 10px; cursor: pointer; }
#ovbtn i { display: inline-block; width: 6px; height: 6px; border: 1px solid currentColor; margin-right: -6px; }
#ovbtn i:nth-of-type(4) { margin-right: 6px; }
#ovbtn:hover { color: var(--ivory); }

/* ---------- overview: every slide as a tile ---------- */
#stage.overview { background: #050504; }
#stage.overview .scene { visibility: visible; pointer-events: auto; cursor: zoom-in; overflow: hidden; background: var(--charcoal);
  transform: translate(var(--tx), var(--ty)) scale(var(--ts)); outline: 4px solid rgba(236,227,207,.08); }
#stage.overview .scene * { pointer-events: none; }
#stage.overview .scene.ov-focus { outline: 10px solid var(--ember); }
#stage.overview .scene::after { content: attr(data-num) "   " attr(data-label); position: absolute; left: 0; top: calc(100% + 26px); font-size: 58px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--ivory); white-space: pre; }
#stage.overview .scene { overflow: visible; }
#stage.ov-leaving .scene:not(.ov-target) { opacity: 0; }

/* ---------- trees ---------- */
/* slide 1: a line-drawn forest grows along the foot of the title column */
.title-forest { position: absolute; left: 64px; bottom: 112px; width: 456px; height: 84px; z-index: 19; overflow: visible; }
.title-forest .ground, .stand .ground { stroke: rgba(236,227,207,.22); stroke-width: 1; }
.linepine { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform 1.3s cubic-bezier(.2,.8,.2,1) var(--d, 0s); }
.scene.is-active .linepine { transform: scaleY(1); }
.linepine .crown { transform-box: fill-box; transform-origin: 50% 100%; }
.scene.is-active .linepine .crown { animation: sway var(--sway, 3s) ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }

/* data beats: an overlay inside the photo panel */
.stand { position: absolute; inset: 0; z-index: 7; background: rgba(9,9,7,.94); padding: 52px 46px; opacity: 0; transition: opacity .6s var(--ease); }
.stand.on { opacity: 1; }
.stand-yr { font-family: var(--serif); font-style: italic; font-size: 58px; color: var(--amber); line-height: 1; }
.stand-t { font-size: 22px; line-height: 1.45; color: var(--ivory); max-width: 640px; margin-top: 16px; }
.stand-t b { color: var(--ember); font-weight: 500; }
.stand-src { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ivory-dim); margin-top: 14px; }
.stand-src i { text-transform: none; font-family: var(--serif); font-size: 13px; letter-spacing: 0; }
.stand-svg { position: absolute; left: 0; right: 0; bottom: 30px; width: 100%; height: auto; overflow: visible; }
.stand-lab { font-size: 13px; letter-spacing: .24em; text-transform: uppercase; fill: var(--amber); }
.stump { fill: #6c5636; }
.plot { fill: rgba(236,227,207,.18); }

/* Russia: each tree falls, drops its crown and leaves to the right as a log */
.felltree { transform-box: fill-box; transform-origin: 50% 100%; animation: fellroll 3.6s var(--d, 0s) both; }
@keyframes fellroll {
  0%   { transform: rotate(0deg); animation-timing-function: cubic-bezier(.55,0,.9,.45); }
  28%  { transform: rotate(88deg); animation-timing-function: ease-out; }
  34%  { transform: rotate(83deg); }
  40%  { transform: rotate(86deg); opacity: 1; animation-timing-function: cubic-bezier(.5,0,.75,0); }
  100% { transform: translateX(760px) rotate(86deg); opacity: 0; }
}
.felltree .crown { animation: dropcrown .5s var(--roll, 1s) both; }
@keyframes dropcrown { to { opacity: 0; } }

/* Poland: plots sprout into trees */
.sprout { transform-box: fill-box; transform-origin: 50% 100%; animation: sprout 1s cubic-bezier(.2,.9,.25,1.25) var(--d, 0s) both; }
@keyframes sprout { from { transform: scale(.05, 0); } to { transform: none; } }
#stage.standing #g-num, #stage.standing #g-disc, #stage.standing #g-vline { opacity: 0; }
