/* =========================================================================
   ЛАТИНА · Дизайн-система «Kinetic Thread» + золотой брендовый слой
   Buildless CSS на переменных (без сборки на сервере). Mobile-first.
   ========================================================================= */

/* Брендовый каллиграфический шрифт логотипа «Латина» (Atziluth Script, self-hosted) */
@font-face {
  font-family: "Atziluth Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/atziluth-script.woff2") format("woff2");
}

:root {
  /* --- Поверхности (тёмный графит) --- */
  --surface: #121414;
  --surface-lowest: #0d0e0f;
  --surface-low: #1a1c1c;
  --surface-container: #1e2020;
  --surface-high: #282a2b;
  --surface-highest: #333535;

  /* --- Текст --- */
  --on-surface: #e2e2e2;
  --on-surface-variant: #eabcb3;
  --muted: #b0877f;
  --outline: #b0877f;
  --outline-variant: #5f3f38;
  --hairline: #333333;

  /* --- Красный / оранжевый (энергия, CTA) --- */
  --primary: #ffb4a6;          /* коралл */
  --on-primary: #660800;
  --red: #ff5539;              /* основной «сальса-красный» (CTA) */
  --red-hover: #e84327;
  --secondary: #ffb77d;        /* оранжевый */
  --secondary-container: #fd8b00;

  /* --- Золотой слой (из maket.jpg) --- */
  --gold-deep: #8a6a2f;
  --gold: #c9a24b;
  --gold-bright: #f0d17a;
  --gold-pale: #f7e3a1;
  --gold-gradient: linear-gradient(135deg, #8a6a2f 0%, #c9a24b 25%, #f0d17a 50%, #c9a24b 75%, #8a6a2f 100%);
  /* акцентная строка hero: коралл -> золото */
  --hero-gradient: linear-gradient(90deg, #ffb4a6 0%, #f0d17a 100%);
  --thread-gradient: linear-gradient(to bottom, #ff5539, #fd8b00);

  /* --- Радиусы --- */
  --r-sm: 2px;
  --r-base: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --r-full: 9999px;

  /* --- Сетка --- */
  --container-max: 1280px;
  --gutter: 24px;
  --margin-side: 16px;          /* мобайл; на десктопе переопределяется */

  /* --- Шрифты --- */
  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-script: "Atziluth Script", "Marck Script", cursive;

  /* --- Свечения --- */
  --glow-red: 0 0 15px rgba(255, 85, 57, 0.40);
  --glow-red-strong: 0 0 25px rgba(253, 139, 0, 0.55);
}

/* ===================== Базовый сброс ===================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--on-surface);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;                 /* контейнер для декоративных «нитей» */
  overflow-x: hidden;                 /* без горизонтального скролла */
  min-height: 100vh;
}
html { overflow-x: hidden; }

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
ul { list-style: none; padding: 0; }

::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

/* ===================== Контейнер ===================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--margin-side);
}

.section { padding-block: 64px; position: relative; }

/* ===================== Типографика ===================== */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw + 0.5rem, 4rem);    /* 40 -> 64px */
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw + 0.75rem, 2rem); /* 24 -> 32px */
  line-height: 1.2;
}
.body-lg { font-size: 18px; line-height: 1.6; }
.label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.eyebrow { color: var(--muted); }

/* Золотой текст (логотип, акценты) */
.gold-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-accent {
  background: var(--hero-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Утилита для брендовых акцентов каллиграфией (логотип, декоративные заголовки) */
.font-script { font-family: var(--font-script); font-weight: 400; line-height: 1.05; }
/* Каллиграфический заголовок секции (крупнее обычного — у скрипта меньше x-height) */
.headline.font-script { font-size: clamp(2.4rem, 4.5vw, 3.4rem); font-weight: 400; line-height: 1.1; letter-spacing: 0; }

/* ===================== «Нити» (stitch) ===================== */
.stitch-line {
  position: absolute;
  left: 0;
  height: 1px;
  width: 100%;
  z-index: 0;
  opacity: 0.5;
  background: linear-gradient(90deg, rgba(255, 85, 57, 0) 0%, rgba(255, 85, 57, 0.8) 50%, rgba(255, 85, 57, 0) 100%);
  pointer-events: none;
}
.stitch-diagonal {
  position: absolute;
  height: 1px;
  width: 150%;
  z-index: 0;
  transform: rotate(-15deg);
  pointer-events: none;
  background: linear-gradient(90deg, rgba(201, 162, 75, 0) 0%, rgba(201, 162, 75, 0.30) 50%, rgba(255, 85, 57, 0) 100%);
}

/* ===================== Кнопки ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--r-base);
  min-height: 44px;                  /* тач-таргет */
  transition: transform .2s ease, background-color .2s ease, box-shadow .3s ease, color .2s ease;
}
.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--glow-red);
}
.btn--primary:hover { background: var(--red-hover); box-shadow: var(--glow-red-strong); transform: translateY(-1px); }

