/* styles.css — «Выход»: красная дорожка клуба — пол сайта. Всё из токенов. */

/* ── Сигнатура: слова краской на полу ───────────────────────── */
.paint {
  font-family: var(--font-display); font-style: italic; font-weight: 900;
  text-transform: uppercase; color: var(--paint); line-height: .82; letter-spacing: -.01em;
  /* потёртость краски: шум маской, без картинки */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1 1 1 1 1 .7 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='1 1 1 1 1 1 .7 1 1 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.paint__word { display: block; }
/* плоские надписи (вид сверху): только вытяжка по ходу бега */
.paint--flat { transform: scaleY(var(--signature-stretch)); transform-origin: 50% 100%; }

/* заголовок главы = номер дорожки + название */
.lane-title { display: flex; align-items: baseline; gap: var(--space-4); font-size: var(--step-3); font-style: italic; font-weight: 900; text-transform: uppercase; line-height: .9; }
.lane-title__no {
  flex: none; display: inline-grid; place-items: center; width: 1.1em; height: 1.1em;
  border: var(--lane-line) solid currentColor; font-size: .62em; font-style: normal; line-height: 1;
}

/* ── Шапка: чёрная полоса клетки, часы зала ───────────────────── */
.header { position: sticky; top: 0; background: var(--cage); color: var(--paint); }
.header__inner { padding-inline: var(--gutter); min-height: 68px; gap: var(--space-5); }
.logo img { width: clamp(118px, 10vw, 158px); height: auto; }
.nav { margin-left: auto; }
.nav__list { gap: var(--space-5); }
.nav__list a { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; text-decoration: none; font-size: var(--step--1); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.nav__lane { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--floor); color: var(--paint); font-size: 12px; transition: background-color var(--dur-micro) var(--ease-out); }
.nav__list a:hover .nav__lane, .nav__list a:focus-visible .nav__lane { background: var(--floor); }
.header__tel { font-weight: 600; font-size: var(--step--1); text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.lang button { color: var(--paint); font-weight: 600; }
.lang button[aria-pressed="true"] { text-decoration-color: var(--floor); text-decoration-thickness: 2px; }

.clock { display: grid; gap: 2px; text-decoration: none; min-height: 44px; align-content: center; }
.clock__digits { position: relative; font-family: var(--font-led); font-size: clamp(17px, 1.5vw, 22px); color: var(--led); line-height: 1; letter-spacing: .04em; }
.clock__ghost { color: color-mix(in oklab, var(--led) 13%, var(--cage)); }
.clock__time { position: absolute; inset: 0; text-shadow: 0 0 10px color-mix(in oklab, var(--led) 45%, transparent); }
.clock__next { font-size: 11px; letter-spacing: .03em; color: color-mix(in oklab, var(--paint) 70%, var(--cage)); white-space: nowrap; }
.clock__next b { color: var(--paint); font-weight: 600; }

/* кнопки */
.btn { border-radius: var(--radius-pill); font-weight: 600; min-height: 52px; padding-inline: 1.6em; }
.btn--primary { background: var(--paint); color: var(--cage); }
.btn--primary:hover { background: var(--cage); color: var(--paint); }
.btn--ghost { border-color: var(--paint); color: var(--paint); }
.btn--ghost:hover { background: var(--paint); color: var(--floor); }

/* ── K1 старт (статичный кадр; движение — scene.css) ───────────── */
.start { position: relative; min-height: calc(100svh - 68px); display: grid; align-content: end; overflow: hidden; isolation: isolate; perspective: 640px; perspective-origin: 50% 36%; }
.start__floor { position: absolute; inset: 0; z-index: -2; }
.start__floor img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.start::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; z-index: -1; background: linear-gradient(to top, color-mix(in oklab, var(--floor-shade) 92%, transparent) 0 35%, transparent); } /* опора текста на полу, не декор */
.paint--stack {
  position: absolute; left: 50%; bottom: 22%; width: min(92vw, 1180px); text-align: center;
  font-size: clamp(64px, 11vw, 180px);
  transform: translateX(-50%) rotateX(var(--signature-tilt)) scaleY(var(--signature-stretch)); transform-origin: 50% 100%;
}
.paint--stack .paint__word { font-size: calc(.42em + var(--i, 0) * .2em); }
.paint--stack .paint__word:nth-child(1) { --i: 0; } .paint--stack .paint__word:nth-child(2) { --i: .5; }
.paint--stack .paint__word:nth-child(3) { --i: 1.3; } .paint--stack .paint__word--wide { --i: 2.9; white-space: nowrap; }
.start__copy { position: relative; padding: 0 var(--gutter) var(--space-6); display: grid; gap: var(--space-3); max-width: 46rem; }
.start__title { font-family: var(--font-body); font-weight: 600; font-size: var(--step-1); line-height: 1.25; }
.start__where { font-size: var(--step--1); color: var(--ink-muted); }
.start__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }

