:root {
    color-scheme: light;
    --paper: #f7f6f3;
    --ink: #211b24;
    --muted: #625965;
    --red: #a80d3d;
    --line: #e6e0df;
    font-family: "Inter", system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #b51245; outline-offset: 4px; }
.shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
.top {
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line);
    gap: 12px;
}
.brand { display: inline-flex; align-items: center; font-weight: 850; letter-spacing: -.055em; font-size: 28px; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 33px;
    height: 33px;
    margin-right: 10px;
    border-radius: 10px;
    background: var(--red);
    color: white;
    font-size: 28px;
    letter-spacing: 0;
    line-height: 1;
}
.brand img { display: block; max-width: min(360px, 150vw); max-height: 150px; object-fit: contain; }
.intro h1 span { color: var(--red); }
.demo { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.demo i { background: var(--red); width: 7px; height: 7px; border-radius: 50%; flex: none; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 45px 0 28px; }
h1, h2, p { margin: 0; }
.intro h1, .next-page h1 { font-size: clamp(33px, 5.8vw, 78px); line-height: 1.02; letter-spacing: -.055em; font-weight: 820; }
.intro p, .next-page p { margin-top: 12px; color: var(--muted); font-size: clamp(15px, 1.4vw, 19px); }
.reference { display: grid; gap: 6px; padding: 0 0 4px 20px; border-left: 1px solid var(--line); }
.reference span { color: var(--muted); font-size: 12px; }
.reference strong { font: 650 14px ui-monospace, monospace; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(224px, 25%); gap: 20px; align-items: start; }
.player, .route { background: #fff; border: 1px solid var(--line); border-radius: 23px; overflow: hidden; }
.scene { isolation: isolate; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #ddd9dc; }
.stills, .still, .scene-shade { position: absolute; inset: 0; }
.still { opacity: 0; transition: opacity .65s ease; }
.still.is-active { opacity: 1; }
.still img { width: 100%; height: 100%; display: block; object-fit: cover; }
.scene-shade { pointer-events: none; background: linear-gradient(0deg, #1c1328ed 0%, #1c132855 26%, transparent 53%); }
.scene-meta { position: absolute; top: 20px; left: 22px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fff; border-radius: 99px; color: #322731; font: 700 12px ui-monospace, monospace; }
.scene-meta > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.scene-caption { position: absolute; color: white; bottom: 0; padding: 24px 28px; }
.scene-caption h2, .final h2 { font-size: clamp(23px, 3.2vw, 43px); line-height: 1.05; letter-spacing: -.045em; }
.scene-caption p { margin-top: 8px; color: #f3eef5; line-height: 1.4; }
body:has(.final[open]) { overflow: hidden; }
.final {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    background: #211625;
    color: white;
    isolation: isolate;
}
.final[open] { display: grid; place-items: center; animation: reveal .45s ease both; }
.final::backdrop { background: #211625; }
.final-image { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .16; z-index: -1; }
.final-content { width: min(100%, 680px); text-align: center; padding-block: 32px; }
.final .final-demo { margin-bottom: 20px; color: #f0b5c7; font-size: 14px; }
.final h2 { font-size: clamp(36px, 7vw, 76px); text-wrap: balance; }
.final p { margin: 16px 0 24px; color: #f3eef5; }
.final-back { margin-top: 20px; padding: 8px; background: transparent; border: 0; color: #f3eef5; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.final-back:focus-visible { outline-color: white; }
.primary { display: inline-flex; align-items: center; gap: 25px; padding: 12px 17px; min-height: 46px; background: #ba1748; color: white; font-weight: 740; border-radius: 10px; }
.primary:hover { background: #950b36; }
.primary:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px #950b36; }
.primary span { font-size: 19px; }
.controls { padding: 10px 20px; display: flex; align-items: center; gap: 15px; min-height: 65px; }
.controls button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: #faf8f7; padding: 7px 9px; cursor: pointer; min-height: 39px; min-width: 113px; font-size: 13px; font-weight: 700; }
.controls button:hover, .stage:hover { background: #f8edf1; }
#play-icon { width: 20px; font-size: 17px; color: var(--red); }
progress { min-width: 0; flex: 1; height: 5px; border: 0; border-radius: 10px; overflow: hidden; background: #eee8e9; accent-color: var(--red); }
progress::-webkit-progress-bar { background: #eee8e9; }
progress::-webkit-progress-value { background: var(--red); }
progress::-moz-progress-bar { background: var(--red); }
.route { padding: 25px 17px 20px; }
.route h2 { font-size: 20px; letter-spacing: -.035em; padding: 0 10px; }
.route ol { list-style: none; padding: 0; margin: 17px 0 0; }
.route li { position: relative; }
.route li:not(:last-child)::after { content: ""; position: absolute; width: 1px; background: #decfd4; left: 20px; top: calc(50% + 9px); bottom: calc(-50% + 9px); pointer-events: none; }
.stage { display: flex; width: 100%; align-items: center; gap: 12px; text-align: left; padding: 11px 12px; min-height: 50px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; }
.stage:disabled { cursor: default; }
.stage-dot { width: 17px; height: 17px; border: 1px solid #cbb9c2; border-radius: 50%; flex: none; background: white; }
.stage.is-past .stage-dot { border: 5px solid #ead8e0; background: var(--red); }
.stage[aria-current] { color: var(--red); background: #f9edf1; font-weight: 750; }
.stage[aria-current] .stage-dot { border: 5px solid var(--red); }
.scanner { display: none; position: absolute; z-index: 1; top: 44%; left: 34%; width: 29%; height: 1px; background: #f03766; box-shadow: 0 0 12px 3px #ff4d76a0; pointer-events: none; }
[data-stage="3"] .scanner { display: block; opacity: 0; }
[data-stage="3"] .scene.has-motion .scanner { animation: scan 3s .2s ease-in-out infinite paused; }
[data-stage="3"] .scene.has-motion[data-running="true"] .scanner { animation-play-state: running; }
.footer { color: var(--muted); border-top: 1px solid var(--line); margin-top: 31px; padding: 16px 0 25px; font-size: 13px; }
.next-page { padding: 70px 0; }
.next-page .primary { margin-top: 25px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes scan {
    0%, 100% { opacity: 0; transform: translateY(-16px); }
    25%, 65% { opacity: .65; }
    85% { opacity: 0; transform: translateY(45px); }
}
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 970px) {
    .shell { width: calc(100% - 52px); }
    .layout { grid-template-columns: minmax(0, 1fr) minmax(185px, 25%); gap: 12px; }
    .route { padding-inline: 10px; }
}
@media (max-width: 700px) {
    .shell { width: calc(100% - 32px); }
    .top { min-height: 62px; }
    .brand { font-size: 23px; }
    .brand-mark { width: 28px; height: 28px; }
    .demo { font-size: 11px; }
    .intro { flex-wrap: wrap; gap: 12px; padding: 28px 0 18px; }
    .reference { display: flex; align-items: baseline; border: 0; padding: 0; gap: 9px; }
    .reference strong { font-size: 12px; }
    .layout { grid-template-columns: minmax(0, 1fr); }
    .scene { aspect-ratio: 1 / 1; }
    .scene-meta { top: 13px; left: 13px; }
    .scene-caption { padding: 17px; }
    .scene-caption p, .final p { font-size: 14px; }
    .route { padding: 17px 10px 12px; }
    .route ol { margin-top: 8px; }
    .stage { min-height: 44px; }
}
