/* Sedem mostov — keynote-style deck.
   One fixed 1920x1080 stage. Two worlds: daylight paper (the city, 1736) and night (the idea, and today).
   One accent only: ember. Everything else is ink or cotton. */
:root {
  --night: #07080b;
  --cotton: #eceae4;
  --ash: #8f8b83;
  --paper: #ebe8e0;
  --paper-2: #f6f4ef;
  --ink: #17150f;
  --graphite: #6b665c;
  --ember: #e8a548;
  --ember-deep: #c27a1e;
  --serif: "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --display: "Libre Caslon Display", "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", "Segoe UI Variable Display", "Segoe UI", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --out: cubic-bezier(.16, 1, .3, 1);
  --io: cubic-bezier(.65, 0, .35, 1);
  --soft-e: cubic-bezier(.4, 0, .2, 1);
  /* theme (night by default) */
  --fg: var(--cotton);
  --bgc: var(--night);
  --soft: #cdcac3;
  --mute: #8f8b83;
  --rule: rgba(236, 234, 228, .16);
  color-scheme: dark;
}
body.is-paper {
  --fg: var(--ink);
  --bgc: var(--paper);
  --soft: #3a362e;
  --mute: #6b665c;
  --rule: rgba(23, 21, 15, .16);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: var(--night); color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; font-kerning: normal; transition: background-color .9s var(--io), color .9s var(--io); user-select: none; }
body.is-paper { background: var(--paper); }
body:not(.mouse) { cursor: none; }
p, h1, h2, h3, blockquote, figure, ul { margin: 0; padding: 0; }

