/* ==========================================================================
   Акселератор такси «Армагеддон» - accelerator.html
   ВТОРАЯ тема сайта и единственное место, где палитра не корпоративная.
   Правило «янтарь только для утечки денег» здесь не действует: страница целиком
   про выжженную пустыню, у неё свой набор смыслов.

   Как устроено: базовая style.css задаёт компоненты (сетка, кнопки, поля формы,
   шапка, drawer, .reveal) через токены :root. Здесь мы переопределяем ТОКЕНЫ
   внутри body.mad - и весь готовый обвес перекрашивается сам, без дублей
   разметки и без правок style.css. Ниже токенов - только то, чего в базе нет.
   Подключать строго ПОСЛЕ style.css.
   ========================================================================== */

body.mad {
  /* Ночь и песок вместо бумаги и белого */
  --paper: #150F0C;
  --surface: #1F1611;
  --surface-2: #191110;

  --ink: #F2E4CE;        /* кость */
  --ink-soft: #C3AE93;
  --ink-faint: #8E7B64;

  --line: rgba(216, 180, 135, .16);
  --line-soft: rgba(216, 180, 135, .09);

  /* Базовый акцент (в светлой теме teal) здесь - огонь.
     Так перекрашиваются .btn-primary, .eyebrow, ссылки, фокус, aria-current. */
  --teal: #E8571C;
  --teal-strong: #C8410F;
  --teal-soft: rgba(232, 87, 28, .17);

  --amber: #F5A623;      /* солнечный блик */
  --amber-soft: rgba(245, 166, 35, .15);

  --danger: #FF6B5A;
  --danger-soft: rgba(255, 107, 90, .16);

  --shadow: 0 2px 6px rgba(0, 0, 0, .5);
  --shadow-lg: 0 10px 40px -12px rgba(0, 0, 0, .8);

  /* Собственные краски темы */
  --sand: #D8B487;
  --sand-deep: #A87B4A;
  --rust: #8E3B18;
  --fire: #E8571C;
  --flare: #F5A623;

  background: var(--paper);
  color: var(--ink);
}

/* Песчаная крупа поверх всей страницы: SVG-шум в data-URI, внешних запросов
   нет (как и везде на сайте). pointer-events выключены - слой чисто визуальный.
   z-index 3 выбран так, чтобы крупа легла на контент, но НЕ на шапку (60),
   drawer (55) и sticky-CTA (50): накрывать интерфейс блендом незачем. */
body.mad::before {
  content: "";
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: .5; mix-blend-mode: overlay;
  background-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='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
}

/* Логотип - тёмный словесный знак на прозрачном фоне: на песке он бы пропал.
   brightness(0) гасит его в чёрный силуэт, invert(1) поднимает в белый. */
body.mad .brand-logo { filter: brightness(0) invert(1); opacity: .93; }

/* Шапка ------------------------------------------------------------------- */
body.mad .header { background: rgba(21, 15, 12, .72); }
body.mad .header[data-scrolled="true"] { background: rgba(15, 10, 8, .93); }
body.mad .drawer { background: var(--paper); }

/* Пункт «Акселератор» (заведён в style.css): в светлом меню он тёмная плашка,
   а здесь шапка и так тёмная - плашка бы слилась. Меняем её на угольную
   подсветку с огненной рамкой, пламя и градиент на слове остаются от базы. */
body.mad .nav a.nav-hot,
body.mad .nav a.nav-hot[aria-current] {
  background: rgba(232, 87, 28, .17);
  border-color: rgba(232, 87, 28, .6);
  box-shadow: 0 0 16px -6px var(--fire);
}
body.mad .nav a.nav-hot:hover {
  background: rgba(232, 87, 28, .28);
  border-color: var(--fire);
}

/* Типографика ------------------------------------------------------------- */
body.mad h1, body.mad h2, body.mad .rules-head {
  text-transform: uppercase; letter-spacing: .01em; font-weight: 800;
}
body.mad h1 { line-height: 1.02; letter-spacing: 0; }
body.mad .eyebrow { color: var(--flare); }
body.mad .eyebrow::before { background: var(--fire); }

/* Полосы-фото между секциями ---------------------------------------------- */
/* Кадры нарисованы в nano-banana 2, см. pics/accel_gen.py. Держим их фоном,
   а не <img>: это декор, в поток чтения он не входит. */
.band {
  height: clamp(150px, 26vw, 320px);
  background-size: cover; background-position: center;
  border-block: 1px solid var(--line);
  position: relative;
}
.band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,15,12,.85), rgba(21,15,12,.28) 45%, rgba(21,15,12,.9));
}
.band-storm { background-image: url("/assets/img/accel/storm.webp"); }
.band-crew { background-image: url("/assets/img/accel/crew.webp"); }
.band-rules { background-image: url("/assets/img/accel/rules.webp"); }

