:root {
  color-scheme: dark;
  --paper: #f8f5ef;
  --ink: #161616;
  --night: #080808;
  --pulse: #e82256;
  font-family: "Trebuchet MS", sans-serif;
  background: var(--night);
  color: #fff;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { position: fixed; inset: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button[hidden] { display: none; }
.presentation { position: fixed; inset: 0; overflow: hidden; isolation: isolate; }
.origin, .arrival { position: absolute; inset: 0; display: grid; place-items: center; }
.origin { background: var(--paper); opacity: 0; visibility: hidden; }
.composition { position: relative; width: min(90vw, 600px, 102svh); aspect-ratio: 1.2; }
.avenue { position: absolute; width: 88%; left: 6%; top: 1%; aspect-ratio: 3 / 2; }
.avenue-art { display: block; width: 100%; height: auto; }
.contour { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke-linecap: round; }
.contour-trace { stroke: var(--pulse); stroke-width: 0.7; opacity: 0.12; }
.contour-light { stroke: var(--pulse); stroke-width: 2; stroke-dasharray: 0.065 0.935; stroke-dashoffset: 0.065; opacity: 0; filter: drop-shadow(0 0 2px #ff7299); }
.origin-wordmark { position: absolute; width: 74%; left: 16%; top: 46%; height: auto; filter: drop-shadow(0 3px 0 var(--paper)) drop-shadow(0 -3px 0 var(--paper)); }
.origin-light { position: absolute; left: 78.684%; top: 54.544%; width: 12px; height: 12px; transform: translate(-50%, -50%); border-radius: 50%; background: #ff315f; opacity: 0; box-shadow: 0 0 12px 5px #ff315f55; }
.blackout { position: absolute; z-index: 2; left: 50%; top: 50%; width: 210vmax; height: 210vmax; border-radius: 50%; background: var(--night); transform: translate(-50%, -50%) scale(0); pointer-events: none; }
.turn { position: absolute; z-index: 3; left: 50%; top: 50%; width: clamp(48px, 7vw, 72px); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: 0; color: var(--ink); pointer-events: none; }
.turn svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.arrival { z-index: 4; padding: max(24px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left)); }
.enter { display: flex; flex-direction: column; align-items: center; gap: clamp(34px, 7vh, 64px); padding: 32px 16px; color: #fff; text-decoration: none; border-radius: 20px; max-width: 100%; }
.destination-wordmark { display: block; width: min(72vw, 640px, 130svh); max-width: 100%; height: auto; filter: brightness(0) invert(1); }
.entry-cue { display: inline-flex; align-items: center; gap: 12px; color: #c4c4c4; font-size: 14px; letter-spacing: 0.025em; line-height: 1.4; }
.cue-icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cue-touch { display: none; }
.cue-arrow { width: 19px; height: 19px; margin-left: 6px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 180ms ease; }
.enter:hover .entry-cue { color: #fff; }
.enter:hover .cue-arrow { transform: translateX(4px); }
.enter:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 8px; }
.skip { position: fixed; z-index: 6; bottom: max(24px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); padding: 12px 16px; min-height: 44px; border: 0; border-radius: 8px; color: #65605a; background: transparent; font-size: 12px; white-space: nowrap; }
.replay { position: fixed; z-index: 6; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: 44px; height: 44px; border: 1px solid #ffffff25; border-radius: 50%; background: transparent; color: #aaa; }
.replay svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

html[data-input="touch"] .cue-touch { display: block; }
html[data-input="touch"] .cue-mouse { display: none; }
html[data-phase] .origin { opacity: 1; visibility: visible; }
html[data-phase] .arrival { opacity: 0; visibility: hidden; pointer-events: none; }
html[data-phase="avenue"] .contour-light { animation: contour-run 1900ms linear 150ms both; }
html[data-phase="avenue"] .origin-light { animation: ignition 620ms ease-in-out 1730ms both; }
html[data-phase="turn"] .composition { animation: depart 430ms ease-in both; }
html[data-phase="turn"] .turn { animation: turn-appear 220ms ease-out both; }
html:is([data-phase="turn"], [data-phase="dark"], [data-phase="reveal"]) .turn svg { animation: turning 800ms linear infinite; }
html[data-phase="dark"] .composition { opacity: 0; }
html[data-phase="dark"] .blackout { animation: blackout 760ms cubic-bezier(.65, 0, .2, 1) both; }
html[data-phase="dark"] .turn { opacity: 1; animation: invert-arrow 250ms ease-out 90ms both; }
html:is([data-phase="dark"], [data-phase="reveal"], [data-phase="ready"]) .skip { color: #bfbfbf; }
html:is([data-phase="reveal"], [data-phase="ready"]) .blackout { transform: translate(-50%, -50%) scale(1); }
html:is([data-phase="reveal"], [data-phase="ready"]) .origin { opacity: 0; visibility: hidden; }
html[data-phase="reveal"] .turn { color: #fff; animation: turn-away 380ms ease-in both; }
html[data-phase="reveal"] .arrival { visibility: visible; animation: arrive 700ms cubic-bezier(.2, .8, .2, 1) both; }
html[data-phase="reveal"] .entry-cue { opacity: 0; }
html[data-phase="ready"] .arrival { opacity: 1; visibility: visible; pointer-events: auto; }
html[data-phase="ready"] .entry-cue { animation: cue-appear 450ms ease-out both; }
html[data-review="true"] *, html[data-review="true"] *::before { animation-duration: 0s !important; animation-delay: 0s !important; }

@keyframes contour-run { 0% { opacity: 0; stroke-dashoffset: .065; } 5% { opacity: 1; } 94% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: -1; } }
@keyframes ignition { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 45% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); } 100% { opacity: .9; transform: translate(-50%, -50%) scale(1); } }
@keyframes depart { to { opacity: 0; transform: scale(.88); } }
@keyframes turn-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes turning { to { transform: rotate(360deg); } }
@keyframes blackout { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes invert-arrow { from { color: var(--ink); } to { color: #fff; } }
@keyframes turn-away { from { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) rotate(180deg) scale(.55); } }
@keyframes arrive { from { opacity: 0; transform: translateY(12px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes cue-appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

@media (pointer: coarse) { html:not([data-input="mouse"]) .cue-touch { display: block; } html:not([data-input="mouse"]) .cue-mouse { display: none; } }
@media (max-height: 420px) { .enter { gap: 26px; padding: 16px; } .destination-wordmark { width: min(65vw, 90svh); } .composition { width: min(55vw, 106svh); } .skip { bottom: max(6px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } .origin, .turn, .blackout { display: none; } html[data-phase] .arrival { opacity: 1; visibility: visible; pointer-events: auto; } }