/* ---------- worlds ---------- */
#viewport { position: fixed; inset: 0; overflow: hidden; }
#bg { position: absolute; inset: 0; pointer-events: none; }
#bg .w { position: absolute; inset: 0; }
.w-night { background: radial-gradient(120% 95% at 50% 42%, #12141c 0%, #090a0e 52%, #030304 100%); }
.w-paper { opacity: 0; transition: opacity .9s var(--io); background: radial-gradient(125% 100% at 50% 38%, #f7f5f1 0%, var(--paper) 56%, #d9d4c8 100%); }
.w-paper::before { content: ""; position: absolute; inset: 0; opacity: .28; mix-blend-mode: multiply; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.011 .08' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .35 0 0 0 0 .24 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"); }
body.is-paper .w-paper { opacity: 1; }
.w-grain { inset: -140px !important; background-size: 260px 260px; opacity: .075; mix-blend-mode: screen; will-change: transform; animation: grain 1s steps(6) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.3 -.45'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body.is-paper .w-grain { opacity: .06; mix-blend-mode: multiply; filter: invert(1); }
@keyframes grain { 0% { transform: translate(0, 0); } 17% { transform: translate(-42px, 26px); } 33% { transform: translate(31px, -38px); } 50% { transform: translate(-24px, -19px); } 67% { transform: translate(37px, 33px); } 83% { transform: translate(-11px, 41px); } 100% { transform: translate(0, 0); } }

/* ---------- stage ---------- */
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; }
body.black #stage::after { content: ''; position: absolute; inset: 0; background: #000; z-index: 100; }
#world { position: absolute; inset: 0; }
#scenes { position: absolute; inset: 0; }
.scene { position: absolute; inset: 0; opacity: 0; transform: scale(1.004); transition: opacity .75s var(--soft-e) .2s, transform .9s var(--soft-e) .2s; }
.scene.on { opacity: 1; transform: none; }
.scene.leaving { opacity: 0; transform: scale(.992); transition: opacity .5s var(--soft-e), transform .6s var(--soft-e); pointer-events: none; }
.abs { position: absolute; }

/* ---------- type ---------- */
.k, .cite { font: 600 20px/1.3 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--mute); transition: color .9s var(--io); }
.cite { font-size: 17px; }
.statement { font: 600 86px/1.03 var(--sans); letter-spacing: -.034em; text-wrap: balance; }
.statement.xl { font-size: 120px; }
.headline { font: 600 60px/1.1 var(--sans); letter-spacing: -.026em; text-wrap: balance; }
.lead { font: 400 34px/1.42 var(--sans); letter-spacing: -.008em; color: var(--soft); max-width: 680px; text-wrap: pretty; transition: color .9s var(--io); }
.lead b { color: var(--fg); font-weight: 600; }
.lead i { font-family: var(--serif); }
.quote { font: italic 400 60px/1.3 var(--serif); max-width: 1400px; text-wrap: balance; }
.display { font-family: var(--display); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; }
.em { color: var(--ember) !important; }
.paper-ember { color: var(--ember-deep); }
body.is-paper .em { color: var(--ember-deep) !important; }
.center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.col-l { position: absolute; left: 150px; top: 0; bottom: 0; width: 680px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.stat { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.stat-n { font: 700 104px/1 var(--sans); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.stat-l { font: 400 26px/1.35 var(--sans); color: var(--mute); }
.rows { display: flex; flex-direction: column; margin-top: 10px; }
.rows p { display: flex; align-items: baseline; gap: 26px; padding: 18px 0; border-top: 1px solid var(--rule); transition: border-color .9s var(--io); }
.rows p:last-child { border-bottom: 1px solid var(--rule); }
.rows b { font: 600 34px/1.1 var(--sans); letter-spacing: -.02em; min-width: 170px; }
.rows span { font: 400 27px/1.3 var(--sans); color: var(--mute); }
.ember-dot { display: inline-block; border-radius: 50%; background: radial-gradient(circle, #fff4da 0%, #ffd38c 34%, var(--ember) 68%); box-shadow: 0 0 18px 5px rgba(232, 165, 72, .62), 0 0 70px 24px rgba(232, 165, 72, .24); }

/* ---------- reveal effects (12YAS timing) ---------- */
.rv { opacity: 0; transform: translateY(38px); filter: blur(8px); transition: opacity 1.1s var(--out), transform 1.1s var(--out), filter 1.1s var(--out); }
.rv.in { opacity: 1; transform: none; filter: blur(0); }
.fade { opacity: 0; transition: opacity .9s var(--soft-e); }
.fade.in { opacity: 1; }
.bl { opacity: 0; transform: scale(1.035); filter: blur(24px); transition: opacity 1.6s var(--out), transform 1.6s var(--out), filter 1.6s var(--out); }
.bl.in { opacity: 1; transform: none; filter: blur(0); }
.pop { opacity: 0; transform: scale(.2); transition: opacity .6s, transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.pop.in { opacity: 1; transform: none; }
.out, .rv.out, .fade.out, .bl.out, .split.out { opacity: 0 !important; filter: blur(10px); transition: opacity .6s var(--soft-e), filter .6s var(--soft-e), transform .6s var(--soft-e) !important; }
.split .u { display: inline-block; opacity: 0; transform: translateY(.32em); filter: blur(7px); transition: opacity .95s var(--out), transform .95s var(--out), filter .95s var(--out); transition-delay: calc(var(--i) * var(--stagger, 85ms)); }
.split.in .u { opacity: 1; transform: none; filter: blur(0); }

/* ---------- world (Kráľovec map → graph) ---------- */
#world .cam { position: absolute; inset: 0; transform-origin: 960px 540px; will-change: transform; }
#world canvas.dots { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
#world canvas.reg { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; opacity: 0; }
#world svg.wl { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: visible; }
.w-dim { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: var(--bgc); transition: background-color .9s var(--io); }
.w-banks { fill: none; }
.w-banks rect { fill: var(--fg); transition: fill .9s var(--io); }
.flow { fill: none; stroke: var(--fg); stroke-linecap: round; stroke-width: 2.6; stroke-dasharray: .1 16; opacity: .32; animation: flow 14s linear infinite; transition: stroke .9s var(--io); }
.flow.f2 { animation-duration: 19s; opacity: .22; }
@keyframes flow { to { stroke-dashoffset: 160; } }
.w-label { transition: opacity .8s var(--io); }
.w-label.off, .w-river.off { opacity: 0; }
.w-lt { font: 600 27px var(--sans); letter-spacing: -.01em; fill: var(--fg); transition: fill .9s var(--io); }
.w-ls { font: 600 14px var(--sans); letter-spacing: .3em; fill: var(--mute); transition: fill .9s var(--io); }
.w-river { font: italic 400 30px var(--serif); fill: var(--mute); transition: opacity .8s, fill .9s var(--io); }

.br { transition: opacity .7s var(--io); }
.br path { fill: none; }
.br .front { stroke: var(--fg); stroke-linecap: butt; transition: stroke .5s, opacity .5s; }
.br .back { stroke: var(--bgc); stroke-linecap: butt; transition: stroke .9s var(--io); }
.br .glowp { stroke: var(--ember); opacity: 0; stroke-linecap: butt; transition: opacity .45s; }
.br.graph .front, .br.graph .back { stroke-linecap: round; }
.br.hidden, .br.gone { opacity: 0; }
.br.lit .front, .br.crossed .front { stroke: var(--ember); }
.br.lit .glowp, .br.crossed .glowp { opacity: .16; }
.br.flash .front { stroke: var(--ember); }
.br.flash .glowp { opacity: .45; }
.br.miss .front { stroke: var(--fg); opacity: .5; }
.br.miss .glowp { stroke: var(--fg); animation: miss 1.1s ease-in-out infinite; }
@keyframes miss { 0%, 100% { opacity: .02; } 50% { opacity: .2; } }
.trail { fill: none; stroke: var(--ember); stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }
.trail-glow { fill: none; stroke: var(--ember); stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; opacity: .16; }
.w-walker .core { fill: var(--ember); }
.xb circle { fill: var(--ember); }
.xb text { font: 700 19px var(--sans); fill: #1a1206; }
.xb { opacity: 0; transition: opacity .4s; }
.xb.in { opacity: 1; }
.node .halo { fill: url(#hgEmber); opacity: 0; transition: opacity .5s; }
.node .ring { fill: var(--fg); transition: fill .5s, stroke .5s; stroke: none; }
.node .nl { font: 700 25px var(--sans); fill: var(--bgc); transition: fill .5s; }
.node.odd .ring { fill: var(--ember); }
.node.odd .nl { fill: #1a1206; }
.node.odd .halo { opacity: 1; }
.node.even .ring { fill: var(--fg); }
.node.pop .ring { animation: npop .5s var(--out); }
@keyframes npop { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.deg { opacity: 0; transition: opacity .4s; }
.deg.on { opacity: 1; }
.deg text { font: 700 38px var(--sans); letter-spacing: -.03em; fill: var(--fg); transition: fill .4s; }
.deg.odd text { fill: var(--ember); }
body.is-paper .deg.odd text { fill: var(--ember-deep); }
.deg.even text { fill: var(--fg); }
.deg.bump text { animation: bump .35s var(--out); }
@keyframes bump { 0% { font-size: 38px; } 45% { font-size: 50px; } 100% { font-size: 38px; } }
.endp { fill: var(--ember); opacity: 0; transition: opacity .35s; }
.endp.in { opacity: 1; }

/* ---------- HUD (pill, like 12YAS) ---------- */
#hud { position: fixed; right: 14px; bottom: 14px; z-index: 50; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(12, 12, 15, .78); color: #eceae4; font: 500 13px/1 var(--sans); opacity: 0; transition: opacity .35s; pointer-events: none; }
body.mouse #hud { opacity: 1; pointer-events: auto; }
#hud button { all: unset; cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: inherit; }
#hud button:hover { background: rgba(255, 255, 255, .1); }
#hud svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#hud .cnt { padding: 0 10px; font-variant-numeric: tabular-nums; color: #b9b6ae; min-width: 64px; text-align: center; }
#notes { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; display: none; max-height: 40vh; overflow: auto; background: rgba(8, 9, 12, .95); color: #eceae4; padding: 20px 24px 22px; font: 400 21px/1.55 var(--sans); }
body.notes-on #notes { display: block; }
#notes .nb-h { font: 600 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #8f8b83; margin-bottom: 10px; }
#notes li, .pr-notes li { margin: 0 0 6px; list-style: none; }
#notes b, .pr-notes b { color: #fff; }
#notes .cue, .pr-notes .cue { color: #b9b6ae; }

/* ---------- presenter window ---------- */
#presenter { position: fixed; inset: 0; background: #0b0c10; color: #eceae4; padding: 34px 40px; display: flex; flex-direction: column; gap: 18px; font-family: var(--sans); z-index: 200; }
#presenter[hidden] { display: none; }
body.presenter { cursor: default; overflow: auto; }
body.presenter #viewport, body.presenter #hud { display: none; }
.pr-top { display: flex; align-items: baseline; gap: 20px; }
.pr-count { font: 600 14px var(--sans); letter-spacing: .2em; color: #8f8b83; }
.pr-title { font: 600 40px/1.1 var(--sans); letter-spacing: -.02em; flex: 1; }
.pr-time { font: 600 34px var(--sans); font-variant-numeric: tabular-nums; color: #b9b6ae; }
.pr-notes { font-size: 26px; line-height: 1.5; color: #eceae4; max-width: 1100px; flex: 1; overflow: auto; padding: 0; margin: 0; }
.pr-next { font-size: 18px; color: #8f8b83; }
.pr-btns { display: flex; gap: 12px; }
.pr-btns button { all: unset; cursor: pointer; padding: 16px 26px; border-radius: 999px; background: #1a1c22; font: 600 18px var(--sans); }
.pr-btns button.big { background: var(--ember); color: #1a1206; flex: 1; text-align: center; }

/* headless screenshot mode */
.shot *, .shot *::before, .shot *::after { transition: none !important; }

/* map fades out under the left column, like the 12YAS map */
#world.mask-left { -webkit-mask-image: linear-gradient(90deg, transparent 0, transparent 24%, #000 50%); mask-image: linear-gradient(90deg, transparent 0, transparent 24%, #000 50%); }
