/* ═══════════════════════════════════════════════════════════════════════════
   places.css — the environments

   Layers, silhouettes, terraces, gateways, the hall, the rooms. Scenery is
   drawn here in CSS and SVG; the artist's images stay whole and are framed as
   objects inside these places.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── the threshold: sky, horizon, terrace ──────────────────────────────── */
.place { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.place__sky {
    position: absolute; inset: -4% -2% 34%;
    background:
        radial-gradient(90% 70% at 68% 88%, oklch(30% 0.06 40 / 0.55) 0%, transparent 62%),
        linear-gradient(180deg, oklch(9% 0.02 265) 0%, oklch(13% 0.03 285) 42%, oklch(24% 0.06 40) 78%, oklch(30% 0.07 32) 100%);
}
.sky__glow {
    position: absolute; left: 50%; bottom: 2%;
    width: 90%; height: 70%; translate: -50% 0;
    background: radial-gradient(60% 55% at 50% 100%, oklch(72% 0.10 70 / 0.22) 0%, transparent 70%);
}
.sky__sun {
    position: absolute; right: 14%; bottom: 16%;
    width: clamp(70px, 9vw, 130px); aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, oklch(88% 0.09 78) 0 38%, oklch(74% 0.10 62 / 0.55) 56%, transparent 72%);
    box-shadow: 0 0 90px 30px oklch(70% 0.10 62 / 0.18);
}
.sky__veil {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(180deg, oklch(100% 0 0 / 0.012) 0 2px, transparent 2px 7px);
    opacity: 0.5;
}

.place__far { position: absolute; left: 0; right: 0; bottom: 34%; height: 28%; }
.ridge { position: absolute; bottom: 0; height: 100%; width: 42%; }
.ridge path, .ridge rect, .ridge circle { fill: currentColor; }
.ridge g { stroke: currentColor; fill: none; }
/* a rim of last light along every silhouette edge: without it the horizon is
   a dark band against a dark sky */
.ridge path { stroke: oklch(72% 0.09 62 / 0.28); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ridge--candy { left: 2%; color: oklch(20% 0.045 335); }
.ridge--summer { left: 33%; width: 40%; color: oklch(19% 0.028 245); }
.ridge--woods { right: 0; width: 34%; color: oklch(12% 0.012 25); }
.ridge__candy circle { fill: oklch(26% 0.06 340); }
.ridge__candy .ridge__swirl { fill: none; stroke: oklch(34% 0.07 340); }
.ridge__birds { stroke: oklch(30% 0.03 245); }

.place__mid { position: absolute; left: 0; right: 0; bottom: 0; height: 34%; }
.terrace__haze {
    position: absolute; left: 0; right: 0; top: -6%; height: 18%;
    background: linear-gradient(180deg, transparent, oklch(60% 0.07 62 / 0.16) 55%, transparent);
    pointer-events: none;
}
.lantern {
    position: absolute; bottom: 16%; width: 26px; height: 42px;
    background: linear-gradient(180deg, oklch(18% 0.02 60), oklch(10% 0.012 40));
    border-top: 1px solid oklch(72% 0.08 62 / 0.5);
}
.lantern::before {
    content: ''; position: absolute; left: 50%; bottom: 100%; translate: -50% 0;
    width: 150px; height: 150px;
    background: radial-gradient(circle at 50% 100%, oklch(78% 0.11 68 / 0.32), transparent 62%);
}
.lantern--l { left: 6%; }
.lantern--r { right: 6%; }
.terrace {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, oklch(16% 0.02 280) 0%, oklch(11% 0.014 270) 46%, oklch(8% 0.01 265) 100%);
    clip-path: polygon(11% 0, 89% 0, 132% 100%, -32% 100%);
}
.terrace__edge {
    position: absolute; left: 11%; right: 11%; top: 0; height: 2px;
    background: linear-gradient(90deg, transparent, oklch(72% 0.06 70 / 0.5) 20%, oklch(72% 0.06 70 / 0.5) 80%, transparent);
}
.terrace__lines {
    position: absolute; inset: 0;
    background:
        repeating-linear-gradient(90deg, transparent 0 78px, oklch(100% 0 0 / 0.045) 78px 79px),
        repeating-linear-gradient(180deg, transparent 0 26px, oklch(100% 0 0 / 0.03) 26px 27px, transparent 27px 58px, oklch(100% 0 0 / 0.045) 58px 59px);
    mask-image: linear-gradient(180deg, transparent 0, oklch(0% 0 0) 22%, oklch(0% 0 0) 100%);
    opacity: 0.85;
}
.terrace__glow {
    position: absolute; left: 50%; top: 0; width: 62%; height: 58%; translate: -50% 0;
    background: radial-gradient(50% 60% at 50% 0%, oklch(68% 0.09 62 / 0.25) 0%, transparent 72%);
}
.terrace__steps {
    position: absolute; left: 32%; right: 32%; bottom: 0; height: 26%;
    background:
        repeating-linear-gradient(180deg, oklch(14% 0.02 280) 0 9px, oklch(10% 0.014 270) 9px 10px);
    clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
    opacity: 0.9;
}

