/* ==========================================================================
   Traincraft:NextGen — styl vychází z loga (grafit + mátová zelená, pixel font)
   ========================================================================== */

:root {
  --bg: #0b0d0c;
  --bg-2: #101312;
  --surface: #151918;
  --surface-2: #1b201e;
  --graphite: #5b5b5b;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef2f0;
  --muted: #9aa5a0;
  --dim: #6b7571;
  --accent: #3fb68b;          /* zesvětlená zelená z loga (#389777) */
  --accent-deep: #389777;
  --accent-soft: rgba(63, 182, 139, .14);
  --accent-glow: rgba(63, 182, 139, .38);
  --discord: #5865f2;

  --f-pixel: "Silkscreen", ui-monospace, monospace;
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-cine: cubic-bezier(.77, 0, .175, 1);
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading, body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
p { margin: 0; }
em { font-style: normal; color: var(--accent); }
::selection { background: var(--accent); color: #06110c; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Official brand assets ---------- */
.brand__tile { display: grid; place-items: center; width: 46px; height: 32px; flex: none; }
.brand__wordmark { width: 98px; height: auto; }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: var(--h); padding: 0 22px;
  border-radius: 12px;
  font: 600 15px/1 var(--f-body);
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s, color .25s;
  position: relative; isolation: isolate; overflow: hidden;
}
.btn--sm { --h: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn--lg { --h: 56px; padding: 0 28px; font-size: 16px; border-radius: 14px; }
.btn--primary {
  background: var(--accent); color: #04110b;
  box-shadow: 0 10px 30px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.btn--primary:hover::after { transform: translateX(120%); }
.btn--ghost { background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: var(--text); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn--ghost:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); transform: translateY(-2px); }
.btn--discord { background: var(--discord); color: #fff; box-shadow: 0 10px 30px -12px rgba(88,101,242,.7); }
.btn--discord:hover { background: #4752c4; transform: translateY(-2px); }
.btn .ico { transition: transform .3s var(--ease); }
.btn:hover .ico { transform: translateX(4px); }

.link-btn { color: var(--accent); font-size: 14px; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at center, #1a1e1c 0%, var(--bg) 70%);
  clip-path: inset(0);
  transition: clip-path 1s var(--ease-cine), visibility 0s 1s;
}
.intro.is-done { clip-path: inset(50% 0 50% 0); visibility: hidden; pointer-events: none; }
.intro__inner { display: grid; justify-items: center; gap: 24px; }
.intro__assembly { position: relative; width: clamp(240px, 62vw, 340px); aspect-ratio: 965 / 887; }
.intro__piece { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: assemble 1s var(--ease) both paused; animation-delay: var(--delay, 0s); }
.intro.is-assembling .intro__piece, .intro.is-assembling .intro__bar span { animation-play-state: running; }
/* Each mask is a disjoint part of the exact official raster, not a redrawn mark. */
.intro__piece--rail-1 { clip-path: inset(0 73% 90% 0); --x: -65px; --delay: .04s; }
.intro__piece--rail-2 { clip-path: inset(10% 73% 65% 0); --x: -80px; --delay: .16s; }
.intro__piece--rail-3 { clip-path: inset(35% 73% 42% 0); --x: -95px; --delay: .28s; }
.intro__piece--rail-4 { clip-path: inset(58% 73% 28% 0); --x: -110px; --delay: .4s; }
.intro__piece--train-top { clip-path: inset(0 0 76% 27%); --x: 45px; --y: -24px; --delay: .12s; }
.intro__piece--train-middle { clip-path: inset(24% 0 52% 27%); --x: 75px; --delay: .24s; }
.intro__piece--train-bottom { clip-path: inset(48% 0 28% 27%); --x: 45px; --y: 24px; --delay: .36s; }
.intro__piece--tc { clip-path: inset(72% 54% 0 0); --y: 32px; --delay: .58s; }
.intro__piece--colon { clip-path: inset(72% 50% 0 46%); --y: 24px; --delay: .7s; }
.intro__piece--ng { clip-path: inset(72% 0 0 50%); --y: 32px; --delay: .82s; }
.intro__bar { width: 180px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 10px; }
.intro__bar span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; animation: introBar 1.8s var(--ease) both paused; }
@keyframes assemble { from { opacity: 0; transform: translate(var(--x, 0px), var(--y, 0px)); filter: blur(5px); } to { opacity: 1; transform: translate(0, 0); filter: blur(0); } }
@keyframes introBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Film grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- Scroll rail ---------- */
.rail { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; background: transparent; }
.rail__fill {
  height: 100%; width: 100%; transform-origin: left; transform: scaleX(0);
  background: repeating-linear-gradient(90deg, var(--accent) 0 14px, transparent 14px 20px);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  transition: background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav__inner { height: 76px; display: flex; align-items: center; gap: 28px; transition: height .4s var(--ease); }
.nav.is-scrolled { background: rgba(11, 13, 12, .72); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-bottom-color: var(--line); }
.nav.is-scrolled .nav__inner { height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand__mark { width: 100%; height: auto; transition: transform .3s var(--ease); }
.brand:hover .brand__mark { transform: translateX(2px); }
.nav__menu { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__menu > a {
  position: relative; padding: 8px 14px; font-size: 14.5px; font-weight: 500; color: rgba(238,242,240,.75);
  transition: color .25s;
}
.nav__menu > a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__menu > a:hover, .nav__menu > a.is-active { color: #fff; }
.nav__menu > a.is-active::after, .nav__menu > a:hover::after { transform: scaleX(1); }
.nav__menu-cta { display: none; }
.nav__cta { display: flex; gap: 10px; }
.nav__toggle { display: none; width: 44px; height: 44px; margin-left: auto; position: relative; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--line-2); }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), top .35s var(--ease); }
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 20.5px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 20.5px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; isolation: isolate;
  padding: 120px 0 150px;
}
.hero__media { position: absolute; inset: 0; z-index: -3; background: #000 url(../assets/img/1.jpg) center / cover no-repeat; overflow: hidden; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.08); transition: transform 2.4s var(--ease), opacity 1.2s ease;
}
body.is-ready .hero__video { transform: scale(1); }
.hero__shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(5,8,7,.88) 0%, rgba(5,8,7,.55) 45%, rgba(5,8,7,.15) 100%),
    linear-gradient(180deg, rgba(5,8,7,.5) 0%, transparent 25%, transparent 60%, var(--bg) 100%),
    radial-gradient(ellipse at 20% 60%, rgba(63,182,139,.12), transparent 60%);
}
.letterbox { position: absolute; left: 0; right: 0; height: 0; background: #000; z-index: 2; transition: height 1.4s var(--ease-cine); }
.letterbox--top { top: 0; }
.letterbox--bottom { bottom: 0; }
body.is-loading .hero .letterbox { height: 50vh; }
.hero .letterbox { height: clamp(14px, 3.2vh, 34px); }
.letterbox--thin { height: clamp(10px, 2.4vh, 26px); }

.hero__content { position: relative; z-index: 3; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 400 12px/1.3 var(--f-pixel); letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); padding: 8px 14px; border-radius: 999px;
  background: rgba(63,182,139,.08); border: 1px solid rgba(63,182,139,.28);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  margin-bottom: 26px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 10px rgba(63,182,139,0); } 100% { box-shadow: 0 0 0 0 rgba(63,182,139,0); } }