/* ── K2 зоны-двери ─────────────────────────────────────────────── */
.zones { padding: var(--space-8) var(--gutter); background:
  linear-gradient(90deg, transparent calc(var(--gutter) / 2 - 1px), var(--paint) 0 calc(var(--gutter) / 2 + 2px), transparent 0 calc(100% - var(--gutter) / 2 - 2px), var(--paint) 0 calc(100% - var(--gutter) / 2 + 1px), transparent 0), var(--floor); }
.doors { counter-reset: d; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); margin-top: var(--space-7); }
.door { display: grid; gap: var(--space-4); align-content: start; }
.door:nth-child(even) { margin-top: var(--space-8); }
.door__window { aspect-ratio: 9 / 16; background: var(--cage); overflow: hidden; }
.door__window video { width: 100%; height: 100%; object-fit: cover; }
.door__no { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-2); line-height: 1; }
.door__name { font-size: var(--step-2); font-style: italic; text-transform: uppercase; }
.door__text p:last-child { color: var(--ink-muted); font-size: var(--step--1); max-width: 28ch; }
.zones__more { margin-top: var(--space-7); max-width: 52rem; font-size: var(--step-1); }

/* ── K3 пик: клетка ────────────────────────────────────────────── */
.peak { position: relative; background: var(--cage); padding: var(--space-7) var(--gutter) var(--space-8); display: grid; justify-items: center; text-align: center; gap: var(--space-4); overflow: hidden; }
.peak__clock { position: relative; font-family: var(--font-led); font-size: clamp(44px, 8vw, 120px); color: var(--led); line-height: 1; }
.peak__clock .peak__time { position: absolute; inset: 0; text-shadow: 0 0 24px color-mix(in oklab, var(--led) 50%, transparent); }
.peak__cage { position: relative; width: min(100%, 860px); aspect-ratio: 1; }
.peak__cage img { width: 100%; height: 100%; object-fit: cover; }
.paint--cage { position: absolute; inset: 0; display: grid; place-content: center; font-size: clamp(44px, 8.4vw, 124px); color: var(--floor); transform: scaleY(1.25); }
.peak__title { font-size: var(--step-3); font-style: italic; text-transform: uppercase; }
.peak__line { color: color-mix(in oklab, var(--paint) 75%, var(--cage)); }
.peak__strike { width: min(100%, 420px); aspect-ratio: 9 / 16; margin-top: var(--space-6); }
.peak__strike video { width: 100%; height: 100%; object-fit: cover; }