.btn--ghost {
  border: 1px solid rgba(255, 180, 166, 0.5);
  color: var(--primary);
  background: transparent;
}
.btn--ghost:hover { background: rgba(255, 180, 166, 0.10); border-color: var(--primary); }

.btn--lg { padding: 16px 32px; font-size: 15px; }
.btn--block { width: 100%; }

/* Третичная кнопка-«нить»: текст + удлиняющаяся линия */
.btn-thread {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.btn-thread .thread {
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--primary);
  transition: width .3s ease;
}
.btn-thread:hover .thread { width: 64px; }

/* ===================== Бейджи / чипы ===================== */
.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid rgba(176, 135, 127, 0.3);
  border-radius: var(--r-base);
  padding: 6px 12px;
}
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 4px 8px;
}
.chip--gold { color: var(--gold-bright); border-color: rgba(201, 162, 75, 0.4); }

/* ===================== Шапка ===================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 80px;
  background: rgba(18, 20, 20, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(51, 53, 53, 0.30);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-script);
  font-size: 46px;
  line-height: 1;
  padding-right: 6px;                 /* воздух под завершающий росчерк */
}
.nav {
  display: none;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--on-surface-variant);
  transition: color .25s ease;
}
.nav a:hover { color: var(--secondary); }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* Бургер */
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--on-surface);
  transition: transform .3s ease, opacity .3s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобильное меню (выезжающая панель) */
.mobile-nav {
  position: fixed;
  inset: 80px 0 auto 0;
  z-index: 49;
  background: rgba(18, 20, 20, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--outline-variant);
  transform: translateY(-120%);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
  padding: 16px var(--margin-side) 28px;
}
.mobile-nav.open { transform: translateY(0); }
.mobile-nav a {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--on-surface);
  padding: 14px 0;
  border-bottom: 1px solid rgba(51, 53, 53, 0.4);
}
.mobile-nav a:last-of-type { border-bottom: none; }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  overflow: hidden;
  text-align: center;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  mix-blend-mode: luminosity;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgba(18, 20, 20, 0) 0%, rgba(18, 20, 20, 0.85) 100%),
    linear-gradient(to top, var(--surface) 0%, rgba(18, 20, 20, 0.8) 45%, rgba(18, 20, 20, 0.2) 100%);
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-max);
  padding-inline: var(--margin-side);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__title {
  margin: 20px 0 24px;
  max-width: 18ch;
  color: var(--on-surface);
}
.hero__title .line2 { display: block; }
.hero__subtitle {
  max-width: 60ch;
  color: var(--on-surface-variant);
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.125rem);
  margin-bottom: 40px;
}

/* ===================== Секция «Направления» ===================== */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 48px;
}
.section-head__text { max-width: 30rem; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--on-surface-variant); }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}
.card {
  position: relative;
  background: var(--surface-container);
  border-radius: var(--r-lg);
  overflow: hidden;
  border-left: 1px solid transparent;
  border-image: var(--thread-gradient) 1;
  transition: transform .3s ease;
}
.card:hover { transform: translateY(-8px); }
.card__media {
  position: relative;
  height: 256px;
  overflow: hidden;
}
.card__img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  mix-blend-mode: luminosity;
  transition: transform .7s ease, mix-blend-mode .3s ease, opacity .3s ease;
}
.card:hover .card__img { transform: scale(1.05); mix-blend-mode: normal; opacity: 1; }
.card__chip { position: absolute; top: 16px; right: 16px; z-index: 2; }
.card__body { padding: 24px; position: relative; z-index: 1; }
.card__body h3 { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.2; margin-bottom: 8px; }
.card__body p { color: var(--on-surface-variant); margin-bottom: 24px; }

