/* ============================================================
   Заповедная Азбука — Дизайн-система
   "Живой полевой справочник": ботанические иллюстрации,
   тёплая бумага, книжный ритм, живые микро-движения.
   ============================================================ */

@font-face {
  font-family: "Onest";
  src: url("../fonts/Onest-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Fira Cond";
  src: url("../fonts/FiraSansCondensed-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fira Cond";
  src: url("../fonts/FiraSansCondensed-ExtraBold.ttf") format("truetype");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fira Cond";
  src: url("../fonts/FiraSansCondensed-SemiBold.ttf") format("truetype");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  /* colour — earthy editorial */
  --ink:        #1c2a1f;
  --ink-2:      #2c3a2f;
  --paper:      #f5eedb;
  --paper-2:    #ece3c8;
  --paper-3:    #e3d6b3;
  --moss:       #4a6b3a;
  --moss-2:     #6c8a4a;
  --moss-soft:  #d9e2c2;
  --amber:      #e07b39;
  --amber-2:    #c8631f;
  --berry:      #b01880;
  --sky:        #5b7fa6;
  --water:      #6a90a3;
  --sand:       #c9b88a;
  --line:       #c9bd9b;
  --muted:      #6e6650;
  --on-ink:     #f1ead4;
  --on-ink-mut: rgba(241, 234, 212, 0.62);

  /* type */
  --f-body:  "Onest", "Segoe UI", system-ui, sans-serif;
  --f-disp:  "Fira Cond", "Arial Narrow", "Impact", sans-serif;
  --f-mono:  ui-monospace, "Cascadia Mono", monospace;

  /* shape */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-xl: 32px; --r-pill: 999px;

  /* shadow */
  --sh-1: 0 1px 0 rgba(28, 42, 31, 0.06);
  --sh-2: 0 12px 28px -12px rgba(28, 42, 31, 0.22);
  --sh-3: 0 30px 60px -30px rgba(28, 42, 31, 0.35);

  /* layout */
  --pad-x: clamp(20px, 4vw, 64px);
  --max:   1340px;
  --nav-h: 68px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  /* страховка от горизонтальной прокрутки на узких экранах (clip не ломает sticky) */
  overflow-x: clip;
}
body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(1200px 700px at 90% -10%, rgba(74, 107, 58, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(224, 123, 57, 0.10), transparent 60%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-disp); font-weight: 800; letter-spacing: -0.01em; line-height: 0.95; }
p { margin: 0; }
::selection { background: var(--ink); color: var(--paper); }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); }
.eyebrow {
  font-family: var(--f-disp);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--amber-2);
}
.muted { color: var(--muted); }
.kicker {
  font-family: var(--f-disp); font-weight: 800;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
}
.h-display { font-family: var(--f-disp); font-weight: 800; letter-spacing: -0.02em; line-height: 0.94; overflow-wrap: break-word; }
.h-1 { font-size: clamp(38px, 7vw, 120px); }
.h-2 { font-size: clamp(34px, 4.4vw, 72px); }
.h-3 { font-size: clamp(24px, 2.6vw, 40px); line-height: 1.02; }
.lead { font-size: clamp(16px, 1.2vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 62ch; overflow-wrap: break-word; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-pill);
  font-family: var(--f-disp); font-weight: 700; font-size: 14px;
  letter-spacing: 0.04em; text-transform: uppercase;
  border: 1.5px solid currentColor;
  background: var(--ink); color: var(--paper);
  transition: transform 0.4s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); background: var(--moss); border-color: var(--moss); }
