/* =========================================================
   СТК «КРОКУС» — СТИЛИ САЙТА
   Один файл на все страницы. Разделы идут сверху вниз:
   цвета → основа → кнопки → меню → блоки главной → страницы → подвал.
   Цвета задаются переменными в самом начале: поменяешь там —
   поменяется на всём сайте. Тёмная тема — ниже, в [data-theme="dark"].
========================================================= */

/* ===== 1. ЦВЕТА И РАЗМЕРЫ ===== */
:root {
  --paper:    #f5f1e8;   /* фон страницы — тёплая бумага */
  --paper-2:  #ece6d9;   /* чуть темнее — подложки */
  --card:     #ffffff;   /* карточки */
  --ink:      #0f1b2d;   /* основной текст — тёмно-синие «чернила» */
  --ink-2:    #43526a;   /* второстепенный текст */
  --ink-3:    #5a6578;   /* подписи (темнее, чтобы читались на солнце) */
  --line:     rgba(15, 27, 45, 0.12);
  --accent:   #f07a1a;   /* оранжевый крокус */
  --accent-2: #ffb627;   /* жёлтый, как клубные куртки */
  --accent-ink: #a64a0a; /* оранжевый для мелкого текста на светлом фоне — яркий там читается плохо */
  --on-accent:#1a0c02;
  --blue:     #2e5c9a;   /* синие горы с логотипа */
  --night:    #0b1424;   /* тёмные блоки */
  --night-2:  #14223a;
  --on-night: #eef2f8;
  --on-night-2: #a9b6cc;

  --radius-lg: 32px;
  --radius:    24px;
  --radius-sm: 14px;
  --shadow:    0 1px 2px rgba(15,27,45,0.04), 0 12px 32px -12px rgba(15,27,45,0.18);
  --ease:      cubic-bezier(0.2, 0.7, 0.2, 1);
  --display:   'Unbounded', system-ui, sans-serif;
  --text:      'Onest', system-ui, sans-serif;
  color-scheme: light;
}

/* Тёмная тема: включается кнопкой в меню (data-theme="dark")
   или сама, если в системе тёмная тема и кнопку ещё не нажимали */
:root[data-theme="dark"] {
  --accent-ink: var(--accent);
  --paper:    #0b1324;
  --paper-2:  #101b30;
  --card:     #15223a;
  --ink:      #eef2f8;
  --ink-2:    #b6c2d6;
  --ink-3:    #7f8ca5;
  --line:     rgba(255, 255, 255, 0.1);
  --night:    #060c18;
  --night-2:  #0e1a2e;
  --shadow:   0 1px 2px rgba(0,0,0,0.3), 0 16px 40px -16px rgba(0,0,0,0.6);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent-ink: var(--accent);
    --paper:    #0b1324;
    --paper-2:  #101b30;
    --card:     #15223a;
    --ink:      #eef2f8;
    --ink-2:    #b6c2d6;
    --ink-3:    #7f8ca5;
    --line:     rgba(255, 255, 255, 0.1);
    --night:    #060c18;
    --night-2:  #0e1a2e;
    --shadow:   0 1px 2px rgba(0,0,0,0.3), 0 16px 40px -16px rgba(0,0,0,0.6);
    color-scheme: dark;
  }
}

/* ===== 2. ОСНОВА ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background 0.4s, color 0.4s;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ссылка «к содержимому» — видна только при переходе клавишей Tab */
.skip { position: fixed; left: 16px; top: -60px; z-index: 400; padding: 0.7rem 1.1rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; transition: top 0.2s; }
.skip:focus { top: 16px; }

/* скрыто от глаз, но читается экранными дикторами */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: min(100% - 2 * clamp(16px, 4vw, 40px), 1240px); margin-inline: auto; }
.section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 96px); }

/* на тёмных блоках мелкий оранжевый текст — яркий */
[data-dark], .card--dark, .cta, .lost, .numbers { --accent-ink: var(--accent); }

/* Подзаголовок-«ярлык» над заголовком: 01 · О клубе */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.2rem;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; border-radius: 2px; background: currentColor; }

.h1, .h2, .h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; overflow-wrap: break-word; }
.h1 { font-size: clamp(2.6rem, 7vw, 6rem); font-weight: 800; }
.h2 { font-size: clamp(2rem, 4.6vw, 3.8rem); }
.h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.2; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--ink-2); max-width: 38rem; }
.muted { color: var(--ink-2); }
.accent { color: var(--accent-ink); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head .lead { margin-top: 1rem; }

/* ===== 3. ЗНАЧКИ =====
   Линейные значки Tabler (бесплатные, лицензия MIT) лежат в assets/icons/
   и красятся в цвет текста:
   <span class="icon i-compass" aria-hidden="true"></span> */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.14em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}
