/* home.css — главная chronotech.run */
/* ── Токены ────────────────────────────────────────────────────────────────
   Цвета логотипа: тёмно-синий секундомер и оранжевая финишная лента. */
:root {
  --ink: #262e56;          /* синий логотипа: текст и табло */
  --night: #161b38;        /* фон табло финиша */
  --tape: #fb5107;         /* финишная лента: действия и акценты */
  --tape-ink: #c63d00;     /* оранжевый для мелкого текста на светлом (контраст) */
  --paper: #f2f3f7;        /* фон страницы */
  --card: #ffffff;
  --slate: #5d6587;        /* второстепенный текст */
  --line: #d9dce8;
  --go: #12a150;           /* «прошли», «на связи» */
  --text: var(--ink);
  --board-text: #f5f6fb;
  --board-dim: #9aa2c7;
  --radius-s: 6px;
  --radius-l: 18px;
  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1329; --card: #182042; --text: #e9ecf7; --slate: #a3abcf; --line: #2a3360;
    --tape-ink: #ff7a3d; --night: #0b0e20; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1329; --card: #182042; --text: #e9ecf7; --slate: #a3abcf; --line: #2a3360;
  --tape-ink: #ff7a3d; --night: #0b0e20; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.6 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.12rem; line-height: 1.3; }
p { margin: 0; }
.lead { font-size: 1.15rem; color: var(--slate); max-width: 60ch; }

/* ── Кнопки ─────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.35em; border-radius: var(--radius-s);
  font: 600 1rem/1.2 var(--body); text-decoration: none; border: 2px solid transparent; cursor: pointer; }
.btn-go { background: var(--tape); color: #fff; }
.btn-go:hover { background: #e04600; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* ── Шапка ──────────────────────────────────────────────────────────────── */
.top { position: absolute; inset: 0 0 auto; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 76px; }
.logo img { height: 34px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--board-dim); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--board-text); }
.top .btn { padding: .55em 1em; font-size: .92rem; color: var(--board-text); }
.theme { background: none; border: 1px solid rgba(255,255,255,.25); color: var(--board-text); width: 38px; height: 38px;
  border-radius: 50%; cursor: pointer; display: grid; place-items: center; flex: none; }
.theme svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .nav { display: none; } .top .btn { margin-left: auto; } }

/* ── Финиш: табло под аркой ─────────────────────────────────────────────── */
.finish { position: relative; background: var(--night); color: var(--board-text); padding: 140px 0 120px; overflow: hidden; }
.finish::before { /* разметка дорожек */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(90deg, transparent 0 159px, rgba(255,255,255,.05) 159px 160px);
}

/* Финишный створ — картинка во всю ширину под табло */
.gate { position: relative; margin: 0; background: var(--night); }
.gate img { width: 100%; height: clamp(260px, 46vw, 640px); object-fit: cover; object-position: 50% 45%; }
.gate figcaption { position: absolute; right: 16px; bottom: 12px; font-size: .78rem; color: rgba(255,255,255,.75);
  background: rgba(22,27,56,.55); padding: 3px 10px; border-radius: 4px; }
.finish-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.finish h1 { font-size: clamp(2.1rem, 4.6vw, 3.7rem); font-weight: 800; }
.finish .lead { color: var(--board-dim); margin-top: 22px; }
.finish .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
/* финишная лента — как на логотипе */
.tape { position: absolute; left: -5%; right: -5%; bottom: 46px; height: 22px; background: var(--tape);
  transform: rotate(-2.2deg); box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.tape::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(255,255,255,.18) 46px 50px); }