.btn .arr { display: inline-block; transition: transform 0.4s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #fff; }
.btn.amber:hover { background: var(--amber-2); border-color: var(--amber-2); }
.btn.paper { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn.paper:hover { background: var(--ink); color: var(--paper); }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 12px; }

/* ---------------- Header / Nav ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  height: var(--nav-h);
  display: flex; align-items: center;
}
.site-header .container { display: flex; align-items: center; gap: 28px; }
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--f-disp); font-weight: 800; font-size: 18px;
  letter-spacing: -0.01em; color: var(--ink);
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  background: var(--ink); color: var(--amber);
  border-radius: 10px;
  font-family: var(--f-disp); font-size: 22px; font-weight: 800;
  transform: rotate(-3deg);
  box-shadow: var(--sh-2);
}
.brand:hover .brand-mark { transform: rotate(3deg) scale(1.06); transition: transform 0.5s var(--ease); }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  position: relative;
  display: inline-flex; align-items: center;
  padding: 10px 14px;
  font-family: var(--f-disp); font-weight: 700; font-size: 14px;
  letter-spacing: 0.02em; text-transform: uppercase;
  border-radius: 999px;
  transition: color 0.3s, background 0.3s;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav a:hover { color: var(--amber-2); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); }

.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav { display: none; }
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; margin-left: auto;
    border-radius: 12px; background: var(--ink); color: var(--paper);
  }
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
    content: ""; display: block; width: 18px; height: 2px; background: currentColor;
  }
  .nav-toggle span { position: relative; }
  .nav-toggle span::before { position: absolute; top: -6px; }
  .nav-toggle span::after  { position: absolute; top:  6px; }
}

.mobile-drawer {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: var(--paper); transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
  display: flex; flex-direction: column; padding: 24px var(--pad-x) 40px;
  border-top: 1px solid var(--line);
}
.mobile-drawer.open { transform: translateY(0); }
.mobile-drawer a {
  display: block; padding: 16px 0;
  font-family: var(--f-disp); font-size: 28px; font-weight: 800;
  border-bottom: 1px solid var(--line);
}
.mobile-drawer a:last-of-type { border-bottom: 0; }

/* ---------------- Generic section ---------------- */
section { padding: clamp(56px, 8vw, 120px) 0; position: relative; }
.section-head { display: grid; gap: 16px; max-width: 56ch; margin-bottom: clamp(28px, 4vw, 56px); }
.section-head .eyebrow { margin-bottom: 4px; }

/* ---------------- Reveal on scroll ---------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.05s; }
.reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.2s; }
.reveal.d4 { transition-delay: 0.28s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- HERO ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(48px, 7vw, 100px);
  padding-bottom: clamp(48px, 7vw, 100px);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(800px 500px at 80% 20%, rgba(74, 107, 58, 0.12), transparent 60%),
    radial-gradient(600px 400px at 20% 80%, rgba(224, 123, 57, 0.08), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  display: grid; gap: clamp(28px, 4vw, 64px);
  grid-template-columns: 1.15fr 0.85fr; align-items: end;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; align-items: start; } }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.hero-eyebrow i { width: 36px; height: 1px; background: var(--amber); display: inline-block; }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(56px, 9vw, 156px);
  line-height: 0.9; letter-spacing: -0.035em;
}
.hero h1 em {
  font-style: normal; color: var(--amber);
  display: inline-block; transform: rotate(-2deg);
  padding: 0 6px;
}
.hero h1 .soft { color: var(--moss); }
.hero-meta {
  margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px;
  font-family: var(--f-disp); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.hero-meta span { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-2); }
.hero-cta { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

.hero-art {
  position: relative; aspect-ratio: 4/5; min-height: 460px;
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--moss);
  box-shadow: var(--sh-3);
  isolation: isolate;
}
.hero-art .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-zoom 20s var(--ease) both; }
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(28, 42, 31, 0.45));
  z-index: 2;
}
.hero-art .badge {
  position: absolute; left: 22px; top: 22px; z-index: 3;
  background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 8px 14px;
  font-family: var(--f-disp); font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-art .stamp {
  position: absolute; right: 22px; bottom: 22px; z-index: 3;
  background: var(--amber); color: #fff;
  border-radius: 12px; padding: 10px 14px;
  font-family: var(--f-disp); font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-letter {
  position: absolute; right: -8%; top: 12%; z-index: 4;
  font-family: var(--f-disp); font-size: clamp(180px, 28vw, 360px);
  font-weight: 800; line-height: 0.8; color: var(--paper);
  opacity: 0.18; letter-spacing: -0.05em;
  pointer-events: none;
}

/* marquee ribbon — бесшовная лента букв.
   Интервал задаётся padding-right внутри каждого дубля, а не gap
   контейнера: тогда сдвиг -50% равен ровно одной копии и стыка не видно. */
.ribbon {
  background: var(--ink); color: var(--paper);
  padding: 18px 0; overflow: hidden;
  border-block: 1px solid color-mix(in oklab, var(--paper) 12%, transparent);
  opacity: 0; transform: translateY(-10px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.ribbon.in { opacity: 1; transform: none; }
.ribbon-track {
  display: flex; gap: 0; white-space: nowrap;
  animation: scroll-x 52s linear infinite;
  font-family: var(--f-disp); font-size: 22px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  will-change: transform;
}
.ribbon-track span {
  display: inline-flex; align-items: center; gap: 56px;
  padding-right: 56px; flex: 0 0 auto;
}
.ribbon-track span::after { content: "✦"; color: var(--amber); }
.ribbon:hover .ribbon-track { animation-play-state: paused; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* alphabet letter pop animation */
@keyframes letter-pop {
  0% { opacity: 0; transform: scale(0.3) translateY(10px); }
  60% { transform: scale(1.15) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.alpha-key { animation: letter-pop .5s var(--ease) both; }
.alpha-key:nth-child(1) { animation-delay: .02s; }
.alpha-key:nth-child(2) { animation-delay: .06s; }
.alpha-key:nth-child(3) { animation-delay: .10s; }
.alpha-key:nth-child(4) { animation-delay: .14s; }
.alpha-key:nth-child(5) { animation-delay: .18s; }
.alpha-key:nth-child(6) { animation-delay: .22s; }
.alpha-key:nth-child(7) { animation-delay: .26s; }
.alpha-key:nth-child(n+8) { animation-delay: .30s; }

/* ---------------- Big stats ---------------- */
.stats {
  display: grid; gap: 22px 24px;
  grid-template-columns: repeat(6, 1fr);
  padding: clamp(40px, 5vw, 72px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 1180px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { display: grid; gap: 6px; align-content: start; }
.stat b {
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(34px, 3.6vw, 62px);
  line-height: 1; color: var(--ink); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--ink); }

/* scenario cards (main) */
.scenarios { display: grid; gap: 16px; grid-template-columns: 1.4fr 1fr 1fr; }
/* Варианты сетки: классы вместо inline-стилей, иначе media-запросы ниже не срабатывают */
.scenarios--2 { grid-template-columns: repeat(2, 1fr); }
.scenarios--3 { grid-template-columns: repeat(3, 1fr); }
.scenarios--4 { grid-template-columns: repeat(4, 1fr); }
.scenarios--split { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 1100px) {
  .scenarios--3, .scenarios--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .scenarios { grid-template-columns: 1fr; }
  .scenarios--split { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .scenarios--2, .scenarios--3, .scenarios--4 { grid-template-columns: 1fr; }
}
.scenario {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  padding: 32px;
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; color: inherit;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.scenario:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.scenario .sc-id { font-family: var(--f-disp); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber-2); }
.scenario h3 { font-size: clamp(26px, 2.6vw, 40px); margin-top: 12px; max-width: 16ch; }
.scenario p { color: var(--muted); margin-top: 12px; max-width: 34ch; }
.scenario .sc-go { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-disp); font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); }
.scenario .sc-go::after { content: "→"; transition: transform 0.4s var(--ease); }
.scenario:hover .sc-go::after { transform: translateX(6px); color: var(--amber); }
.scenario .sc-letter {
  position: absolute; right: -10px; bottom: -40px;
  font-family: var(--f-disp); font-size: clamp(160px, 18vw, 260px);
  font-weight: 800; line-height: 0.8; color: var(--moss); opacity: 0.12; letter-spacing: -0.04em;
  pointer-events: none;
}
.scenario.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.scenario.dark .sc-id { color: var(--amber); }
.scenario.dark p { color: var(--on-ink-mut); }
.scenario.dark .sc-letter { color: var(--amber); opacity: 0.18; }
.scenario.dark .sc-go { color: var(--paper); }
.scenario.green { background: var(--moss); color: var(--paper); border-color: var(--moss); }
.scenario.green .sc-id, .scenario.green .sc-go { color: var(--paper); }
.scenario.green p { color: rgba(255, 255, 255, 0.78); }
.scenario.green .sc-letter { color: var(--paper); opacity: 0.12; }

/* ---------------- Alphabet grid ---------------- */
.alphabet-wrap { display: grid; gap: 40px; grid-template-columns: 0.95fr 1.05fr; align-items: start; }
@media (max-width: 980px) { .alphabet-wrap { grid-template-columns: 1fr; } }

.alpha-panel {
  background: var(--ink); color: var(--paper);
  border-radius: var(--r-xl);
  padding: 36px;
  position: sticky; top: calc(var(--nav-h) + 16px);
}
.alpha-panel .eyebrow { color: var(--amber); }
.alpha-panel h2 { font-size: clamp(28px, 3vw, 40px); margin: 8px 0 16px; }
.alpha-panel p { color: var(--on-ink-mut); }
.alpha-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 24px;
}
@media (max-width: 560px) { .alpha-grid { grid-template-columns: repeat(6, 1fr); } }
.alpha-key {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1; min-height: 56px;
  border-radius: 14px;
  background: color-mix(in oklab, var(--paper) 8%, transparent);
  color: var(--paper);
  font-family: var(--f-disp); font-weight: 800; font-size: 24px;
  border: 1px solid color-mix(in oklab, var(--paper) 14%, transparent);
  transition: all 0.35s var(--ease);
  overflow: hidden;
}
.alpha-key[aria-pressed="true"], .alpha-key.active {
  background: var(--amber); color: #fff; border-color: var(--amber);
  transform: scale(1.06);
}
.alpha-key:hover { background: color-mix(in oklab, var(--paper) 20%, transparent); transform: translateY(-2px); }
.alpha-key.muted { opacity: 0.42; }
.alpha-key .img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s; }
.alpha-key[data-img]:hover .img { opacity: 0.45; }

.species-list { display: grid; gap: 16px; }
.species-card {
  display: grid; grid-template-columns: 140px 1fr auto; align-items: center; gap: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  text-decoration: none; color: inherit;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.species-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--ink); }
@media (max-width: 600px) { .species-card { grid-template-columns: 80px 1fr; } .species-card .arrow { display: none; } }
.species-card .glyph {
  position: relative; aspect-ratio: 1;
  background: var(--paper-2);
  border-radius: 14px;
  display: grid; place-items: center;
  overflow: hidden;
}
.species-card .glyph .glyph-letter {
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(48px, 6vw, 76px);
  color: var(--moss);
  text-shadow: 3px 3px 0 color-mix(in oklab, var(--ink) 70%, transparent);
}
.species-card .glyph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.species-card .glyph img + .glyph-letter { color: transparent; }
.species-card h3 { font-size: clamp(22px, 1.8vw, 28px); margin-bottom: 6px; }
.species-card small { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }
.species-card .arrow { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 18px; }
.species-card:hover .arrow { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------------- Map ---------------- */
.map-shell { position: relative; color: var(--ink); }
.map-toolbar { display: flex; gap: 8px; z-index: 6; flex-wrap: wrap; margin-bottom: 12px; }
.map-legend { position: absolute; left: 16px; bottom: 16px; z-index: 6; display: flex; gap: 10px; flex-wrap: wrap; }

/* размеры сцены карты: соотношение совпадает с viewBox, чтобы круги не растягивались */
.map-shell--preview .map-stage { aspect-ratio: 116 / 84; }
.map-shell--full .map-stage { height: clamp(440px, 74vh, 800px); }
/* На узких экранах панель фильтров и легенда перестают лежать поверх карты:
   они выходят из наложения и становятся обычными строками над и под сценой,
   поэтому ни один маркер не остаётся под плашкой. Карта при этом занимает
   всю ширину экрана — без горизонтальной прокрутки, зоны видны целиком. */
@media (max-width: 760px) {
  .map-shell--preview,
  .map-shell--full { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
  .map-shell--preview .map-toolbar,
  .map-shell--full .map-toolbar,
  .map-shell--preview .map-legend,
  .map-shell--full .map-legend { position: static; inset: auto; padding: 0; z-index: 3; }
  .map-shell--preview .map-stage,
  .map-shell--full .map-stage {
    height: auto; aspect-ratio: 116 / 84;
    border-radius: var(--r-md); overflow: hidden;
  }
  /* карта ужимается до ширины экрана — слегка увеличиваем кружки и буквы,
     чтобы маркеры оставались различимыми и попадали пальцем */
  .map-canvas .mk-halo { r: 3.8; }
  .map-canvas .mk-dot { r: 2.3; }
  .map-canvas .mk-letter { font-size: 2.75px; }
  /* на телефоне сцена совпадает с пропорцией холста, поэтому водяной знак
     попадал бы прямо на лесополосу и спорил с подписью зоны — убираем его,
     название заповедника и так стоит заголовком страницы */
  .geo-title { display: none; }
}
.map-canvas { position: relative; z-index: 2; width: 100%; height: 100%; display: block; }

/* маркеры: буква внутри цветного кружка, читается на любом масштабе */
.map-canvas .mk { transition: opacity .4s var(--ease); }
.map-canvas .mk-letter {
  font-family: var(--f-disp); letter-spacing: 0;
  paint-order: stroke; pointer-events: none; user-select: none;
}
.map-canvas .mk-dot { transition: stroke .25s, stroke-width .25s; }
.map-canvas .mk:hover .mk-dot { stroke: var(--ink); stroke-width: 0.5; }
.map-canvas .mk:hover .mk-halo { opacity: 0.34; }
.map-canvas .zone { transition: opacity .4s var(--ease); }
.map-canvas .zone-name {
  font-family: var(--f-disp); font-size: 2.15px; font-weight: 800;
  letter-spacing: .13em; pointer-events: none; user-select: none;
  paint-order: stroke; stroke: #fdfaf2; stroke-width: 0.6; stroke-linejoin: round;
  opacity: .95;
}

/* story overlay */
.story-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in oklab, var(--ink) 78%, transparent);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.story-overlay.open { opacity: 1; pointer-events: auto; }
.story {
  width: min(960px, 92vw); max-height: 88vh; overflow: auto;
  background: var(--paper); color: var(--ink);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--sh-3);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.5s var(--ease);
}
.story-overlay.open .story { transform: none; }
.story-head { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.story-head .close {
  width: 44px; height: 44px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 20px;
  border: 0; cursor: pointer;
}
.story .glyph-big {
  font-family: var(--f-disp); font-size: clamp(80px, 12vw, 160px);
  line-height: 0.8; color: var(--amber); font-weight: 800;
  letter-spacing: -0.04em;
  margin: 12px 0 -8px;
}
.story h2 { font-size: clamp(36px, 4vw, 56px); }
.story .step { display: none; padding-top: 24px; }
.story .step.active { display: block; animation: fadein 0.5s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.story p { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin-top: 14px; max-width: 60ch; }
.story .step ul { display: grid; gap: 12px; margin-top: 18px; }
.story .step li { padding-left: 36px; position: relative; font-size: 17px; }
.story .step li::before { content: attr(data-n); position: absolute; left: 0; top: 0; font-family: var(--f-disp); font-weight: 800; color: var(--amber); }
.story .nav { margin-top: 28px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.story .dots { display: flex; gap: 6px; }
.story .dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line); transition: all 0.3s; }
.story .dots i.on { background: var(--ink); width: 24px; }

/* ---------------- Video grid ---------------- */
.video-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; } }
.video-card {
  position: relative; aspect-ratio: 16/10;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--ink); color: var(--paper);
  text-decoration: none; cursor: pointer;
  transition: transform 0.4s var(--ease);
}
.video-card:hover { transform: translateY(-3px); }
.video-card .thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.78; transition: opacity 0.4s, transform 0.6s var(--ease); }
.video-card:hover .thumb { opacity: 0.9; transform: scale(1.04); }
.video-card .meta { position: absolute; left: 16px; bottom: 16px; right: 16px; z-index: 2; }
.video-card h3 { font-size: 20px; line-height: 1.1; }
.video-card small { display: block; margin-top: 6px; color: var(--on-ink-mut); font-size: 13px; }
.video-card .play {
  position: absolute; right: 16px; top: 16px; z-index: 2;
  width: 48px; height: 48px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  display: grid; place-items: center; font-size: 18px;
  transition: transform 0.4s var(--ease);
}
.video-card:hover .play { transform: scale(1.1); background: var(--amber); color: #fff; }
.video-card .duration {
  position: absolute; left: 16px; top: 16px; z-index: 2;
  background: color-mix(in oklab, var(--ink) 80%, transparent);
  color: var(--paper); padding: 4px 10px; border-radius: 6px;
  font-family: var(--f-disp); font-size: 12px; font-weight: 700;
}
.video-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(28, 42, 31, 0.85)); z-index: 1; }

