/* ═══ home.css — the hero banner: the Kremlin wall & Spasskaya Tower at dusk ═══
   Host: <div id="hero"></div>.  home.js injects <div class="hero" data-weather="snow|rain"> into it. No text in the art.
   Classes the app can rely on:  .hero · .hero .star · .hero .beam · .hero .wall    (+ .tower .clock .snow .rain .hero-fade)
   Animations: star pulse 4s · beam sweep 9s alternate · weather drift.  transform/opacity only; reduced motion = still frame. */
#hero { display: block; width: 100%; }
.hero { position: relative; width: 100%; height: 34vh; min-height: 236px; max-height: 340px; overflow: hidden; isolation: isolate; background: #0d0a14; }
.hero > svg { position: absolute; inset: 0; overflow: visible; width: 100%; height: 100%; display: block; }
.hero .hero-fade { position: absolute; inset: auto 0 0 0; height: 46%; z-index: 3; pointer-events: none; background: linear-gradient(180deg, transparent, var(--night, #09090d) 92%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: calc(var(--grain, .35) * .5); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.hero .tint { mix-blend-mode: soft-light; }
.hero .wall { }                                   /* the wall + merlons (hook for per-era recolour) */
.hero .wall .brick { fill: color-mix(in srgb, var(--accent, #b0121f) 38%, #120a0a); }
.hero .wall .brick-hi { fill: color-mix(in srgb, var(--accent, #b0121f) 55%, #1a0d0d); }
.hero .tower .stone { fill: color-mix(in srgb, var(--accent, #b0121f) 32%, #0f0a0c); }
.hero .tower .roof { fill: #0f1a1c; }
.hero .win { fill: var(--gold, #d4a93c); opacity: .85; }
.hero .win.f { animation: h-win 5.5s steps(1) infinite; }
@keyframes h-win { 0%, 100% { opacity: .85; } 31% { opacity: .35; } 34% { opacity: .85; } 70% { opacity: .6; } 72% { opacity: .85; } }
.hero .clock { fill: var(--gold, #d4a93c); opacity: .95; filter: drop-shadow(0 0 4px var(--gold, #d4a93c)); }

/* the ruby star — slow red pulse, 4s */
.hero .star { transform-box: fill-box; transform-origin: 50% 50%; }
.hero .star .core { fill: var(--accent, #c8102e); filter: drop-shadow(0 0 3px #ff5a5f); }
.hero .star .halo { fill: var(--accent, #c8102e); opacity: .0; transform-box: fill-box; transform-origin: 50% 50%; animation: h-star 4s ease-in-out infinite; }
.hero .star .halo.b { animation-delay: -1.1s; }
@keyframes h-star { 0%, 100% { opacity: .1; transform: scale(.85); } 50% { opacity: .3; transform: scale(1.25); } }
.hero .star .core { animation: h-core 4s ease-in-out infinite; }
@keyframes h-core { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }

/* searchlight beams — sweep 9s alternate */
.hero .beam { transform-box: fill-box; transform-origin: 50% 100%; mix-blend-mode: screen; opacity: .9; animation: h-beam 9s ease-in-out infinite alternate; }
.hero .beam.b { animation-duration: 11s; animation-delay: -4s; animation-direction: alternate-reverse; }
@keyframes h-beam { from { transform: rotate(-24deg); } to { transform: rotate(22deg); } }

/* weather */
.hero .snow i, .hero .rain i { position: absolute; }
.hero .flake { animation: h-snow linear infinite; opacity: 0; }
@keyframes h-snow { 0% { transform: translate(0, -12px); opacity: 0; } 10% { opacity: .85; } 90% { opacity: .7; } 100% { transform: translate(var(--dx, 14px), 300px); opacity: 0; } }
.hero .drop { animation: h-rain linear infinite; opacity: 0; }
@keyframes h-rain { 0% { transform: translate(0, -20px); opacity: 0; } 12% { opacity: .55; } 100% { transform: translate(-26px, 300px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .hero .star .halo, .hero .star .core, .hero .beam, .hero .flake, .hero .drop, .hero .win.f { animation: none; }
  .hero .star .halo { opacity: .35; } .hero .flake, .hero .drop { opacity: .5; }
  .hero .beam { transform: rotate(-6deg); } .hero .beam.b { transform: rotate(8deg); }
}

/* historical accuracy hooks: no Mausoleum before 1924; the first one (1924–30) was WOODEN — timber-brown, tiered */
body[data-era="1922"] .hero .mauso, body[data-era="1922"] .hero .mauso + rect, body[data-era="1922"] .hero .mauso ~ rect[fill="#050304"] { display: none; }
body[data-era="1926"] .hero .mauso { fill: #4a3220; }

/* Spasskaya's crown: the gilt double-headed eagle until the 1935 stars (the ruby star from Oct 1937); 1922/1926 show the eagle */
body[data-era="1922"] .hero .star, body[data-era="1926"] .hero .star { display: none; }
body[data-era="1922"] .hero .eagle, body[data-era="1926"] .hero .eagle { display: inline; }
.hero .eagle { filter: drop-shadow(0 0 2px rgba(255, 210, 120, .7)); }

/* ── poster layer: turning sunburst, rising smoke, the gear, the banner, halftone ── */
.hero .rays { transform-box: view-box; transform-origin: 226px 132px; animation: h-rays 140s linear infinite; }
@keyframes h-rays { to { transform: rotate(360deg); } }
.hero .gear { transform-box: view-box; animation: h-gear 90s linear infinite; }
@keyframes h-gear { to { transform: rotate(360deg); } }
.hero .smoke { transform-box: fill-box; transform-origin: 50% 100%; animation: h-smoke 7s ease-out infinite; }
@keyframes h-smoke { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: .22; } 100% { transform: translateY(-46px) scale(1.5); opacity: 0; } }
.hero .flag { transform-box: fill-box; transform-origin: 0 50%; animation: h-flag 3.2s ease-in-out infinite alternate; }
@keyframes h-flag { from { transform: skewY(-3deg) scaleX(1); } to { transform: skewY(3.5deg) scaleX(.95); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .22; mix-blend-mode: multiply;
  background: radial-gradient(circle, rgba(0,0,0,.75) 1px, transparent 1.6px) 0 0 / 5px 5px; -webkit-mask-image: linear-gradient(to top, #000, transparent 72%); mask-image: linear-gradient(to top, #000, transparent 72%); }

@media (prefers-reduced-motion: reduce) { .hero .rays, .hero .gear, .hero .smoke, .hero .flag { animation: none; } .hero .smoke { opacity: .12; } }

/* ── Soviet-lettered year cards (Russian-style Latin: heavy, narrow, slanted, stencil-struck) — use .sov on any year/era label ── */
.sov, .era-year { font-family: var(--head, Impact, 'Arial Narrow Bold', 'Franklin Gothic Heavy', 'Haettenschweiler', 'Arial Black', sans-serif); font-weight: 400; text-transform: uppercase; letter-spacing: .09em; font-style: normal;
  color: var(--gold, #d4a93c); text-shadow: 2px 2px 0 var(--accent, #b0121f), 3px 3px 0 rgba(0,0,0,.55); display: inline-block; transform: skewX(-9deg); -webkit-text-stroke: .6px rgba(60,20,0,.55); font-variant-numeric: lining-nums; }
.sov::before, .era-year::before { content: "★ "; font-size: .55em; vertical-align: .25em; color: var(--accent, #b0121f); text-shadow: none; }
.sov.nostar::before { content: none; }
.sov-plate { display: inline-block; padding: 4px 12px 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent,#b0121f) 88%, #000), color-mix(in srgb, var(--accent,#b0121f) 55%, #000)); border: 2px solid var(--gold, #d4a93c); box-shadow: 0 0 0 1px #000, 3px 3px 0 rgba(0,0,0,.6); }
.sov-plate .sov { text-shadow: 1.5px 1.5px 0 #000; }

/* plates: fixed width, centred, no star prefix, so a row of years is perfectly even */
.sov-plate { width: 84px; box-sizing: border-box; text-align: center; padding: 5px 0 4px; }
.sov-plate .sov::before { content: none; }

/* ── era cards: icon + year + title, a vertical list (even by construction) ── */
.era-list { display: grid; gap: 8px; padding: 10px; }
.era-card { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; grid-template-columns: 56px 1fr 14px; gap: 14px; align-items: center; padding: 10px 14px 10px 12px; overflow: hidden;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,.14) 0 6px, transparent 6px 12px), linear-gradient(180deg, color-mix(in srgb, var(--accent,#b0121f) 70%, #000), color-mix(in srgb, var(--accent,#b0121f) 38%, #000));
  border: 2px solid var(--gold, #d4a93c); box-shadow: 0 0 0 1px #000, 4px 4px 0 rgba(0,0,0,.55); transition: transform .2s cubic-bezier(.2,.8,.2,1); color: var(--gold, #d4a93c); }
.era-card:hover, .era-card:focus-visible { transform: translateX(3px); outline: none; }
.era-card:focus-visible { box-shadow: 0 0 0 2px var(--gold,#d4a93c), 4px 4px 0 rgba(0,0,0,.55); }
.era-card[aria-pressed="true"] { filter: brightness(1.18); }
.ec-icon { width: 56px; height: 56px; padding: 4px; box-sizing: border-box; background: rgba(0,0,0,.35); border: 1.5px solid color-mix(in srgb, var(--gold,#d4a93c) 60%, transparent); }
.ec-txt { display: grid; gap: 2px; min-width: 0; }
.ec-year { font-size: 24px; line-height: 1; justify-self: start; }
.ec-title { font: 400 12.5px/1.2 var(--head, Impact, 'Arial Black', sans-serif); letter-spacing: .14em; text-transform: uppercase; color: #fff3d0; }
.ec-sub { font: italic 400 12px/1.35 var(--serif, Georgia, serif); color: color-mix(in srgb, #fff3d0 65%, transparent); }
.ec-star { width: 14px; height: 14px; background: var(--gold,#d4a93c); clip-path: polygon(50% 0, 62% 34%, 98% 36%, 70% 58%, 80% 94%, 50% 72%, 20% 94%, 30% 58%, 2% 36%, 38% 34%); opacity: .8; }
@media (prefers-reduced-motion: reduce) { .era-card { transition: none; } }

/* ── David spec: era cards fullwidth, one per line ── */
#era-rail.era-list { display: flex; flex-direction: column; gap: 9px; padding: 12px 2px 4px; }
.played-note { text-align: center; padding: 20px 0 24px; }
.home-foot { padding: 4px 0 28px; }
.home-foot .btn + .btn { margin-top: 12px; }

/* ── seat cards: fullwidth rows, portrait left, dossier right —
   same card language as the era rail ── */
.cast-grid { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.cast-card { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; padding: 12px 16px 12px 12px; position: relative; overflow: hidden;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,.14) 0 6px, transparent 6px 12px), linear-gradient(180deg, color-mix(in srgb, var(--accent,#b0121f) 62%, #000), color-mix(in srgb, var(--accent,#b0121f) 34%, #000));
  border: 2px solid var(--gold, #d4a93c); box-shadow: 0 0 0 1px #000, 4px 4px 0 rgba(0,0,0,.55); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.cast-card:hover, .cast-card:focus-visible { transform: translateX(3px); outline: none; }
.cast-card:focus-visible { box-shadow: 0 0 0 2px var(--gold, #d4a93c), 4px 4px 0 rgba(0,0,0,.55); }
.cast-card > svg { width: 96px; height: 96px; display: block; }
.cast-card .cc-name { font: 400 17px/1.25 var(--head, sans-serif); color: #fff3d0; }
.cast-card .cc-role { font: 400 12.5px/1.45 var(--serif, Georgia, serif); color: color-mix(in srgb, #fff3d0 78%, transparent); margin-top: 3px; }
.cast-card .cc-party { display: inline-block; margin-top: 7px; font: 400 9.5px/1 var(--head, sans-serif); letter-spacing: .22em; text-transform: uppercase; color: var(--gold, #d4a93c); }
.cast-card[data-played="true"]::after { content: "★ YOU HAVE SAT HERE"; position: absolute; right: 12px; top: 10px; font: 400 8.5px/1 var(--head, sans-serif); letter-spacing: .18em; color: var(--gold, #d4a93c); opacity: .85; }
@media (prefers-reduced-motion: reduce) { .cast-card { transition: none; } }

/* ── home intro block (app markup: .hero-text · .hero-copy · .hero-seal) —
   centred, with room to breathe. Heading voice: Russo One; body: PT Serif. ── */
.hero-text { text-align: center; padding: 30px 8px 4px; }
.hero-kicker { font: 400 10.5px/1.4 var(--head, sans-serif); letter-spacing: .34em; text-transform: uppercase; color: var(--gold, #d4a93c); }
.hero-title { margin: 12px 0 0; font: 400 40px/1 var(--head, sans-serif); color: var(--paper, #efe6cf); text-transform: uppercase; letter-spacing: .015em; }
.hero-title .ht-the { display: block; font-size: 13px; letter-spacing: .58em; padding-left: .58em; color: var(--gold, #d4a93c); margin-bottom: 7px; }
.hero-title .ht-hill span { display: inline-block;
  background: linear-gradient(180deg, #fff6cf, var(--gold, #d4a93c) 60%, var(--gold-2, #f0a03a));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .5));
  animation: k-rise .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 60ms); }
.hero-title .hero-sub { display: block; font: italic 400 15px/1.3 var(--serif, Georgia, serif); text-transform: none; letter-spacing: .1em; color: var(--paper-dim, #b8b5c9); margin-top: 10px; }
.hero-copy { text-align: center; margin: 18px auto 0; max-width: 42ch; font: 400 14px/1.7 var(--serif, Georgia, serif); color: var(--ink-dim, #b3a583); }
.hero-seal { text-align: center; font: 400 12px/1 var(--head, sans-serif); letter-spacing: .3em; color: var(--gold, #d4a93c); padding: 26px 0 2px; }
@keyframes k-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-title .ht-hill span { animation: none; } }