/* ===================== Секция «Расписание» ===================== */
.schedule { background: var(--surface); }
.schedule__head { text-align: center; margin-bottom: 48px; }
.schedule__head p { color: var(--on-surface-variant); max-width: 36rem; margin-inline: auto; }

.day-toggle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}
.day {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 10px 22px;
  border-radius: var(--r-full);
  border: 1px solid var(--surface-highest);
  color: var(--on-surface-variant);
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
  min-height: 40px;
}
.day:hover { border-color: rgba(255, 180, 166, 0.5); color: var(--on-surface); }
.day.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 180, 166, 0.10);
  box-shadow: var(--glow-red);
}

.schedule__panel {
  background: rgba(30, 32, 32, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.schedule__row {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
  padding: 24px;
  border-bottom: 1px solid var(--hairline);
  transition: background-color .2s ease;
}
.schedule__row:last-child { border-bottom: none; }
.schedule__row:hover { background: var(--surface-container); }
.schedule__row--featured { background: rgba(30, 32, 32, 0.5); border-left: 2px solid var(--red); }
.schedule__meta { display: flex; align-items: center; gap: 24px; }
.schedule__time {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--primary);
  min-width: 56px;
}
.schedule__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.2; }
.schedule__sub { color: var(--on-surface-variant); font-size: 14px; }
.schedule__row .btn { width: 100%; }
.schedule__btn-default {
  border: 1px solid var(--hairline);
  color: var(--on-surface);
  background: transparent;
}
.schedule__row:hover .schedule__btn-default { border-color: var(--primary); }
.schedule__empty { padding: 48px 24px; text-align: center; color: var(--on-surface-variant); }

/* ===================== Подвал ===================== */
.site-footer {
  background: var(--surface-lowest);
  border-top: 1px solid rgba(95, 63, 56, 0.2);
  padding-block: 56px;
  position: relative;
  z-index: 10;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.footer-brand { font-family: var(--font-script); font-size: 56px; line-height: 1; margin-bottom: 16px; display: inline-block; padding-right: 8px; }
.footer-about { color: var(--muted); max-width: 28rem; }
.footer-contacts { margin-top: 16px; color: var(--on-surface-variant); font-size: 14px; }
.footer-contacts a:hover { color: var(--gold-bright); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-start; }
.footer-links a { color: var(--muted); transition: color .2s ease; }
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r-full);
  border: 1px solid var(--outline-variant); color: var(--on-surface-variant);
  transition: border-color .2s ease, color .2s ease;
}
.footer-social a:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ===================== Заглушка раздела (Часть 1) ===================== */
.stub {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--margin-side) 80px;
  gap: 16px;
}
.stub p { color: var(--on-surface-variant); max-width: 40ch; }

/* Стрелка в кнопке (inline SVG) */
.icon-arrow { flex-shrink: 0; transition: transform .2s ease; }
.btn:hover .icon-arrow { transform: translateX(3px); }

/* ===================== Адаптив (mobile-first → min-width) ===================== */
@media (min-width: 768px) {
  :root { --margin-side: 32px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  /* «Ступенчатые» смещения карточек как в макете */
  .cards .card:nth-child(2) { margin-top: 48px; }
  .cards .card:nth-child(3) { margin-top: 96px; }

  .section-head { flex-direction: row; align-items: flex-end; }
  .schedule__row { flex-direction: row; align-items: center; justify-content: space-between; }
  .schedule__row .btn { width: auto; }
  .footer-grid { grid-template-columns: 1.2fr 2fr; }
  .footer-links { justify-content: flex-end; }
}

@media (min-width: 1024px) {
  :root { --margin-side: 48px; }
  .nav { display: flex; }
  .burger { display: none; }
  .section { padding-block: 96px; }
}

/* Уважение к настройкам уменьшенного движения */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* Учёт «чёлки» (iOS safe-area) */
@supports (padding: env(safe-area-inset-left)) {
  .container, .hero__inner { padding-left: max(var(--margin-side), env(safe-area-inset-left)); padding-right: max(var(--margin-side), env(safe-area-inset-right)); }
}

/* =========================================================================
   ЧАСТЬ 2 — Внутренние страницы
   ========================================================================= */

/* Шапка внутренней страницы + хлебные крошки */
.page-head { padding-top: calc(80px + 40px); padding-bottom: 24px; }
.page-head__title { margin-top: 16px; }
.page-head__sub { color: var(--on-surface-variant); max-width: 60ch; margin-top: 16px; }
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  color: var(--muted); margin-bottom: 8px;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs__sep { color: var(--outline-variant); }
.breadcrumbs [aria-current="page"] { color: var(--on-surface-variant); }

/* Текстовые блоки */
.prose { max-width: 72ch; }
.prose p { margin-bottom: 16px; color: var(--on-surface-variant); }
.prose h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.25rem, 2vw + .5rem, 1.6rem);
  margin: 32px 0 12px; color: var(--on-surface);
}
.prose--legal { max-width: 80ch; }
.prose--legal h2 { font-size: 1.2rem; margin-top: 28px; }