.board { background: #0a0d1e; border: 1px solid #2a3260; border-radius: var(--radius-l); padding: 26px 28px 22px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04); }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--board-dim); font-size: .88rem; }
.board-head .live { display: inline-flex; align-items: center; gap: 8px; color: var(--board-text); font-weight: 600; }
.board-head .live i { width: 9px; height: 9px; border-radius: 50%; background: var(--tape); animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.clock { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1; margin: 18px 0 6px;
  display: flex; letter-spacing: 0; color: #fff; }
.clock span { display: inline-block; width: .74em; text-align: center; }
.clock .sep { width: .32em; color: var(--board-dim); }
.clock .ms { font-size: .46em; width: .78em; align-self: flex-end; padding-bottom: .16em; color: var(--tape); }
.clock .ms.sep { width: .3em; }
.clock-cap { color: var(--board-dim); font-size: .85rem; }
.fin-now { display: grid; grid-template-columns: 2.6em 3.4em minmax(0, 1fr) auto; gap: 14px; align-items: baseline;
  margin-top: 22px; padding: 16px 0 14px; border-top: 1px solid #262e58; border-bottom: 1px solid #262e58; font-size: 1.25rem; }
.fin-now .pl { font-family: var(--display); color: var(--tape); }
.fin-now .no { color: var(--board-dim); }
.fin-now .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-now .tm { font-family: var(--display); font-size: .95em; }
.fin-now.flash { animation: arrive .7s ease-out; }
@keyframes arrive { from { background: rgba(251,81,7,.22); } to { background: transparent; } }
.fin-list { list-style: none; margin: 10px 0 0; padding: 0; font-size: .92rem; color: var(--board-dim); }
.fin-list li { display: grid; grid-template-columns: 2.6em 3.4em minmax(0, 1fr) auto; gap: 14px; padding: 4px 0; }
.fin-list li span:nth-child(3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-note { margin-top: 14px; font-size: .8rem; color: #6f78a6; }
@media (max-width: 900px) {
  .finish { padding: 108px 0 110px; }
  .finish-grid { grid-template-columns: 1fr; gap: 40px; }
  .fin-now { font-size: 1.05rem; gap: 10px; }
  .fin-now, .fin-list li { grid-template-columns: 2.2em 3em minmax(0, 1fr) auto; }
}
@media (max-width: 520px) {
  /* на телефоне номер участника не помещается рядом с фамилией — прячем его */
  .fin-now, .fin-list li { grid-template-columns: 2em minmax(0, 1fr) auto; }
  .fin-now .no, .fin-list li span:nth-child(2) { display: none; }
  .top .wrap { gap: 14px; }
  .top .btn .long { display: none; }
}
@media (min-width: 521px) { .top .btn .short { display: none; } }

/* ── Секции ─────────────────────────────────────────────────────────────── */
.sec { padding: 104px 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { max-width: 760px; margin-bottom: 52px; }
.sec-head .lead { margin-top: 16px; }
@media (max-width: 700px) { .sec { padding: 72px 0; } .sec-head { margin-bottom: 36px; } }

/* Возможности: заголовок слева, перечень справа */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
.split .sec-head { position: sticky; top: 32px; align-self: start; margin: 0; }
.caps { margin: 0; }
.caps div { padding: 22px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; }
.caps div:first-child { padding-top: 0; }
.caps dt { font-weight: 700; font-size: 1.02rem; }
.caps dd { margin: 0; color: var(--slate); }
.caps a { color: var(--tape-ink); }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split .sec-head { position: static; }
  .caps div { grid-template-columns: 1fr; gap: 6px; }
}

/* День старта: настоящая последовательность */
.day { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.day li { position: relative; padding: 46px 28px 0 0; counter-increment: step; }
.day li::before { /* дорожка */
  content: ""; position: absolute; top: 15px; left: 0; right: 0; height: 2px; background: var(--line);
}
.day li::after { content: counter(step); position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--ink); color: var(--text); font: 700 .9rem/28px var(--display); text-align: center; }
:root[data-theme="dark"] .day li::after { border-color: var(--slate); }
.day li:last-child::after { background: var(--tape); border-color: var(--tape); color: #fff; }
.day h3 { margin-bottom: 8px; }
.day p { color: var(--slate); font-size: .98rem; }
@media (max-width: 900px) {
  .day { grid-template-columns: 1fr; }
  .day li { padding: 0 0 30px 52px; }
  .day li::before { top: 32px; bottom: 0; left: 15px; right: auto; width: 2px; height: auto; }
  .day li:last-child::before { display: none; }
}

/* Трансляция: сцена с переключателем вида */
.cast { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.modes { display: flex; flex-direction: column; gap: 8px; margin-top: 30px; }
.modes button { text-align: left; background: none; border: 1px solid var(--line); color: inherit; border-radius: var(--radius-s);
  padding: 12px 16px; font: 500 1rem/1.35 var(--body); cursor: pointer; }
.modes button small { display: block; color: var(--slate); font-size: .86rem; }
.modes button[aria-pressed="true"] { border-color: var(--tape); box-shadow: inset 4px 0 0 var(--tape); }
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-l); overflow: hidden; color: #fff;
  background:
    radial-gradient(ellipse at 70% 120%, rgba(251,81,7,.35), transparent 55%),
    linear-gradient(160deg, #3a4a7a, #1b2142 55%, #0d1022); }
.stage::before { /* «кадр с камеры»: дорога и арка */
  content: ""; position: absolute; left: 50%; bottom: -40%; width: 70%; height: 90%; transform: translateX(-50%) perspective(400px) rotateX(58deg);
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 3px, transparent 3px 25%), #2a3157; opacity: .7;
}
.stage::after { content: "кадр с камеры"; position: absolute; right: 14px; top: 12px; font-size: .75rem; color: rgba(255,255,255,.45); }
.ov { position: absolute; font-family: var(--body); }
.ov-table { left: 4%; top: 7%; width: 46%; background: rgba(12,15,36,.88); border-radius: 10px; padding: 10px 12px; font-size: clamp(.6rem, 1.3vw, .9rem); }
.ov-table b { display: flex; justify-content: space-between; font-family: var(--display); font-size: 1.05em; margin-bottom: 6px; }
.ov-table b em { font-style: normal; color: var(--tape); }
.ov-table div { display: grid; grid-template-columns: 1.6em 2.4em minmax(0, 1fr) auto; gap: 8px; padding: 3px 0; border-top: 1px solid rgba(255,255,255,.08); }
.ov-table div span:nth-child(3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-card { left: 5%; right: 5%; bottom: 8%; display: flex; align-items: center; gap: 4%; background: rgba(12,15,36,.9); border-left: 6px solid var(--tape);
  border-radius: 10px; padding: 2.4% 3%; font-size: clamp(.75rem, 1.9vw, 1.35rem); }
.ov-card .pl { font-family: var(--display); font-size: 1.7em; color: var(--tape); }
.ov-card .nm { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-card .nm small { display: block; font-weight: 400; color: #b6bde0; font-size: .7em; }
.ov-card .tm { font-family: var(--display); }
.ov-tick { left: 0; right: 0; bottom: 0; display: flex; background: rgba(12,15,36,.92); font-size: clamp(.7rem, 1.5vw, 1.05rem); white-space: nowrap; overflow: hidden; }
.ov-tick strong { background: var(--tape); padding: .55em 1em; font-family: var(--display); flex: none; }
.ov-tick .run { display: inline-flex; gap: 2.4em; padding: .55em 1em; animation: tick 22s linear infinite; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ov-board { left: 0; right: 0; top: 0; height: 22%; background: #000; display: flex; align-items: center; justify-content: space-between;
  padding: 0 3.5%; font-family: var(--display); font-size: clamp(.9rem, 2.6vw, 2rem); }
.ov-board .tm { color: #ffd23f; }
.ov-board .nm { color: #fff; }
.stage [hidden] { display: none; }
.cast-note { margin-top: 14px; color: var(--slate); font-size: .92rem; }
@media (max-width: 900px) { .cast { grid-template-columns: 1fr; gap: 28px; } .modes { flex-direction: row; flex-wrap: wrap; } .modes button small { display: none; } }

/* Трейл: трасса и прохождение точек */
.trail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 40px; align-items: start; }
.course { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; }
.course svg { width: 100%; height: auto; display: block; }
.course .path { fill: none; stroke: var(--tape); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.course .relief { fill: none; stroke: var(--line); stroke-width: 1.5; }
.cp { cursor: pointer; pointer-events: bounding-box; }
.cp circle { fill: var(--card); stroke: var(--ink); stroke-width: 3; }
:root[data-theme="dark"] .cp circle { stroke: #e9ecf7; }
.cp text { font: 700 13px var(--body); fill: var(--text); }
.cp .cnt { font: 600 12px var(--body); fill: var(--go); }
.cp .cnt.miss { fill: var(--tape-ink); }
.cp:hover circle, .cp:focus circle, .cp[aria-pressed="true"] circle { fill: var(--tape); stroke: var(--tape); }
.cp:focus { outline: none; }
.cp:focus-visible circle { stroke-width: 5; }
.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; }
.report h3 { font-size: 1.3rem; }
.report .sub { color: var(--slate); margin-top: 4px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); margin: 16px 0 18px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--go); transition: width .4s ease; }
.missing { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.missing li { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.missing li span:last-child { color: var(--slate); }
.missing .none { display: block; color: var(--go); }
.missing .more { display: block; color: var(--slate); }
@media (max-width: 900px) { .trail { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .cp text { font-size: 22px; } .cp .cnt { font-size: 19px; } .course { padding: 8px; } }

/* Бэкъярд и «Отметки»: два разных инструмента рядом */
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.tool { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 34px; display: flex; flex-direction: column; gap: 18px; }
.tool p { color: var(--slate); }
.yard { display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap; padding: 22px 24px; background: var(--night); color: var(--board-text); border-radius: 12px; }
.yard .big { font-family: var(--display); font-size: 3.2rem; line-height: 1; }
.yard small { display: block; color: var(--board-dim); font-size: .82rem; margin-bottom: 6px; }
.yard .bell { color: #ffd23f; }
.yard .bell.soon { color: var(--tape); }
.phone { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.handset { background: var(--night); border-radius: 26px; padding: 14px; color: var(--board-text); border: 3px solid #2a3260; }
.handset .pt { font-size: .75rem; color: var(--board-dim); display: flex; justify-content: space-between; }
.handset output { display: block; font-family: var(--display); font-size: 1.9rem; text-align: center; min-height: 1.4em; margin: 6px 0; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keys button { background: #232b55; color: #fff; border: 0; border-radius: 10px; height: 40px; font: 600 1.1rem var(--body); cursor: pointer; }
.keys button:active { background: #33407a; }
.keys .mark { grid-column: 1 / -1; background: var(--tape); height: 48px; font-size: 1rem; }
.marks { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.marks li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.marks li span:last-child { color: var(--go); font-size: .85rem; }
.marks .empty { color: var(--slate); border: 0; }
@media (max-width: 980px) { .pair { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .phone { grid-template-columns: 1fr; } .handset { max-width: 260px; } .tool { padding: 24px; } }

/* Связь */
.contact { background: var(--ink); color: var(--board-text); position: relative; overflow: hidden; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: end; }
.contact .lead { color: #c3c9e6; margin-top: 18px; }
.contact ul { margin: 18px 0 0; padding-left: 1.2em; color: #c3c9e6; }
.mail { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 2.2rem); font-weight: 700; color: #fff; text-decoration: none;
  border-bottom: 4px solid var(--tape); padding-bottom: 4px; overflow-wrap: anywhere; }
.mail:hover { color: var(--tape); }
.contact .side p { color: #c3c9e6; margin-top: 18px; }
.contact .side a:not(.mail) { color: #fff; }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; } }

.foot { padding: 30px 0 40px; color: var(--slate); font-size: .92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.foot img { height: 26px; width: auto; }
.foot nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.foot a { color: var(--slate); }
.foot .logo-light { display: none; }
:root[data-theme="dark"] .foot .logo-light { display: block; }
:root[data-theme="dark"] .foot .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .foot .logo-light { display: block; }
  :root:not([data-theme="light"]) .foot .logo-dark { display: none; }
}
@media (max-width: 700px) {
  .gate img { height: 86vw; object-position: 50% 15%; }
  .gate figcaption { font-size: .7rem; right: 10px; bottom: 8px; }
}
