/* Сайт LOKO FC. Палітра й шрифт ті самі, що в грі (src/style.css): темно-зелене тло, папір, червоний «стоп», зелений «вперед». */
@font-face { font-family: Rubik; font-weight: 400; font-display: swap; src: url(fonts/rubik-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Rubik; font-weight: 400; font-display: swap; src: url(fonts/rubik-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-2199, U+2248; }
@font-face { font-family: Rubik; font-weight: 700; font-display: swap; src: url(fonts/rubik-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Rubik; font-weight: 700; font-display: swap; src: url(fonts/rubik-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-2199, U+2248; }
@font-face { font-family: Rubik; font-weight: 900; font-display: swap; src: url(fonts/rubik-cyrillic-900-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Rubik; font-weight: 900; font-display: swap; src: url(fonts/rubik-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2190-2199, U+2248; }

:root {
  --ink: #0a241b; --deep: #113c2f; --deep2: #18503e; --paper: #f1efe8; --paper2: #e4e0d3;
  --red: #b82a3a; --red2: #9a1f2e; --green: #2a9a60; --grass: #17623f; --grass2: #1d7149;
  --gold: #e3b33a; --night: #07140f;
  --m: clamp(16px, 4.4vw, 56px);
  --gap: clamp(72px, 12vw, 180px);
  --fs-d: clamp(76px, 21vw, 300px);
  --fs-h: clamp(31px, 8.4vw, 128px);
  --fs-s: clamp(20px, 2.3vw, 30px);
  --fs-b: clamp(17px, 1.25vw, 19px);
  --fs-c: 15px;
  --bar: 54px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 var(--fs-b)/1.55 Rubik, system-ui, sans-serif; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 4px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--ink); }
p { margin: 0 0 1em; max-width: 34em; }
h1, h2, h3 { margin: 0; }
h1, h2, .go { font-weight: 900; text-transform: uppercase; font-style: normal; letter-spacing: -0.02em; line-height: 0.92; transform: skewX(-8deg); transform-origin: 0 100%; }
h2 { font-size: var(--fs-h); margin-bottom: 0.4em; max-width: none; }
.club h2 { font-size: clamp(30px, 5.4vw, 82px); }
h3 { font-size: var(--fs-s); font-weight: 700; line-height: 1.15; margin-bottom: 0.5em; }
figure { margin: 0; }
figcaption, .cap { font-size: var(--fs-c); line-height: 1.4; margin-top: 10px; max-width: 38em; opacity: 0.86; }
.wrap { padding-inline: var(--m); max-width: 1560px; margin-inline: auto; }
.say { font-size: var(--fs-s); line-height: 1.3; max-width: 26em; margin-bottom: 1.6em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 10px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* Заголовок розділу: назва на всю ширину, під нею одне речення про головне */
.head { margin-bottom: clamp(30px, 4vw, 64px); }
.head h2 { margin-bottom: 0.3em; }
.head .say { margin-bottom: 0; }
@media (min-width: 1000px) { .head .say { margin-left: 34%; max-width: 27em; } }

/* Кнопка: скошена плашка, як «ВПЕРЕД!» у меню гри */
.btn { display: inline-block; background: var(--red); color: #fff; font-weight: 900; text-transform: uppercase; text-decoration: none; font-size: 18px; line-height: 1; padding: 19px 30px 18px; border: 0; cursor: pointer; font-family: inherit;
  clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); transition: transform .16s ease, background-color .16s ease; }
.btn:hover { background: var(--red2); transform: translateX(4px); }
.btn:active { transform: translateX(4px) scale(0.97); }
.btn-alt { background: var(--paper); color: var(--ink); }
.btn-alt:hover { background: #fff; }
.btn-s { font-size: 15px; padding: 13px 22px 12px; }
.btn-xl { font-size: clamp(19px, 1.9vw, 26px); padding: 0.95em 1.5em 0.9em; }
.acts { align-items: center; }
.acts-note { font-size: var(--fs-c); opacity: 0.86; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; max-width: none; }

/* Шапка */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: var(--bar); padding: 0 var(--m); background: var(--ink); }
.burger { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px 0 12px; border: 0; background: var(--deep2); color: var(--paper); font: 700 16px/1 Rubik, system-ui, sans-serif; cursor: pointer; clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); transition: background-color .16s; }
.burger:hover { background: var(--green); }
.burger-ic { display: grid; gap: 6px; width: 20px; }
.burger-ic i { height: 3px; background: currentColor; transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.menu-open .burger-ic i:first-child { transform: translateY(4.5px) rotate(45deg); }
.menu-open .burger-ic i:last-child { transform: translateY(-4.5px) rotate(-45deg); }
/* меню розділів на весь екран: список станцій */
.menu { position: fixed; inset: var(--bar) 0 0 0; z-index: 19; background: var(--ink); overflow-y: auto; padding: clamp(18px, 4vh, 44px) var(--m) 40px; display: none; }
.menu ol { list-style: none; margin: 0 0 28px; padding: 0; display: grid; }
.menu li a { display: flex; align-items: center; gap: 0.5em; padding: 0.13em 0; font-weight: 900; text-transform: uppercase; text-decoration: none; font-size: clamp(27px, min(6.4vw, 7.2vh), 76px); line-height: 1.08; letter-spacing: -0.02em; color: var(--paper); transition: color .15s, transform .25s cubic-bezier(.2, .8, .2, 1); }
.menu li a::before { content: ''; flex: none; width: 0.44em; height: 0.44em; box-shadow: inset 0 0 0 0.12em var(--green); transition: background-color .15s; }
.menu li a:hover, .menu li a:focus-visible { color: var(--gold); transform: translateX(0.3em); }
.menu li.now a { color: var(--gold); } .menu li.now a::before { background: var(--gold); box-shadow: none; }
.menu-go { margin: 0; }
.menu-open .menu { display: block; animation: menuin .32s cubic-bezier(.2, .8, .2, 1); }
.menu-open { overflow: hidden; }
@keyframes menuin { from { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); } to { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 120%); } }
.menu-open .menu li { animation: menuli .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--k, 0) * 38ms + 80ms); }
@keyframes menuli { from { transform: translateX(-46px) skewX(-10deg); } }
.menu li:nth-child(2) { --k: 1; } .menu li:nth-child(3) { --k: 2; } .menu li:nth-child(4) { --k: 3; } .menu li:nth-child(5) { --k: 4; }
.menu li:nth-child(6) { --k: 5; } .menu li:nth-child(7) { --k: 6; } .menu li:nth-child(8) { --k: 7; } .menu li:nth-child(9) { --k: 8; }
@media (min-width: 900px) { .menu ol { grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: repeat(5, auto); column-gap: var(--m); } }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; text-decoration: none; margin-right: auto; }
@media (max-width: 480px) { .mark span, .burger-t { display: none; } .bar { gap: 10px; } .bar .btn-s { padding-inline: 16px; font-size: 14px; } }