.video-modal { position: fixed; inset: 0; z-index: 90; background: color-mix(in oklab, var(--ink) 88%, transparent); display: none; place-items: center; padding: 24px; }
.video-modal.open { display: grid; }
.video-modal .box { width: min(960px, 100%); background: var(--paper); border-radius: var(--r-xl); padding: 24px; position: relative; max-height: 90vh; overflow: auto; }
.video-modal .box .close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: var(--paper); display: grid; place-items: center; border: 0; cursor: pointer; }
.video-modal .frame { aspect-ratio: 16/9; background: var(--ink); border-radius: var(--r-md); display: grid; place-items: center; color: var(--paper); position: relative; overflow: hidden; }
.video-modal .frame .ph { font-family: var(--f-disp); font-size: 64px; opacity: 0.6; }
.video-modal .frame .badge { position: absolute; top: 16px; left: 16px; background: var(--amber); color: #fff; padding: 6px 12px; border-radius: 999px; font-family: var(--f-disp); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---------------- Teachers ---------------- */
.teacher-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  font-family: var(--f-disp); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  cursor: pointer; transition: all 0.3s;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:hover { border-color: var(--ink); }

.kit-card { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
@media (max-width: 760px) { .kit-card { grid-template-columns: 1fr; } }
.kit-card .meta-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.kit-card .meta-tags span { padding: 6px 12px; border-radius: 999px; background: var(--moss-soft); color: var(--moss); font-family: var(--f-disp); font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.kit-card h3 { font-size: clamp(26px, 2.4vw, 36px); margin-bottom: 10px; }
.kit-card p { color: var(--muted); }
.kit-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.kit-files b { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-family: var(--f-disp); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }

.empty-state {
  background: var(--paper-2); border: 1px dashed var(--line); border-radius: var(--r-lg);
  padding: 40px; text-align: center; color: var(--muted);
}
.empty-state h3 { color: var(--ink); font-size: 24px; margin-bottom: 8px; }

/* ---------------- Species: fact strip + source mark ----------------
   Идея из рабочей сборки DEMO: три ключевых факта крупной типографикой
   и явная ссылка на источник под текстом. */
.fact-strip {
  display: grid; gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .fact-strip { grid-template-columns: 1fr; } }
.fact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  display: grid; gap: 7px; align-content: start;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.fact:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--ink); }
.fact small {
  font-family: var(--f-disp); font-size: 11px; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--amber-2);
}
.fact b {
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(26px, 2.6vw, 38px); line-height: 1.03;
  color: var(--ink); letter-spacing: -.02em;
}
.fact p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.source-mark {
  margin-top: 22px; padding: 14px 18px;
  border-left: 3px solid var(--moss);
  background: color-mix(in oklab, var(--moss) 7%, transparent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13px; line-height: 1.55; color: var(--muted);
  max-width: 74ch;
}
.source-mark b { color: var(--ink); font-weight: 700; }
.source-mark.on-ink {
  background: color-mix(in oklab, var(--paper) 9%, transparent);
  border-left-color: var(--amber);
  color: var(--on-ink-mut);
}
.source-mark.on-ink b { color: var(--paper); }

/* recognition list (страница вида) */
.recognition-list {
  display: grid; gap: 0; list-style: none; padding: 0; margin: 0;
  counter-reset: rec;
}
.recognition-list li {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px;
  align-items: start; padding: 15px 0;
  border-top: 1px solid var(--line);
}
.recognition-list li:first-child { border-top: 0; padding-top: 4px; }
.recognition-list li b {
  font-family: var(--f-disp); font-weight: 800; font-size: 17px;
  color: var(--amber-2); line-height: 1.35;
}
.recognition-list li span { font-size: 15.5px; line-height: 1.55; }

/* ---------------- About ---------------- */
.about-hero { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: end; }
@media (max-width: 880px) { .about-hero { grid-template-columns: 1fr; } }
.timeline { position: relative; display: grid; gap: 20px; }
.timeline::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-item { display: grid; grid-template-columns: 36px 1fr; gap: 20px; position: relative; }
.tl-item i { width: 36px; height: 36px; border-radius: 999px; background: var(--paper); border: 3px solid var(--ink); display: grid; place-items: center; font-family: var(--f-disp); font-weight: 800; font-size: 12px; z-index: 1; }
.tl-item.active i { background: var(--amber); border-color: var(--amber); color: #fff; }
.tl-item h3 { font-size: 22px; margin-bottom: 4px; }
.tl-item small { display: block; color: var(--muted); font-family: var(--f-disp); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.tl-item p { color: var(--ink-2); }

.team-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.team-grid > * { min-width: 0; }
@media (max-width: 780px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.team-card h4 { font-size: 22px; overflow-wrap: break-word; }
.team-card small { color: var(--amber-2); font-family: var(--f-disp); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.team-card p { color: var(--muted); font-size: 14px; margin-top: 10px; }

.partners { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .partners { grid-template-columns: 1fr; } }
.partner { padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); display: grid; gap: 6px; }
.partner b { font-size: 17px; }
.partner small { color: var(--muted); }

/* ---------------- Book reader ---------------- */
.book-wrap { display: grid; gap: 24px; grid-template-columns: 280px 1fr; }
/* min-width:0 обязателен: иначе «широкий» разворот книги (width:100%)
   отдаёт свою натуральную ширину как min-content и раздувает колонку */
.book-wrap > * { min-width: 0; }
@media (max-width: 900px) {
  .book-wrap { grid-template-columns: 1fr; }
  /* на мобильном сначала сам читальный зал, потом длинное содержание */
  .book-stage { order: -1; }
}
.book-toc { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; height: fit-content; }
.book-toc h4 { font-size: 18px; margin-bottom: 12px; }
.book-toc a { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.book-toc a:last-of-type { border-bottom: 0; }
.book-toc a:hover { color: var(--amber-2); }
.book-stage { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.book-page { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); min-height: 480px; padding: 40px; position: relative; }
.book-page h2 { font-size: clamp(40px, 5vw, 64px); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tool { padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--paper); font-family: var(--f-disp); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; cursor: pointer; }
.tool[aria-pressed="true"] { background: var(--amber); }
.book-canvas { position: relative; }
.book-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.book-canvas.tool-on canvas { pointer-events: auto; cursor: crosshair; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--ink); color: var(--on-ink); padding: 72px 0 24px; margin-top: 64px; }
.site-footer a { color: var(--on-ink); }
.site-footer .grid { display: grid; gap: 40px; grid-template-columns: 1.4fr repeat(3, 1fr); }
@media (max-width: 800px) { .site-footer .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-footer .grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--f-disp); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.site-footer ul li { padding: 6px 0; }
.site-footer ul a:hover { color: var(--amber); }
.site-footer .legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; justify-content: space-between; gap: 16px; color: var(--on-ink-mut); font-size: 13px; flex-wrap: wrap; }
.site-footer .legal .admin-link a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(245, 238, 219, 0.22);
  color: var(--on-ink-mut);
  font-family: var(--f-disp); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  transition: background .3s, color .3s, border-color .3s;
}
.site-footer .legal .admin-link a:hover {
  background: var(--amber); border-color: var(--amber); color: #fff;
}
.site-footer .legal .admin-link a span { transition: transform .3s var(--ease); }
.site-footer .legal .admin-link a:hover span { transform: translate(2px, -2px); }

/* utility */
.row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.stack-sm { display: grid; gap: 8px; }
.stack { display: grid; gap: 24px; }
.center { text-align: center; }
.spacer-sm { height: 24px; }
.spacer { height: 64px; }

/* scroll progress indicator */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 100;
  background: var(--amber);
  width: 0%; transition: width .1s linear;
}

/* page transition */
body { transition: opacity .4s ease; }

/* species card image cover */
.species-card .glyph { position: relative; }
.species-card .glyph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.species-card .glyph img ~ .glyph-letter {
  position: absolute; bottom: 4px; right: 6px;
  font-size: 28px; text-shadow: 2px 2px 4px rgba(0,0,0,.5);
  color: var(--paper);
}

/* hover lift for video cards on home */
.video-card { will-change: transform; }
.video-card .play {
  transition: transform .4s var(--ease), background .3s, color .3s;
}
.video-card:hover .play {
  transform: scale(1.15) rotate(8deg);
}

/* ---------------- Adaptivity safety net ----------------
   Инлайновые grid-раскладки в разметке не знают о медиазапросах,
   поэтому на узких экранах принудительно выстраиваем их в одну колонку.
   Исключаем hero-grid, который имеет свой брейкпоинт. */
@media (max-width: 820px) {
  .scenarios,
  [style*="grid-template-columns"]:not(.hero-grid):not([class*="hero"]) {
    grid-template-columns: 1fr !important;
  }
  .scenarios > *,
  [style*="grid-template-columns"]:not(.hero-grid):not([class*="hero"]) > * {
    min-width: 0;
  }
}
@media (max-width: 560px) {
  .hero-cta .btn, .row .btn { flex: 1 1 100%; justify-content: center; }
  .site-footer .legal { flex-direction: column; gap: 8px; }
}

/* ================================================================
   РАСШИРЕНИЕ ДИЗАЙН-СИСТЕМЫ (v2)
   Лента алфавита со счётчиками, витрина видов, территории,
   светлая карта в языке рабочей сборки DEMO, книжные врезки.
   ================================================================ */

/* ---------------- Лента алфавита А–Я со счётчиками ----------------
   Показывает количество букв и распределение видов по буквам.
   Числа приходят из AZ.counts, в разметке не хардкодятся. */
.alpha-strip {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--paper);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--sh-1);
}
.alpha-strip-head {
  display: flex; flex-wrap: wrap; gap: 20px 36px;
  align-items: flex-end; justify-content: space-between;
  padding-bottom: 22px; border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.alpha-strip-head .eyebrow { display: block; margin-bottom: 10px; }
.alpha-tally { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 44px); }
.alpha-tally > div { display: grid; gap: 4px; }
.alpha-tally b {
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(30px, 3.4vw, 54px); line-height: 1;
  color: var(--ink); letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.alpha-tally b em { font-style: normal; color: var(--amber); }
.alpha-tally small {
  font-family: var(--f-disp); font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.alpha-strip-note {
  font-size: 14px; line-height: 1.55; color: var(--muted);
  max-width: 46ch;
}
.alpha-strip-note b { color: var(--ink); font-weight: 700; }

.alpha-strip-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(14, minmax(0, 1fr));
}
@media (max-width: 1180px) { .alpha-strip-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .alpha-strip-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .alpha-strip-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.alpha-tile {
  position: relative; display: grid; place-items: center;
  aspect-ratio: 1 / 1.14; min-height: 46px;
  border-radius: 13px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(20px, 1.9vw, 28px); line-height: 1;
  text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
  animation: letter-pop .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}
.alpha-tile:hover { transform: translateY(-3px) scale(1.04); box-shadow: var(--sh-2); background: var(--ink); color: var(--paper); }
.alpha-tile .img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .45s var(--ease);
}
.alpha-tile:hover .img { opacity: .42; }
.alpha-tile span { position: relative; z-index: 1; }
.alpha-tile .n {
  position: absolute; right: 5px; top: 5px; z-index: 2;
  min-width: 19px; height: 19px; padding: 0 4px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--ink) 82%, transparent);
  color: var(--paper);
  font-family: var(--f-disp); font-size: 11px; font-weight: 800;
  display: grid; place-items: center; line-height: 1;
}
.alpha-tile[data-count="2"] .n { background: var(--amber); }
.alpha-tile.is-active,
.alpha-tile[aria-current="page"] { background: var(--ink); color: var(--paper); }
.alpha-tile.is-active .n { background: var(--amber); }