/* ── the rail (foreground) ─────────────────────────────────────────────── */
.rail { position: relative; z-index: 12; }
.rail__top {
    position: absolute; left: 0; right: 0; top: 0; height: 10px;
    background: linear-gradient(180deg, oklch(26% 0.02 60 / 0.95), oklch(14% 0.012 40 / 0.95));
    border-top: 1px solid oklch(72% 0.06 70 / 0.28);
    box-shadow: 0 8px 20px -12px oklch(0% 0 0 / 0.9);
}
.rail__bars {
    position: absolute; left: 0; right: 0; top: 10px; bottom: 0;
    background: repeating-linear-gradient(90deg,
        oklch(15% 0.014 40 / 0.9) 0 7px,
        transparent 7px 84px);
    mask-image: linear-gradient(180deg, oklch(0% 0 0) 0 62%, transparent 100%);
}
.rail__post { position: absolute; top: 0; bottom: 0; width: 14px; background: oklch(17% 0.015 45 / 0.92); }
.rail__post--l { left: 4%; }
.rail__post--r { right: 4%; }

/* ── gateway scenes (a world behind an arch) ───────────────────────────── */
.gscene { position: absolute; inset: 0; display: block; overflow: hidden; background: oklch(8% 0.01 265); }

.gscene--teaser { background: oklch(6% 0.005 20); }
.gs__dark { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 40%, oklch(18% 0.02 30) 0%, oklch(5% 0.004 20) 78%); }
.gs__mask {
    position: absolute; left: 50%; top: 40%; width: 26%; height: 38%; translate: -50% -50%;
    border-radius: 48% 48% 44% 44% / 56% 56% 40% 40%;
    background: radial-gradient(60% 70% at 50% 40%, oklch(90% 0.012 80) 0 42%, oklch(64% 0.008 60) 74%, transparent 78%);
    opacity: 0.55;
}
.gs__slit {
    position: absolute; left: 18%; top: 8%; bottom: 12%; width: 2px;
    background: oklch(52% 0.19 22);
    box-shadow: 0 0 18px 3px oklch(46% 0.19 22 / 0.65);
}
.gs__rain {
    position: absolute; inset: -10%;
    background: repeating-linear-gradient(76deg, transparent 0 9px, oklch(88% 0.01 80 / 0.16) 9px 10px);
    animation: rain-fall 1.6s linear infinite;
}
@keyframes rain-fall { to { transform: translate3d(-14px, 44px, 0); } }
.gs__floor {
    position: absolute; left: 0; right: 0; bottom: 0; height: 16%;
    background: linear-gradient(180deg, transparent, oklch(3% 0.003 20 / 0.9));
}

.gscene--shd {
    background: linear-gradient(180deg, oklch(80% 0.06 225) 0%, oklch(93% 0.04 86) 46%, oklch(85% 0.05 130) 62%, oklch(66% 0.08 138) 100%);
}
.gs__sky { position: absolute; inset: 0; }
.gscene--shd .gs__sun {
    position: absolute; right: 22%; top: 14%; width: 26%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, oklch(99% 0.05 92) 0 40%, transparent 72%);
}
.gs__haze {
    position: absolute; inset: 0;
    background: radial-gradient(70% 50% at 60% 62%, oklch(99% 0.04 88 / 0.5), transparent 70%);
}
.gs__ridge { position: absolute; bottom: 8%; width: 100%; height: 46%; color: oklch(30% 0.05 140); }
.gs__ridge path { fill: currentColor; }
.gs__poles path { stroke: oklch(24% 0.03 60); fill: none; }
.gs__grass {
    position: absolute; left: -10%; right: -10%; bottom: 0; height: 16%;
    background: linear-gradient(180deg, oklch(62% 0.09 138) 0 46%, oklch(44% 0.09 140) 100%);
    mask-image: repeating-linear-gradient(90deg, oklch(0% 0 0) 0 3px, transparent 3px 9px);
    opacity: 0.9;
}
.gs__motes {
    position: absolute; inset: 0;
    background-image: radial-gradient(oklch(100% 0.01 90 / 0.85) 0 1px, transparent 1.5px);
    background-size: 38px 44px;
    animation: mote-drift 14s linear infinite;
    opacity: 0.7;
}
@keyframes mote-drift { to { background-position: 22px -60px; } }