/* Перший екран. Без скрипта: знімок і назва під ним. Зі скриптом (.scene): темна завіса з вирізаними літерами, крізь які видно знімок;
   прокручування веде камеру крізь літеру O, як м'яч на екрані з назвою в самій грі. Завісу малює канва (site.js). */
.hero { position: relative; }
.hero-pic { overflow: hidden; display: block; }
.hero-pic img { width: 100%; height: clamp(230px, 44vw, 50vh); object-fit: cover; object-position: 50% 78%; }
.hero-cut { display: none; }
.hero-txt { width: 100%; padding-block: clamp(20px, 3vw, 44px) clamp(34px, 5vw, 70px); display: grid; gap: 0 var(--m); }
.hero h1 { font-size: var(--fs-d); line-height: 0.8; margin-top: -0.42em; position: relative; color: var(--paper); text-shadow: 0.035em 0.035em 0 var(--green); white-space: nowrap; }
.hero .lead { font-size: var(--fs-s); line-height: 1.3; max-width: 25em; margin: 0.9em 0 1em; }
.hero .cap { margin: 0; padding: 10px var(--m) 0; }
@media (min-width: 1000px) {
  .hero-txt { grid-template-columns: 1.15fr 1fr; align-items: end; }
  .hero h1 { grid-column: 1 / -1; }
  .hero .lead { margin-bottom: 0; }
  .hero .acts { justify-self: end; flex-direction: column; align-items: flex-end; gap: 8px; }
}
.hero.scene { height: 340vh; }
.scene .hero-pin { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); height: calc(100svh - var(--bar)); overflow: hidden; }
.scene .hero-pic { position: absolute; inset: 0; }
.scene .hero-pic img { height: 100%; transform: scale(calc(1.3 - var(--hp, 0) * 0.3)); }
.scene .hero-cut { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .hero-txt { position: absolute; left: 0; right: 0; bottom: 0; padding-block: 0 clamp(18px, 3.4vh, 44px); transform: translateY(calc(var(--out, 0) * 70px)); opacity: calc(1 - var(--out, 0)); }
.hero.scene h1 { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); }
.hero.scene .lead { margin-top: 0; }
.hero.scene .cap { position: absolute; left: 0; bottom: 0; margin: 0; padding: 12px var(--m) 14px; background: var(--ink); opacity: var(--cap, 0); max-width: min(100%, 44em); }
@media (max-width: 699px) { .hero.scene .lead { font-size: 18px; } .hero.scene .acts .btn { padding: 15px 22px 14px; font-size: 16px; } }