/* ---------------- Витрина видов (главная) ---------------- */
.showcase {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1000px) { .showcase { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.showcase .sp {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--ink); color: var(--paper);
  aspect-ratio: 3 / 4; min-height: 230px;
  text-decoration: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.showcase .sp:hover { transform: translateY(-5px); box-shadow: var(--sh-3); }
.showcase .sp img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .92;
  transition: transform .9s var(--ease), opacity .4s;
}
.showcase .sp:hover img { transform: scale(1.06); opacity: 1; }
.showcase .sp::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(28, 42, 31, .9));
}
.showcase .sp .ltr {
  position: absolute; left: 14px; top: 8px; z-index: 2;
  font-family: var(--f-disp); font-weight: 800; font-size: 52px; line-height: 1;
  color: var(--paper); text-shadow: 2px 3px 0 rgba(28, 42, 31, .5);
  opacity: .95;
}
.showcase .sp .txt { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2; }
.showcase .sp h3 { font-size: 20px; line-height: 1.08; }
.showcase .sp small { display: block; margin-top: 6px; color: var(--on-ink-mut); font-size: 12px; letter-spacing: .02em; }
.showcase .sp .zone {
  display: inline-block; margin-bottom: 8px;
  padding: 4px 9px; border-radius: 999px;
  background: color-mix(in oklab, var(--paper) 20%, transparent);
  font-family: var(--f-disp); font-size: 10px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
}
.showcase .sp--feature { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; min-height: 340px; }
@media (max-width: 1000px) { .showcase .sp--feature { grid-column: span 2; grid-row: span 1; min-height: 300px; } }
@media (max-width: 700px)  { .showcase .sp--feature { grid-column: span 2; } }
.showcase .sp--feature h3 { font-size: clamp(28px, 3vw, 40px); }
.showcase .sp--feature p { margin-top: 10px; color: rgba(255, 255, 255, .82); font-size: 14px; line-height: 1.5; max-width: 40ch; }