.gscene--at {
    background: linear-gradient(180deg, oklch(82% 0.075 235) 0%, oklch(95% 0.03 220) 52%, oklch(86% 0.07 120) 56%, oklch(74% 0.11 140) 100%);
}
.gs__cloud {
    position: absolute; left: -30%; width: 40%; height: 8%;
    border-radius: 40px;
    background: oklch(100% 0 0 / 0.9);
    box-shadow: 12px 4px 0 -1px oklch(100% 0 0 / 0.9), -12px 5px 0 -3px oklch(100% 0 0 / 0.9);
    animation: cloud-pass 26s linear infinite;
}
.gs__cloud--a { top: 16%; }
.gs__cloud--b { top: 30%; width: 26%; animation-duration: 34s; animation-delay: -12s; }
@keyframes cloud-pass { from { translate: 0 0; } to { translate: 150% 0; } }
.gs__hills { position: absolute; left: -20%; right: -20%; border-radius: 50% 50% 0 0 / 70% 70% 0 0; }
.gs__hills--far { bottom: 22%; height: 30%; background: oklch(80% 0.09 140); opacity: 0.8; }
.gs__hills--near { bottom: 0; height: 32%; background: oklch(70% 0.12 142); }
.gs__house {
    position: absolute; left: 24%; bottom: 26%; width: 18%; height: 16%;
    background: oklch(90% 0.06 60);
}
.gs__house::before {
    content: ''; position: absolute; left: -16%; right: -16%; bottom: 100%; height: 70%;
    background: oklch(62% 0.10 30);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.gs__house i {
    position: absolute; left: 20%; bottom: 18%; width: 22%; height: 30%;
    background: oklch(98% 0.05 90);
}
.gs__grass {
    position: absolute; left: 0; right: 0; bottom: 0; height: 10%;
    background: oklch(58% 0.13 145);
}

/* ── the hall of realities ─────────────────────────────────────────────── */
.hall__place { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: oklch(7% 0.012 275); }
.hall__wall {
    position: absolute; inset: 0 0 26%;
    background:
        radial-gradient(60% 50% at 50% 30%, oklch(22% 0.03 280) 0%, transparent 72%),
        linear-gradient(180deg, oklch(9% 0.014 275) 0%, oklch(12% 0.02 275) 100%);
}
.hall__niche {
    position: absolute; bottom: 26%; width: 16%; height: 40%;
    border-radius: 50% 50% 0 0 / 34% 34% 0 0;
    border: 1px solid oklch(72% 0.06 70 / 0.18);
    border-bottom: 0;
    background: radial-gradient(70% 60% at 50% 70%, oklch(18% 0.03 280), oklch(9% 0.014 275));
    box-shadow: inset 0 0 40px oklch(0% 0 0 / 0.7);
}
.hall__niche--1 { left: 10%; }
.hall__niche--2 { left: 42%; }
.hall__niche--3 { right: 10%; }
.hall__floor {
    position: absolute; left: 0; right: 0; bottom: 0; height: 28%;
    background: linear-gradient(180deg, oklch(12% 0.016 275), oklch(7% 0.01 270));
}
.hall__floor::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 96px, oklch(100% 0 0 / 0.04) 96px 97px);
    mask-image: linear-gradient(180deg, oklch(0% 0 0), transparent 90%);
}
.hall__lines {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0 3px, oklch(100% 0 0 / 0.012) 3px 4px);
    opacity: 0.6;
}
.hall__pillar {
    position: absolute; bottom: 0; width: 9%; height: 64%;
    background: linear-gradient(90deg, oklch(6% 0.008 270), oklch(14% 0.016 275) 42%, oklch(6% 0.008 270));
    box-shadow: 0 0 60px 10px oklch(0% 0 0 / 0.6);
}
.hall__pillar--l { left: -3%; }
.hall__pillar--r { right: -3%; }
.hall__lamp {
    position: absolute; top: 12%; width: 90px; height: 140px;
    background: radial-gradient(60% 50% at 50% 0%, oklch(72% 0.09 70 / 0.35), transparent 70%);
}
.hall__lamp--l { left: 18%; }
.hall__lamp--r { right: 18%; }