.i-home          { --icon: url("../icons/home.svg"); }
.i-mountain      { --icon: url("../icons/mountain.svg"); }
.i-calendar      { --icon: url("../icons/calendar.svg"); }
.i-calendar-event{ --icon: url("../icons/calendar-event.svg"); }
.i-photo         { --icon: url("../icons/photo.svg"); }
.i-chart-bar     { --icon: url("../icons/chart-bar.svg"); }
.i-backpack      { --icon: url("../icons/backpack.svg"); }
.i-user-plus     { --icon: url("../icons/user-plus.svg"); }
.i-mail          { --icon: url("../icons/mail.svg"); }
.i-trekking      { --icon: url("../icons/trekking.svg"); }
.i-lasso         { --icon: url("../icons/lasso.svg"); }
.i-compass       { --icon: url("../icons/compass.svg"); }
.i-tent          { --icon: url("../icons/tent.svg"); }
.i-camera        { --icon: url("../icons/camera.svg"); }
.i-kitchen       { --icon: url("../icons/tools-kitchen-2.svg"); }
.i-clock         { --icon: url("../icons/clock.svg"); }
.i-route         { --icon: url("../icons/route.svg"); }
.i-map           { --icon: url("../icons/map-2.svg"); }
.i-map-pin       { --icon: url("../icons/map-pin.svg"); }
.i-star          { --icon: url("../icons/star.svg"); }
.i-check         { --icon: url("../icons/check.svg"); }
.i-trophy        { --icon: url("../icons/trophy.svg"); }
.i-tree          { --icon: url("../icons/christmas-tree.svg"); }
.i-clipboard     { --icon: url("../icons/clipboard-text.svg"); }
.i-users         { --icon: url("../icons/users.svg"); }
.i-award         { --icon: url("../icons/award.svg"); }
.i-shirt         { --icon: url("../icons/shirt.svg"); }
.i-first-aid     { --icon: url("../icons/first-aid-kit.svg"); }
.i-tools         { --icon: url("../icons/tools.svg"); }
.i-scale         { --icon: url("../icons/scale.svg"); }
.i-shoe          { --icon: url("../icons/shoe.svg"); }
.i-droplet       { --icon: url("../icons/droplet.svg"); }
.i-temperature   { --icon: url("../icons/temperature.svg"); }
.i-battery       { --icon: url("../icons/battery-charging.svg"); }
.i-candy         { --icon: url("../icons/candy.svg"); }
.i-cake          { --icon: url("../icons/cake.svg"); }
.i-barbell       { --icon: url("../icons/barbell.svg"); }
.i-run           { --icon: url("../icons/run.svg"); }
.i-handshake     { --icon: url("../icons/heart-handshake.svg"); }
.i-clipboard-heart { --icon: url("../icons/clipboard-heart.svg"); }
.i-telegram      { --icon: url("../icons/brand-telegram.svg"); }
.i-vk            { --icon: url("../icons/brand-vk.svg"); }
.i-phone         { --icon: url("../icons/phone.svg"); }
.i-arrow         { --icon: url("../icons/arrow-right.svg"); }
.i-arrow-up      { --icon: url("../icons/arrow-up-right.svg"); }
.i-chevron-left  { --icon: url("../icons/chevron-left.svg"); }
.i-chevron-right { --icon: url("../icons/chevron-right.svg"); }
.i-sun           { --icon: url("../icons/sun.svg"); }
.i-moon          { --icon: url("../icons/moon.svg"); }
.i-copy          { --icon: url("../icons/copy.svg"); }
.i-flag          { --icon: url("../icons/flag-3.svg"); }
.i-x             { --icon: url("../icons/x.svg"); }
.i-refresh       { --icon: url("../icons/refresh.svg"); }

/* ===== 4. КНОПКИ, МЕТКИ ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.1;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.btn .i-arrow, .btn .i-arrow-up { transition: transform 0.3s var(--ease); }
.btn:hover .i-arrow { transform: translateX(4px); }
.btn:hover .i-arrow-up { transform: translate(3px, -3px); }
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-2); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--accent); color: var(--on-accent); }
.btn--ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { border: 1.5px solid rgba(255,255,255,0.35); color: #fff; }
.btn--light:hover { background: #fff; color: var(--night); border-color: #fff; }
.btn--sm { min-height: 42px; padding: 0.6rem 1.1rem; font-size: 0.9rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  background: var(--paper-2);
  color: var(--ink-2);
  white-space: nowrap;
}
.chip--accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); }
.chip--blue   { background: color-mix(in srgb, var(--blue) 18%, transparent); color: color-mix(in srgb, var(--blue) 70%, var(--ink)); }
.chip--glass  { background: rgba(10,20,36,0.55); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }

/* ===== 5. МЕНЮ ===== */
.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100;
  width: min(100% - 24px, 1260px);
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 60px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  view-transition-name: site-nav; /* при переходе между страницами меню стоит на месте */
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.nav.is-scrolled { box-shadow: var(--shadow); }
/* над тёмным первым экраном главной меню светлое */
.nav--dark {
  background: rgba(10, 20, 36, 0.35);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-right: auto;
}
.nav-logo img { width: 36px; height: 36px; border-radius: 50%; }
.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-links a {
  position: relative;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.78;
  transition: opacity 0.2s, background 0.2s;
}
.nav-links a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  translate: -50% 0;
  background: var(--accent);
}
.nav-round {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.15rem;
  transition: background 0.2s;
}
.nav-round:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.nav-cta { min-height: 44px; padding: 0.55rem 1.2rem; }
.nav-burger { display: none; }

/* кнопка темы: в светлой показываем луну, в тёмной — солнце */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: inline-block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* Меню на весь экран (телефон и планшет) */
.menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 96px clamp(20px, 6vw, 48px) 32px;
  background: var(--night);
  color: var(--on-night);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
  overflow-y: auto;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu-links { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: auto; }
.menu-links a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.35rem 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.7rem, 7vw, 3rem);
  line-height: 1.15;
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.4s var(--ease), translate 0.4s var(--ease), color 0.2s;
}
.menu-links a small { font-family: var(--text); font-size: 0.8rem; font-weight: 500; color: var(--on-night-2); }
.menu-links a:hover, .menu-links a[aria-current="page"] { color: var(--accent); }
.menu.is-open .menu-links a { opacity: 1; translate: 0 0; transition-delay: calc(0.04s * var(--i) + 0.08s); }
.menu-foot { display: flex; flex-wrap: wrap; gap: 0.6rem; padding-top: 2rem; }

