/* Лендинг: мир вокзального табло с перекидными флажками. Одна тёмная тема:
   табло тёмное по своей природе, а смотрят его ночью, проверяя ферму. */

@font-face { font-family: "Sofia XC"; src: url(/fonts/sofia-xc-cyrillic.woff2) format("woff2"); font-weight: 500 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia XC"; src: url(/fonts/sofia-xc-latin.woff2) format("woff2"); font-weight: 500 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Golos"; src: url(/fonts/golos-cyrillic.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos"; src: url(/fonts/golos-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }

:root {
  --ground: #16140f;     /* металл табло, фон страницы */
  --ground-2: #1c1a15;   /* соседние участки того же металла */
  --tile: #27241e;       /* флажок */
  --tile-top: #2d2a23;   /* верхняя половина флажка чуть светлее: свет сверху */
  --line: #3a362d;
  --ink: #f2eee4;        /* знак на флажке */
  --ink-2: #bdb7aa;
  --ink-3: #8f897c;
  --signal: #f5c518;     /* вокзальный жёлтый: действия и «сейчас» */
  --signal-ink: #16140f;
  --go: #3ccf6e;         /* только статус «идёт» */
  --display: "Sofia XC", "Arial Narrow", sans-serif;
  --text: "Golos", system-ui, sans-serif;
  --cjk: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --radius: 2px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  color-scheme: dark;
}
@font-face { font-family: "Noto SC Page"; src: url(/fonts/noto-sc-zh.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:lang(zh-CN) { --display: "Sofia XC", "Noto SC Page", var(--cjk); --text: "Golos", var(--cjk); }

* { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--ground); }
body { margin: 0; color: var(--ink); font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; }
::selection { background: var(--signal); color: var(--signal-ink); }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: var(--radius); }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Вывеска платформы */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--ground) 92%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 64px; display: flex; align-items: center; gap: 24px; }
.mark { font: 500 15px/1 var(--text); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.mark b { font-weight: 700; color: var(--ink); }
@media (max-width: 720px) { .mark span { display: none; } }
.langs { margin-left: auto; display: flex; gap: 2px; }
.langs a { font: 600 14px/1 var(--text); padding: 10px 10px; min-width: 44px; text-align: center; text-decoration: none; color: var(--ink-2); border-radius: var(--radius); }
.langs a[aria-current="page"] { color: var(--ink); background: var(--tile); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; background: var(--signal); color: var(--signal-ink); font: 700 17px/1 var(--text); text-decoration: none; border-radius: var(--radius); white-space: nowrap; transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms ease-out; }
.btn:hover { color: var(--signal-ink); background: #ffd23a; }
.btn:active { transform: translateY(1px); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* Первый экран */
.hero { padding: clamp(32px, 6vh, 72px) 0 clamp(40px, 7vh, 80px); }
.hero-text { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(28px, 5vh, 48px); }
.hero h1 { margin: 0; font: 800 clamp(3.5rem, 10vw, 6rem)/0.9 var(--display); letter-spacing: -0.01em; text-transform: uppercase; text-wrap: balance; }
.hero-side p { margin: 0 0 20px; color: var(--ink-2); max-width: 44ch; font-size: 18px; }

/* Табло */
.board { margin: 0; --fs: 22px; background: var(--ground-2); border: 8px solid #0e0d0a; outline: 1px solid var(--line); border-radius: 4px; padding: clamp(12px, 2vw, 24px); }
.board-head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(10px, 1.5vw, 18px); font: 700 clamp(15px, 1.6vw, 20px)/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.now { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.now::before { content: ""; width: 18px; height: 4px; background: var(--signal); }
.now time { color: var(--ink); font-variant-numeric: tabular-nums; }
.heads { display: flex; margin-bottom: 8px; font: 600 clamp(11px, 1vw, 13px)/1 var(--text); letter-spacing: 0.1em; color: var(--ink-3); text-transform: uppercase; }
.head { flex: none; overflow: hidden; white-space: nowrap; }
.log { list-style: none; margin: clamp(14px, 2vw, 22px) 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font: 500 14px/1.3 var(--text); color: var(--ink-3); }
.log li { display: flex; gap: 14px; white-space: pre; overflow: hidden; }
.log li:first-child { color: var(--ink-2); }
.log time { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rows { overflow: hidden; display: grid; gap: clamp(4px, 0.5vw, 7px); font: 700 var(--fs)/1 var(--display); }
.row { display: flex; width: max-content; gap: clamp(8px, 1.4vw, 20px); transition: opacity 600ms ease-out; }
.row.dim { opacity: 0.62; }
.col { display: flex; gap: 2px; }
.cell { position: relative; width: var(--cell-w, 0.64em); flex: none; height: 1.3em; perspective: 4em; }
.col.wide .cell { width: var(--cell-wide, 1.02em); }
.half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--tile); color: var(--ink); text-align: center; backface-visibility: hidden; }
.half > span { position: absolute; left: 0; right: 0; height: 1.3em; line-height: 1.3em; }
.half.top, .half.ft { top: 0; background: var(--tile-top); border-radius: var(--radius) var(--radius) 0 0; transform-origin: 50% 100%; }
.half.bot, .half.fb { bottom: 0; border-radius: 0 0 var(--radius) var(--radius); transform-origin: 50% 0; border-top: 1px solid var(--ground); box-shadow: inset 0 0.18em 0.2em -0.12em rgb(0 0 0 / 0.55); }
.half.bot > span, .half.fb > span { top: -0.65em; }
.half.ft { z-index: 2; animation: flip-top var(--flip, 90ms) ease-in forwards; }
.half.fb { z-index: 2; transform: rotateX(90deg); animation: flip-bot var(--flip, 90ms) ease-out var(--flip, 90ms) forwards; }
@keyframes flip-top { to { transform: rotateX(-90deg); } }
@keyframes flip-bot { to { transform: rotateX(0deg); } }
.row[data-s="go"] .c-status .half { color: var(--go); text-shadow: 0 0 0.35em rgb(60 207 110 / 0.7); }
.row[data-s="go"] .c-status .cell { filter: drop-shadow(0 0 0.25em rgb(60 207 110 / 0.18)); }
.row[data-s="wait"] .c-status .half { color: var(--signal); }
.row[data-s="done"] .c-status .half { color: var(--ink-3); }
.board figcaption { margin-top: 14px; color: var(--ink-3); font-size: 14px; }

/* Маршрут: как начать */
section { padding: clamp(56px, 10vh, 112px) 0; }
h2 { margin: 0 0 clamp(28px, 4vh, 44px); font: 800 clamp(2.25rem, 5vw, 3.5rem)/0.95 var(--display); text-transform: uppercase; letter-spacing: 0; }
.route { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; position: relative; }
.route::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 4px; background: var(--signal); }
.route li { position: relative; padding-top: 44px; }
.route li::before { content: ""; position: absolute; top: -6px; left: -6px; width: 38px; height: 38px; border-radius: 50%; background: var(--ground); border: 3px solid var(--signal); }
.icon { width: 1em; height: 1em; flex: none; }
.route .icon { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; color: var(--signal); z-index: 1; }
.route h3 { margin: 0 0 8px; font: 700 clamp(1.4rem, 2.4vw, 1.75rem)/1.05 var(--display); text-transform: uppercase; }
.route p { margin: 0; color: var(--ink-2); max-width: 34ch; }

/* Игры: как список направлений */
.games { background: var(--ground-2); border-block: 1px solid var(--line); }
.dest { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dest li { display: flex; align-items: baseline; gap: 24px; padding: 18px 20px; background: var(--tile); border-radius: var(--radius); }
.dest .name { font: 700 clamp(1.5rem, 3.4vw, 2.5rem)/1 var(--display); text-transform: uppercase; }
.dest .state { margin-left: auto; font: 700 clamp(1rem, 1.8vw, 1.3rem)/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.dest li.on .state { color: var(--go); }
.dest li:not(.on) .name { color: var(--ink-2); }

/* Цена: билет */
.ticket { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); background: var(--ink); color: var(--ground); border-radius: 6px; position: relative;
  -webkit-mask: radial-gradient(circle 14px at calc(5 / 12 * 100%) 0, transparent 98%, #000) , radial-gradient(circle 14px at calc(5 / 12 * 100%) 100%, transparent 98%, #000);
  -webkit-mask-composite: source-in; mask: radial-gradient(circle 14px at calc(5 / 12 * 100%) 0, transparent 98%, #000), radial-gradient(circle 14px at calc(5 / 12 * 100%) 100%, transparent 98%, #000); mask-composite: intersect; }
.stub { padding: clamp(24px, 4vw, 44px); border-right: 2px dashed #b9b2a1; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.amount { font: 800 clamp(3.5rem, 8vw, 5.5rem)/0.9 var(--display); }
.per { font: 600 18px/1.3 var(--text); color: #4a463d; }
.terms-list { padding: clamp(24px, 4vw, 44px); margin: 0; list-style: none; display: grid; gap: 14px; }
.terms-list li { padding-left: 22px; position: relative; color: #2b2821; }
.terms-list li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 3px; background: var(--ground); }
.ticket .btn { align-self: flex-start; background: var(--ground); color: var(--signal); }
.ticket .btn:hover { background: #2b2821; color: var(--signal); }

/* Что нужно и риски */
.facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.facts h3 { margin: 0 0 14px; font: 700 clamp(1.5rem, 2.6vw, 2rem)/1 var(--display); text-transform: uppercase; }
.facts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--ink-2); }
.facts li { display: flex; gap: 12px; align-items: flex-start; }
.facts li .icon { width: 22px; height: 22px; margin-top: 1px; color: var(--ink); }
.facts h3 { display: flex; align-items: center; gap: 12px; }
.risk h3 .icon { width: 28px; height: 28px; color: var(--signal); }
.risk { border-top: 6px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--signal) 0 12px, var(--ground) 12px 24px) 6; padding-top: 20px; }
.risk p { margin: 0; color: var(--ink-2); max-width: 52ch; }
.facts .needs { border-top: 6px solid var(--line); padding-top: 20px; }

/* Подвал */
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--ink-3); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
footer a { color: var(--ink-2); }
footer .note { flex-basis: 100%; }

/* Юридические страницы */
.doc { max-width: 72ch; padding-block: 48px 80px; }
.doc h1 { font: 800 clamp(2.25rem, 5vw, 3.25rem)/0.95 var(--display); text-transform: uppercase; margin: 0 0 28px; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); }
.doc .ph { background: var(--signal); color: var(--signal-ink); padding: 0 4px; border-radius: var(--radius); }

@media (max-width: 860px) {
  .hero-text { grid-template-columns: minmax(0, 1fr); }
  .route { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .route::before { left: 11px; right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
  .route li { padding: 0 0 0 48px; }
  .ticket { grid-template-columns: minmax(0, 1fr); -webkit-mask: none; mask: none; }
  .stub { border-right: 0; border-bottom: 2px dashed #b9b2a1; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .nav .btn { display: none; }
}
@media (max-width: 700px) {
  .dest li { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .half.ft, .half.fb { animation: none; display: none; }
  .row, .btn { transition: none; }
}