/* ---------------- Территории / зоны карты ---------------- */
.zones-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1000px) { .zones-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .zones-grid { grid-template-columns: 1fr; } }
.zone-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 20px;
  min-height: 168px;
  display: flex; flex-direction: column; justify-content: space-between;
  text-decoration: none; color: inherit;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.zone-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--ink); }
.zone-card .zf {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: .16; transition: opacity .5s var(--ease), transform .9s var(--ease);
}
.zone-card:hover .zf { opacity: .26; transform: scale(1.05); }
.zone-card > * { position: relative; z-index: 1; }
.zone-card .zi {
  font-family: var(--f-disp); font-size: 11px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--amber-2);
}
.zone-card h3 { font-size: clamp(24px, 2.2vw, 32px); margin-top: 10px; }
.zone-card .zn {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--f-disp); font-size: 13px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.zone-card .zn b { font-size: 26px; color: var(--ink); letter-spacing: -.02em; }
.zone-card .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* ---------------- Светлая карта в языке DEMO ----------------
   Органические слои, вода и топографическая текстура — визуальный
   приём из рабочей сборки. Подложка согласована с зонами: зелень
   на севере (лесополоса), тёплое поле на востоке (степь), вода на
   западе и юго-западе (лиман, Сиваш). Сами зоны и маркеры рисует
   AZ_UI.drawMap — их формы выводятся из координат маркеров. */