@media (max-width: 1080px) {
  .nav-links, .nav .nav-cta { display: none; }
  .nav-burger { display: grid; }
}
.nav-burger span, .nav-burger span::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), translate 0.3s var(--ease);
}
.nav-burger span::before { translate: 0 6px; }
.nav-burger span { translate: 0 -3px; }
.nav-burger[aria-expanded="true"] span { transform: rotate(45deg); translate: 0 0; }
.nav-burger[aria-expanded="true"] span::before { transform: rotate(-90deg); translate: 0 0; }
.menu-open .nav { background: transparent; border-color: transparent; color: #fff; box-shadow: none; }

/* ===== 6. ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ =====
   Блок с data-reveal проявляется, когда доезжает до экрана (класс is-in ставит main.js).
   --d — задержка, чтобы соседние блоки появлялись по очереди */
.js [data-reveal] {
  opacity: 0;
  translate: 0 28px;
  filter: blur(8px);
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; translate: 0 0; filter: blur(0); }

/* ===== 7. ПЕРВЫЙ ЭКРАН ГЛАВНОЙ ===== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: #060c18;
  color: #fff;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  z-index: -3;
}
.hero::after { /* затемнение снизу, чтобы читался текст */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6,12,24,0.55) 0%, rgba(6,12,24,0) 30%, rgba(6,12,24,0) 55%, rgba(6,12,24,0.85) 100%);
}
/* мягкие цветные «сияния» в небе — медленно плавают */
.hero-aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero-aurora span {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite alternate;
}
.hero-aurora span:nth-child(1) { background: #f07a1a; left: -20vmax; top: -30vmax; }
.hero-aurora span:nth-child(2) { background: #2e5c9a; right: -25vmax; top: -20vmax; animation-delay: -6s; }
.hero-aurora span:nth-child(3) { background: #ffb627; left: 30%; top: -45vmax; opacity: 0.18; animation-delay: -12s; }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* огромное слово КРОКУС — сверху, под строкой «Спортивно-туристский клуб»; цветок растёт под ним (crocus.js) */
.hero-word {
  position: absolute;
  left: 50%;
  top: calc(120px + clamp(4rem, 15.5vw, 16rem) * 0.43);
  translate: -50% -50%;
  z-index: 1;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4rem, 15.5vw, 16rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.35));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  user-select: none;
}
.hero-crocus { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero-crocus.is-ready { opacity: 1; }
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding-bottom: clamp(64px, 9vh, 110px);
}
.hero-meta {
  position: absolute;
  top: 96px;
  left: 50%;
  translate: -50% 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.hero-lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); max-width: 32rem; color: rgba(255,255,255,0.85); margin-bottom: 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-facts { display: flex; gap: clamp(1.5rem, 3vw, 3rem); }
.hero-facts b { display: block; font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; }
.hero-facts span { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

/* лента с местами, где были, — бежит по кругу */
.tape {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  rotate: -2deg;
  background: var(--accent);
  color: var(--on-accent);
  overflow: hidden;
  padding: 0.9rem 0;
  box-shadow: 0 10px 30px -10px rgba(240,122,26,0.6);
}
.tape-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-track span {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding-right: 1.4rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  text-transform: uppercase;
  white-space: nowrap;
}
.tape-track span::after { content: '✦'; font-size: 0.8em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* первый экран на телефоне: всё в один столбец, слово выше, текст внизу на тёмной подложке */
@media (max-width: 760px) {
  .hero-word { top: 25%; font-size: 17.5vw; }
  .hero-meta { top: 86px; font-size: 0.6rem; }
  .hero::after { background: linear-gradient(180deg, rgba(6,12,24,0.55) 0%, rgba(6,12,24,0) 25%, rgba(6,12,24,0) 42%, rgba(6,12,24,0.92) 78%); }
  .hero-inner { grid-template-columns: 1fr; padding-bottom: 64px; }
  .hero-lead { font-size: 1.05rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-facts { display: none; }
}

/* ===== 8. КАРТОЧКИ И «БЕНТО»-СЕТКА ===== */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 32px);
  overflow: hidden;
}
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.row-2 { grid-row: span 2; }
@media (max-width: 960px) {
  .span-3 { grid-column: span 6; }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; }
  .span-6 { grid-column: span 12; }
  .row-2 { grid-row: auto; }
}
@media (max-width: 560px) {
  .span-3 { grid-column: span 12; }
}
.card-photo { padding: 0; min-height: 320px; }
.card-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); }
.card-photo:hover img { scale: 1.04; }
.card-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin-bottom: 1.4rem;
  font-size: 1.5rem;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.card h3 { margin-bottom: 0.5rem; }
.card.span-3 { container-type: inline-size; }
.card.span-3 .h3 { font-size: min(clamp(1.15rem, 1.6vw, 1.4rem), 9cqi); }
.card p { color: var(--ink-2); font-size: 0.95rem; }
.card--dark { background: var(--night); border-color: transparent; color: var(--on-night); }
.card--dark p { color: var(--on-night-2); }
.card--accent { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.card--accent p { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }

.about-text p + p { margin-top: 1rem; }
.about-text .btn { margin-top: 2rem; }

/* ===== 9. ЦИФРЫ КЛУБА (тёмная полоса) ===== */
.numbers { background: var(--night); color: var(--on-night); }
.numbers-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,0.1); border-radius: var(--radius); overflow: hidden; }
.number { background: var(--night); padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 28px); container-type: inline-size; }
.number b {
  display: block;
  font-family: var(--display);
  font-size: min(clamp(2.4rem, 5vw, 4.4rem), 30cqi);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.6rem;
}
.number:nth-child(odd) b { color: var(--accent); }
.number span { color: var(--on-night-2); font-size: 0.95rem; }
@media (max-width: 900px) {
  .numbers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .number:last-child { grid-column: span 2; }
}

/* ===== 10. ПОХОДЫ ===== */
/* Обложка похода — нарисованная сцена; --fx — какая часть картинки важнее по ширине */
.poster { position: relative; overflow: hidden; background: var(--night); }
.poster > img { width: 100%; height: 100%; object-fit: cover; object-position: var(--fx, 60%) 70%; transition: scale 1.2s var(--ease); }

/* цифры похода: км, дни, высота */
.stats-row { display: flex; gap: 1.8rem; margin-top: auto; padding-top: 1rem; }
.stats-row b { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1; }
.stats-row span { font-size: 0.78rem; color: var(--ink-3); }