/* Квиток: смуга фактів із перфорацією згори */
.ticket { background: var(--paper); color: var(--ink); position: relative; margin-bottom: -1px; }
.ticket::before { content: ''; position: absolute; left: 0; right: 0; top: -9px; height: 18px; background: radial-gradient(circle at 12px 9px, var(--ink) 7px, transparent 7.5px) 0 0 / 24px 18px repeat-x; }
.ticket dl { margin-block: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; padding-block: 38px 30px; }
.ticket div:last-child { grid-column: 1 / -1; }
.ticket dt { font-size: var(--fs-c); }
.ticket dd { margin: 0; font-weight: 900; font-size: clamp(19px, 2vw, 28px); line-height: 1.1; text-transform: uppercase; }
@media (min-width: 900px) { .ticket dl { grid-template-columns: repeat(4, auto) 1.4fr; } .ticket div:last-child { grid-column: auto; } }

/* Поля кольору */
.sec { padding-block: var(--gap); scroll-margin-top: 52px; }
.paper { background: var(--paper); color: var(--ink); }
.ticket + .paper { padding-top: calc(var(--gap) * 0.6); }
.grass { background: var(--grass); }
.ink { background: var(--ink); }
.board { background: var(--night); }
.deep { background: var(--deep); }
.stop { background: var(--red); }

/* Як почати: два квитки з відривним корінцем */
.ways { display: grid; gap: 18px; margin-bottom: clamp(56px, 8vw, 110px); }
.way { position: relative; display: grid; color: var(--paper); }
.way-tg { background: var(--grass); }
.way-web { background: var(--ink); }
.way-main { padding: clamp(22px, 3vw, 40px); }
.way ol { margin: 0 0 1.2em; padding-left: 1.3em; font-size: var(--fs-s); line-height: 1.3; font-weight: 700; }
.way li { margin-bottom: 0.35em; padding-left: 0.2em; }
.way p { margin: 0; }
.way-stub { position: relative; display: grid; place-items: center; padding: 26px 22px 28px; background: radial-gradient(circle, var(--paper) 3.5px, transparent 4px) -7px -7px / 14px 14px repeat-x; }
.way-stub::before, .way-stub::after { content: ''; position: absolute; top: -13px; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); }
.way-stub::before { left: -13px; } .way-stub::after { right: -13px; }
.way-stub .btn { white-space: nowrap; }
@media (min-width: 900px) {
  .way { grid-template-columns: 1fr 300px; }
  .way-main { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--m); }
  .way-main h3, .way-main ol { grid-column: 1; } .way-note { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .way-stub { background: radial-gradient(circle, var(--paper) 3.5px, transparent 4px) -7px -7px / 14px 14px repeat-y; padding: 22px 20px 22px 34px; }
  .way-stub::after { right: auto; left: -13px; top: auto; bottom: -13px; }
}
.way { margin-bottom: 22px; }
.way p + p { margin-top: 0.8em; }
.web { max-width: 40em; margin-bottom: clamp(56px, 8vw, 110px); }
.first { display: grid; gap: 34px 20px; }
@media (min-width: 900px) {
  .first { grid-template-columns: repeat(12, 1fr); align-items: start; }
  .first-txt { grid-column: 1 / 6; grid-row: 1; padding-top: 12px; }
  .f-a { grid-column: 6 / 13; grid-row: 1 / 3; }
  .f-b { grid-column: 1 / 5; grid-row: 2 / 4; align-self: end; }
  .f-c { grid-column: 5 / 11; grid-row: 3; margin-top: 10px; }
}

/* Удар */
.shot-grid { display: grid; gap: 36px var(--m); }
.toy h3 { margin-bottom: 14px; }
.toy canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; background: var(--grass2); }
.toy canvas:active { cursor: grabbing; }
.toy-out { font-weight: 700; margin: 14px 0 12px; min-height: 3.1em; max-width: none; }
.toy-acts { margin-bottom: 0; }
.pair { display: grid; gap: 30px 20px; margin-top: clamp(56px, 8vw, 110px); }
@media (min-width: 900px) {
  .shot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 620px); align-items: start; }
  .pair { grid-template-columns: 7fr 5fr; align-items: end; }
}