.map-shell {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: #e9eee0;
}
.map-stage { position: relative; }
.geo {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(158deg, #eef2e5 0%, #e7ecdb 42%, #f1e8d2 100%);
}
/* степь — тёплое поле на востоке */
.geo::before {
  content: ""; position: absolute; width: 66%; height: 82%; right: -16%; top: 12%;
  background: radial-gradient(ellipse at 44% 52%, rgba(205, 180, 116, .55), rgba(205, 180, 116, 0) 71%);
  border-radius: 50%;
}
/* лесополоса — зелёная полоса вдоль северной кромки */
.geo::after {
  content: ""; position: absolute; width: 88%; height: 30%; left: 1%; top: -8%;
  background: radial-gradient(ellipse at 50% 55%, rgba(124, 152, 88, .50), rgba(124, 152, 88, 0) 72%);
  border-radius: 50%;
}
/* вода — лиман на западе и лагуна Сиваша на юго-западе */
.geo-water {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 19% 18% at 12% 52%, rgba(88, 130, 178, .30), rgba(88, 130, 178, 0) 74%),
    radial-gradient(ellipse 16% 14% at 12% 86%, rgba(66, 106, 156, .34), rgba(66, 106, 156, 0) 74%);
}
.geo-topo {
  position: absolute; inset: 0; opacity: .13; pointer-events: none;
  background: repeating-radial-gradient(ellipse at 64% 58%, transparent 0 30px, rgba(28, 42, 31, .26) 31px 32px, transparent 33px 46px);
  mix-blend-mode: multiply; transform: scale(1.16);
}
.map-stage .map-canvas { position: relative; z-index: 2; }
/* заголовок-водяной знак: имя заповедника, а не название зоны */
.geo-title {
  position: absolute; z-index: 1; right: 4.5%; top: 5.5%; pointer-events: none;
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(11px, 1.05vw, 14px); letter-spacing: .22em; text-transform: uppercase;
  color: rgba(28, 42, 31, .30); text-align: right; line-height: 1.35;
}
.geo-title small {
  display: block; font-size: .74em; letter-spacing: .13em;
  font-weight: 700; color: rgba(28, 42, 31, .22);
}