.hero__title { font-size: clamp(42px, 7.6vw, 104px); line-height: .98; letter-spacing: -.035em; max-width: 13ch; text-shadow: 0 4px 40px rgba(0,0,0,.4); }
.hero__title .line { display: block; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.hero__lead { margin-top: 24px; max-width: 520px; font-size: clamp(16px, 1.6vw, 19px); color: rgba(238,242,240,.82); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
#features { scroll-margin-top: 76px; }

/* Hero entrance */
.reveal-hero { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
body.is-ready .reveal-hero { opacity: 1; transform: none; }

.hero__hud {
  position: absolute; right: var(--gutter); bottom: calc(clamp(14px, 3.2vh, 34px) + 16px); z-index: 3;
  display: flex; justify-content: flex-end; align-items: flex-end;
}
.hero__departure { margin-top: 18px; }
.board {
  display: inline-flex; align-items: stretch; border-radius: 10px; overflow: hidden;
  background: rgba(8,10,9,.7); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-family: var(--f-pixel); font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  max-width: 100%;
}
.board__label { background: var(--accent); color: #04110b; padding: 10px 12px; font-weight: 700; display: flex; align-items: center; white-space: nowrap; }
.board__value { padding: 10px 14px; color: #f4d35e; display: block; line-height: 1.3; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board { min-width: 0; flex: 0 1 auto; }
.board[hidden] { display: none; }

/* Ovládání traileru */
.player {
  display: flex; align-items: center; gap: 12px; flex: none;
  padding: 6px 6px 6px 16px; border-radius: 999px;
  background: rgba(8,10,9,.6); border: 1px solid var(--line-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 400 12px/1 var(--f-pixel); text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.player__label { color: #fff; }
.player__bar { position: relative; width: 120px; height: 14px; cursor: pointer; display: flex; align-items: center; }
.player__bar::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--line-2); border-radius: 2px; }
.player__bar span { position: relative; height: 2px; width: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); border-radius: 2px; box-shadow: 0 0 8px var(--accent-glow); }
.player__time { min-width: 3.4em; font-variant-numeric: tabular-nums; }
.player__btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; transition: background .25s, color .25s;
}
.player__btn:hover { background: var(--accent); color: #04110b; }
.player__btn .ico { width: 18px; height: 18px; }
.player__btn .ico--play, .player__btn .ico--sound { display: none; }
.player.is-paused .ico--pause, .player.is-unmuted .ico--muted { display: none; }
.player.is-paused .ico--play, .player.is-unmuted .ico--sound { display: block; }
.player.is-unmuted #playerSound { background: var(--accent); color: #04110b; }
.player.no-video { display: none; }

.scroll-cue {
  position: absolute; left: 50%; bottom: calc(clamp(14px, 3.2vh, 34px) + 22px); z-index: 3;
  width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.4);
}
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: cue 1.8s infinite var(--ease); }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Ticker ---------- */
.ticker { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); padding: 18px 0; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--bg-2), transparent); }
.ticker::after { right: 0; background: linear-gradient(-90deg, var(--bg-2), transparent); }
.ticker__track { display: flex; width: max-content; animation: ticker 40s linear infinite; }
.ticker__track span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font: 400 15px/1 var(--f-pixel); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.ticker__track span::after { content: ""; width: 22px; height: 4px; background: var(--accent); border-radius: 1px; box-shadow: -8px 8px 0 -0px transparent; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 12vw, 150px) 0; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 20%, var(--bg-2) 80%, var(--bg) 100%); }
.section__head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__head h2 { font-size: clamp(36px, 5.4vw, 68px); letter-spacing: -.03em; }
.section__head > p, .section__head--split > p { margin-top: 20px; color: var(--muted); font-size: 17px; max-width: 560px; }
.section__head--split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; }
.section__head--split > p { margin-top: 0; max-width: 420px; }
.kicker {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font: 400 12px/1 var(--f-pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
}
.kicker span { color: var(--dim); }
.kicker::before { content: ""; width: 28px; height: 3px; background: var(--accent); border-radius: 1px; order: -1; }
.kicker--light { color: #fff; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--rd, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Features ---------- */
#features { padding-block: clamp(80px, 8vw, 110px); }
.features > .kicker { margin: 0 0 32px; }
.features__layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 5vw, 72px); }
.features__scene { position: relative; isolation: isolate; min-height: 540px; overflow: hidden; border-radius: 4px 4px 72px 4px; background: var(--surface); }
.features__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 35% center; z-index: -2; }
.features__scene::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4,12,9,.85), rgba(4,12,9,.2) 44%, transparent 68%, rgba(4,12,9,.7)); }
.features__scene-heading { padding: clamp(26px, 3.5vw, 44px); }
.features__region { margin-bottom: 18px; color: rgba(238,242,240,.8); font: 400 14px/1.5 var(--f-pixel); letter-spacing: .04em; text-transform: uppercase; }
.features__scene h2 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.06; letter-spacing: -.035em; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.features__scene h2 em { color: #63d3aa; }
.features__territory { display: block; margin-top: 16px; font-size: clamp(20px, 2vw, 25px); line-height: 1.3; letter-spacing: -.02em; }
.features__caption { position: absolute; left: clamp(26px, 3.5vw, 44px); bottom: 24px; color: rgba(238,242,240,.8); font-size: 14px; }
/* Milníky podél tratě; přerušovaná část pokračuje do budoucnosti. */
.features__route { position: relative; padding-left: 48px; }
.feature-stop { position: relative; padding-block: 0 44px; }
.feature-stop:last-child { padding-bottom: 0; }
.feature-stop::before { content: ""; position: absolute; left: -48px; top: 9px; z-index: 1; width: 19px; height: 19px; border: 3px solid var(--accent); border-radius: 50%; background: var(--bg); }
.feature-stop:not(:last-child)::after { content: ""; position: absolute; left: -40px; top: 18px; width: 3px; height: 100%; background: var(--accent-deep); transform: scaleY(0); transform-origin: top; transition: transform .6s var(--segment-delay, .2s) var(--ease); }
.feature-stop:nth-child(2) { --segment-delay: .45s; }
.feature-stop:nth-child(3) { --segment-delay: .7s; }
.feature-stop:nth-child(4) { --segment-delay: .95s; }
.feature-stop--future { --segment-delay: 1.2s; }
.feature-stop--future::after { content: ""; position: absolute; left: -40px; top: 18px; width: 3px; height: calc(100% + 24px); background: repeating-linear-gradient(to bottom, var(--accent-deep) 0 6px, transparent 6px 12px); mask-image: linear-gradient(#000 30%, transparent); transform: scaleY(0); transform-origin: top; transition: transform .6s var(--segment-delay) var(--ease); }
.features__route.is-in .feature-stop::after { transform: scaleY(1); }
.feature-stop:first-child::before { background: var(--accent); box-shadow: inset 0 0 0 4px var(--bg); }
.feature-stop--future::before { border-style: dashed; }
.feature-stop h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.25; letter-spacing: -.02em; }
.feature-stop__date { display: block; margin-bottom: 10px; color: var(--accent); font: 400 14px/1.5 var(--f-pixel); }
.feature-stop p { margin-top: 10px; max-width: 31ch; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* ---------- Cinematic break ---------- */
.cine, .cta { position: relative; overflow: hidden; isolation: isolate; }
.cine { min-height: 90vh; display: flex; align-items: center; padding: 120px 0; }
.cine__bg, .cta__bg { position: absolute; inset: -18% 0; z-index: -2; background-size: cover; background-position: center; will-change: transform; }
.cine__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(5,8,7,.35) 22%, rgba(5,8,7,.35) 70%, var(--bg) 100%), linear-gradient(90deg, rgba(5,8,7,.8), transparent 70%); }
.cine .letterbox { z-index: 1; }
.cine__content { position: relative; z-index: 2; }
.cine__author { margin-top: 24px; font-size: 18px; color: var(--text); }
.cine blockquote { margin: 0; max-width: 18ch; font: 700 clamp(34px, 5.6vw, 76px)/1.02 var(--f-display); letter-spacing: -.035em; text-shadow: 0 6px 40px rgba(0,0,0,.5); }

/* ---------- Gallery ---------- */
.gallery-page { padding-top: 150px; }
.gallery-page h1 { font-size: clamp(40px, 6vw, 76px); letter-spacing: -.035em; }
.gallery-page .section__head { gap: 24px; }
.gallery__intro { color: var(--muted); font-size: 17px; }
.gallery__count { display: block; margin-top: 12px; font: 400 14px/1.4 var(--f-pixel); color: var(--accent); }
.gallery { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shot {
  position: relative; min-width: 0; display: block;
  text-align: left; cursor: zoom-in;
}
.shot[hidden] { display: none; }
.shot:first-child { grid-column: 1 / -1; }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--surface); transition: filter .35s; }
.shot:first-child img { aspect-ratio: 2.15; }
.shot:hover img { filter: brightness(1.08); }
.shot__label {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 14px;
  font: 500 17px/1.4 var(--f-display); color: var(--text); transition: color .25s;
}
.shot__label::after { content: attr(data-index); font: 400 14px/1.4 var(--f-pixel); color: var(--dim); flex: none; }
.shot:hover .shot__label { color: var(--accent); }
.gallery__more { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 36px; }
.gallery__more:has(button[hidden]) { display: none; }
.gallery__more button[hidden] { display: none; }
.gallery__progress { color: var(--muted); font-size: 14px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(3,5,4,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 72px 84px 130px; opacity: 0; transition: opacity .25s; }
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; min-width: 0; max-width: min(1400px, 100%); }
.lightbox figure img { max-height: calc(100svh - 250px); max-width: 100%; width: auto; margin: 0 auto; border-radius: 4px; object-fit: contain; }
.lightbox figcaption { margin-top: 18px; text-align: center; font: 500 17px/1.4 var(--f-display); color: var(--text); }
.lightbox__counter { position: absolute; top: 28px; left: 28px; font: 400 14px/1.4 var(--f-pixel); color: var(--muted); }
.lightbox__thumbs { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; max-width: calc(100% - 40px); overflow-x: auto; padding: 5px; scrollbar-width: thin; scrollbar-color: var(--accent-deep) transparent; }
.lightbox__thumb { flex: 0 0 88px; padding: 3px; border: 2px solid transparent; border-radius: 5px; opacity: .5; transition: opacity .2s, border-color .2s; }
.lightbox__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 2px; }
.lightbox__thumb:hover, .lightbox__thumb[aria-current="true"] { opacity: 1; }
.lightbox__thumb[aria-current="true"] { border-color: var(--accent); }
.lightbox__close { position: absolute; top: 16px; right: 16px; width: 46px; height: 46px; font-size: 30px; line-height: 1; border-radius: 50%; background: rgba(255,255,255,.08); }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 30px; line-height: 1; transition: background .25s; }
.lightbox__nav:hover, .lightbox__close:hover { background: var(--accent); color: #04110b; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

/* ---------- Events ---------- */
.events { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
.cal, .agenda { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px); }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.cal__title { font-size: 22px; text-transform: capitalize; }
.cal__nav { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); font-size: 22px; line-height: 1; transition: background .25s, color .25s; }
.cal__nav:hover { background: var(--accent); color: #04110b; border-color: var(--accent); }
.cal__dow, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal__dow { margin-bottom: 8px; }
.cal__dow span { text-align: center; font: 400 11px/1 var(--f-pixel); text-transform: uppercase; color: var(--dim); padding: 6px 0; }
.cal__day {
  position: relative; aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center;
  font: 500 15px/1 var(--f-display); color: var(--text); border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s;
}
.cal__day:hover { background: rgba(255,255,255,.05); }
.cal__day.is-out { color: var(--dim); opacity: .45; }
.cal__day.is-today { border-color: var(--line-2); }
.cal__day.is-today::before { content: "dnes"; position: absolute; top: 4px; font: 400 8px/1 var(--f-pixel); color: var(--muted); text-transform: uppercase; }
.cal__day.has-event { background: var(--accent-soft); color: #fff; }
.cal__day.has-event::after { content: ""; position: absolute; bottom: 7px; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.cal__day.is-selected { background: var(--accent); color: #04110b; }
.cal__day.is-selected::after { background: #04110b; box-shadow: none; }

.agenda__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.agenda__head h3 { font-size: 22px; }
.agenda__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ev {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 16px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line);
  animation: evIn .5s var(--ease) both;
}
@keyframes evIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ev__date { width: 62px; text-align: center; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); }
.ev__date span { display: block; background: var(--accent); color: #04110b; font: 700 10px/1 var(--f-pixel); text-transform: uppercase; padding: 5px 0; }
.ev__date strong { display: block; font: 700 24px/1 var(--f-display); padding: 8px 0 7px; }
.ev h4 { font-size: 16px; line-height: 1.3; letter-spacing: -.01em; }
.ev__time { display: inline-flex; gap: 6px; align-items: center; margin: 6px 0 6px; font: 400 12px/1 var(--f-pixel); color: #f4d35e; }
.ev p { font-size: 14px; color: var(--muted); }
.agenda__empty { padding: 28px 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); font-size: 15px; }

/* ---------- Community ---------- */
.community { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ccard {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: clamp(26px, 3vw, 36px); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); overflow: hidden;
  transition: transform .5s var(--ease), border-color .4s;
}
.ccard:hover { transform: translateY(-6px); border-color: rgba(63,182,139,.35); }
.ccard p { color: var(--muted); font-size: 15px; flex: 1; }
.ccard h3 { font-size: 22px; }
.ccard .btn { margin-top: 8px; }
.ccard__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 24px; margin-bottom: 8px; }
.ccard__icon svg { width: 26px; height: 26px; }
.ccard--discord { background: linear-gradient(160deg, rgba(88,101,242,.22), var(--surface) 60%); border-color: rgba(88,101,242,.3); }
.ccard--discord .ccard__icon { background: rgba(88,101,242,.2); color: #aab2ff; }
.ccard--discord:hover { border-color: rgba(88,101,242,.6); }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.social {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); font-weight: 600; font-size: 15px;
  transition: transform .3s var(--ease), background .3s, border-color .3s;
}
.social:hover { transform: translateY(-3px); border-color: var(--accent); }
.social--ig:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: transparent; }
.social--tt:hover { background: #000; border-color: #25f4ee; box-shadow: 3px 3px 0 #fe2c55; }
.social--yt:hover { background: #dc2626; border-color: transparent; }

/* ---------- CTA ---------- */
.cta { padding: clamp(120px, 18vw, 220px) 0; text-align: center; }
.cta__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--bg) 0%, rgba(5,8,7,.55) 30%, rgba(5,8,7,.6) 70%, var(--bg) 100%); }
.cta__content { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta__logo { width: clamp(140px, 28vw, 190px); height: auto; }
.cta h2 { font-size: clamp(44px, 8vw, 110px); letter-spacing: -.04em; text-shadow: 0 6px 40px rgba(0,0,0,.45); }
.cta p { max-width: 520px; font-size: 18px; color: rgba(238,242,240,.85); margin-bottom: 10px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg); padding-top: 64px; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer__brand p { color: var(--muted); font-size: 14px; margin-top: 18px; max-width: 320px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font: 400 12px/1 var(--f-pixel); text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 6px; }
.footer__col a { color: rgba(238,242,240,.75); font-size: 14.5px; transition: color .2s; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px 28px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }
.footer__domain { font-family: var(--f-pixel); font-size: 12px; }

/* ---------- Wiki page ---------- */
.page-hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; padding: 120px 0 80px; }
.page-hero__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; animation: kb 20s ease-in-out infinite alternate; }
.page-hero__shade { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(5,8,7,.6), rgba(5,8,7,.92) 70%); }
@keyframes kb { from { transform: scale(1.05); } to { transform: scale(1.18) translate(-2%, -1%); } }
.page-hero .container { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.page-hero h1 { font-size: clamp(40px, 7vw, 88px); letter-spacing: -.035em; }
.page-hero p { max-width: 520px; color: rgba(238,242,240,.82); font-size: 18px; }
.page-hero .eyebrow { margin-bottom: 0; }
.track-loader { width: min(320px, 80vw); height: 48px; position: relative; margin: 10px 0; }
.track-loader::before { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; background: repeating-linear-gradient(90deg, var(--line-2) 0 10px, transparent 10px 16px); }
.track-loader__train { position: absolute; left: 0; bottom: 8px; width: 58px; animation: drive 3.2s var(--ease-cine) infinite; }
.track-loader__train img { width: 100%; height: auto; }
@keyframes drive { 0%, 8% { left: 0; opacity: 0; } 18% { opacity: 1; } 82% { opacity: 1; } 92%, 100% { left: calc(100% - 58px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .nav__cta { display: none; }
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; align-items: stretch; justify-content: center; gap: 4px;
    padding: 90px var(--gutter) 40px;
    background: rgba(8,10,9,.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    clip-path: inset(0 0 100% 0); transition: clip-path .7s var(--ease-cine);
  }
  .nav__menu.is-open { clip-path: inset(0 0 0 0); }
  .nav__menu > a { font: 700 clamp(30px, 8vw, 44px)/1.15 var(--f-display); letter-spacing: -.02em; padding: 8px 0; color: #fff; opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .5s var(--ease), color .2s; }
  .nav__menu.is-open > a { opacity: 1; transform: none; }
  .nav__menu.is-open > a:nth-child(2) { transition-delay: .05s; } .nav__menu.is-open > a:nth-child(3) { transition-delay: .1s; }
  .nav__menu.is-open > a:nth-child(4) { transition-delay: .15s; } .nav__menu.is-open > a:nth-child(5) { transition-delay: .2s; }
  .nav__menu.is-open > a:nth-child(6) { transition-delay: .25s; }
  .nav__menu > a::after { display: none; }
  .nav__menu > a.is-active { color: var(--accent); }
  .nav__menu-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
  .nav.menu-open { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }

  .events { grid-template-columns: 1fr; }
  .community { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .section__head--split { flex-direction: column; align-items: flex-start; gap: 0; }
  .section__head--split > p { margin-top: 20px; }
}

@media (max-width: 680px) {
  .hero { padding: 110px 0 140px; justify-content: flex-end; }
  .hero__shade { background: linear-gradient(180deg, rgba(5,8,7,.55) 0%, rgba(5,8,7,.35) 30%, rgba(5,8,7,.9) 75%, var(--bg) 100%); }
  .eyebrow { font-size: 10px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .scroll-cue { display: none; }
  .hero__hud { gap: 10px; }
  .player { padding: 4px; gap: 4px; }
  .player__label, .player__bar, .player__time { display: none; }
  .player__btn { width: 34px; height: 34px; }
  .board { font-size: 10px; }
  .features__layout { grid-template-columns: 1fr; gap: 40px; }
  .features__scene { min-height: 420px; border-bottom-right-radius: 48px; }
  .features__scene h2 { font-size: clamp(36px, 8.8vw, 54px); }
  .features__route { padding-left: 42px; }
  .feature-stop { padding-bottom: 34px; }
  .feature-stop::before { left: -42px; top: 5px; }
  .feature-stop:not(:last-child)::after { left: -34px; top: 14px; }
  .feature-stop--future::after { left: -34px; top: 14px; }
  .gallery { grid-template-columns: 1fr; gap: 28px; }
  .shot:first-child img { aspect-ratio: 16 / 9; }
  .shot__label { font-size: 16px; padding-top: 10px; }
  .gallery__more { flex-direction: column; gap: 12px; }
  .cine { min-height: 70vh; }
  .ev { grid-template-columns: 1fr; }
  .lightbox { padding: 72px 16px 170px; }
  .lightbox figure img { max-height: calc(100svh - 300px); }
  .lightbox__nav { top: auto; bottom: 106px; transform: none; width: 44px; height: 44px; }
  .lightbox__thumb { flex-basis: 68px; }
  .lightbox__thumbs { bottom: 22px; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .grain { display: none; }
}
