/* Variant B — Manuscript Void
 * Asymmetric shell, side-rail nav; Outfit + Manrope (clean geometric sans).
 */
:root {
  --void: #05030c;
  /* White ↔ cosmic indigo, nudged toward white for contrast */
  --ink: #f6f3fd;
  --ink-dim: #d0c6ea;
  --violet: #5b2bbd;
  --violet-hot: #9b5cff;
  --gold: #d4af37;
  --gold-soft: #f0d78c;
  --line: rgba(155, 92, 255, 0.28);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-pen: "Marck Script", "Segoe Script", "Apple Chancery", cursive;
  --font-literary: "Cormorant Garamond", "Times New Roman", "Liberation Serif", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.65;
  background: var(--void);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/*
 * Cosmic scrollbars — not a recolor of OS chrome.
 * Shape: hairline rail, floating capsule thumb, no ↑↓ buttons.
 */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.55) transparent;
}

.rail-nav,
.book-modal__dialog {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.55) transparent;
}

/* Kill classic ↑↓ OS chrome everywhere WebKit paints */
*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  border: none !important;
}

*::-webkit-scrollbar-corner {
  background: transparent;
  border: none;
}

html::-webkit-scrollbar,
.rail-nav::-webkit-scrollbar,
.book-modal__dialog::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  background: transparent;
}

html::-webkit-scrollbar-track,
.rail-nav::-webkit-scrollbar-track,
.book-modal__dialog::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
  border: none;
  box-shadow: none;
}

html::-webkit-scrollbar-thumb,
.rail-nav::-webkit-scrollbar-thumb,
.book-modal__dialog::-webkit-scrollbar-thumb {
  background:
    linear-gradient(
      180deg,
      rgba(240, 215, 140, 0.9) 0%,
      rgba(155, 92, 255, 0.75) 100%
    );
  border-radius: 999px;
  border: none;
  min-height: 32px;
  box-shadow:
    0 0 0 1px rgba(240, 215, 140, 0.2),
    0 0 12px rgba(155, 92, 255, 0.4);
}

html::-webkit-scrollbar-thumb:hover,
.rail-nav::-webkit-scrollbar-thumb:hover,
.book-modal__dialog::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(
      180deg,
      #f0d78c 0%,
      #d4af37 50%,
      #9b5cff 100%
    );
  box-shadow:
    0 0 0 1px rgba(240, 215, 140, 0.45),
    0 0 16px rgba(212, 175, 55, 0.5);
}

html::-webkit-scrollbar-button,
.rail-nav::-webkit-scrollbar-button,
.book-modal__dialog::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ===== Splash: comet spiral → bill reveal (video untouched) ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  display: grid;
  place-items: center;
}

.splash-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  perspective: 900px;
  perspective-origin: 50% 45%;
}

.comet {
  position: relative;
  width: min(72vw, 520px);
  aspect-ratio: 2 / 1;
  display: grid;
  place-items: center;
  transform-origin: center center;
  transform-style: preserve-3d;
  will-change: transform, filter;
  opacity: 0;
}

.comet-roll {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
  transform-origin: center center;
  will-change: transform;
  z-index: 2;
}

.comet-glow {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #f0d78c 35%, rgba(155, 92, 255, 0.2) 70%, transparent 100%);
  box-shadow:
    0 0 18px 6px rgba(240, 215, 140, 0.85),
    0 0 48px 16px rgba(155, 92, 255, 0.45);
  opacity: 1;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.35s var(--ease);
}

.comet-roll picture {
  display: contents;
}

.splash-dollar {
  width: 100%;
  height: auto;
  max-width: 520px;
  transform-origin: center center;
  backface-visibility: visible;
  filter: blur(6px) brightness(1.6) saturate(0.35);
  opacity: 0.35;
  will-change: filter, opacity;
}

/* JS drives flight; frozen end-state handled by .is-parked */
body.splash-dollar-frozen .comet-glow {
  opacity: 0;
}

body.splash-dollar-frozen .splash-dollar {
  opacity: 1;
  filter: drop-shadow(0 0 22px rgba(155, 92, 255, 0.4))
    drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

.splash-skip {
  pointer-events: auto;
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  background: transparent;
  border: 1px solid rgba(239, 232, 255, 0.35);
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 200ms var(--ease), border-color 200ms var(--ease);
}

.splash-skip:hover {
  opacity: 1;
  border-color: var(--gold);
  color: var(--gold-soft);
}

body.is-splash {
  overflow: hidden;
}

body.is-splash .shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* no translateY — keeps glyph box stable for park (no jerk) */
}

/* ===== Staged reveal after intro flight (motion) ===== */
body.is-reveal-words .shell,
body.is-reveal-title .shell,
body.is-reveal-lines .shell,
body.is-ready .shell {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity 0.35s var(--ease), visibility 0s;
}

/* Phase 1: only top words */
body.is-reveal-words .rail-nav,
body.is-reveal-words .hero-copy,
body.is-reveal-words .block,
body.is-reveal-words .menu-btn,
body.is-reveal-words .glyph-caption {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.is-reveal-words .hero-glyph {
  opacity: 1;
  visibility: visible;
}

body.is-reveal-words .glyph-ray,
body.is-reveal-words .glyph-ring {
  opacity: 0;
  transform: translate(-50%, -100%) scaleY(0);
}

body.is-reveal-words .glyph-ring {
  transform: scale(0.55);
}

body.is-reveal-words .top-bar {
  opacity: 1;
  visibility: visible;
}

body.is-reveal-words .top-word {
  opacity: 0;
  display: inline-block;
  animation: wordIn 0.42s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.18s);
}