.map-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  background: color-mix(in oklab, var(--paper) 93%, transparent);
  border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent);
  color: var(--ink);
  font-family: var(--f-disp); font-size: 12px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  box-shadow: 0 6px 16px -12px rgba(28, 42, 31, .6);
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.map-pill[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.map-pill:hover { transform: translateY(-1px); border-color: var(--ink); }
.map-pill .cnt {
  font-size: 10px; opacity: .62; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.map-legend { position: absolute; left: 16px; bottom: 16px; z-index: 4; display: flex; gap: 10px; flex-wrap: wrap; }
.map-legend span {
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  color: var(--ink);
  border: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  border-radius: 999px; padding: 8px 14px;
  font-family: var(--f-disp); font-size: 11px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
}
.map-legend span i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }

/* На узком экране панель фильтров и легенда не должны съедать карту:
   уменьшаем плашки, чтобы они укладывались в две строки вместо трёх. */
@media (max-width: 760px) {
  .map-toolbar { gap: 6px; }
  .map-pill { padding: 7px 11px; font-size: 11px; letter-spacing: .03em; gap: 6px; }
  .map-pill .cnt { font-size: 9px; }
  .map-legend { gap: 7px; }
  .map-legend span { padding: 6px 11px; font-size: 10px; }
}

/* --- Инструменты карты: поиск + масштаб (ТЗ §6) --- */
.map-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.map-search { position: relative; flex: 1 1 240px; min-width: 200px; }
.map-search-input {
  width: 100%; box-sizing: border-box; padding: 9px 14px; border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--ink) 16%, transparent);
  background: color-mix(in oklab, var(--paper) 96%, transparent);
  font-family: var(--f-disp); font-size: 13px; font-weight: 700; color: var(--ink);
}
.map-search-input:focus { outline: 2px solid var(--amber); outline-offset: 1px; }
.map-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--paper); border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent);
  border-radius: var(--r-md); box-shadow: 0 18px 40px -20px rgba(28, 42, 31, .5);
  max-height: 320px; overflow-y: auto;
}
.map-search-item, .map-search-empty {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  padding: 10px 14px; background: none; color: var(--ink); font-family: var(--f-base);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
}
.map-search-item:hover, .map-search-item:focus { background: color-mix(in oklab, var(--amber) 16%, var(--paper)); outline: none; }
.map-search-item b { display: block; font-family: var(--f-disp); font-size: 14px; }
.map-search-item small { color: var(--muted); font-size: 12px; }
.map-search-empty { color: var(--muted); font-size: 13px; cursor: default; }
.map-zoom { display: inline-flex; gap: 6px; }
.map-zoom-btn {
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--ink) 14%, transparent);
  background: color-mix(in oklab, var(--paper) 96%, transparent);
  color: var(--ink); font-size: 18px; font-weight: 800; line-height: 1;
  display: grid; place-items: center; transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.map-zoom-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.map-zoom-btn:active { transform: scale(.92); }