/* ── K4 расписание: дорожки = дни ──────────────────────────────── */
.schedule { padding: var(--space-8) var(--gutter) var(--space-7); position: relative; overflow: hidden; }
.schedule__head { display: grid; gap: var(--space-4); position: relative; }
.schedule__big { position: absolute; right: -.04em; top: -.18em; font-size: clamp(160px, 30vw, 460px); line-height: .8; opacity: .16; pointer-events: none; }
.schedule__lead { max-width: 40rem; font-size: var(--step-1); }
.filters, .days { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.days { display: none; }
.filter, .day { min-height: 44px; padding: 0 1.1em; border: 2px solid var(--paint); border-radius: var(--radius-pill); background: transparent; color: var(--paint); font-weight: 600; font-size: var(--step--1); transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.filter[aria-pressed="true"], .day[aria-selected="true"] { background: var(--paint); color: var(--floor); }
.lanes { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: var(--space-5); border-left: var(--lane-line) solid var(--paint); }
.lane { border-right: var(--lane-line) solid var(--paint); padding: 0 var(--space-3) var(--space-5); min-width: 0; }
.lane__day { position: sticky; top: 68px; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; padding: var(--space-3) 0; background: var(--floor); font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-2); text-transform: uppercase; line-height: 1; border-bottom: 2px solid var(--paint); }
.lane__day small { font-family: var(--font-body); font-style: normal; font-weight: 600; font-size: 11px; letter-spacing: .06em; }
.lane.is-today .lane__day { color: var(--cage); background: var(--paint); padding-inline: var(--space-2); margin-inline: calc(-1 * var(--space-2)); }
.slot-h { display: block; margin-top: var(--space-4); font-family: var(--font-led); font-size: 12px; color: color-mix(in oklab, var(--paint) 70%, var(--floor)); }
.cls { display: grid; gap: 1px; padding: var(--space-2) 0; border-bottom: 1px dashed color-mix(in oklab, var(--paint) 40%, transparent); font-size: 13px; line-height: 1.3; }
.cls b { font-weight: 600; font-size: 14px; }
.cls span { color: var(--ink-muted); }
.cls[hidden] { display: none; }
.cls.is-now b::after { content: " · " attr(data-now); color: var(--paint); font-weight: 400; }
.schedule__note { margin-top: var(--space-5); font-size: var(--step--1); color: var(--ink-muted); }
.schedule__note a { color: var(--paint); font-weight: 600; }

/* ── K5 татами: стартовый лист, дети, отзывы ───────────────────── */
.team { background: var(--tatami); color: var(--cage); padding: var(--space-8) var(--gutter);
  background-image: linear-gradient(color-mix(in oklab, var(--cage) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklab, var(--cage) 6%, transparent) 1px, transparent 1px);
  background-size: 200px 200px; } /* швы татами 1×1 м */
.team :focus-visible { outline-color: var(--floor); }
.team__lead { margin-top: var(--space-4); max-width: 40rem; font-size: var(--step-1); }
.roster { margin-top: var(--space-6); border-top: 3px solid var(--cage); }
.runner { position: relative; display: grid; grid-template-columns: 4ch 1fr 1fr; gap: var(--space-4); align-items: baseline; padding: var(--space-3) 0; border-bottom: 1px solid color-mix(in oklab, var(--cage) 22%, transparent); }
.runner__no { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-1); color: var(--floor); }
.runner__name { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-2); text-transform: uppercase; line-height: 1; }
.runner__what { color: color-mix(in oklab, var(--cage) 72%, var(--tatami)); }
.runner--photo .runner__name::after { content: " ●"; color: var(--floor); font-size: .4em; vertical-align: middle; }
.runner__shot { grid-column: 1 / -1; overflow: hidden; max-height: 0; transition: max-height var(--dur-long) var(--ease-out); }
.runner__shot img { width: min(100%, 640px); aspect-ratio: 16 / 10; object-fit: cover; margin-top: var(--space-3); }
.runner.is-open .runner__shot { max-height: 520px; }
.runner__btn { all: unset; cursor: pointer; display: contents; }

.kids { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-7); align-items: center; margin-top: var(--space-8); }
.kids__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.kids__title { font-size: var(--step-4); font-style: italic; text-transform: uppercase; color: var(--floor); line-height: .85; }
.kids__list { margin: var(--space-5) 0; display: grid; gap: var(--space-3); }
.kids__list li { display: grid; grid-template-columns: 9rem 1fr; gap: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid color-mix(in oklab, var(--cage) 22%, transparent); }
.kids__list b { font-weight: 600; }

.proof { margin-top: var(--space-8); display: grid; grid-template-columns: 1fr 1.4fr 1.4fr; gap: var(--space-6); align-items: start; }
.proof__score { display: grid; }
.proof__num { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-4); line-height: .85; color: var(--floor); }
.proof__quote { font-size: var(--step-0); border-left: 3px solid var(--floor); padding-left: var(--space-4); }

/* ── K6 финиш ──────────────────────────────────────────────────── */
.finish { position: relative; padding: var(--space-8) var(--gutter) var(--space-7); overflow: hidden; }
.finish__word { font-size: clamp(120px, 26vw, 400px); text-align: center; line-height: .78; }
.finish__line { height: 14px; margin: var(--space-4) calc(-1 * var(--gutter)) var(--space-7); background: var(--paint); }
.finish__title { font-size: var(--step-3); font-style: italic; text-transform: uppercase; max-width: 16ch; }
.finish__lead { margin-top: var(--space-4); max-width: 38rem; font-size: var(--step-1); }
.finish__actions { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--space-6); border-top: var(--lane-line) solid var(--paint); }
.act { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-5) var(--space-5) var(--space-6) 0; text-decoration: none; border-bottom: var(--lane-line) solid var(--paint); transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), padding var(--dur-micro) var(--ease-out); }
.act + .act { border-left: var(--lane-line) solid var(--paint); padding-left: var(--space-5); }
.act__k { font-size: var(--step--1); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.act__v { font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-2); text-transform: uppercase; line-height: 1; }
.act:hover { background: var(--paint); color: var(--floor); padding-left: var(--space-5); }
.finish__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); margin-top: var(--space-6); font-size: var(--step--1); }
.finish__facts dt { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.finish__facts dd { margin: var(--space-1) 0 0; color: var(--ink-muted); }
.finish__facts a { color: var(--paint); }

.footer { background: var(--cage); padding: var(--space-6) var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); font-size: var(--step--1); color: color-mix(in oklab, var(--paint) 70%, var(--cage)); }
.footer__motto { margin-left: auto; font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-1); text-transform: uppercase; color: var(--paint); }