@keyframes wordIn {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Phase 1b: MagDollar, then Игорь / Бобров letter cascade */
body.is-reveal-title .shell,
body.is-reveal-words .shell,
body.is-reveal-lines .shell,
body.is-ready .shell {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

body.is-reveal-title .rail-nav,
body.is-reveal-title .block,
body.is-reveal-title .menu-btn,
body.is-reveal-title .glyph-caption,
body.is-reveal-title .lede,
body.is-reveal-title .actions {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.is-reveal-title .top-word {
  opacity: 1;
}

body.is-reveal-title .hero-copy {
  opacity: 1;
  visibility: visible;
}

body.is-reveal-title .hero-glyph {
  opacity: 1;
  visibility: visible;
}

body.is-reveal-title .glyph-ray,
body.is-reveal-title .glyph-ring {
  opacity: 1;
}

body.is-reveal-title .glyph-ray.r1 {
  transform: translate(-50%, -100%) rotate(0deg);
}
body.is-reveal-title .glyph-ray.r2 {
  transform: translate(-50%, -100%) rotate(120deg);
}
body.is-reveal-title .glyph-ray.r3 {
  transform: translate(-50%, -100%) rotate(240deg);
}

body.is-reveal-title .glyph-ring {
  transform: scale(1);
}

body.is-reveal-title .hero-title {
  opacity: 0;
  animation: titleIn 0.85s var(--ease) forwards;
}

body.is-reveal-title .eyebrow {
  opacity: 1;
  animation: none;
}

body.is-reveal-title .name-letter {
  opacity: 0;
  display: inline-block;
  animation: letterIn 0.38s var(--ease) forwards;
  animation-delay: calc(var(--base, 0s) + var(--li, 0) * 0.07s);
}

body.is-reveal-title .name-part--project .name-letter {
  --base: 0.95s;
}

body.is-reveal-title .name-part--igor .name-letter {
  /* after ПРОЕКТ (~6 letters) + pause */
  --base: 1.9s;
}

body.is-reveal-title .name-part--bobrov .name-letter {
  /* after ИГОРЯ + pause */
  --base: 2.85s;
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes letterIn {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Phase 2 (early): draw figure — before MagDollar title */
body.is-reveal-lines .rail-nav,
body.is-reveal-lines .hero-copy,
body.is-reveal-lines .block,
body.is-reveal-lines .menu-btn,
body.is-reveal-lines .glyph-caption,
body.is-reveal-lines .lede,
body.is-reveal-lines .actions {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.is-reveal-lines .top-word {
  opacity: 1;
}

body.is-reveal-lines .top-bar {
  opacity: 1;
  visibility: visible;
}

body.is-reveal-lines .hero-glyph {
  opacity: 1;
  visibility: visible;
}

body.is-reveal-lines .glyph-ray {
  opacity: 0;
  transform-origin: 50% 100%;
  animation: rayDraw 0.4s var(--ease) forwards;
}

body.is-reveal-lines .glyph-ray.r1 {
  animation-delay: 0.02s;
  --ray-rot: 0deg;
}
body.is-reveal-lines .glyph-ray.r2 {
  animation-delay: 0.14s;
  --ray-rot: 120deg;
}
body.is-reveal-lines .glyph-ray.r3 {
  animation-delay: 0.26s;
  --ray-rot: 240deg;
}

body.is-reveal-lines .glyph-ring {
  opacity: 0;
  transform: scale(0.55);
  animation: ringDraw 0.45s var(--ease) 0.38s forwards;
}

@keyframes rayDraw {
  from {
    opacity: 0;
    transform: translate(-50%, -100%) rotate(var(--ray-rot, 0deg)) scaleY(0);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -100%) rotate(var(--ray-rot, 0deg)) scaleY(1);
  }
}

@keyframes ringDraw {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Phase 3: full site — polished stagger (webcoder §Motion CSS path; no Framer on static) */
body.is-ready .rail-nav {
  opacity: 1;
  visibility: visible;
  animation: none;
}

body.is-ready .brand-side {
  animation: fadeRise 0.75s var(--ease) both;
}

body.is-ready .side-links a {
  opacity: 0;
  animation: fadeRise 0.7s var(--ease) both;
}

body.is-ready .side-links a:nth-child(1) { animation-delay: 0.08s; }
body.is-ready .side-links a:nth-child(2) { animation-delay: 0.14s; }
body.is-ready .side-links a:nth-child(3) { animation-delay: 0.2s; }
body.is-ready .side-links a:nth-child(4) { animation-delay: 0.26s; }
body.is-ready .side-links a:nth-child(5) { animation-delay: 0.32s; }
body.is-ready .side-links a:nth-child(6) { animation-delay: 0.38s; }

body.is-ready .menu-btn {
  opacity: 1;
  visibility: visible;
  animation: fadeRise 0.65s var(--ease) 0.12s both;
}

body.is-ready .hero-copy {
  animation: none;
}

body.is-ready .top-bar {
  opacity: 1;
}

body.is-ready .top-word,
body.is-ready .hero-title,
body.is-ready .name-letter {
  opacity: 1;
  filter: none;
  transform: none;
  animation: none;
}

body.is-ready .lede {
  opacity: 1;
  visibility: visible;
  animation: fadeRise 0.85s var(--ease) 0.1s both;
}

body.is-ready .actions {
  opacity: 1;
  visibility: visible;
  animation: none;
}

body.is-ready .glyph-caption {
  opacity: 1;
  visibility: visible;
  animation: fadeRise 0.75s var(--ease) 0.22s both;
}

body.is-ready .glyph-ray.r1 {
  transform: translate(-50%, -100%) rotate(0deg);
}
body.is-ready .glyph-ray.r2 {
  transform: translate(-50%, -100%) rotate(120deg);
}
body.is-ready .glyph-ray.r3 {
  transform: translate(-50%, -100%) rotate(240deg);
}

body.is-ready .glyph-ring {
  opacity: 1;
  transform: scale(1);
  animation: spinSlow 40s linear infinite;
}

body.is-ready .actions .cta {
  opacity: 0;
  animation: fadeRise 0.75s var(--ease) both;
}

body.is-ready .actions .cta:nth-child(1) {
  animation-delay: 0.18s;
}

body.is-ready .actions .cta:nth-child(2) {
  animation-delay: 0.28s;
}

body.is-ready .block {
  opacity: 0;
  animation: fadeRise 0.8s var(--ease) both;
}

body.is-ready .block:nth-of-type(1) { animation-delay: 0.28s; }
body.is-ready .block:nth-of-type(2) { animation-delay: 0.36s; }
body.is-ready .block:nth-of-type(3) { animation-delay: 0.44s; }
body.is-ready .block:nth-of-type(4) { animation-delay: 0.52s; }
body.is-ready .block:nth-of-type(5) { animation-delay: 0.6s; }
body.is-ready .block:nth-of-type(6) { animation-delay: 0.68s; }

body.is-ready .foot {
  opacity: 0;
  animation: fadeRise 0.7s var(--ease) 0.75s both;
}

@keyframes railIn {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* After intro: dollar stays parked on glyph via JS (.is-parked) */
body.is-reveal-words .splash,
body.is-reveal-title .splash,
body.is-reveal-lines .splash,
body.is-ready .splash {
  pointer-events: none;
}

body.is-reveal-words .splash-skip,
body.is-reveal-title .splash-skip,
body.is-reveal-lines .splash-skip,
body.is-ready .splash-skip {
  opacity: 0;
  pointer-events: none;
}

body.is-reveal-words .splash-stage,
body.is-reveal-title .splash-stage,
body.is-reveal-lines .splash-stage,
body.is-ready .splash-stage {
  pointer-events: none;
}

body.is-reveal-words .comet:not(.is-parked),
body.is-reveal-title .comet:not(.is-parked),
body.is-reveal-lines .comet:not(.is-parked),
body.is-ready .comet:not(.is-parked) {
  /* no-op */
}

.comet.is-parked {
  position: fixed;
  margin: 0;
  z-index: 25;
  pointer-events: none;
  opacity: 1 !important;
  filter: none;
}

/* Locked to figure center — follows glyph forever */
.glyph-frame > .comet.is-parked {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54%;
  max-width: 150px;
  height: auto;
  aspect-ratio: 2 / 1;
  margin: 0;
  z-index: 4;
  opacity: 1 !important;
  filter: none;
  transform: translate(-50%, -50%) rotate(-10deg);
  pointer-events: none;
}

.comet.is-parked .splash-dollar,
.glyph-frame > .comet.is-parked .splash-dollar {
  width: 100%;
  max-width: none;
  opacity: 1;
  filter: drop-shadow(0 0 22px rgba(155, 92, 255, 0.4))
    drop-shadow(0 10px 28px rgba(0, 0, 0, 0.5));
}

.comet.is-parked .comet-glow {
  opacity: 0;
}

/* Warm solar aura around parked bill — starts after figure is drawn */
.comet .solar-aura,
.comet .solar-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
}

.comet .solar-aura {
  width: 160%;
  height: 160%;
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(255, 250, 240, 0.55) 0%,
      rgba(255, 232, 190, 0.28) 28%,
      rgba(240, 215, 140, 0.12) 52%,
      transparent 72%);
  transform: translate(-50%, -50%) scale(0.85);
  filter: blur(2px);
}

.comet .solar-rays {
  width: 210%;
  height: 210%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 248, 230, 0.22) 8deg,
    transparent 18deg,
    transparent 40deg,
    rgba(255, 236, 200, 0.16) 48deg,
    transparent 58deg,
    transparent 80deg,
    rgba(255, 250, 240, 0.2) 88deg,
    transparent 98deg,
    transparent 120deg,
    rgba(255, 236, 200, 0.14) 128deg,
    transparent 138deg,
    transparent 160deg,
    rgba(255, 248, 230, 0.18) 168deg,
    transparent 178deg,
    transparent 200deg,
    rgba(255, 236, 200, 0.12) 208deg,
    transparent 218deg,
    transparent 240deg,
    rgba(255, 250, 240, 0.16) 248deg,
    transparent 258deg,
    transparent 280deg,
    rgba(255, 236, 200, 0.14) 288deg,
    transparent 298deg,
    transparent 320deg,
    rgba(255, 248, 230, 0.18) 328deg,
    transparent 338deg,
    transparent 360deg
  );
  mask-image: radial-gradient(circle, transparent 22%, #000 38%, #000 58%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle, transparent 22%, #000 38%, #000 58%, transparent 78%);
  transform: translate(-50%, -50%) rotate(0deg);
  mix-blend-mode: screen;
}

body.is-bill-solar .comet.is-parked .solar-aura {
  animation: solarAuraPulse 4.8s ease-in-out infinite;
}

body.is-bill-solar .comet.is-parked .solar-rays {
  animation: solarRaysShimmer 18s linear infinite;
}

body.is-bill-solar .comet.is-parked .splash-dollar {
  filter:
    drop-shadow(0 0 18px rgba(255, 248, 230, 0.55))
    drop-shadow(0 0 36px rgba(255, 220, 160, 0.35))
    drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}

@keyframes solarAuraPulse {
  0%, 100% {
    opacity: 0.42;
    transform: translate(-50%, -50%) scale(0.9);
  }
  50% {
    opacity: 0.88;
    transform: translate(-50%, -50%) scale(1.12);
  }
}

@keyframes solarRaysShimmer {
  0% {
    opacity: 0.35;
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 0.35;
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Slogan solar wash — soft dawn, then ambient pulse (bill untouched) */
.top-note {
  position: relative;
}

.slogan-solar {
  position: absolute;
  inset: -0.55em -0.9em;
  z-index: 0;
  pointer-events: none;
  border-radius: 999px;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 50%,
      rgba(255, 250, 240, 0.42) 0%,
      rgba(255, 232, 190, 0.18) 42%,
      transparent 72%);
  filter: blur(1px);
  transform: scale(0.9);
}

.top-note .top-word {
  position: relative;
  z-index: 1;
  text-shadow:
    0 0 12px rgba(255, 248, 230, 0),
    0 0 28px rgba(255, 220, 160, 0),
    0 0 2px rgba(255, 250, 240, 0);
}

/* Phase 1: soft ignition only */
body.is-slogan-solar .slogan-solar {
  animation: sloganSolarIgnite 4.4s cubic-bezier(0.05, 0.72, 0.18, 1) forwards;
}

body.is-slogan-solar .top-word {
  animation: sloganTextIgnite 4.4s cubic-bezier(0.05, 0.7, 0.15, 1) forwards;
}

/* Phase 2: slow ambient pulse (swapped in via JS after ignite) */
body.is-slogan-solar-pulse .slogan-solar {
  animation: sloganSolarPulse 5.2s ease-in-out infinite;
}

body.is-slogan-solar-pulse .top-word {
  animation: sloganTextPulse 5.2s ease-in-out infinite;
}

@keyframes sloganSolarIgnite {
  0% {
    opacity: 0;
    transform: scale(0.88);
    filter: blur(8px);
  }
  15% {
    opacity: 0.015;
  }
  35% {
    opacity: 0.06;
  }
  60% {
    opacity: 0.16;
  }
  85% {
    opacity: 0.28;
  }
  100% {
    opacity: 0.52;
    transform: scale(0.98);
    filter: blur(1px);
  }
}

@keyframes sloganTextIgnite {
  0% {
    text-shadow:
      0 0 12px rgba(255, 248, 230, 0),
      0 0 28px rgba(255, 220, 160, 0),
      0 0 2px rgba(255, 250, 240, 0);
  }
  100% {
    text-shadow:
      0 0 12px rgba(255, 248, 230, 0.48),
      0 0 28px rgba(255, 220, 160, 0.23),
      0 0 2px rgba(255, 250, 240, 0.33);
  }
}

/* Slow, barely-there ambient breathing — narrow amplitude around mid glow */
@keyframes sloganSolarPulse {
  0%, 100% {
    opacity: 0.48;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.62;
    transform: scale(1.015);
  }
}

@keyframes sloganTextPulse {
  0%, 100% {
    text-shadow:
      0 0 12px rgba(255, 248, 230, 0.44),
      0 0 28px rgba(255, 220, 160, 0.2),
      0 0 2px rgba(255, 250, 240, 0.3);
  }
  50% {
    text-shadow:
      0 0 13px rgba(255, 248, 230, 0.52),
      0 0 30px rgba(255, 220, 160, 0.26),
      0 0 2px rgba(255, 250, 240, 0.36);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-bill-solar .comet.is-parked .solar-aura {
    animation: none;
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1);
  }
  body.is-bill-solar .comet.is-parked .solar-rays {
    animation: none;
    opacity: 0.35;
  }
  body.is-slogan-solar .slogan-solar,
  body.is-slogan-solar-pulse .slogan-solar {
    animation: none;
    opacity: 0.5;
    transform: none;
    filter: blur(1px);
  }
  body.is-slogan-solar .top-word,
  body.is-slogan-solar-pulse .top-word {
    animation: none;
    text-shadow:
      0 0 12px rgba(255, 248, 230, 0.45),
      0 0 28px rgba(255, 220, 160, 0.22),
      0 0 2px rgba(255, 250, 240, 0.32);
  }
}

body.is-reveal-words .comet-roll,
body.is-reveal-title .comet-roll,
body.is-reveal-lines .comet-roll,
body.is-ready .comet-roll {
  transform: rotateX(0deg) !important;
  transition: transform 0.6s var(--ease);
}

body.is-ready .cosmos-shade {
  transition: opacity 0.8s var(--ease);
}

@media (max-width: 920px) {
  /* parkToGlyph still centers on glyph; glyph is on top on mobile */
}

@media (prefers-reduced-motion: reduce) {
  body.is-splash .shell,
  body.is-reveal-words .shell,
  body.is-reveal-title .shell,
  body.is-reveal-lines .shell,
  body.is-ready .shell {
    transition: none;
    animation: none;
  }
  body.is-reveal-words .top-word,
  body.is-reveal-title .hero-title,
  body.is-reveal-title .name-letter,
  body.is-reveal-lines .glyph-ray,
  body.is-reveal-lines .glyph-ring,
  body.is-ready .brand-side,
  body.is-ready .side-links a,
  body.is-ready .lede,
  body.is-ready .actions .cta,
  body.is-ready .block,
  body.is-ready .glyph-caption,
  body.is-ready .foot,
  body.is-ready .menu-btn {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Full-viewport cosmic — poster always, video on top when it plays */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #05030c;
  background-image: url("../assets/img/cosmos-poster-web.jpg?v=20260924s");
  background-image: image-set(
    url("../assets/img/cosmos-poster.webp?v=20260924s") type("image/webp"),
    url("../assets/img/cosmos-poster-web.jpg?v=20260924s") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
}

.cosmos-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block !important;
  visibility: visible !important;
  transition:
    opacity 0.05s linear,
    filter 2s cubic-bezier(0.33, 0, 0.15, 1);
}

.cosmos-video--a {
  opacity: 1;
}

.cosmos-video--b {
  opacity: 0;
}

.cosmos-shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* light veil — stars/nebula must stay readable */
  background:
    linear-gradient(90deg, rgba(5, 3, 12, 0.22) 0%, rgba(5, 3, 12, 0.05) 45%, rgba(5, 3, 12, 0.12) 100%),
    linear-gradient(180deg, rgba(5, 3, 12, 0.05) 0%, rgba(5, 3, 12, 0.18) 100%);
}

/* Cinema house-lights: full-page veil when «Автор о себе» is open */
.cinema-veil {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      ellipse 52% 46% at 58% 40%,
      rgba(0, 0, 0, 0.42) 0%,
      rgba(0, 0, 0, 0.78) 58%,
      rgba(0, 0, 0, 0.92) 100%
    );
  transition: opacity 1.8s cubic-bezier(0.33, 0, 0.15, 1);
}

body.is-about-reading .cinema-veil {
  opacity: 1;
}

body.is-about-reading .cosmos-video {
  filter: brightness(0.38) saturate(0.7);
}

body.is-about-reading .cosmos-shade {
  background: rgba(0, 0, 0, 0.5);
}

/* Lift content column above the veil; dim everything except #about */
body.is-about-reading .content {
  position: relative;
  z-index: 9;
}

body.is-about-reading .rail-nav,
body.is-about-reading .top-bar,
body.is-about-reading .mobile-nav,
body.is-about-reading .hero-split,
body.is-about-reading .block:not(#about),
body.is-about-reading .foot {
  opacity: 0.16;
  filter: brightness(0.55);
  transition:
    opacity 1.8s cubic-bezier(0.33, 0, 0.15, 1),
    filter 1.8s cubic-bezier(0.33, 0, 0.15, 1);
}

body.is-about-reading #about {
  position: relative;
  z-index: 10;
  opacity: 1;
  filter: none;
}

body.is-about-reading .about-self__quote {
  position: relative;
  background: rgba(10, 8, 18, 0.62);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 70px 28px rgba(8, 6, 16, 0.65);
  border-radius: 0.35rem;
  padding: 1rem 1.1rem;
}

.rail-nav,
.top-bar,
.mobile-nav,
.hero-split,
.block,
.foot {
  transition:
    opacity 1.8s cubic-bezier(0.33, 0, 0.15, 1),
    filter 1.8s cubic-bezier(0.33, 0, 0.15, 1);
}

@media (prefers-reduced-motion: reduce) {
  .cinema-veil,
  .cosmos-video,
  .rail-nav,
  .top-bar,
  .mobile-nav,
  .hero-split,
  .block,
  .foot {
    transition: none;
  }
  /* keep cosmos visible: pause via JS, do NOT remove the video/poster */
  .cosmos-video {
    display: block !important;
  }
}

.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.rail-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 2rem 1.4rem;
  border-right: 1px solid var(--line);
  /* no backdrop-filter: it re-blurs the playing video every frame */
  background: rgba(5, 3, 12, 0.42);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  overflow-y: auto;
}

.brand-side {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-side-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 1rem;
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.side-links a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 200ms var(--ease), transform 200ms var(--ease);
}

.side-links a span {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.side-links a:hover,
.side-links a:focus-visible {
  color: var(--ink);
  transform: translateX(4px);
}

.content {
  min-width: 0;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem) 3rem;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0 0.5rem;
}

.top-note {
  margin: 0;
  max-width: min(38rem, 92%);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.8vw, 2.55rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 0.55em;
  position: relative;
}

.top-word {
  display: inline-block;
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(8, 5, 20, 0.9);
}

.mobile-nav a {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mobile-nav:not([hidden]) { display: flex; }

.hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  min-height: min(88vh, 820px);
  padding: 2rem 0 4rem;
}

.hero-copy .eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-decoration: none;
  cursor: pointer;
  transition: color 200ms var(--ease), opacity 200ms var(--ease);
}

.hero-copy a.eyebrow:hover,
.hero-copy a.eyebrow:focus-visible {
  color: var(--gold);
  opacity: 0.92;
  outline: none;
}

.hero-copy .name-part {
  display: inline-block;
}

.hero-copy .name-letter {
  display: inline-block;
  font-weight: 800;
}

.hero-copy .hero-title,
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.1rem, 8.5vw, 5.9rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  /* Outfit is optically light — slight stroke so ExtraBold actually reads heavier */
  -webkit-text-stroke: 0.45px currentColor;
  paint-order: stroke fill;
}

.lede {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  color: var(--ink-dim);
  font-size: clamp(1.18rem, 2.2vw, 1.4rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.65rem 1.35rem;
  background: var(--gold);
  color: #1a1204;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  border-radius: 0;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}

.actions .cta {
  min-height: 3.3rem;
  padding: 0.72rem 1.49rem;
  font-size: 0.828rem;
}

.cta:hover { transform: translateY(-2px); background: var(--gold-soft); }

.cta--stack {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 3.35rem;
  padding: 0.45rem 1.25rem;
  line-height: 1.25;
  text-align: center;
}

.actions .cta--stack {
  min-height: 3.685rem;
  padding: 0.5rem 1.38rem;
}

.cta-line {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.cta-line:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
  background: transparent;
}

.hero-glyph {
  display: grid;
  justify-items: center;
  gap: 1rem;
  /* Stable box — no fadeUp on the frame (that caused park blink) */
  margin-top: 0.85rem;
}

.glyph-frame {
  position: relative;
  width: min(280px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.glyph-ring {
  position: absolute;
  inset: 8%;
  z-index: 0;
  border: 1px dashed rgba(212, 175, 55, 0.45);
  border-radius: 50%;
  animation: spinSlow 40s linear infinite;
}

.glyph-ray {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: 1px;
  height: 46%;
  background: linear-gradient(to top, transparent, rgba(155, 92, 255, 0.7));
  transform-origin: bottom center;
}

.r1 { transform: translate(-50%, -100%) rotate(0deg); }
.r2 { transform: translate(-50%, -100%) rotate(120deg); }
.r3 { transform: translate(-50%, -100%) rotate(240deg); }

.glyph-caption {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

@keyframes spinSlow { to { transform: rotate(360deg); } }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.block {
  max-width: 720px;
  padding: 3.5rem 0;
  border-top: 1px solid var(--line);
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}

.block h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.8vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  /* same optical densify as MagDollar — Outfit reads light at 700 */
  -webkit-text-stroke: 0.35px currentColor;
  paint-order: stroke fill;
}

.block p {
  margin: 0 0 1rem;
  color: var(--ink-dim);
  line-height: 1.65;
}

.block p:last-child {
  margin-bottom: 0;
}

.about-self {
  margin-top: 0.35rem;
}

.about-self__toggle {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0.15rem 0 0;
  padding: 0.15rem 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--font-pen);
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.about-self__toggle::after {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-left: 0.15em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.12em);
  opacity: 0.65;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.about-self.is-open .about-self__toggle::after {
  transform: rotate(-135deg) translateY(-0.05em);
  opacity: 0.9;
}

.about-self__toggle:hover,
.about-self__toggle:focus-visible {
  color: #fff;
  outline: none;
}

.about-self__body {
  display: none;
  margin-top: 0.85rem;
}

.about-self.is-open .about-self__body {
  display: block;
}

.about-self__body[hidden] {
  display: none !important;
}

.about-self__quote {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-literary);
  font-size: clamp(1.05rem, 2.1vw, 1.22rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-dim);
}

.about-self__quote p {
  margin: 0 0 1rem;
  text-indent: 1.6em;
  color: inherit;
  font: inherit;
}

.about-self__quote p:last-child {
  margin-bottom: 0;
}

.about-self__quote p:first-child::before {
  content: "«";
}

.about-self__quote p:last-child::after {
  content: "»";
}

.folios {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.folio--series {
  border-left: 2px solid var(--violet-hot);
  padding: 0;
}

.folio-trigger {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 1.05rem 0.85rem 1.05rem 1rem;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  transition: background-color 180ms var(--ease);
}

.folio-trigger:hover,
.folio-trigger:focus-visible {
  background: rgba(155, 92, 255, 0.08);
  outline: none;
}

.folio-trigger__title {
  display: block;
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
}

.folio-trigger__lead {
  display: block;
  margin: 0;
  font-size: 1.08rem;
  color: var(--ink-dim);
  line-height: 1.5;
}

.folio-trigger__chev {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.35rem;
  border-right: 2px solid var(--gold-soft);
  border-bottom: 2px solid var(--gold-soft);
  transform: rotate(45deg);
  transition: transform 200ms var(--ease);
  opacity: 0.85;
}

.folio--series.is-open .folio-trigger__chev {
  transform: rotate(-135deg);
  margin-top: 0.55rem;
}

.book-list {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0.85rem 1rem;
  display: none;
  gap: 0.35rem;
}

.folio--series.is-open .book-list {
  display: grid;
}

.book-list[hidden] {
  display: none !important;
}

.book-row {
  display: block;
  padding: 0.45rem 0.35rem;
  border-top: 1px solid rgba(155, 92, 255, 0.16);
}

.book-row__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.book-row__title {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1.35;
  transition: color 160ms var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.book-row__title:hover,
.book-row__title:focus-visible {
  color: var(--gold-soft);
  outline: none;
}

.book-row.is-open .book-row__title {
  color: var(--gold);
}

.book-row__actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}

.book-row__panel {
  display: flow-root;
  margin-top: 0.55rem;
  padding: 0.7rem 0.75rem 0.8rem;
  border: 1px solid rgba(240, 215, 140, 0.22);
  background:
    linear-gradient(135deg, rgba(18, 10, 36, 0.72), rgba(8, 4, 18, 0.55)),
    radial-gradient(ellipse at 12% 20%, rgba(212, 175, 55, 0.08), transparent 55%);
  height: auto;
  max-height: none;
  overflow: visible;
}

.book-row__panel[hidden] {
  display: none !important;
}

.book-row__cover {
  float: left;
  width: 240px;
  max-width: 52%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin: 0.1rem 0.95rem 0.55rem 0;
  shape-outside: margin-box;
  border: 1px solid rgba(240, 215, 140, 0.35);
  background: rgba(6, 3, 14, 0.85);
}

.book-row__cover--empty {
  min-height: 0;
  background: rgba(20, 12, 40, 0.9);
}

.book-row__desc {
  margin: 0;
  color: var(--ink-dim);
  font-size: 1.02rem;
  line-height: 1.5;
  max-height: none;
  overflow: visible;
}

.book-row__desc--empty {
  opacity: 0.65;
  font-style: italic;
}

.book-promo {
  clear: both;
  margin: 0.95rem 0 0.15rem;
  padding-top: 0.35rem;
}

.book-promo__row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.book-promo__label {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.book-promo__input {
  flex: 0 0 auto;
  width: 8.2ch;
  min-width: 0;
  margin: 0;
  padding: 0.2rem 0.05rem 0.22rem;
  border: 0;
  border-bottom: 1px solid rgba(240, 215, 140, 0.55);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.book-promo__input:focus {
  outline: none;
  border-bottom-color: var(--gold);
}

.book-promo__apply {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.38rem 0.85rem;
  border: 1px solid rgba(240, 215, 140, 0.55);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.book-promo__apply:hover,
.book-promo__apply:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212, 175, 55, 0.16);
  outline: none;
}

.book-promo__msg {
  margin: 0.35rem 0 0;
  color: #f0b4b4;
  font-size: 0.8rem;
}

.book-promo--ok {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 0.85rem;
  margin: 0.95rem 0 0.15rem;
  clear: both;
  color: var(--gold-soft);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.book-promo__ok-label {
  flex: 0 0 auto;
}

.book-promo__ok-hint {
  flex: 0 1 auto;
  margin: 0;
  color: var(--gold);
  font-family: var(--font-pen);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.book-preview-note {
  margin: 0 0 0.65rem;
  color: var(--ink-dim);
  font-size: 0.82rem;
}

.book-audio-track.is-locked audio {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 520px) {
  .book-promo__row {
    flex-wrap: wrap;
  }

  .book-promo__label {
    flex: 1 0 100%;
  }
}

@media (max-width: 520px) {
  .book-row__panel {
    padding: 0.6rem 0.6rem 0.7rem;
  }

  .book-row__cover {
    width: 184px;
    max-width: 58%;
    margin: 0.05rem 0.7rem 0.45rem 0;
  }

  .book-row__desc {
    font-size: 0.88rem;
    line-height: 1.45;
  }
}

.book-icon {
  display: inline-flex;
  align-items: stretch;
  height: 2.35rem;
  min-width: 7.2rem;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  background: rgba(8, 4, 18, 0.35);
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.book-icon__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  padding: 0 0.7rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.book-icon__mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 2.35rem;
  width: 2.35rem;
  border-left: 1.5px solid var(--gold);
}

.book-icon svg {
  width: 0.95rem;
  height: 0.95rem;
}

.book-icon:hover,
.book-icon:focus-visible {
  background: rgba(212, 175, 55, 0.14);
  border-color: var(--gold-soft);
  color: var(--gold-soft);
  outline: none;
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.22);
}

.book-icon:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 720px) {
  .book-row__main {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .book-row__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .book-icon {
    height: 2.15rem;
    min-width: 6.4rem;
  }

  .book-icon__label {
    font-size: 0.72rem;
    padding: 0 0.55rem;
    letter-spacing: 0.1em;
  }

  .book-icon__mark {
    flex-basis: 2.15rem;
    width: 2.15rem;
  }
}

.book-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.book-modal[hidden] {
  display: none !important;
}

.book-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 10, 0.78);
}

.book-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: min(80vh, 640px);
  overflow: auto;
  background: #140a22;
  border: 1px solid var(--line);
  padding: 1rem 1rem 1.15rem;
}

.book-modal__close {
  position: absolute;
  top: 0.25rem;
  right: 0.45rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.book-modal__title {
  margin: 0 1.5rem 0.75rem 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.book-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.book-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.book-audio-track {
  margin-bottom: 0.75rem;
}

.book-audio-track p {
  margin: 0 0 0.35rem;
  color: var(--ink-dim);
  font-size: 0.9rem;
}

.book-audio-track audio {
  width: 100%;
}

body.is-book-modal {
  overflow: hidden;
}

.folios article:not(.folio--series) {
  padding: 1.1rem 0 1.1rem 1rem;
  border-left: 2px solid var(--violet-hot);
}

.folios h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
}

.folios p {
  margin: 0;
  font-size: 0.98rem;
}

.block-support .cta { margin-top: 1.4rem; }

.foot {
  max-width: 720px;
  padding: 2rem 0 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.92rem;
}

@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .rail-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .top-bar {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 1.25rem;
    gap: 1.25rem;
  }
  .hero-glyph { order: -1; margin-top: 0.25rem; }
  .glyph-frame {
    width: min(240px, 68vw);
  }
  /* optically center wide rotated bill inside the circle */
  .glyph-frame > .comet.is-parked {
    width: 48%;
    max-width: 130px;
  }
  .top-note {
    font-size: clamp(1.15rem, 5.2vw, 1.55rem);
    letter-spacing: 0.06em;
    max-width: calc(100% - 5.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.inline-link{color:var(--violet-hot);text-decoration:underline;text-underline-offset:0.18em}
.inline-link:hover{color:#fff}

/* Films — poster board (variant B) */
.film-board { margin-top: 1.5rem; }
.film-posters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 820px) {
  .film-posters { grid-template-columns: 1fr; }
}
.film-poster__hit {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #12081f;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}
.film-poster__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.film-poster__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--violet-hot);
  background: radial-gradient(circle at 30% 20%, #3a1f5c, #0a0612 70%);
}
.film-poster__badge {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: rgba(10, 6, 18, 0.72);
}
.film-poster__title {
  margin: 0.65rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.film-poster__blurb {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-dim);
}
.film-poster__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  align-items: center;
}
.film-poster__play {
  border: 1px solid var(--violet-hot);
  background: transparent;
  color: var(--ink);
  padding: 0.35rem 0.7rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.film-poster__play:hover { background: rgba(168, 120, 255, 0.15); }
.film-link {
  color: var(--violet-hot);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  font-size: 0.88rem;
}
.film-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.film-modal[hidden] { display: none !important; }
.film-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 10, 0.82);
}
.film-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  background: #140a22;
  border: 1px solid var(--line);
  padding: 1rem 1rem 1.2rem;
}
.film-modal__close {
  position: absolute;
  top: 0.35rem;
  right: 0.55rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.film-embed,
.film-embed--modal {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}
.film-embed iframe,
.film-embed--modal iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film-modal__info h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  color: var(--ink);
}
.film-modal__info p {
  margin: 0 0 0.85rem;
  color: var(--ink-dim);
  line-height: 1.55;
}
.film-modal__picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.film-modal__pick {
  border: 1px solid var(--violet-hot);
  background: transparent;
  color: var(--ink);
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
}
body.is-film-modal { overflow: hidden; }

/* Cookie consent — compact bottom bar (1 line) */
.cookie-gate {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: block;
  padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  background: transparent;
}

html.is-cookie-ok .cookie-gate {
  display: none !important;
}

.cookie-gate__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  max-width: 920px;
  margin: 0 auto;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(240, 215, 140, 0.28);
  background: rgba(8, 4, 18, 0.92);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

.cookie-gate__text {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-dim);
  font-size: 0.82rem;
  line-height: 1.2;
}

.cookie-gate__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.cookie-gate__full {
  margin: 0;
  padding: 0.28rem 0.7rem;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, #f0d78c 0%, #d4af37 60%, #9b5cff 100%);
  color: #1a1028;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.28);
}

.cookie-gate__full:hover,
.cookie-gate__full:focus-visible {
  filter: brightness(1.06);
  outline: none;
}

.cookie-gate__partial {
  margin: 0;
  padding: 0.26rem 0.55rem;
  border: 1px solid rgba(155, 92, 255, 0.35);
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-gate__partial:hover,
.cookie-gate__partial:focus-visible {
  color: var(--ink);
  border-color: rgba(155, 92, 255, 0.55);
  outline: none;
}

@media (max-width: 560px) {
  .cookie-gate__bar {
    flex-wrap: nowrap;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
  }

  .cookie-gate__text {
    font-size: 0.72rem;
  }

  .cookie-gate__full {
    font-size: 0.72rem;
    padding: 0.24rem 0.55rem;
  }

  .cookie-gate__partial {
    font-size: 0.66rem;
    padding: 0.22rem 0.4rem;
  }
}

/* Formula — embedded film */
.formula-film {
  margin-top: 1.25rem;
}
.formula-film__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 700;
  color: var(--ink);
}
.formula-film__link {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
}