.map-zoom-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Маркеры: перетаскивание/курсор, фокус с клавиатуры и подсветка совпадения (ТЗ §15) */
.map-canvas { cursor: grab; touch-action: pan-y; }
.map-canvas:active { cursor: grabbing; }
.map-shell--full .map-canvas { touch-action: none; }
.map-canvas .mk:focus { outline: none; }
.map-canvas .mk:focus .mk-dot { stroke: var(--amber); stroke-width: 0.7; }
.map-canvas .mk:focus .mk-halo { opacity: .42; }
.map-canvas .mk-hit .mk-halo { opacity: .55; }
.map-canvas .mk-hit .mk-dot { stroke: #fff; stroke-width: 0.4; }


/* ---------------- Книжные врезки и плашки изображений ---------------- */
.plate {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--paper-2);
  margin: 0;
}
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plate figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 18px;
  background: linear-gradient(transparent, rgba(28, 42, 31, .86));
  color: var(--paper); font-size: 13px; line-height: 1.45;
}
.plate figcaption b { display: block; font-family: var(--f-disp); font-size: 15px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.plate.plain figcaption { position: static; background: none; color: var(--muted); border-top: 1px solid var(--line); }
.plate.plain figcaption b { color: var(--ink); }

.split {
  display: grid; gap: clamp(24px, 3.5vw, 52px);
  grid-template-columns: 1fr 1fr; align-items: center;
}
.split.wide-right { grid-template-columns: 0.85fr 1.15fr; }
.split.wide-left  { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 900px) { .split, .split.wide-right, .split.wide-left { grid-template-columns: 1fr; } }

.plate-stack { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .plate-stack { grid-template-columns: 1fr; } }
.plate-stack .plate:first-child { grid-column: 1 / -1; }

/* лента-галерея разворотов книги */
.spread-row {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 860px) { .spread-row { grid-template-columns: 1fr; } }

/* ---------------- Полоса-акцент ---------------- */
.band-quote {
  display: grid; gap: clamp(24px, 3vw, 48px);
  grid-template-columns: 1.15fr 0.85fr; align-items: center;
}
@media (max-width: 900px) { .band-quote { grid-template-columns: 1fr; } }
.band-quote blockquote {
  margin: 0;
  font-family: var(--f-disp); font-weight: 800;
  font-size: clamp(24px, 2.8vw, 40px); line-height: 1.12;
  letter-spacing: -.02em;
}
.band-quote cite { display: block; margin-top: 16px; font-style: normal; font-size: 14px; color: var(--muted); }

/* ---------------- Доступность: уважаем reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  .ribbon-track { animation: none; }
  .ribbon { opacity: 1; transform: none; }
  .alpha-tile { animation: none; }
  .hero-art .cover { animation: none; }
  .alpha-key { animation: none; }
  .video-card:hover .play { transform: none; }
}

.field { display: grid; gap: 6px; }
.field label { font-family: var(--f-disp); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--amber); outline-offset: 2px; }
