/* Издательский дом «Волга» — прототип главной.
   Палитра: бумага с холодным речным оттенком, глубокий волжский синий, фирменный синий афиш как акцент. */
:root {
  --paper: #f3f4f1;
  --paper-2: #e8ebe7;
  --ink: #0f2230;
  --ink-2: #4a5966;
  --line: rgba(15, 34, 48, .14);
  --accent: #1f5fae;
  --accent-2: #d7e5f4;
  --night: #0b1826;
  --night-2: #12263a;
  --on-night: #eef2f4;
  --on-night-2: #a9b8c4;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pad: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --r: 14px;
  --head: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
.shelf { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- кнопки и типографика ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; font: 500 15px/1 var(--sans); text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-light { background: var(--on-night); color: var(--night); }
.btn-light:hover { background: #fff; }
.btn-ghost { border-color: rgba(238, 242, 244, .5); color: var(--on-night); background: rgba(11, 24, 38, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--on-night); background: rgba(11, 24, 38, .35); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--accent); }
.link { color: var(--accent); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.h2 { font: 500 clamp(36px, 4.6vw, 68px)/1.02 var(--serif); letter-spacing: -.01em; margin: 0 0 .35em; text-wrap: balance; }
.h2-light { color: var(--on-night); }
.lede { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 46ch; margin: 0 0 1.5em; }

/* ---------- шапка ---------- */
.top { position: fixed; z-index: 50; inset: 0 0 auto 0; height: calc(var(--head) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--pad) 0; display: flex; align-items: center; gap: 28px; color: var(--on-night); transition: background .4s, color .4s, box-shadow .4s, transform .5s var(--ease); }
.top.solid { background: rgba(243, 244, 241, .9); color: var(--ink); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.top.hide { transform: translateY(-100%); }
.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand-word { font: 500 26px/1 var(--sans); letter-spacing: .2em; }
.brand-sub { font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; opacity: .75; margin-top: 4px; color: inherit; }
.top.solid .brand-sub { color: var(--accent); opacity: 1; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 14.5px; opacity: .85; position: relative; padding: 6px 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease); }
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.next-chip { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 13.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(238, 242, 244, .35); white-space: nowrap; transition: border-color .3s; }
.top.solid .next-chip { border-color: var(--line); }
.next-chip b { font-weight: 600; }
.next-chip i { font-style: normal; color: var(--on-night-2); }
.top.solid .next-chip i { color: var(--accent); }
.cart { position: relative; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.cart svg { width: 24px; height: 24px; }
.cart-n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; transform: scale(0); transition: transform .3s var(--ease); }
.cart-n.on { transform: scale(1); }
.burger { display: none; width: 44px; height: 44px; background: none; border: 0; position: relative; cursor: pointer; }
.burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- герой ---------- */
.hero { position: relative; min-height: 100svh; color: var(--on-night); overflow: hidden; background: var(--night); isolation: isolate; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 24, 38, .55) 0%, rgba(11, 24, 38, .12) 34%, rgba(11, 24, 38, 0) 52%, rgba(11, 24, 38, .5) 82%, rgba(11, 24, 38, .82) 100%), linear-gradient(90deg, rgba(11, 24, 38, .45), rgba(11, 24, 38, 0) 58%); }
.hero-mask { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; transform-origin: 50% 56%; will-change: transform, opacity; }
.mask-word { font: italic 600 470px/1 var(--serif); letter-spacing: -.02em; }
.mask-fill { fill: var(--paper); }
.hero.revealed .hero-mask { display: none; }
.hero-in { position: relative; z-index: 2; padding: calc(var(--head) + env(safe-area-inset-top, 0px) + clamp(24px, 5vh, 64px)) var(--pad) 0; max-width: 1100px; }
.hero-kicker { font: 500 13px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--on-night-2); margin: 0 0 22px; }
.hero-title { font: 500 clamp(38px, 4.3vw, 70px)/1.04 var(--serif); letter-spacing: -.015em; margin: 0 0 22px; text-wrap: balance; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.06em; }
.hero-title .line > span { display: inline-block; }
.hero-title em { font-style: italic; color: #f6dcb8; }
.hero-sub { font-size: clamp(17px, 1.4vw, 19px); max-width: 46ch; text-shadow: 0 1px 14px rgba(11, 24, 38, .5); margin: 0 0 30px; color: rgba(238, 242, 244, .88); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.route { position: absolute; z-index: 2; left: var(--pad); right: var(--pad); bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
.route-label { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-night-2); }
.route-line { position: relative; height: 64px; }
.route-svg { position: absolute; inset: 14px 0 auto; width: 100%; height: 40px; overflow: visible; }
.route-svg path { fill: none; stroke: rgba(238, 242, 244, .5); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.route-towns { position: absolute; inset: 0; }
.route-town { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; color: var(--on-night); font-size: 14px; padding: 0 4px; white-space: nowrap; }
.route-town::before { content: ''; order: 2; width: 11px; height: 11px; border-radius: 50%; background: var(--night); border: 1.5px solid var(--on-night); transition: transform .3s var(--ease), background .3s; }
.route-town:hover::before { transform: scale(1.4); background: #f6dcb8; }
.route-town span { order: 3; opacity: .9; }

/* ---------- река книг ---------- */
.drift { position: relative; padding: 70px 0 56px; overflow: hidden; background: var(--paper); }
.drift-track { display: flex; gap: 46px; width: max-content; align-items: flex-end; animation: drift 70s linear infinite; padding-left: 46px; }
.drift:hover .drift-track { animation-play-state: paused; }
.drift-book { height: 210px; flex: none; text-decoration: none; animation: bob 5.5s ease-in-out infinite; animation-delay: calc(var(--i) * -0.7s); transition: transform .4s var(--ease); }
.drift-book img { height: 100%; width: auto; filter: drop-shadow(0 18px 18px rgba(15, 34, 48, .22)); transition: transform .45s var(--ease); }
.drift-book:hover img { transform: translateY(-14px) rotate(-1.5deg); }
.drift-cap { text-align: center; margin: 34px var(--pad) 0; font: italic 500 clamp(22px, 2vw, 28px)/1.3 var(--serif); color: var(--ink-2); }
@keyframes drift { to { transform: translateX(-50%); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }

/* ---------- полка: карта и листалка ---------- */
.shelf { display: grid; grid-template-columns: minmax(280px, 0.9fr) 2fr; gap: clamp(24px, 4vw, 72px); padding: clamp(60px, 9vw, 130px) var(--pad); max-width: 1500px; margin: 0 auto; }
.shelf-map { position: sticky; top: calc(var(--head) + 24px); align-self: start; }
.map { position: relative; margin-top: 64px; width: 100%; max-width: 330px; aspect-ratio: 320 / 720; max-height: 68vh; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-river { fill: none; stroke: var(--accent); stroke-width: 3.2; stroke-linecap: round; }
.map-river-glow { fill: none; stroke: var(--accent-2); stroke-width: 22; stroke-linecap: round; opacity: .9; }
.map-boat { fill: var(--accent); stroke: var(--paper); stroke-width: 3; }
.map-towns { position: absolute; inset: 0; }
.town { position: absolute; transform: translate(-50%, -50%); background: none; border: 0; cursor: pointer; padding: 6px; display: flex; align-items: center; gap: 10px; font: 500 15px/1 var(--sans); color: var(--ink-2); white-space: nowrap; transition: color .3s; }
.town::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); flex: none; transition: transform .3s var(--ease), background .3s, border-color .3s; }
.town.l { flex-direction: row; transform: translate(-6px, -50%); }
.town.r { flex-direction: row-reverse; transform: translate(calc(-100% + 6px), -50%); }
.town:hover { color: var(--ink); }
.town:hover::before { transform: scale(1.25); }
.town[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.town[aria-selected="true"]::before { background: var(--accent); border-color: var(--accent); transform: scale(1.35); box-shadow: 0 0 0 6px var(--accent-2); }
.town.far::before { border-style: dashed; }
.town.river-all { left: 50% !important; top: -2% !important; transform: translate(-50%, -100%); flex-direction: column-reverse; gap: 6px; font-family: var(--serif); font-style: italic; font-size: 19px; }
.chips { display: none; }
.shelf-book { min-width: 0; }
.book-head { min-height: 140px; }
.book-note { margin: 0 0 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.book-title { font: 500 clamp(30px, 3.4vw, 50px)/1.05 var(--serif); margin: 0 0 10px; text-wrap: balance; }
.book-meta { margin: 0; color: var(--ink-2); font-size: 15px; }
.flip { margin-top: 10px; }
.flip-stage { position: relative; display: grid; place-items: center; min-height: min(70svh, 700px); perspective: 2200px; outline: none; touch-action: pan-y; padding-block: 28px; }
.flip-holder { position: relative; z-index: 1; width: 100%; transform-style: preserve-3d; }
.flip-holder .stf__parent { margin: 0 auto; }
.flip-holder > .flip-pages { position: relative; z-index: 2; }
.book-case, .book-edge { position: absolute; z-index: 0; pointer-events: none; transition: left .75s var(--ease), top .75s var(--ease), width .75s var(--ease), height .75s var(--ease), opacity .5s; }
.flip-holder:not(.fitted) .book-case, .flip-holder:not(.fitted) .book-edge { opacity: 0 !important; }
.flip-holder.instant .book-case, .flip-holder.instant .book-edge, .flip-holder.instant .book-spine { transition: none !important; }
.book-case { border-radius: 4px; background: var(--case, #333); box-shadow: 0 46px 70px -30px rgba(15, 34, 48, .55), 0 14px 26px -10px rgba(15, 34, 48, .3); }
.book-case::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 1px, transparent 1px 3px), repeating-linear-gradient(-45deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px), linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.12)); }
.book-case::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12); }
.book-spine { position: absolute; top: 0; bottom: 0; left: 50%; width: 4%; transform: translateX(-50%); transition: opacity .4s; background: linear-gradient(90deg, rgba(0,0,0,.42), rgba(0,0,0,.08) 35%, rgba(255,255,255,.06) 50%, rgba(0,0,0,.08) 65%, rgba(0,0,0,.42)); }
.book-edge { z-index: 1; box-shadow: 0 1px 2px rgba(15, 34, 48, .18); }
.book-edge.side { background: repeating-linear-gradient(90deg, #fbfaf6 0 1px, #dad6cd 1px 2px); }
.book-edge.bottom { background: repeating-linear-gradient(180deg, #fbfaf6 0 1px, #d6d2c8 1px 2px); }
.flip-static { display: grid; place-items: center; }
.flip-static img { max-height: min(60svh, 560px); width: auto; filter: drop-shadow(0 30px 30px rgba(15, 34, 48, .3)); }
.flip-static p { margin: 18px 0 0; color: var(--ink-2); font-size: 14px; text-align: center; }
.flip-hint { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s; background: rgba(11, 24, 38, .5); color: #fff; text-align: center; font-size: 15px; border-radius: var(--r); }
.flip-hint.on { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .flip-hint { display: none; } }
.flip-bar { display: flex; align-items: center; justify-content: center; gap: 18px; }
.flip-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 18px; transition: background .25s, border-color .25s; }
.flip-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.flip-btn:disabled { opacity: .3; cursor: default; }
.flip-count { min-width: 200px; text-align: center; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.book-buy { margin-top: 26px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px 40px; align-items: start; }
.book-text { margin: 0; color: var(--ink-2); max-width: 52ch; }
.buy-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-self: end; }
.price { font: 500 34px/1 var(--serif); }
.also { grid-column: 1 / -1; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.also:empty { display: none; }
.also span { font-size: 13px; color: var(--ink-2); margin-right: 4px; }
.also button { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 16px 6px 6px; cursor: pointer; font-size: 14px; transition: border-color .25s, background .25s; text-align: left; }
.also button img { height: 40px; width: auto; border-radius: 3px; }
.also button[aria-pressed="true"] { border-color: var(--ink); background: var(--paper-2); }
.also button:hover { border-color: var(--ink); }

/* ---------- манифест ---------- */
.manifest { padding: clamp(80px, 12vw, 180px) var(--pad); max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); }
.manifest-text { font: 500 clamp(30px, 3.9vw, 58px)/1.18 var(--serif); margin: 0 0 clamp(50px, 7vw, 100px); text-wrap: pretty; }
.manifest-text .w { opacity: .16; transition: opacity .2s; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; }
.facts div { padding-top: 18px; border-top: 1px solid var(--ink); }
.facts dt { font: 500 clamp(40px, 4.4vw, 64px)/1 var(--serif); margin-bottom: 10px; }
.facts dd { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 22ch; }

/* ---------- пространство: горизонтальная прогулка ---------- */
.space { background: var(--night); color: var(--on-night); }
.space-pin { height: 100svh; overflow: hidden; display: flex; align-items: center; }
.space-track { display: flex; gap: clamp(20px, 2.4vw, 40px); padding: 0 var(--pad); align-items: center; height: 100%; width: max-content; will-change: transform; }
.panel { margin: 0; flex: none; width: clamp(280px, 28vw, 440px); }
.panel-wide { width: clamp(320px, 44vw, 720px); }
.panel-tall .ph { aspect-ratio: 3 / 4; }
.panel-intro { width: clamp(300px, 34vw, 520px); padding-right: 3vw; }
.panel-intro p { color: var(--on-night-2); font-size: 18px; max-width: 40ch; margin: 0 0 28px; }
.ph { position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 3; background: var(--night-2); }
.ph img { position: absolute; inset: -4% -8%; width: 116%; height: 108%; max-width: none; object-fit: cover; will-change: transform; }
.panel figcaption { margin-top: 16px; color: var(--on-night-2); font-size: 15px; max-width: 42ch; }
.panel figcaption b { display: block; color: var(--on-night); font: 500 25px/1.15 var(--serif); margin-bottom: 4px; }

/* ---------- афиша: билеты ---------- */
.afisha { background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%); color: var(--on-night); padding: clamp(70px, 10vw, 140px) var(--pad); }
.afisha-in { max-width: 1320px; margin: 0 auto; }
.tickets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin: 36px 0 70px; }
.ticket { position: relative; display: grid; grid-template-columns: 150px 1fr; min-height: 230px; color: var(--ink); filter: drop-shadow(0 26px 34px rgba(0, 0, 0, .35)); transition: transform .5s var(--ease); }
.ticket:hover { transform: translateY(-6px) rotate(-.4deg); }
.t-stub { background: var(--accent-2); border-radius: var(--r) 0 0 var(--r); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; text-align: center; -webkit-mask: radial-gradient(circle 12px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 12px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; mask: radial-gradient(circle 12px at 100% 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 12px at 100% 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; transition: transform .6s var(--ease); transform-origin: 100% 50%; }
.ticket:hover .t-stub { transform: rotate(-4deg) translateX(-6px); }
.t-day { font: 500 72px/0.9 var(--serif); color: var(--accent); }
.t-mon { font-size: 14px; text-transform: uppercase; letter-spacing: .14em; margin-top: 8px; }
.t-wd { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.t-body { background: var(--paper); border-radius: 0 var(--r) var(--r) 0; padding: 24px 28px; display: flex; flex-direction: column; border-left: 2px dashed rgba(15, 34, 48, .25); -webkit-mask: radial-gradient(circle 12px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 12px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; mask: radial-gradient(circle 12px at 0 0, #0000 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 12px at 0 100%, #0000 98%, #000) bottom / 100% 51% no-repeat; }
.t-kind { font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.t-who { font-size: 16px; margin: 10px 0 2px; color: var(--ink-2); }
.t-title { font: 500 30px/1.08 var(--serif); margin: 0 0 18px; text-wrap: balance; }
.t-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.t-row .btn { min-height: 42px; padding: 0 18px; font-size: 14px; }
.afisha-foot { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 100px); border-top: 1px solid rgba(238, 242, 244, .16); padding-top: 40px; }
.afisha-foot h3 { font: 500 26px/1.1 var(--serif); margin: 0 0 18px; }
.past ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.past li { break-inside: avoid; padding: 0 0 14px; color: var(--on-night-2); font-size: 14.5px; }
.past li b { display: block; color: var(--on-night); font-weight: 500; }
.past time { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: #f6dcb8; }
.formats p { color: var(--on-night-2); max-width: 46ch; margin: 0 0 24px; }
.subs { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- сувениры ---------- */
.souv { padding: clamp(70px, 10vw, 140px) var(--pad); max-width: 1500px; margin: 0 auto; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, minmax(300px, 28vw)); gap: 16px; }
.cell { margin: 0; border-radius: var(--r); overflow: hidden; position: relative; background: #1b3a46; }
.cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.cell:hover img { transform: scale(1.04); }
.cell figcaption { position: absolute; left: 16px; bottom: 14px; right: 16px; color: #f2f4f2; font-size: 14.5px; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease); }
.cell:hover figcaption, .cell:focus-within figcaption { opacity: 1; transform: none; }
.cell-text { background: var(--paper-2); padding: clamp(24px, 2.6vw, 40px); display: flex; flex-direction: column; justify-content: space-between; grid-column: span 2; }
.cell-text .h2 { font-size: clamp(30px, 2.9vw, 46px); }
.cell-text .btn { align-self: flex-start; }
.cell-text p { color: var(--ink-2); margin: 0 0 26px; max-width: 40ch; }
.cell-a { grid-column: span 2; }
.cell-b { grid-column: span 2; }
.cell-c { grid-column: span 2; }
.cell-d { grid-column: span 2; }
.cell-e { grid-column: span 2; }
.tilt { transform-style: preserve-3d; transition: transform .5s var(--ease); }

/* ---------- издать книгу ---------- */
.publish { padding: clamp(70px, 10vw, 140px) var(--pad); max-width: 1320px; margin: 0 auto; border-top: 1px solid var(--line); }
.publish-head { max-width: 760px; margin-bottom: 40px; }
.stack { position: relative; }
.card-s { position: sticky; top: calc(var(--head) + 30px); display: grid; grid-template-columns: 1.3fr 1fr; min-height: min(66svh, 560px); margin-bottom: 30px; border-radius: 22px; overflow: hidden; background: var(--night); color: var(--on-night); box-shadow: 0 30px 60px -30px rgba(15, 34, 48, .5); transform-origin: 50% 0; }
.card-s img { width: 100%; height: 100%; object-fit: cover; }
.card-s-in { padding: clamp(28px, 4vw, 60px); display: flex; flex-direction: column; justify-content: flex-end; }
.card-s h3 { font: 500 clamp(32px, 3.4vw, 50px)/1.05 var(--serif); margin: 0 0 16px; }
.card-s p { color: var(--on-night-2); font-size: 17px; margin: 0; max-width: 36ch; }
.prices { margin: 60px 0; }
.prices h3, .req h3 { font: 500 30px/1.1 var(--serif); margin: 0 0 22px; }
.prices ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.prices li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; display: flex; align-items: baseline; gap: 14px; }
.prices li b { font: 500 26px/1 var(--serif); color: var(--ink); min-width: 4.6em; }
.req { background: var(--paper-2); border-radius: 22px; padding: clamp(24px, 4vw, 56px); }
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.f { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink); }
.f-wide { grid-column: 1 / -1; }
.f input, .f textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid rgba(15, 34, 48, .3); border-radius: 12px; padding: 13px 14px; transition: border-color .25s, box-shadow .25s; }
.f input:focus, .f textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.f textarea::placeholder { color: #69757f; }
.f input[aria-invalid="true"] { border-color: #b3261e; }
.req-err { color: #b3261e; font-size: 14px; margin: 12px 0 0; }
.req-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 22px; }
.req-or { color: var(--ink-2); font-size: 15px; }
.req-ok { margin: 16px 0 0; color: var(--accent); font-size: 15px; }

/* ---------- как найти ---------- */
.visit { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 0; background: var(--paper-2); }
.visit-photo { margin: 0; grid-row: span 2; min-height: 560px; overflow: hidden; }
.visit-photo img { width: 100%; height: 100%; object-fit: cover; }
.visit-info { padding: clamp(40px, 6vw, 90px) var(--pad) 40px; }
.addr { margin: 26px 0 32px; display: grid; gap: 18px; }
.addr div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; }
.addr dt { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); padding-top: 3px; }
.addr dd { margin: 0; font-size: 17px; max-width: 42ch; }
.addr a { text-decoration: none; border-bottom: 1px solid var(--line); }
.visit-map { min-height: 320px; padding: 0 var(--pad) var(--pad); }
.visit-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; border-radius: var(--r); filter: grayscale(.35) contrast(1.02); }

/* ---------- подвал ---------- */
.foot { background: var(--night); color: var(--on-night); padding: 40px var(--pad) calc(30px + env(safe-area-inset-bottom, 0px)); overflow: hidden; }
.foot-word svg { width: 100%; height: auto; display: block; }
.foot-word text { font: italic 600 250px/1 var(--serif); fill: var(--on-night); letter-spacing: -.02em; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; border-top: 1px solid rgba(238, 242, 244, .16); padding-top: 30px; margin-top: 10px; }
.foot-cols b { font-weight: 600; }
.foot-cols p { color: var(--on-night-2); margin: 8px 0 0; }
.foot-cols a { text-decoration: none; border-bottom: 1px solid rgba(238, 242, 244, .25); }
.foot-legal { margin: 34px 0 0; font-size: 13px; color: rgba(169, 184, 196, .7); }

.toast { visibility: hidden; position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 200%); background: var(--ink); color: var(--paper); padding: 14px 20px; border-radius: 999px; font-size: 15px; transition: transform .5s var(--ease); max-width: calc(100vw - 32px); }
.toast.on { transform: translate(-50%, 0); visibility: visible; }

/* ---------- адаптив ---------- */
@media (max-width: 1180px) {
  .nav { gap: 16px; }
  .nav a { font-size: 14px; }
  .next-chip { display: none; }
}
@media (max-width: 980px) {
  .nav { position: fixed; inset: 0; top: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; padding: 0 var(--pad); background: var(--night); color: var(--on-night); transform: translateY(-100%); visibility: hidden; transition: transform .6s var(--ease), visibility 0s .6s; margin: 0; height: 100svh; }
  .nav a { font: 500 40px/1.2 var(--serif); opacity: 1; }
  .nav.open { transform: none; visibility: visible; transition: transform .6s var(--ease), visibility 0s; }
  .burger { display: block; }
  .cart { margin-left: auto; }
  .top.menu { color: var(--on-night); background: transparent; box-shadow: none; backdrop-filter: none; }
  .shelf { grid-template-columns: minmax(0, 1fr); }
  .shelf-map { position: static; min-width: 0; }
  .map { display: none; }
  .chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 8px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 10px 16px; font-size: 15px; cursor: pointer; }
  .chips button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
  .book-buy { grid-template-columns: 1fr; }
  .buy-row { justify-self: start; }
  .facts { grid-template-columns: 1fr 1fr; }
  .tickets { grid-template-columns: 1fr; }
  .afisha-foot { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: minmax(220px, 52vw); }
  .cell-text { grid-column: 1 / -1; }
  .cell-a, .cell-b, .cell-c, .cell-d, .cell-e { grid-column: span 1; }
  .cell-a { grid-column: 1 / -1; }
  .cell figcaption { opacity: 1; transform: none; }
  .card-s { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 0; position: relative; top: 0; }
  .card-s img { aspect-ratio: 3 / 2; height: auto; }
  .prices ul { grid-template-columns: 1fr 1fr; }
  .visit { grid-template-columns: 1fr; }
  .visit-photo { grid-row: auto; min-height: 340px; }
  .foot-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --head: 60px; }
  .brand-word { font-size: 22px; }
  .hero-in { padding-top: calc(var(--head) + env(safe-area-inset-top, 0px) + 24px); }
  .hero-kicker { font-size: 11.5px; }
  .hero-video { object-position: 70% 50%; }
  .route-line { height: auto; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
  .route-line::-webkit-scrollbar { display: none; }
  .route-svg { display: none; }
  .route-towns { position: static; display: flex; gap: 8px; width: max-content; }
  .route-town { position: static; transform: none; flex-direction: row; border: 1px solid rgba(238, 242, 244, .4); border-radius: 999px; padding: 10px 14px; background: rgba(11, 24, 38, .3); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .route-town::before { display: none; }
  .drift-book { height: 150px; }
  .flip-stage { min-height: calc((100vw - 2 * var(--pad)) * 1.45 + 56px); }
  .flip-count { min-width: 0; }
  .ticket { grid-template-columns: 100px 1fr; }
  .t-day { font-size: 52px; }
  .t-title { font-size: 25px; }
  .t-body { padding: 20px; }
  .past ul { columns: 1; }
  .req-grid { grid-template-columns: 1fr; }
  .prices ul { grid-template-columns: 1fr; }
  .addr div { grid-template-columns: 1fr; gap: 4px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: minmax(240px, 86vw); }
  .cell-a, .cell-b, .cell-c, .cell-d, .cell-e { grid-column: 1 / -1; }
  .space-pin { height: auto; overflow: visible; padding: 70px 0; }
  .space-track { flex-direction: column; width: auto; align-items: stretch; height: auto; transform: none !important; }
  .panel, .panel-wide, .panel-intro { width: auto; }
  .panel-tall .ph { aspect-ratio: 4 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .hero-mask { display: none; }
  .manifest-text .w { opacity: 1; }
}