/* Матч: кінокадри вступу в широкому форматі 2,39:1 */
.cine { display: grid; gap: 34px 20px; margin-bottom: clamp(60px, 8vw, 120px); }
.cine img { width: 100%; aspect-ratio: 2.39 / 1; object-fit: cover; }
.cine-a { margin-inline: calc(var(--m) * -1); }
.cine-a figcaption { padding-inline: var(--m); }
@media (min-width: 900px) {
  .cine { grid-template-columns: repeat(12, 1fr); gap: 44px 28px; align-items: center; }
  .cine-a { grid-column: 1 / -1; } .cine-txt { grid-column: 1 / 6; } .cine-b { grid-column: 6 / 13; }
  .cine-c { grid-column: 1 / 8; } .cine-d { grid-column: 8 / 13; align-self: end; }
}

/* Матч */
.mgrid { display: grid; gap: 40px 20px; }
.rings { list-style: none; padding: 0; margin: 0 0 1.1em; }
.rings li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rings i { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 8px var(--ink); outline: 5px solid currentColor; outline-offset: -5px; color: inherit; }
.rings i + i { margin-left: -6px; }
.m-more h3:not(:first-child) { margin-top: 1.4em; }
@media (min-width: 900px) {
  .mgrid { grid-template-columns: repeat(12, 1fr); gap: clamp(60px, 7vw, 110px) 28px; align-items: center; }
  .m-goal { grid-column: 1 / 9; } .m-ring { grid-column: 9 / 13; }
  .m-def { grid-column: 1 / 6; } .m-pen { grid-column: 6 / 13; }
  .m-rep { grid-column: 1 / 8; } .m-more { grid-column: 8 / 13; }
}