/* HERO -------------------------------------------------------------------- */
.mad-hero {
  position: relative;
  padding-block: clamp(64px, 10vw, 140px) clamp(56px, 8vw, 104px);
  background: #100B08 url("/assets/img/accel/hero.webp") center 35% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
/* Затемнение с уходом в фон страницы: снизу hero должен «растворяться» */
.mad-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 72% 30%, rgba(245,166,35,.20), transparent 60%),
    linear-gradient(180deg, rgba(16,11,8,.78) 0%, rgba(16,11,8,.62) 40%, rgba(21,15,12,.97) 100%);
}
.mad-hero > .container { position: relative; z-index: 2; }

/* Перенос в заголовке задан <br> в разметке: «Акселератор такси» строкой,
   «Армагеддон» строкой. Ширину не режем, иначе первая строка ломается сама. */
.mad-hero h1 { margin-bottom: .18em; }
/* «Армагеддон» выжжен: заливка огнём + тень, чтобы читалось поверх пыли */
.burnmark {
  background: linear-gradient(180deg, var(--flare) 8%, var(--fire) 62%, var(--rust) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 14px rgba(232, 87, 28, .45));
}
.mad-hero .hero-sub { color: var(--sand); max-width: 30ch; margin-top: 6px; }
.mad-hero .lead { margin-top: 22px; max-width: 62ch; }
.mad-hero .cta-row { margin-top: 30px; }

/* Полоска фактов ----------------------------------------------------------- */
.gauge {
  display: grid; gap: 1px; margin: 34px 0 0; padding: 0;
  grid-template-columns: repeat(2, 1fr);
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 760px) { .gauge { grid-template-columns: repeat(4, 1fr); } }
.gauge-slim { margin-top: 30px; }
@media (min-width: 760px) { .gauge-slim { grid-template-columns: repeat(3, 1fr); } }
.gauge > div { background: rgba(31, 22, 17, .82); padding: 18px 18px 16px; }
/* Нижняя граница 18px, а не 20: на 390px полоска идёт в две колонки, и
   «21 АВГУСТА» капслоком в 20px впритык упирается в край ячейки. */
.gauge dt {
  font: 800 clamp(18px, 2.5vw, 27px)/1.1 var(--sans);
  letter-spacing: -.02em; color: var(--sand); text-transform: uppercase;
}
.gauge dt.hot { color: var(--fire); }
.gauge dd { margin: 7px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-faint); }

/* Отсчёт до старта - см. assets/js/accelerator.js, до расчёта скрыт */
.countdown {
  margin: 18px 0 0; font: 600 15px/1.4 var(--mono);
  color: var(--flare); letter-spacing: .02em;
}
.countdown::before { content: "▸ "; color: var(--fire); }

/* Пять канистр ------------------------------------------------------------- */
.cans { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: can; }
@media (min-width: 700px) { .cans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cans { grid-template-columns: repeat(5, 1fr); } }
.cans li {
  counter-increment: can;
  background: var(--surface); border: 1px solid var(--line);
  border-top: 2px solid var(--rust);
  border-radius: var(--radius-sm); padding: 20px 18px 18px;
}
.cans li::before {
  content: "0" counter(can);
  display: block; margin-bottom: 10px;
  font: 700 12px var(--mono); letter-spacing: .12em; color: var(--sand-deep);
}
.cans b { display: block; font-size: 17px; margin-bottom: 7px; color: var(--sand); }
.cans span { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

.verdict {
  margin-top: 30px; padding: 24px 26px;
  background: linear-gradient(135deg, rgba(142, 59, 24, .30), rgba(31, 22, 17, .7));
  border: 1px solid color-mix(in srgb, var(--fire) 30%, transparent);
  border-radius: var(--radius);
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6; max-width: 74ch;
}
body.mad .money { color: var(--flare); }

/* Что горит ---------------------------------------------------------------- */
.burns { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .burns { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .burns { grid-template-columns: repeat(4, 1fr); } }
.burns li {
  background: rgba(21, 15, 12, .6); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 20px 18px;
}
.burns .fig {
  display: inline-block; margin-bottom: 12px; padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--fire) 45%, transparent);
  border-radius: 999px; background: var(--teal-soft);
  font: 700 12px var(--mono); letter-spacing: .04em; color: var(--flare);
  text-transform: uppercase;
}
.burns b { display: block; font-size: 16.5px; line-height: 1.3; margin-bottom: 8px; color: var(--sand); }
.burns p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

/* Экипаж ------------------------------------------------------------------- */
.units { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .units { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .units { grid-template-columns: repeat(3, 1fr); } }
.unit {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: border-color .16s ease, transform .16s ease;
}
.unit:hover { border-color: color-mix(in srgb, var(--fire) 40%, transparent); transform: translateY(-2px); }
.unit .ico {
  width: 30px; height: 30px; margin-bottom: 14px;
  color: var(--fire); filter: drop-shadow(0 0 10px rgba(232, 87, 28, .35));
}
.unit b { display: block; font-size: 19px; letter-spacing: -.01em; margin-bottom: 9px; color: var(--sand); }
.unit p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* Цитадель данных: вопросы, которые можно задать собранному контуру --------- */
.band-citadel {
  height: auto; padding-block: clamp(64px, 9vw, 120px);
  background: #100B08 url("/assets/img/accel/citadel.webp") center 40% / cover no-repeat;
  border-block: 1px solid var(--line);
  position: relative;
}
.band-citadel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,11,8,.94) 0%, rgba(16,11,8,.78) 55%, rgba(16,11,8,.45) 100%);
}
.band-citadel > .container { position: relative; z-index: 2; }
/* Ширины хватает ровно на строку вопроса: уже - и вопросы рассыпаются
   на обрывки, шире - наезжают на башню справа. */