/* ── an alcove: a niche holding a world ────────────────────────────────── */
.alcove {
    position: relative;
    flex: 0 0 auto;
    width: var(--alcove-w, 520px);
    display: grid; gap: var(--space-3);
    padding: 0; border: 0; background: none; color: inherit;
    cursor: pointer;
    text-align: center;
    transition: transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out);
    filter: saturate(0.8) brightness(0.86);
}
.alcove__niche {
    position: relative; display: block;
    height: var(--alcove-h, 300px);
    border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    overflow: hidden;
    border: 1px solid var(--scene-rule);
    border-bottom: 2px solid oklch(72% 0.06 70 / 0.3);
    box-shadow: inset 0 0 70px oklch(0% 0 0 / 0.55);
}
.alcove__glass {
    position: absolute; inset: 0;
    background: linear-gradient(120deg, oklch(100% 0 0 / 0.12) 0 12%, transparent 34%);
    pointer-events: none;
}
.alcove__plaque {
    display: inline-grid; gap: 2px; justify-self: center;
    padding: 10px 22px;
    background: linear-gradient(180deg, oklch(16% 0.02 275), oklch(11% 0.014 270));
    border: 1px solid var(--scene-rule);
}
.alcove__plaque b { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: var(--tracking-caps); color: var(--scene-accent); }
.alcove__plaque span { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.1; color: var(--scene-dim); }
.alcove__plaque i { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--scene-faint); }

.alcove:hover, .alcove:focus-visible { filter: none; transform: translateY(-4px); }
.alcove[aria-current='true'] { filter: none; transform: translateY(-6px); }
.alcove[aria-current='true'] .alcove__niche { border-color: var(--scene-accent); box-shadow: inset 0 0 70px oklch(0% 0 0 / 0.4), 0 0 40px -12px var(--scene-accent); }
.alcove[aria-current='true'] .alcove__plaque span { color: var(--scene-ink); }

/* ── dioramas inside an alcove ─────────────────────────────────────────── */
.diorama { position: absolute; inset: 0; display: block; overflow: hidden; }
.diorama--teaser { background: oklch(6% 0.005 20); }
.diorama__trees { position: absolute; inset: 0; color: oklch(12% 0.01 25); }
.diorama__trees path { stroke: currentColor; fill: none; }
.diorama__slit {
    position: absolute; left: 12%; top: 10%; bottom: 6%; width: 2px;
    background: oklch(52% 0.19 22);
    box-shadow: 0 0 22px 4px oklch(46% 0.19 22 / 0.55);
}
.diorama__rain {
    position: absolute; inset: -10%;
    background: repeating-linear-gradient(76deg, transparent 0 11px, oklch(88% 0.01 80 / 0.14) 11px 12px);
    animation: rain-fall 1.8s linear infinite;
}

.diorama--shd {
    background: linear-gradient(180deg, oklch(80% 0.06 225) 0%, oklch(94% 0.04 86) 48%, oklch(84% 0.05 130) 58%, oklch(64% 0.08 138) 100%);
}
.diorama__sky { position: absolute; inset: 0; }
.diorama--shd .diorama__sun {
    position: absolute; right: 18%; top: 10%; width: 22%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, oklch(99% 0.05 92) 0 42%, transparent 72%);
}
.diorama__haze { position: absolute; inset: 0; background: radial-gradient(70% 50% at 62% 58%, oklch(99% 0.04 88 / 0.45), transparent 70%); }
.diorama__ridge { position: absolute; bottom: 10%; width: 100%; height: 48%; color: oklch(30% 0.05 140); }
.diorama__ridge path { fill: currentColor; }
.diorama__ridge g { stroke: oklch(24% 0.03 60); fill: none; }
.diorama__grass {
    position: absolute; left: -8%; right: -8%; bottom: 0; height: 14%;
    background: linear-gradient(180deg, oklch(60% 0.09 138), oklch(42% 0.09 140));
    mask-image: repeating-linear-gradient(90deg, oklch(0% 0 0) 0 3px, transparent 3px 8px);
}
.diorama__motes {
    position: absolute; inset: 0;
    background-image: radial-gradient(oklch(100% 0.01 90 / 0.8) 0 1px, transparent 1.5px);
    background-size: 34px 40px;
    animation: mote-drift 16s linear infinite;
}