.sticky-cta .btn { box-shadow: 0 10px 30px -10px rgb(0 0 0 / .5); }
.mobile-menu { background: var(--cage); }
.mobile-menu__tel { display: block; margin-top: var(--space-5); font-family: var(--font-display); font-style: italic; font-weight: 900; font-size: var(--step-2); text-decoration: none; }

/* ── ПК средний ────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .header__tel { display: none; }
  .nav__list { gap: var(--space-4); }
}

/* ── Телефон: отдельная композиция ─────────────────────────────── */
@media (max-width: 900px) {
  .header__inner { min-height: 60px; gap: var(--space-3); }
  .clock { margin-left: auto; }
  .clock__next { font-size: 10px; }
  .lane__day { top: 60px; }

  .start { min-height: calc(100svh - 60px); }
  .paint--stack { bottom: 30%; width: 100vw; font-size: 26vw; }
  .start__copy { padding-bottom: var(--space-5); }
  .start__actions .btn--ghost { display: none; }
  .start__actions .btn { width: 100%; }

  .doors { grid-template-columns: 1fr; gap: var(--space-7); }
  .door:nth-child(even) { margin-top: 0; }
  .door { grid-template-columns: 1fr; }
  .door__window { width: 78%; justify-self: center; }
  .door:nth-child(even) .door__window { justify-self: end; }
  .door:nth-child(odd) .door__window { justify-self: start; }

  .peak__strike { width: 86%; }

  .days { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: none; }
  .lanes { grid-template-columns: 1fr; border-left: var(--lane-line) solid var(--paint); }
  .lane { display: none; padding-inline: var(--space-4); }
  .lane.is-shown { display: block; }
  .lane__day { position: static; }
  .cls { grid-template-columns: 5.2rem 1fr; font-size: 14px; }
  .cls .cls__t { grid-row: span 2; font-family: var(--font-led); font-size: 13px; color: var(--paint); }

  .runner { grid-template-columns: 3ch 1fr; row-gap: 2px; }
  .runner__what { grid-column: 2; font-size: var(--step--1); }
  .kids { grid-template-columns: 1fr; gap: var(--space-5); }
  .kids__list li { grid-template-columns: 6.5rem 1fr; }
  .proof { grid-template-columns: 1fr; gap: var(--space-5); }

  .finish__actions { grid-template-columns: 1fr; }
  .act + .act { border-left: 0; padding-left: 0; }
  .act:hover { padding-left: var(--space-3); }
  .finish__facts { grid-template-columns: 1fr; }
  .footer__motto { margin-left: 0; }
}
@media (max-width: 420px) {
  .clock__next { display: none; }
}
@media (min-width: 901px) {
  .cls__t { display: none; }
}
.cls b small { font-weight: 400; font-size: 12px; color: var(--ink-muted); }
.slot-h[hidden] { display: none; }
@media (max-width: 900px) { .slot-h { display: none; } }
@media (max-width: 360px) { .start__actions .btn { padding-inline: 1em; font-size: 15px; } }
/* после сцены: двери 2–4 лесенкой — дорожки уходят вглубь, не три равные карточки */
.zones--rest { padding-top: var(--space-7); }
.zones--rest .doors { grid-template-columns: 1.25fr 1fr 1fr; align-items: start; margin-top: 0; }
.zones--rest .door:nth-child(2) { margin-top: var(--space-8); }
.zones--rest .door:nth-child(3) { margin-top: calc(var(--space-8) * 2); }
@media (max-width: 900px) { .zones--rest .doors { grid-template-columns: 1fr; } .zones--rest .door:nth-child(n) { margin-top: 0; } }
/* нижние главы не считаются, пока до них не докрутили: телефону легче на старте (Lighthouse TBT) */
.schedule, .team, .finish, .footer { content-visibility: auto; contain-intrinsic-size: auto 1200px; }