.ask { margin: 0; max-width: 48ch; }
.ask p {
  margin: 0; font-size: clamp(19px, 2.6vw, 30px); font-weight: 700;
  line-height: 1.35; letter-spacing: -.02em; color: var(--sand);
  text-wrap: balance;
}
.ask cite {
  display: block; margin-top: 20px; font-style: normal;
  font-size: 14.5px; line-height: 1.5; color: var(--ink-faint);
  border-left: 2px solid var(--fire); padding-left: 12px;
}

/* Итерация и правила ------------------------------------------------------- */
.loop { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
@media (min-width: 860px) { .loop { grid-template-columns: repeat(4, 1fr); } }
.loop li {
  counter-increment: step; position: relative;
  padding: 18px 18px 16px 18px;
  background: rgba(21, 15, 12, .55);
  border: 1px solid var(--line); border-left: 3px solid var(--fire);
  border-radius: var(--radius-sm);
}
.loop li::before {
  content: "Шаг " counter(step);
  display: block; margin-bottom: 8px;
  font: 700 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fire);
}
.loop b { display: block; font-size: 16px; margin-bottom: 5px; color: var(--sand); }
.loop span { font-size: 14px; line-height: 1.5; color: var(--ink-soft); }

.rules-head { margin: clamp(44px, 6vw, 72px) 0 0; font-size: clamp(20px, 2.4vw, 26px); color: var(--sand); }
.rules { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: rule; }
@media (min-width: 800px) { .rules { grid-template-columns: repeat(2, 1fr); } }
.rules li {
  counter-increment: rule; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px;
  padding: 20px 22px;
  background: linear-gradient(180deg, rgba(142, 59, 24, .16), rgba(31, 22, 17, .55));
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.rules li::before {
  content: counter(rule, decimal-leading-zero);
  grid-row: span 2; align-self: start;
  font: 800 26px/1 var(--mono); color: var(--rust);
  -webkit-text-stroke: 1px color-mix(in srgb, var(--flare) 45%, transparent);
}
.rules b { font-size: 16.5px; color: var(--flare); }
.rules span { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }

/* Кому не сюда ------------------------------------------------------------- */
.nope-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.nope-list li {
  position: relative; padding: 14px 16px 14px 46px;
  background: rgba(31, 22, 17, .5); border: 1px solid var(--line);
  border-radius: var(--radius-sm); font-size: 15.5px; line-height: 1.55; color: var(--ink-soft);
}
.nope-list li::before {
  content: "✕"; position: absolute; left: 18px; top: 13px;
  font: 700 15px var(--mono); color: var(--danger);
}

/* Форма -------------------------------------------------------------------- */
.join {
  position: relative;
  background: #100B08 url("/assets/img/accel/road.webp") center bottom / cover no-repeat;
  border-top: 1px solid var(--line);
}
.join::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,15,12,.93) 0%, rgba(21,15,12,.72) 55%, rgba(21,15,12,.96) 100%);
}
.join > .container { position: relative; z-index: 2; }
.join-grid { display: grid; gap: 36px; align-items: start; }
@media (min-width: 980px) { .join-grid { grid-template-columns: 1fr 1.05fr; gap: 56px; } }

body.mad .gets .n { background: var(--teal-soft); color: var(--flare); border: 1px solid color-mix(in srgb, var(--fire) 40%, transparent); }
body.mad .gets b { color: var(--sand); }

body.mad .form-card { background: rgba(25, 17, 14, .93); border-color: color-mix(in srgb, var(--sand) 22%, transparent); }
body.mad .form-card h3 { color: var(--sand); text-transform: uppercase; letter-spacing: .01em; }
body.mad .field input, body.mad .field textarea { background: rgba(16, 11, 8, .8); color: var(--ink); }
body.mad .field input::placeholder, body.mad .field textarea::placeholder { color: #7A6852; }
body.mad .field input:focus, body.mad .field textarea:focus { background: rgba(16, 11, 8, .95); }
body.mad .field-consent input[type="checkbox"] { accent-color: var(--fire); }
body.mad .form-error { color: #FFD2C8; }

/* Футер -------------------------------------------------------------------- */
body.mad .footer { background: #100B08; border-top-color: var(--line); }

/* Доступность и движение ---------------------------------------------------- */
body.mad .skip { background: var(--fire); color: #fff; }
body.mad :focus-visible { outline-color: var(--flare); }

@media (prefers-reduced-motion: reduce) {
  .unit { transition: none; }
  .unit:hover { transform: none; }
}

/* Узкие экраны: полосы-фото режем, чтобы не съедали половину прокрутки */
@media (max-width: 620px) {
  .band { height: 140px; }
  .rules li { grid-template-columns: 1fr; }
  .rules li::before { grid-row: auto; }
}