/* Табло режимів */
.board h2 { color: var(--gold); }
.tbl { overflow-x: auto; margin-inline: calc(var(--m) * -1); padding-inline: var(--m); }
table { border-collapse: collapse; width: 100%; min-width: 760px; }
th, td { text-align: left; vertical-align: top; padding: 16px 18px; }
thead th { font-size: var(--fs-c); font-weight: 400; padding-block: 6px 10px; }
tbody th { font-weight: 900; text-transform: uppercase; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.1; }
.board tbody th { color: var(--gold); white-space: nowrap; }
.board tbody tr:nth-child(odd) { background: #10221b; }
.clock { display: inline-block; margin-top: 8px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.notes { display: grid; gap: 34px 40px; margin-top: clamp(48px, 6vw, 90px); }
.zz img { margin-bottom: 14px; }
@media (min-width: 900px) {
  .notes { gap: 0; }
  .notes > div { display: grid; grid-template-columns: 4fr 7fr; gap: 0 var(--m); padding-block: 34px; align-items: start; }
  .notes > div:nth-child(odd) { background: #10221b; margin-inline: calc(var(--m) * -1); padding-inline: var(--m); }
  .notes h3 { font-size: clamp(26px, 3.2vw, 46px); font-weight: 900; text-transform: uppercase; color: var(--gold); line-height: 1; }
  .notes p { grid-column: 2; max-width: 36em; }
  .zz { position: relative; } .zz img { position: absolute; left: var(--m); bottom: 30px; width: 84px; height: auto; margin: 0; }
}

/* Таблиці на телефоні: кожен рядок стає блоком, назва колонки стоїть перед значенням */
@media (max-width: 760px) {
  table { min-width: 0; display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody, tr, tbody th, td { display: block; }
  tr { padding: 16px 14px 12px; }
  th, td { padding: 0; }
  tbody th { margin-bottom: 8px; white-space: normal; }
  td { margin-bottom: 8px; }
  td::before { content: attr(data-l) ': '; font-weight: 700; }
  .tbl { overflow: visible; }
}

/* Маршрут кар'єри: колія зі станціями */
.route, .route ol { list-style: none; margin: 0; padding: 0; }
.route { display: grid; gap: 26px; margin-block: 10px 8px; }
.route > li > b { display: block; font-weight: 900; text-transform: uppercase; font-size: clamp(18px, 1.5vw, 22px); margin-bottom: 12px; }
.route ol { display: grid; gap: 0; }
.route ol li { position: relative; padding: 5px 0 5px 34px; font-weight: 700; }
.route ol li::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 8px; background: var(--ink); }
.route ol li::after { content: ''; position: absolute; left: 0; top: 50%; width: 20px; height: 20px; margin-top: -10px; background: var(--paper); box-shadow: inset 0 0 0 5px var(--ink); }
.route > li:nth-child(2) ol li::before { background: var(--grass); } .route > li:nth-child(2) ol li::after { box-shadow: inset 0 0 0 5px var(--grass); }
.route > li:nth-child(3) ol li::before { background: var(--red); } .route > li:nth-child(3) ol li::after { box-shadow: inset 0 0 0 5px var(--red); }
.route > li:nth-child(4) ol li::before { background: #a87c12; } .route > li:nth-child(4) ol li::after { box-shadow: inset 0 0 0 5px #a87c12; }
.route > li:last-child ol li:last-child::after { background: var(--gold); width: 26px; height: 26px; left: -3px; margin-top: -13px; }
@media (min-width: 1000px) {
  .route { grid-template-columns: 3fr 3fr 5fr 4fr; gap: 0; margin-block: 30px 14px; }
  .route ol { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .route ol li { padding: 44px 8px 0 0; font-size: 16px; }
  .route ol li::before { left: 0; right: 0; top: 10px; bottom: auto; width: auto; height: 10px; }
  .route ol li::after { left: 0; top: 0; margin-top: 0; width: 30px; height: 30px; box-shadow: inset 0 0 0 7px var(--ink); }
  .route > li:nth-child(2) ol li::after { box-shadow: inset 0 0 0 7px var(--grass); }
  .route > li:nth-child(3) ol li::after { box-shadow: inset 0 0 0 7px var(--red); }
  .route > li:nth-child(4) ol li::after { box-shadow: inset 0 0 0 7px #a87c12; }
  .route > li:last-child ol li:last-child::after { width: 40px; height: 40px; left: 0; top: -5px; margin-top: 0; }
}
.isle { display: grid; gap: 34px 20px; margin-top: clamp(56px, 8vw, 110px); }
.cols { display: grid; gap: 34px 40px; margin-top: clamp(56px, 8vw, 110px); }
@media (min-width: 900px) {
  .isle { grid-template-columns: repeat(12, 1fr); align-items: start; }
  .isle-big { grid-column: 1 / 9; grid-row: 1 / 3; }
  .isle-txt { grid-column: 9 / 13; }
  .isle-menu { grid-column: 9 / 13; align-self: end; }
  .cols { grid-template-columns: 5fr 7fr; align-items: start; }
  .cols > figure { grid-column: 2; grid-row: 1 / 3; }
  .cols > div { grid-column: 1; }
}

/* Онлайн: три кадри потяга їдуть сходинками */
.train { display: grid; gap: 22px; padding-inline: var(--m); margin-bottom: clamp(56px, 8vw, 110px); }
@media (min-width: 900px) {
  .train { grid-template-columns: repeat(3, 1fr); gap: 12px; padding-inline: 0; }
  .train figure:nth-child(2) { margin-top: 60px; } .train figure:nth-child(3) { margin-top: 120px; }
  .train figcaption { padding-inline: var(--m) 12px; }
}
.packs, .club2 { display: grid; gap: 40px var(--m); }
.club2 { margin-top: clamp(56px, 8vw, 110px); align-items: center; }
.wg { margin-bottom: 26px; }
.wg p { margin-bottom: 8px; }
.cars { display: flex; gap: 3px; height: 34px; }
.cars i { flex: var(--n) 0 0; background-color: #4d8fd6; background-image: linear-gradient(90deg, transparent calc(100% - 3px), var(--deep) 0); background-size: calc(100% / var(--n)) 100%; }
.cars .e { background-color: #a25fd0; } .cars .l { background-color: var(--gold); }
@media (min-width: 900px) { .packs { grid-template-columns: 5fr 6fr; } .club2 { grid-template-columns: 7fr 5fr; } }

/* Клуб: червоне поле «стоп» */
.club { display: grid; gap: 40px var(--m); align-items: start; }
.crest { width: clamp(150px, 26vw, 360px); }
.nums { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 30px 20px; }
.nums dt { font-weight: 900; font-size: clamp(44px, 7vw, 104px); line-height: 0.9; letter-spacing: -0.03em; }
.nums dd { margin: 8px 0 0; max-width: 17em; }
@media (min-width: 900px) {
  .club { grid-template-columns: auto 1fr; }
  .nums { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); margin-top: 30px; }
}

/* Керування */
.keys tbody tr:nth-child(odd) { background: var(--paper2); }
.keys tbody th { white-space: nowrap; }
.keys { margin-bottom: 30px; }

/* Підвал */
.foot { background: var(--ink); padding-block: clamp(60px, 9vw, 130px) 40px; }
.go { font-size: clamp(60px, 16.5vw, 240px); margin: 0 0 0.25em; max-width: none; white-space: nowrap; }
.go a { text-decoration: none; color: var(--green); transition: color .2s; }
.go a:hover { color: var(--paper); }
.foot-row { display: grid; gap: 24px var(--m); margin-block: clamp(50px, 6vw, 90px) 30px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot li a { display: inline-block; padding: 9px 0; }
@media (min-width: 900px) { .foot-row { grid-template-columns: 1fr 1fr; } .foot ul { grid-template-columns: 1fr 1fr; } }

/* Скошений край між полями кольору: як плашки в інтерфейсі гри */
.sec { position: relative; }
.sec::before { content: ''; position: absolute; left: 0; right: 0; top: calc(-5vw + 1px); height: 5vw; background: inherit; clip-path: polygon(0 100%, 100% 0, 100% 100%); pointer-events: none; }
.sec:nth-of-type(odd)::before { clip-path: polygon(0 0, 100% 100%, 0 100%); }
.ticket + .sec::before, .led + .sec::before { display: none; }

/* LED-борт: рядок біжить, як на бортах стадіону в грі */
.led { background: var(--night); overflow: hidden; padding-block: 16px 14px; position: relative; z-index: 1; }
.led-run { display: flex; width: max-content; animation: run 38s linear infinite; will-change: transform; }
.js .led-run { animation: none; }
.led { transform: skewY(calc(var(--sk, 0deg) * -0.25)); }
.led-run span { display: flex; }
.led b { font-weight: 900; text-transform: uppercase; font-size: clamp(22px, 3.4vw, 46px); line-height: 1; white-space: nowrap; padding-right: 1.1em; }
.led b::after { content: '›››'; padding-left: 1.1em; color: var(--green); letter-spacing: -0.08em; }
.led b:nth-child(even)::after { color: #e0364a; }
@keyframes run { to { transform: translateX(-50%); } }

/* Кнопка: шеврони, як на «ВПЕРЕД!» у меню */
.btn:not(.btn-s)::after, .bar .btn-s::after { content: '›››'; display: inline-block; margin-left: 0.55em; letter-spacing: -0.1em; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.btn:not(.btn-s):hover::after, .bar .btn-s:hover::after { transform: translateX(7px); }

/* ===== Рух. Зміст видно й без скрипта: усе нижче діє лише з класом .js на html ===== */
.js .rv { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }

/* заголовки перекидаються по літері, як механічне табло */
.js h2.rv, .js h2.rv.in { opacity: 1; transform: skewX(calc(-8deg - var(--sk, 0deg) * 1.6)); }
h2 .w, .go .w { display: inline-block; white-space: nowrap; perspective: 700px; }
h2 .ch, .go .ch { display: inline-block; }
.js h2 .ch { transform: rotateX(-96deg); transform-origin: 50% 62%; opacity: 0; transition: transform .6s cubic-bezier(.2, .9, .25, 1.15) calc(var(--i) * 30ms), opacity .15s linear calc(var(--i) * 30ms); }
.js h2.in .ch { transform: none; opacity: 1; }

/* знімки відкриваються скошеною шторкою зліва, сам кадр під нею від'їжджає */
figure { overflow: hidden; }
.js figure.rv { opacity: 1; transform: none; }
.js figure.rv img { clip-path: polygon(0 0, 0 0, -14% 100%, -14% 100%); transform: scale(1.14); transition: clip-path .95s cubic-bezier(.65, 0, .2, 1) var(--d, 0ms), transform 1.5s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms); }
.js figure.rv.in img { clip-path: polygon(0 0, 114% 0, 100% 100%, 0 100%); transform: none; }
.js figure.rv figcaption { opacity: 0; transform: translateY(10px); transition: opacity .5s ease calc(var(--d, 0ms) + .55s), transform .5s ease calc(var(--d, 0ms) + .55s); }
.js figure.rv.in figcaption { opacity: 1; transform: none; }
.m-goal { overflow: visible; position: relative; }

/* квитки виїжджають, як із принтера каси, кнопку на корінці ставить штамп */
.js .way.rv { transform: translateX(-70px) rotate(-3deg); transform-origin: 0 100%; }
.js .way.rv.in { transform: none; }
.js .way .way-stub .btn { transform: scale(0.6) rotate(-8deg); opacity: 0; transition: transform .45s cubic-bezier(.2, 1.5, .4, 1) calc(var(--d, 0ms) + .55s), opacity .2s linear calc(var(--d, 0ms) + .55s), background-color .16s; }
.js .way.in .way-stub .btn { transform: none; opacity: 1; }

/* квиток-смуга: значення друкуються по черзі */
.js .ticket div { opacity: 0; transform: translateY(18px); transition: opacity .4s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }
.js .ticket.in div { opacity: 1; transform: none; }
.js .ticket.in div:nth-child(2) { transition-delay: .09s; } .js .ticket.in div:nth-child(3) { transition-delay: .18s; }
.js .ticket.in div:nth-child(4) { transition-delay: .27s; } .js .ticket.in div:nth-child(5) { transition-delay: .36s; }

/* кільця під м'ячем дихають, як у грі */
.rings i { animation: ring 1.6s ease-in-out infinite; }
.rings li:nth-child(2) i { animation-delay: .3s; } .rings li:nth-child(3) i { animation-delay: .6s; }
@keyframes ring { 50% { transform: scale(1.22); } }

/* табло: рядки перекидаються згори вниз */
.js .board .tbl.rv { opacity: 1; transform: none; }
.js .board tbody tr { transform: perspective(900px) rotateX(-88deg); transform-origin: 50% 0; opacity: 0; transition: transform .6s cubic-bezier(.2, .9, .3, 1.1), opacity .2s linear; transition-delay: calc(var(--r, 0) * 110ms); }
.js .board .tbl.in tbody tr { transform: none; opacity: 1; }
.board tbody tr:nth-child(2) { --r: 1; } .board tbody tr:nth-child(3) { --r: 2; } .board tbody tr:nth-child(4) { --r: 3; } .board tbody tr:nth-child(5) { --r: 4; }
.clock::before { content: ''; display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--gold); margin-right: 0.45em; animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.15; } }

/* колія кар'єри: станції загоряються, поки гортаєш, тепловоз їде лінією */
.route { position: relative; }
.route ol li::after { transition: transform .35s cubic-bezier(.2, 1.6, .4, 1), background-color .2s; }
.js .route ol li { opacity: 0.38; transition: opacity .3s; }
.js .route ol li.on { opacity: 1; }
.js .route ol li.on::after { background: currentColor; transform: scale(1.12); }
.route > li:nth-child(1) ol li::after { color: var(--ink); } .route > li:nth-child(2) ol li::after { color: var(--grass); }
.route > li:nth-child(3) ol li::after { color: var(--red); } .route > li:nth-child(4) ol li::after { color: #a87c12; }
.js .route > li:last-child ol li:last-child.on::after { background: var(--gold); animation: cup .9s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes cup { 0% { transform: scale(0.3) rotate(-90deg); } 60% { transform: scale(1.5) rotate(8deg); } 100% { transform: scale(1.12); } }
.route-loco { display: none; }
@media (min-width: 1000px) {
  .js .route-loco { display: block; position: absolute; left: 0; top: 30px; width: 74px; height: 26px; margin-left: -80px; background: var(--green); box-shadow: inset 0 -7px 0 var(--red), inset -16px 0 0 #1c6b43; will-change: transform; z-index: 2; }
  .route-loco::before { content: ''; position: absolute; right: 3px; top: 4px; width: 9px; height: 7px; background: #dff7e9; }
}

/* три кадри потяга їдуть убік разом із прокручуванням */
.train { will-change: transform; }
@media (min-width: 900px) { .js .train { width: 108vw; margin-left: -4vw; } .js .train figcaption { padding-left: calc(8vw + var(--m)); } }

/* вагони паків заїжджають справа й стукають зчепленнями */
.cars span { flex: 1 0 0; background: #4d8fd6; }
.cars span.e { background: #a25fd0; } .cars span.l { background: var(--gold); }
.js .cars span { transform: translateX(105vw); transition: transform .9s cubic-bezier(.16, 1.12, .3, 1) calc(var(--i) * 55ms); }
.js .wagons.in .cars span { transform: none; }
.wagons { overflow: hidden; }

/* герб влітає з обертом, як на екрані з назвою */
.js .crest.rv { transform: perspective(900px) rotateY(-540deg) scale(0.3); transition: transform 1.3s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.js .crest.rv.in { transform: none; }
.nums dt { font-variant-numeric: tabular-nums; }

/* підвал: «ВПЕРЕД!» складається літера за літерою, як напис «ГОЛ!» */
.js .go .ch { transform: scale(2.6) translateY(-0.2em); opacity: 0; transition: transform .38s cubic-bezier(.2, .9, .3, 1.25) calc(var(--i) * 80ms), opacity .12s linear calc(var(--i) * 80ms); }
.js .go.in .ch { transform: none; opacity: 1; }
.js .go.in { animation: slam .5s linear .62s; }
@keyframes slam { 0%, 100% { transform: skewX(-8deg); } 20% { transform: skewX(-8deg) translate(-9px, 5px); } 45% { transform: skewX(-8deg) translate(7px, -4px); } 70% { transform: skewX(-8deg) translate(-4px, 2px); } }

/* конфеті над знімком гола */
.cf { position: absolute; left: 62%; top: 34%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.cf i { position: absolute; width: var(--s); height: var(--s); background: var(--c); animation: cf 1.9s cubic-bezier(.1, .7, .3, 1) both; animation-delay: var(--t); }
@keyframes cf { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }

/* слід курсора: пунктир прицілу */
.trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; mix-blend-mode: difference; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js h2 .ch, .js .go .ch, .js .ticket div, .js .board tbody tr, .js .cars span, .js .route ol li, .js figure.rv img, .js figure.rv figcaption, .js .way .way-stub .btn, .js .crest.rv { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; animation: none !important; }
  .js h2.rv { transform: skewX(-8deg) !important; }
  .led-run, .rings i, .clock::before { animation: none; }
  .btn, .btn::after { transition: none; }
}

.js .go.rv, .js .go.rv.in { opacity: 1; transform: skewX(-8deg); }

/* знімок гола здригається разом із конфеті */
.m-goal.hit img { animation: quake .45s linear; }
@keyframes quake { 20% { translate: -7px 4px; } 45% { translate: 6px -3px; } 70% { translate: -3px 2px; } }
@media (prefers-reduced-motion: reduce) { .m-goal.hit img, .menu-open .menu, .menu-open .menu li { animation: none; } }

/* Заглушка на місці знімка: смуги газону, пунктир прицілу біжить, м'яч стрибає. Зникає, коли знімок відкрився */
.shot { display: block; position: relative; overflow: hidden; }
.js .shot { background: repeating-linear-gradient(90deg, #14412f 0 12.5%, #113a2a 12.5% 25%); }
.js .shot::before { content: ''; position: absolute; left: -40px; right: 0; top: 50%; height: 10px; margin-top: 22px; background: radial-gradient(circle, #f1efe8 4px, transparent 4.5px) 0 0 / 40px 10px repeat-x; animation: dots .7s linear infinite; opacity: 0.85; }
.js .shot::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -30px 0 0 -15px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #111, inset 0 0 0 9px #fff, inset 0 0 0 30px #111; animation: hop2 .55s cubic-bezier(.3, 0, .7, 1) infinite alternate; }
.js .shot img { position: relative; z-index: 1; }
.js .shot.ok { background: none; }
.js .shot.ok::before, .js .shot.ok::after { display: none; }
@keyframes dots { to { transform: translateX(40px); } }
@keyframes hop2 { from { transform: translateY(-46px) rotate(-60deg); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .shot::before, .js .shot::after { animation: none; } }

/* Посилання назад на сайт «Залізної Зміни» (сторінка живе на ironsquad.org.ua/loko/) */
.home-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--paper); text-decoration: none; opacity: .82; transition: opacity .16s; white-space: nowrap; }
.home-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 640px) { .home-link-t { display: none; } .home-link { font-size: 20px; } }

/* Розкладка секції «Тягни назад» мала той самий клас .shot, що й заглушки скриншотів,
   тож отримувала їхній смугастий фон, пунктир через увесь екран і м'яч. Тепер у неї власний клас .shot-grid,
   а поле «Спробуй» не ширше 620px. */
.toy { width: 100%; max-width: 620px; }

/* Коли меню відкрите, сторінка не прокручується, і липка шапка лишалась там, де її застали.
   Фіксуємо шапку зверху, щоб кнопка «Закрити» завжди була на екрані. */
.menu-open .bar { position: fixed; top: 0; left: 0; right: 0; }