/* Карточки без «ступенчатого» смещения */
.cards--flat .card { margin-top: 0 !important; }
a.card__media { display: block; }

/* Карточка тренера */
.trainer-card {
  margin-top: 40px; background: var(--surface-container);
  border-left: 1px solid transparent; border-image: var(--gold-gradient) 1;
  border-radius: var(--r-lg); padding: 32px;
}
.trainer-card p { color: var(--on-surface-variant); max-width: 60ch; }

/* Форматы занятий */
.format-grid { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
.format-card {
  background: var(--surface-container); border: 1px solid var(--outline-variant);
  border-radius: var(--r-lg); padding: 24px;
}
.format-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.format-card p { color: var(--on-surface-variant); }

/* Список тегов-направлений */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-list .chip { padding: 8px 14px; font-size: 13px; }

/* Маркированный список с «галочками» */
.check-list { display: grid; gap: 12px; max-width: 60ch; }
.check-list li { position: relative; padding-left: 28px; color: var(--on-surface-variant); }
.check-list li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px;
  border-left: 2px solid var(--gold-bright); border-bottom: 2px solid var(--gold-bright);
  transform: rotate(-45deg);
}

/* CTA-полоса */
.cta-band {
  display: flex; flex-direction: column; gap: 16px;
  align-items: flex-start; justify-content: space-between;
  margin-top: 48px; padding: 28px; border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--surface-container), var(--surface-low));
  border: 1px solid var(--outline-variant);
}
.cta-band p { color: var(--on-surface-variant); }

/* Страница направления */
.direction-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
.direction-hero {
  height: 280px; border-radius: var(--r-xl); background-size: cover; background-position: center;
  margin-bottom: 24px; border-left: 1px solid transparent; border-image: var(--thread-gradient) 1;
}
.info-card {
  background: var(--surface-container); border: 1px solid var(--outline-variant);
  border-radius: var(--r-lg); padding: 24px;
}
.info-dl { margin: 16px 0; display: grid; gap: 10px; }
.info-dl > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--hairline); padding-bottom: 8px; }
.info-dl dt { color: var(--muted); font-size: 14px; }
.info-dl dd { color: var(--on-surface); font-weight: 600; font-size: 14px; text-align: right; }

/* Афиша */
.events-grid { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }
.event-card {
  background: var(--surface-container); border-radius: var(--r-lg); overflow: hidden;
  border-left: 1px solid transparent; border-image: var(--thread-gradient) 1;
  display: flex; flex-direction: column;
}
.event-card__media { position: relative; height: 200px; background: var(--surface-low); overflow: hidden; }
.event-card__date {
  position: absolute; bottom: 16px; left: 16px; background: var(--red); color: #fff;
  border-radius: var(--r-base); padding: 8px 12px; text-align: center; min-width: 56px; box-shadow: var(--glow-red);
}
.event-card__day { display: block; font-family: var(--font-display); font-weight: 800; font-size: 22px; line-height: 1; }
.event-card__mon { display: block; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; }
.event-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.event-card__meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); }
.event-card__body p { color: var(--on-surface-variant); }