.diorama--at {
    background: linear-gradient(180deg, oklch(82% 0.075 235) 0%, oklch(95% 0.03 220) 54%, oklch(86% 0.07 120) 58%, oklch(74% 0.11 140) 100%);
}
.diorama__sky { position: absolute; inset: 0; }
.diorama--at .diorama__sun {
    position: absolute; left: 16%; top: 12%; width: 20%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(circle, oklch(99% 0.09 96) 0 40%, transparent 70%);
}
.diorama__cloud {
    position: absolute; left: -20%; width: 34%; height: 7%;
    border-radius: 40px; background: oklch(100% 0 0 / 0.9);
    box-shadow: 10px 3px 0 -1px oklch(100% 0 0 / 0.9), -10px 4px 0 -3px oklch(100% 0 0 / 0.9);
    animation: cloud-pass 30s linear infinite;
}
.diorama__cloud--a { top: 18%; }
.diorama__cloud--b { top: 32%; width: 22%; animation-duration: 40s; animation-delay: -10s; }
.diorama__hills { position: absolute; bottom: 0; width: 100%; height: 56%; color: oklch(72% 0.12 142); }
.diorama__hills path { fill: currentColor; }
.diorama__hills g { stroke: oklch(46% 0.09 30); fill: oklch(88% 0.09 350); }
.diorama__grass {
    position: absolute; left: 0; right: 0; bottom: 0; height: 8%;
    background: oklch(58% 0.13 145);
}

/* ── the arcade room ───────────────────────────────────────────────────── */
.arc__carpet {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(60% 40% at 50% 86%, oklch(40% 0.14 330 / 0.22), transparent 70%),
        repeating-conic-gradient(from 45deg at 50% 50%, oklch(18% 0.05 300) 0 6deg, oklch(10% 0.02 300) 6deg 12deg);
    background-size: auto, 120px 120px;
    opacity: 0.5;
    mask-image: linear-gradient(180deg, transparent 0 54%, oklch(0% 0 0) 78%);
}
.arc__neon {
    position: absolute; z-index: 0; top: 8%;
    font-family: var(--font-mono); font-size: clamp(11px, 1.1vw, 14px);
    letter-spacing: 0.42em;
    color: oklch(84% 0.18 350);
    text-shadow: 0 0 10px oklch(70% 0.2 350 / 0.9), 0 0 32px oklch(60% 0.2 350 / 0.55);
    opacity: 0.75;
    animation: neon-breathe 6s var(--ease-out) infinite;
}
.arc__neon--a { left: 8%; }
.arc__neon--b { right: 9%; color: oklch(82% 0.15 200); text-shadow: 0 0 10px oklch(70% 0.15 200 / 0.9), 0 0 30px oklch(60% 0.16 200 / 0.5); animation-delay: -3s; }
@keyframes neon-breathe { 0%, 100% { opacity: 0.55; } 46% { opacity: 0.9; } 52% { opacity: 0.7; } }
.arc__floor {
    position: absolute; left: 0; right: 0; bottom: 0; height: 34%; z-index: 0;
    background: linear-gradient(180deg, oklch(9% 0.014 290), oklch(6% 0.01 290));
    mask-image: linear-gradient(180deg, transparent, oklch(0% 0 0) 40%);
}
.arc__floor::before {
    content: ''; position: absolute; inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 120px, oklch(70% 0.12 200 / 0.06) 120px 121px);
}
.arc__counter {
    position: absolute; left: 0; bottom: 0; width: 22%; height: 42%; z-index: 0;
    background: linear-gradient(180deg, oklch(13% 0.02 300), oklch(8% 0.012 300));
    clip-path: polygon(0 12%, 100% 0, 100% 100%, 0 100%);
    opacity: 0.9;
}
.arc__ceiling {
    position: absolute; left: 0; right: 0; top: 0; height: 22%; z-index: 0;
    background: radial-gradient(50% 100% at 50% 0%, oklch(30% 0.05 300 / 0.35), transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
    .gs__rain, .diorama__rain, .gs__motes, .diorama__motes, .gs__cloud, .diorama__cloud, .arc__neon { animation: none !important; }
}