/* Страница походов: большие карточки, которые «складываются стопкой» при прокрутке */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter small { font-size: 0.75rem; opacity: 0.6; }
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.hike-feature {
  position: sticky;
  top: calc(92px + var(--i, 0) * 14px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: min(78vh, 640px);
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: opacity 0.4s, scale 0.4s;
}
.hike-feature[hidden] { display: none; }
.hike-feature .poster { min-height: 280px; }
.hike-feature-body { display: flex; flex-direction: column; gap: 1rem; padding: clamp(24px, 3.4vw, 48px); }
.hike-feature-body .h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
.hike-feature-body p { color: var(--ink-2); }
.hike-feature-body .stats-row { gap: 2.4rem; margin-top: 0.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.hike-feature-body .stats-row b { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.leader { font-size: 0.9rem; color: var(--ink-3); margin-top: auto; }
.leader b { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .hike-feature { grid-template-columns: minmax(0, 1fr); position: relative; top: 0; min-height: 0; }
  .hike-feature .poster { aspect-ratio: 16 / 10; min-height: 0; width: 100%; }
}

/* ===== 10б. «ЗАЛИПАЮЩИЕ» БЛОКИ-ФИЛЬМЫ (скроллителлинг): главная, «Статистика», «Вступить» =====
   Блок выше экрана на --jr-scroll: пока крутишь этот путь, .jr-stage стоит на месте
   и в нём по очереди идут сцены походов (логика — в main.js). Больше --jr-scroll — медленнее */
.journey {
  --jr-scroll: 440vh;
  position: relative;
  height: calc(100vh + var(--jr-scroll));
  height: calc(100svh + var(--jr-scroll));
  background: #060c18;
}
.jr-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: #fff;
}

/* Сцена: небо — фоном, остальное — слоями поверх.
   --fx — какая точка картинки (по ширине) стоит по центру экрана,
   --lift — насколько картинка приподнята над низом экрана (под ней — тёмная земля) */
.f-scene {
  position: absolute;
  inset: 0;
  --fx: 50%;
  --lift: 0%;
  background: linear-gradient(0deg, #060c18 var(--lift), transparent var(--lift)), var(--sky);
}
.f-scene + .f-scene { opacity: 0; visibility: hidden; }
.f-scene--pass    { --sky: linear-gradient(180deg, #0a1730 0%, #18305a 28%, #3e5d8f 46%, #c98a78 58%, #ffb27a 66%, #ffc98f 72%); --fx-m: 66%; --lift-m: 16%; }
.f-scene--dzhentu { --sky: linear-gradient(180deg, #0b1b36 0%, #1b3d6c 30%, #4f7fb8 55%, #8db6e2 72%); --fx-m: 66%; }
.f-scene--ruza    { --sky: linear-gradient(180deg, #0c1a33 0%, #1f3d66 30%, #5a7fa8 52%, #d9a679 66%, #f2c08e 74%); --fx-m: 64%; --lift-m: 18%; }
.f-scene--steppe  { --sky: linear-gradient(180deg, #0c1830 0%, #2a2c5a 26%, #7a4a6a 44%, #e0784a 56%, #ffb36a 63%, #ffd49a 68%); --fx-m: 70%; --lift-m: 22%; }

/* Слой всегда в пропорциях картинки 16:9 и прижат к низу экрана — подписи
   и мелкие картинки внутри слоя ставятся в процентах и не съезжают */
.f-layer {
  position: absolute;
  bottom: var(--lift);
  left: 50%;
  width: max(100%, 177.78vh);
  width: max(100%, 177.78svh);
  aspect-ratio: 16 / 9;
  translate: calc(-1 * var(--fx)) 0;
  transform-origin: var(--fx) 62%; /* слои «наезжают» на точку у горизонта */
}
.f-scene.is-live .f-layer[data-depth] { will-change: transform; }
.f-layer > img:not(.f-sprite),
.f-layer > svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.f-sprite { position: absolute; max-width: none; }
.f-sun, .f-glow, .f-mist, .f-cloud { position: absolute; translate: -50% -50%; border-radius: 50%; pointer-events: none; }
.f-sun { aspect-ratio: 1; }
.f-scene--pass .f-sun { background: radial-gradient(circle, #fff6e0 0 52%, #ffd59a 60%, rgba(255,190,120,0) 72%); box-shadow: 0 0 60px 20px rgba(255,190,120,0.35); }
.f-scene--steppe .f-sun,
.f-scene--ruza .f-sun { background: radial-gradient(circle, #fff1c9 0 40%, #ffc46e 55%, rgba(255,140,60,0) 71%); box-shadow: 0 0 90px 30px rgba(255,150,70,0.35); }
.f-glow { background: radial-gradient(closest-side, rgba(255,190,130,0.55), rgba(255,190,130,0)); }
.f-scene--steppe .f-glow { background: radial-gradient(closest-side, rgba(255,170,90,0.6), rgba(255,170,90,0)); }
.f-mist  { background: radial-gradient(closest-side, rgba(200,218,245,0.3), rgba(200,218,245,0)); }
.f-cloud { background: radial-gradient(closest-side, rgba(232,242,255,0.55), rgba(232,242,255,0)); }
/* тропа на перевал прорисовывается при прокрутке */
.f-draw { fill: none; stroke: #fff; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.f-route { fill: none; stroke: #ffc27a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.1 11; }
.f-hiker { fill: var(--accent); filter: drop-shadow(0 0 6px rgba(255,169,77,0.9)); }
.f-label {
  position: absolute;
  translate: -50% -150%;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffc27a;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(6,12,24,0.85);
  opacity: 0;
}

/* затемнение, чтобы текст читался поверх картинки */
.jr-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6,12,24,0.75) 0%, rgba(6,12,24,0) 24%),
    linear-gradient(0deg, rgba(6,12,24,0.7) 0%, rgba(6,12,24,0) 26%),
    linear-gradient(90deg, rgba(6,12,24,0.88) 0%, rgba(6,12,24,0.5) 34%, rgba(6,12,24,0) 60%);
}
.jr-content {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: 100px;
  padding-bottom: 32px;
}
.jr-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.jr-head .eyebrow { margin-bottom: 0.5rem; }
.jr-title { font-family: var(--display); font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 700; }
.jr-texts { display: grid; align-self: center; }
.jr-text { grid-area: 1 / 1; max-width: 36rem; text-shadow: 0 2px 24px rgba(6,12,24,0.6); }
.jr-text > * { transform-origin: 0 50%; }
.js .jr-text + .jr-text > * { opacity: 0; } /* до запуска скрипта виден первый рассказ */
.jr-text .chips { margin-bottom: 1.1rem; }
.jr-text .date { display: block; font-family: var(--display); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.jr-text h3 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0.6rem 0 0.9rem;
}
.jr-text p { color: rgba(255,255,255,0.86); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 32rem; }
.jr-text .stats-row { padding-top: 1.4rem; }
.jr-text .stats-row b { font-size: clamp(1.6rem, 2.8vw, 2.4rem); }
.jr-text .stats-row span { color: rgba(255,255,255,0.6); }

/* переключатель походов: полоска заполняется, пока крутишь; клик — перейти к походу */
.jr-steps { display: flex; gap: 1rem; }
.jr-step {
  flex: 0 1 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.4rem 0;
  text-align: left;
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  transition: color 0.3s;
}
.jr-step small { margin-top: -0.3rem; font-family: var(--text); font-size: 0.72rem; font-weight: 500; }
.jr-step i { display: block; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.18); overflow: hidden; }
.jr-step i::after { content: ''; display: block; height: 100%; background: var(--accent); transform: scaleX(var(--fill, 0)); transform-origin: left; }
.jr-step:hover, .jr-step.is-active { color: #fff; }

/* узкий (вертикальный) экран: картинка сдвинута к главному месту, рассказ — внизу */
@media (max-aspect-ratio: 1/1) {
  .f-scene { --fx: var(--fx-m, 50%); --lift: var(--lift-m, 0%); }
  .jr-texts { align-self: end; margin-bottom: 1.2rem; }
  .jr-shade {
    background:
      linear-gradient(180deg, rgba(6,12,24,0.75) 0%, rgba(6,12,24,0) 22%),
      linear-gradient(0deg, rgba(6,12,24,0.95) 0%, rgba(6,12,24,0.8) 38%, rgba(6,12,24,0) 66%);
  }
}
@media (max-width: 600px) {
  .jr-content { padding-top: 88px; padding-bottom: 20px; }
  .jr-head .btn { display: none; }
  .jr-text h3 { font-size: 2rem; }
  .jr-text p { font-size: 0.95rem; }
  .jr-steps { gap: 0.6rem; }
  .jr-step { flex: 1 1 0; font-size: 0.72rem; }
  .jr-step small { font-size: 0.62rem; }
}
@media (max-height: 600px) {
  .jr-content { padding-top: 80px; padding-bottom: 12px; }
  .jr-text h3 { font-size: 1.7rem; margin: 0.3rem 0 0.4rem; }
  .jr-text p { font-size: 0.85rem; }
  .jr-text .chips { margin-bottom: 0.4rem; }
  .jr-text .stats-row { padding-top: 0.6rem; }
}
/* ещё две сцены: дистанция с флажками КП («Вступить») и карта маршрутов («Статистика») */
.f-scene--course { --sky: linear-gradient(180deg, #0c1a33 0%, #1f4070 32%, #5d8cc4 56%, #a9cbe9 72%); --fx-m: 70%; --lift-m: 22%; }
.f-scene--topo   { --sky: radial-gradient(ellipse 80% 70% at 62% 55%, #12284a 0%, #0b1830 60%, #070f1f 100%); --lift: 12%; --fx-m: 69.5%; --lift-m: 8%; background: var(--sky); } /* без тёмной полосы снизу: карта сама растворяется */
.f-scene--topo .f-layer > img { -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, #000 82%, transparent 100%); } /* низ карты — плавно в темноту */
/* на узком экране вся карта не влезает над текстом: «камера» сначала смотрит на Подмосковье,
   а к кавказскому походу 2025 года съезжает на юг (--k ставит main.js: 0 — начало блока, 1 — конец) */
@media (max-aspect-ratio: 1/1) {
  .f-scene--topo .f-layer { translate: calc(-1 * var(--fx)) calc(clamp(0, (var(--k, 0) - 0.453) * 21, 1) * -50%); }
  .f-scene--topo { --lift: var(--lift-m); }
  .f-scene--topo .f-label--dim { display: none; } /* «Чёрное море» на узком экране обрезается */
  /* дистанция: три флажка в узкий экран не влезают — «камера» плывёт за туристом от КП 1 к финишу */
  .f-scene--course { --fx: calc(58% + var(--k, 0) * 22%); }
}
.f-glow--map { background: radial-gradient(closest-side, rgba(95,168,232,0.22), rgba(95,168,232,0)); }
/* маршруты на карте: сплошная линия похода и тонкая — дорога из Москвы */
.f-draw.f-line   { stroke: #ffc27a; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.f-draw.f-travel { stroke: #9fc4ff; stroke-width: 1.8; opacity: 0.55; }
/* точка на карте с расходящимся кольцом */
.f-pin {
  position: absolute;
  width: 12px;
  height: 12px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 3px rgba(240,122,26,0.6);
  opacity: 0;
}
.f-pin::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255,169,77,0.6);
  animation: pinPulse 2.4s ease-out infinite;
}
.f-pin--home { background: #5fa8e8; box-shadow: 0 0 12px 3px rgba(95,168,232,0.6); }
.f-pin--home::after { border-color: rgba(95,168,232,0.6); }
@keyframes pinPulse { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.f-label--map { color: #eef2f8; }
.f-label--dim { color: #7f8ca5; font-weight: 500; opacity: 1; }

/* рассказ-«год» в статистике и шаг-КП на «Вступить» */
.jr-text .year { font-family: var(--display); font-size: clamp(3.4rem, 9vw, 7rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; color: var(--accent); }
.jr-text .jr-list { display: grid; gap: 0.5rem; margin-top: 1.2rem; }
.jr-text .jr-list li { font-size: clamp(0.95rem, 1.2vw, 1.1rem); line-height: 1.4; color: rgba(255,255,255,0.85); }
.jr-text .jr-list b { display: block; font-family: var(--display); font-weight: 700; color: #fff; }
.jr-text .kp { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.jr-text .kp i { width: 22px; height: 22px; border-radius: 3px; background: linear-gradient(135deg, var(--accent) 50%, #fff 50%); }

@media (prefers-reduced-motion: reduce) { .f-pin::after { animation: none; } }

/* без JavaScript блок не «залипает»: показываем походы друг под другом */
html:not(.js) .journey { height: auto; }
html:not(.js) .jr-stage { position: relative; height: auto; min-height: 100vh; }
html:not(.js) .jr-texts { display: flex; flex-direction: column; gap: 3rem; }
html:not(.js) .jr-steps { display: none; }

/* ===== 11. УВЛЕЧЕНИЯ ===== */
.hobbies { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.hobbies-photo {
  position: sticky;
  top: 100px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hobbies-photo img { width: 100%; height: 100%; object-fit: cover; }
.hobbies-photo figcaption { position: absolute; left: 16px; bottom: 16px; }
.hobby {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 1.2rem;
  align-items: start;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.hobby:last-child { border-bottom: 1px solid var(--line); }
.hobby-num { font-family: var(--display); font-size: 0.8rem; font-weight: 700; color: var(--ink-3); padding-top: 0.5rem; }
.hobby .card-icon { margin: 0; width: 48px; height: 48px; font-size: 1.35rem; transition: background 0.3s, color 0.3s, rotate 0.4s var(--ease); }
.hobby:hover .card-icon { background: var(--accent); color: var(--on-accent); rotate: -8deg; }
.hobby > div { min-width: 0; container-type: inline-size; }
.hobby h3 { margin-bottom: 0.35rem; font-size: min(clamp(1.15rem, 1.6vw, 1.4rem), 9.5cqi); }
.hobby p { color: var(--ink-2); }
@media (max-width: 860px) {
  .hobbies { grid-template-columns: 1fr; }
  .hobbies-photo { position: relative; top: 0; aspect-ratio: 16 / 11; }
}

/* ===== 12. ТРЕНИРОВКИ ПО ДНЯМ И БЛИЖАЙШЕЕ СОБЫТИЕ ===== */
.week { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.day { display: flex; flex-direction: column; gap: 0.9rem; }
.day-name {
  font-family: var(--display);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent-ink);
}
.day-name small { display: block; font-family: var(--text); font-size: 0.85rem; font-weight: 500; color: var(--ink-3); margin-top: 0.4rem; letter-spacing: 0; }
.slot { padding-top: 0.9rem; border-top: 1px solid var(--line); }
.slot b { display: block; font-weight: 600; }
.slot span { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; color: var(--ink-2); }
@media (max-width: 760px) { .week { grid-template-columns: 1fr; } }

.next-event { display: flex; flex-direction: column; gap: 0.8rem; min-height: 100%; }
.next-event .eyebrow { color: var(--on-accent); margin-bottom: 0.4rem; }
.next-when { font-family: var(--display); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.next-title { font-family: var(--display); font-size: 1.15rem; font-weight: 700; line-height: 1.25; }
.next-event .btn { margin-top: auto; align-self: flex-start; }

/* ===== 13. ПРИЗЫВ «ХОЧЕШЬ С НАМИ?» ===== */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 7vw, 96px) clamp(24px, 6vw, 80px);
  color: #fff;
  background: var(--night);
}
.cta > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 80%; z-index: -2; }
.cta::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(6,12,24,0.85) 0%, rgba(6,12,24,0.45) 55%, rgba(6,12,24,0.1) 100%); }
.cta .h2 { max-width: 14ch; margin-bottom: 1.2rem; }
.cta p { color: rgba(255,255,255,0.82); max-width: 32rem; margin-bottom: 2rem; font-size: 1.1rem; }
.cta .hero-cta { gap: 0.7rem; }

/* ===== 14. ШАПКА ВНУТРЕННИХ СТРАНИЦ ===== */
.page-hero { padding-top: clamp(112px, 14vw, 160px); padding-bottom: clamp(40px, 6vw, 80px); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; color: var(--ink-3); margin-bottom: 1.4rem; }
.crumbs a:hover { color: var(--accent-ink); }
.page-hero .h1 { font-size: clamp(2.3rem, 4.8vw, 4.4rem); overflow-wrap: anywhere; }
.page-hero .lead { margin-top: 1.4rem; }
.page-hero-art {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--night);
}
.page-hero-art img { width: 100%; height: 115%; object-fit: cover; object-position: var(--fx, 60%) 70%; will-change: transform; }
@media (max-width: 860px) {
  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-art { aspect-ratio: 16 / 10; }
}

/* ===== 15. КАЛЕНДАРЬ ===== */
.groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .groups { grid-template-columns: 1fr; } }
.group { display: flex; flex-direction: column; gap: 0.6rem; }
.group .chip { white-space: normal; }
.group-days { font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--accent-ink); line-height: 1; }
.group-time { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: auto; padding-top: 0.8rem; font-weight: 600; }
.note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 16px;
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  color: var(--ink-2);
}
.note .icon { font-size: 1.4rem; color: var(--blue); }
:root[data-theme="dark"] .note .icon { color: #7fb2ec; }
.note b { color: var(--ink); }

.next-big {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: 40px;
}
.next-big .next-when { font-size: clamp(2.4rem, 6vw, 5rem); }
@media (max-width: 640px) { .next-big { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }
.month { margin-top: 48px; }
.month-name { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem; }
.month-name .h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.month-name span { color: var(--ink-3); font-size: 0.9rem; }
.event {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line);
  transition: opacity 0.3s;
}
.event-date b { display: block; font-family: var(--display); font-size: 1.5rem; line-height: 1.05; }
.event-date span { font-size: 0.8rem; color: var(--ink-3); }
.event h4 { font-family: var(--display); font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
.event p { font-size: 0.88rem; color: var(--ink-2); margin-top: 0.2rem; }
.event .chips { margin-top: 0.5rem; }
.status { justify-self: end; }
.event.is-past { opacity: 0.45; }
.event.is-next { position: relative; }
.event.is-next::before { content: ''; position: absolute; left: -16px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); }
@media (max-width: 640px) {
  .event { grid-template-columns: 4.6rem minmax(0, 1fr); gap: 1rem; }
  .status { grid-column: 2; justify-self: start; }
  .event-date b { font-size: 1.15rem; }
}

.timeline { display: grid; gap: 0; }
.tl {
  display: grid;
  grid-template-columns: 7.5rem 20px minmax(0, 1fr);
  gap: 1.5rem;
  padding-bottom: 2.2rem;
  position: relative;
}
.tl::before { content: ''; position: absolute; left: calc(7.5rem + 1.5rem + 9px); top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; border: 4px solid var(--paper); background: var(--accent); box-shadow: 0 0 0 2px var(--accent); margin-top: 4px; }
.tl-date b { display: block; font-family: var(--display); font-size: 1.4rem; line-height: 1; }
.tl-date span { font-size: 0.82rem; color: var(--ink-3); }
.tl h3 { margin: 0.5rem 0 0.3rem; }
.tl p { color: var(--ink-2); font-size: 0.95rem; }
@media (max-width: 640px) {
  .tl { grid-template-columns: 20px minmax(0, 1fr); gap: 1rem; }
  .tl::before { left: 9px; }
  .tl-date { grid-column: 2; grid-row: 1; }
  .tl-dot { grid-row: 1 / span 2; }
  .tl > div:last-child { grid-column: 2; }
}

/* ===== 16. ГАЛЕРЕЯ ===== */
.trainers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.trainer {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--night);
  color: #fff;
  cursor: zoom-in;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
}
.trainer img { width: 100%; height: 100%; object-fit: cover; transition: scale 1.2s var(--ease); }
.trainer:hover img { scale: 1.05; }
.trainer figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 60px 24px 22px;
  background: linear-gradient(0deg, rgba(6,12,24,0.88), rgba(6,12,24,0));
}
.trainer figcaption b { display: block; font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.6rem); line-height: 1.15; }
.trainer figcaption span { color: var(--accent-2); font-size: 0.92rem; }
@media (max-width: 560px) { .trainers { grid-template-columns: 1fr; } .trainer { aspect-ratio: 4 / 4.4; } }

/* фото участников — «кирпичная кладка»: колонки разной высоты без пустот */
.masonry { columns: 4 240px; column-gap: 14px; }
.shot {
  display: block;
  width: 100%;
  margin-bottom: 14px;
  break-inside: avoid;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper-2);
  cursor: zoom-in;
  padding: 0;
}
.shot img { width: 100%; height: auto; transition: scale 0.8s var(--ease); }
.shot:hover img { scale: 1.05; }

/* окно просмотра фото */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 72px 16px 56px;
  background: rgba(6, 12, 24, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  touch-action: pan-y;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(100%, 1100px); max-height: 100%; border-radius: var(--radius-sm); object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 1.4rem;
  transition: background 0.2s;
}
.lb-btn:hover { background: rgba(255,255,255,0.22); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }
.lb-count { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.lb-caption { position: absolute; left: 20px; top: 26px; color: #fff; font-weight: 600; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 8px; translate: 0 0; } }

/* ===== 17. СТАТИСТИКА ===== */
.stat-tile b {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin: 0.2rem 0 0.4rem;
}
.stat-tile .card-icon { margin-bottom: 1.6rem; }

.bars { display: flex; align-items: flex-end; gap: clamp(16px, 4vw, 40px); height: 240px; margin-top: 1rem; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.bar { position: relative; flex: 1; max-width: 120px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.5rem; }
.bar i {
  width: 100%;
  height: var(--h);
  border-radius: 14px 14px 4px 4px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.is-in .bar i { transform: scaleY(1); }
.bar b { font-family: var(--display); font-size: 1.5rem; }
.bar span { position: absolute; top: 100%; margin-top: 8px; font-size: 0.85rem; color: var(--ink-3); font-weight: 600; }

.donut { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2rem; align-items: center; margin-top: 1rem; }
.donut .legend { flex: 1 1 190px; }
.donut svg { flex: none; width: 180px; height: 180px; rotate: -90deg; }
.donut circle { fill: none; stroke-width: 22; }
.donut .d-bg { stroke: var(--paper-2); }
.donut .d-a, .donut .d-b {
  stroke-dasharray: var(--len) 1000;
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1.4s var(--ease);
  transition-delay: var(--d, 0s);
}
.is-in .donut .d-a, .is-in .donut .d-b { stroke-dashoffset: 0; }
.donut .d-a { stroke: var(--accent); }
.donut .d-b { stroke: var(--blue); }
.legend li { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.legend li i { width: 12px; height: 12px; border-radius: 4px; }
.legend li span { margin-left: auto; font-family: var(--display); }


/* ===== 18. СНАРЯЖЕНИЕ: ЧЕК-ЛИСТ ===== */
.packing { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px; align-items: start; }
.packing-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.ring { position: relative; width: 150px; height: 150px; margin: 0.5rem 0 1.2rem; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring circle { fill: none; stroke-width: 12; }
.ring .r-bg { stroke: rgba(255,255,255,0.12); }
.ring .r-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--p, 0)); transition: stroke-dashoffset 0.6s var(--ease); }
.ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: var(--display); font-weight: 800; font-size: 2rem; line-height: 1; }
.ring-num small { font-family: var(--text); font-size: 0.8rem; font-weight: 500; color: var(--on-night-2); margin-top: 0.3rem; }
.legend-dots { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.9rem; color: var(--on-night-2); margin-top: 1rem; }
.legend-dots span { display: inline-flex; align-items: center; gap: 0.45rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--must { background: var(--accent); }
.dot--good { background: var(--ink-3); }
.packing-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cat-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.cat-head .card-icon { margin: 0; }
.cat-head small { display: block; font-size: 0.8rem; color: var(--ink-3); font-weight: 500; }
.check {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
  font-size: 0.95rem;
}
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check .box {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--line);
  font-size: 0.85rem;
  color: transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, scale 0.2s var(--ease);
}
.check:hover .box { border-color: var(--ink-3); }
.check input:checked + .box { background: var(--accent); border-color: var(--accent); color: var(--on-accent); scale: 1.08; }
.check input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check input:checked ~ .check-text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--accent); }
.check .dot { margin-left: auto; }
@media (max-width: 960px) {
  .packing { grid-template-columns: 1fr; }
  .packing-side { position: relative; top: 0; }
}
@media (max-width: 640px) { .packing-cats { grid-template-columns: 1fr; } }

.equip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 1.4rem; }
.equip { padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); background: var(--paper-2); }
.equip b { display: block; font-family: var(--display); font-size: 0.92rem; margin-bottom: 0.3rem; }
.equip span { font-size: 0.9rem; color: var(--ink-2); }
@media (max-width: 640px) { .equip-grid { grid-template-columns: 1fr; } }
.gear-photos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.gear-photo { border-radius: var(--radius-sm); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.gear-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 10px; }
.gear-photo figcaption { padding: 0.5rem 0.7rem 0.7rem; font-size: 0.8rem; font-weight: 600; color: #0f1b2d; }
@media (max-width: 900px) { .gear-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gear-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== 19. ВСТУПИТЬ: РАСПИСАНИЕ ===== */
.sched { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 2rem 0 1rem; }
.sched div { min-width: 0; overflow-wrap: break-word; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); }
.sched b { display: block; font-family: var(--display); font-size: 0.85rem; margin-bottom: 0.4rem; }
.sched span { font-size: 0.9rem; color: var(--on-night-2); }
@media (max-width: 900px) { .sched { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== 20. КОНТАКТЫ ===== */
.contacts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .contacts { grid-template-columns: 1fr; } }
.contact { display: flex; flex-direction: column; gap: 0.3rem; min-height: 220px; transition: translate 0.4s var(--ease), box-shadow 0.4s; }
.contact:hover { translate: 0 -4px; box-shadow: var(--shadow); }
.contact .card-icon { margin-bottom: auto; }
.contact small { color: var(--ink-3); font-weight: 500; margin-top: 2rem; }
.contact b { font-family: var(--display); font-size: clamp(1.1rem, 1.8vw, 1.5rem); line-height: 1.2; word-break: break-word; }
.contact-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.copy-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; font-weight: 600; color: var(--accent-ink); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 300;
  translate: -50% calc(100% + 40px);
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: translate 0.4s var(--ease);
}
.toast.is-on { translate: -50% 0; }

/* ===== 21. ПОДВАЛ ===== */
.footer { background: var(--night); color: var(--on-night); padding-top: clamp(56px, 8vw, 96px); overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer h4 { font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-night-2); margin-bottom: 1rem; }
.footer-col a { display: block; padding: 0.3rem 0; color: var(--on-night); opacity: 0.85; transition: opacity 0.2s, color 0.2s; }
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-brand p { color: var(--on-night-2); max-width: 22rem; margin: 1rem 0 1.4rem; }
.footer-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4rem, 17vw, 15rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  text-align: center;
  margin-top: clamp(40px, 6vw, 80px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.18);
  user-select: none;
  translate: 0 12%;
}
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; color: var(--on-night-2); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-brand { grid-column: span 2; } }

/* ===== 22. ПЕРЕХОДЫ МЕЖДУ СТРАНИЦАМИ И «МЕНЬШЕ ДВИЖЕНИЯ» =====
   Браузеры, которые умеют, плавно перетекают со страницы на страницу */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.3s var(--ease) both vtOut; }
::view-transition-new(root) { animation: 0.45s var(--ease) both vtIn; }
@keyframes vtOut { to { opacity: 0; translate: 0 -12px; } }
@keyframes vtIn { from { opacity: 0; translate: 0 16px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; translate: none; filter: none; }
}

/* ===== 23. СТРАНИЦА 404 «ТАКОЙ ТРОПЫ НЕТ» ===== */
.lost {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: 140px 0 clamp(48px, 12vh, 140px);
  overflow: hidden;
  background: #060c18;
  color: #fff;
  isolation: isolate;
}
.lost::after { /* затемнение снизу, чтобы читался текст */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(6,12,24,0.55) 0%, rgba(6,12,24,0) 28%, rgba(6,12,24,0.6) 52%, rgba(6,12,24,0.92) 100%);
}
.lost .h1 { max-width: 12ch; }
.lost .lead { margin: 1.2rem 0 2rem; color: rgba(255,255,255,0.8); }

/* ===== 24. ПОГОДА НА ПЕРВОМ ЭКРАНЕ (season.js): снег, лепестки, светлячки, листья ===== */
.hero-weather { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

/* ===== 25. ПРОФИЛЬ ВЫСОТЫ ГОРНОГО ПОХОДА (поверх картинки; рисуется при прокрутке — main.js) ===== */
.hike-feature .poster { position: relative; }
.profile {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(40px, 6vw, 72px) clamp(14px, 2.4vw, 28px) 12px;
  background: linear-gradient(180deg, rgba(6,12,24,0) 0%, rgba(6,12,24,0.6) 38%, rgba(6,12,24,0.86) 100%);
  color: #fff;
  pointer-events: none;
  container-type: inline-size;
}
.profile-plot { position: relative; aspect-ratio: 400 / 120; }
.profile-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.profile-line { fill: none; stroke: #ffc27a; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 5px rgba(255,170,90,0.55)); }
.profile-pt { position: absolute; width: 0; height: 0; opacity: 0; transition: opacity 0.4s; }
.profile-pt.is-on { opacity: 1; }
.profile-pt::before { content: ''; position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,194,122,0.45); }
.profile-pt > span {
  position: absolute;
  left: 0;
  bottom: 9px;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(6,12,24,0.9);
}
.profile-pt.is-first > span { translate: -14px 0; align-items: flex-start; }
.profile-pt.is-last > span { translate: calc(-100% + 14px) 0; align-items: flex-end; }
.profile-pt b { font-family: var(--display); font-size: 0.8rem; font-weight: 700; color: #ffc27a; }
.profile-pt i { font-style: normal; font-size: 0.72rem; color: rgba(255,255,255,0.85); }
.profile-cap { margin-top: 8px; font-size: 0.68rem; color: rgba(255,255,255,0.62); }
/* на узкой картинке названия только у первой, последней и самой высокой точки */
@container (max-width: 460px) {
  .profile-pt:not(.is-key) i { display: none; }
}

/* ===== 26. ТРЕНАЖЁР УЗЛОВ (knots.js) ===== */
.knots {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: "tabs tabs" "board info";
  gap: 16px;
  align-items: start;
}
.knot-tabs { grid-area: tabs; position: relative; display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.knot-tabs::-webkit-scrollbar { display: none; }
.knot-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.knot-tab small { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--accent-ink); }
.knot-tab:hover { border-color: var(--accent); }
.knot-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.knot-tab[aria-selected="true"] small { color: var(--accent); }
/* в тёмной теме выбранная вкладка светлая — точки сложности потемнее, чтобы были видны */
:root[data-theme="dark"] .knot-tab[aria-selected="true"] small { color: #a64a0a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .knot-tab[aria-selected="true"] small { color: #a64a0a; } }
.knot-board { grid-area: board; padding: 0; overflow: hidden; }
.knot-stage {
  position: relative;
  /* доска в клеточку, как в тетради по узлам */
  background-color: color-mix(in srgb, var(--paper) 55%, var(--card));
  background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.knot-canvas { display: block; width: 100%; aspect-ratio: 400 / 320; }
.knot-badge {
  position: absolute;
  right: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: #2f9e5b;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  opacity: 0;
  scale: 0.8;
  transition: opacity 0.3s, scale 0.3s var(--ease);
}
.knots.is-done .knot-badge { opacity: 1; scale: 1; }
.knot-controls { display: flex; justify-content: center; gap: 0.8rem; padding: 14px; border-top: 1px solid var(--line); }
.knot-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 1.3rem;
  transition: background 0.2s, color 0.2s, scale 0.2s;
}
.knot-btn:hover { background: var(--paper-2); }
.knot-btn:active { scale: 0.94; }
.knot-btn--play { width: 56px; height: 56px; background: var(--accent); border-color: transparent; color: var(--on-accent); }
.knot-btn--play:hover { background: var(--accent); filter: brightness(1.06); }
.knot-btn--play svg { width: 24px; height: 24px; fill: currentColor; }
.knot-btn--play .kp-pause, .knot-btn--play .kp-again { display: none; }
.knot-btn--play[data-state="pause"] .kp-play { display: none; }
.knot-btn--play[data-state="pause"] .kp-pause { display: block; }
.knot-btn--play[data-state="again"] .kp-play { display: none; }
.knot-btn--play[data-state="again"] .kp-again { display: block; font-size: 1.4rem; }
.knot-info { grid-area: info; padding-top: 0.4rem; }
.knot-info .eyebrow { margin-bottom: 0.6rem; }
.knot-use { margin: 0.9rem 0 1.4rem; color: var(--ink-2); }
.knot-steps { display: grid; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.knot-steps button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--card);
  text-align: left;
  color: var(--ink-2);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.knot-steps b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.85rem;
}
.knot-steps span { padding-top: 0.3rem; }
.knot-steps li.is-active button { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 8%, var(--card)); }
.knot-steps li.is-active b { background: var(--accent); color: var(--on-accent); }
.knot-steps li.is-done b { background: #2f9e5b; color: #fff; }
.knot-done { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: color-mix(in srgb, #2f9e5b 12%, var(--card)); color: var(--ink); display: none; }
.knot-done b { color: #2f9e5b; }
.knots.is-done .knot-done { display: block; }
.knot-note { margin-top: 24px; }
@media (max-width: 860px) {
  .knots { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tabs" "board" "info"; }
}

/* баннер «Тренажёр узлов» на странице «Снаряжение» */
.knots-promo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; margin-bottom: clamp(48px, 7vw, 96px); transition: translate 0.3s var(--ease); }
.knots-promo:hover { translate: 0 -3px; }
.knots-promo .card-icon { margin: 0; }
.knots-promo b { display: block; font-family: var(--display); font-size: 1.25rem; margin-bottom: 0.3rem; }
.knots-promo span span { color: var(--on-night-2); }
@media (max-width: 640px) { .knots-promo { grid-template-columns: minmax(0, 1fr); } }