/* Пустое состояние */
.empty-state {
  text-align: center; padding: 64px 24px; display: flex; flex-direction: column;
  gap: 20px; align-items: center; background: var(--surface-low);
  border-radius: var(--r-xl); border: 1px dashed var(--outline-variant);
}
.empty-state p { color: var(--on-surface-variant); max-width: 46ch; }

/* Галерея */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-item { display: block; border-radius: var(--r-md); overflow: hidden; background: var(--surface-low); aspect-ratio: 1 / 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item--video, .gallery-item--embed { aspect-ratio: 16 / 9; }
.gallery-item--video video, .gallery-item--embed iframe { width: 100%; height: 100%; border: 0; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8, 9, 9, .92); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox__img { max-width: 92vw; max-height: 88vh; border-radius: var(--r-md); }
.lightbox__close { position: absolute; top: 16px; right: 24px; font-size: 36px; color: #fff; line-height: 1; width: 44px; height: 44px; }

/* Контакты */
.contacts-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.contacts-info { display: flex; flex-direction: column; gap: 20px; }
.info-row .label { color: var(--muted); display: block; margin-bottom: 4px; }
.contact-link { color: var(--on-surface); font-size: 20px; font-weight: 600; }
.contact-link:hover { color: var(--gold-bright); }
.contacts-map { min-height: 360px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--outline-variant); }
.contacts-map iframe { display: block; min-height: 360px; }

/* Чип уровня в расписании */
.schedule__level {
  display: inline-block; margin-left: 10px; font-family: var(--font-mono); font-size: 11px;
  color: var(--gold-bright); border: 1px solid rgba(201, 162, 75, .3);
  border-radius: var(--r-sm); padding: 1px 6px;
}

@media (min-width: 768px) {
  .format-grid { grid-template-columns: repeat(3, 1fr); }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contacts-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: row; align-items: center; }
  .direction-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .info-card { position: sticky; top: 100px; }
}

@media (min-width: 1024px) {
  .events-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================================
   ЧАСТЬ 3 — Модальная форма записи, поля, тосты
   ========================================================================= */

.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal__overlay { position: fixed; inset: 0; background: rgba(8, 9, 9, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal__dialog {
  position: relative; z-index: 1; width: 100%; max-width: 480px; margin: auto;
  background: var(--surface-high); border: 1px solid var(--outline-variant);
  border-radius: var(--r-xl); padding: 32px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.modal__close { position: absolute; top: 12px; right: 14px; font-size: 28px; line-height: 1; color: var(--on-surface-variant); width: 44px; height: 44px; }
.modal__close:hover { color: var(--primary); }
.modal__sub { color: var(--on-surface-variant); margin: 8px 0 24px; }

/* Поля ввода (нижний бордер, фокус — красный) */
.field { margin-bottom: 20px; }
.field > label {
  display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.field__opt { text-transform: none; color: var(--outline-variant); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface); color: var(--on-surface);
  border: none; border-bottom: 2px solid var(--surface-highest); border-radius: 0;
  padding: 12px 4px; font: inherit; font-size: 16px; transition: border-color .2s ease;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23b0877f' stroke-width='2'><path d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--red); }
.field textarea { resize: vertical; min-height: 72px; }
.field input.is-invalid, .field select.is-invalid, input.is-invalid { border-bottom-color: var(--red); }
.field__error { display: block; color: var(--error); font-size: 13px; margin-top: 6px; }

/* Согласие 152-ФЗ */
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 6px; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }
.consent span { font-size: 14px; color: var(--on-surface-variant); line-height: 1.5; }
.consent a { color: var(--gold-bright); text-decoration: underline; }

/* Honeypot (скрыто от людей) */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { color: var(--error); font-size: 14px; margin: 8px 0; }
.smart-captcha { margin: 8px 0 16px; }

.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

/* Тосты */
.toasts { position: fixed; z-index: 120; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; max-width: min(92vw, 360px); }
.toast {
  background: var(--surface-high); color: var(--on-surface); border-left: 3px solid var(--gold);
  border-radius: var(--r-md); padding: 14px 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  font-size: 14px; opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast--success { border-left-color: #5fd08a; }
.toast--error { border-left-color: var(--red); }

@media (max-width: 480px) {
  .modal { padding: 12px; }
  .modal__dialog { padding: 24px 20px; }
  .toasts { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}
