:root {
	--fiberglass: #ece9e3;
	--orange: #e2552a;
	--teak: #9e7559;
	--carpet: #3f3a33;
	--phosphor: #7ce0a3;
	--amber: #e6b23a;
	--glass: #07100c;
	--condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, monospace;
	--zoom: 0;
	--alarm: 0;
	--seated: 0;
	--chrome-font: var(--mono);
	--chrome-fg: var(--fiberglass);
	--chrome-bg: rgba(7, 16, 12, 0.7);
	--chrome-line: rgba(124, 224, 163, 0.4);
}

html {
	background: #1b1714;
	color: var(--phosphor);
}

body {
	font-family: var(--mono);
	font-size: 15px;
	line-height: 1.6;
}

::selection {
	background: rgba(124, 224, 163, 0.3);
}

/* Camera: the screen is the viewport at 0.42 scale; sitting down scales it to 1 and the room by the
   same ratio around the same point, so the bezel always holds the screen. */
.room,
.screen {
	position: fixed;
	inset: 0;
	pointer-events: none;
	transform-origin: 50% 42.5%;
	will-change: transform;
}

.room {
	z-index: 0;
	transform: scale(calc(1 + var(--zoom) * 1.381));
}

.wall {
	position: absolute;
	inset: 0 0 24vh;
	background:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='900'><filter id='w' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.08 .004' numOctaves='3' seed='5' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .25  0 0 0 0 .14  0 0 0 0 .07  0 0 0 .55 -.08'/></filter><rect width='100%25' height='100%25' filter='url(%23w)'/></svg>") 0 0 / 600px 900px,
		repeating-linear-gradient(90deg, transparent 0 calc(9vw - 3px), rgba(40, 22, 10, 0.55) calc(9vw - 3px) 9vw),
		linear-gradient(180deg, #5a3f2c 0%, var(--teak) 40%, #8a644a 100%);
	box-shadow: inset 0 -30px 60px rgba(0, 0, 0, 0.35), inset 0 60px 120px rgba(0, 0, 0, 0.45);
}

.carpet {
	position: absolute;
	inset: auto 0 0;
	height: 24vh;
	background:
		url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='c' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .16  0 0 0 0 .14  0 0 0 0 .12  0 0 0 .7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23c)'/></svg>"),
		linear-gradient(180deg, #2b2722, var(--carpet) 50%, #4a443b);
	box-shadow: inset 0 18px 30px rgba(0, 0, 0, 0.45);
}

.signage {
	position: absolute;
	top: calc(63.5vh + 22px);
	left: 50%;
	z-index: 1;
	transform: translateX(-50%);
	margin: 0;
	font-family: var(--condensed);
	font-weight: 500;
	font-size: 1.3vh;
	letter-spacing: 0.4em;
	text-transform: uppercase;
	color: rgba(236, 233, 227, 0.75);
	white-space: nowrap;
}

.screen {
	z-index: 1;
	overflow: hidden;
	background: var(--glass);
	transform: scale(calc(0.42 + var(--zoom) * 0.58));
	border-radius: calc((1 - var(--zoom)) * 44px);
	box-shadow: 0 0 120px rgba(124, 224, 163, 0.25);
}

.screen::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse 80% 70% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

.board {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.scanlines {
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
	mix-blend-mode: multiply;
}

/* The fiberglass bezel, drawn on the room so it scales with the camera. */
.room::after {
	content: "";
	position: absolute;
	top: calc(21.5vh - 14px);
	left: calc(29vw - 14px);
	right: calc(29vw - 14px);
	bottom: calc(36.5vh - 14px);
	border-radius: 30px;
	background: linear-gradient(160deg, #fbfaf7, var(--fiberglass) 45%, #b9b3a8);
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.chairs {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	z-index: 3;
	pointer-events: none;
	transform-origin: 50% 100%;
	transform: translateY(calc(var(--zoom) * 70vh)) scale(calc(1 + var(--zoom) * 0.5));
	opacity: calc(1 - var(--zoom) * 0.6);
	filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.35));
}

.beacon {
	position: fixed;
	inset: -50vmax;
	z-index: 4;
	pointer-events: none;
	mix-blend-mode: screen;
	opacity: calc(var(--alarm) * 0.55);
	background: conic-gradient(from 0deg at 50% 50%, rgba(230, 178, 58, 0.9), transparent 12%, transparent 50%, rgba(230, 178, 58, 0.9) 62%, transparent 74%);
	animation: beacon 2.4s linear infinite;
}

@keyframes beacon {
	to {
		transform: rotate(1turn);
	}
}

.room-main {
	z-index: 5;
}

.eyebrow {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(236, 233, 227, 0.75);
}

.arrival {
	height: 230vh;
	text-align: center;
	color: var(--fiberglass);
}

.arrival .eyebrow {
	padding-top: 2.4vh;
}

.arrival h1 {
	margin: 0.6vh 0 0;
	font-family: var(--condensed);
	font-weight: 800;
	font-size: 11.5vh;
	line-height: 0.95;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--fiberglass);
	text-shadow: 0 2px 0 #c9c4ba, 0 6px 14px rgba(0, 0, 0, 0.45);
}

.lede {
	position: absolute;
	top: 71vh;
	left: 0;
	right: 0;
	margin: 0;
	font-family: var(--condensed);
	font-size: 2.6vh;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--fiberglass);
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.slide {
	min-height: 120vh;
	padding: 16vh 8vw 10vh;
}

.panel {
	position: relative;
	max-width: 760px;
	margin: 0;
	padding: 1.6rem 1.8rem 1.8rem;
	background: rgba(5, 12, 9, 0.86);
	border: 1px solid rgba(124, 224, 163, 0.32);
	border-radius: 6px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 50px rgba(124, 224, 163, 0.08), inset 0 0 40px rgba(124, 224, 163, 0.05);
	text-shadow: 0 0 6px rgba(124, 224, 163, 0.45);
	backdrop-filter: blur(2px);
}

.credits a {
	color: var(--fiberglass);
	text-underline-offset: 3px;
}

.watch {
	min-height: 180vh;
}

.hold {
	min-height: 200vh;
}

.try {
	position: sticky;
	top: 80vh;
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--amber);
	text-shadow: 0 0 8px rgba(230, 178, 58, 0.5);
}

.refs {
	display: grid;
	gap: 22vh;
}

.shot {
	max-width: 900px;
}

.shot img {
	width: 100%;
	height: auto;
	border-radius: 2px;
	filter: saturate(0.95) contrast(1.02);
}

.shot figcaption {
	margin-top: 0.9rem;
	font-size: 12px;
	color: rgba(201, 243, 216, 0.85);
}

.vsm {
	max-width: 440px;
	margin-left: auto;
	margin-right: 8vw;
}

.vsm img {
	background: #f4f2ee;
	padding: 10px;
}

.dsky-shot {
	max-width: 560px;
}

.arrival [data-reveal].in {
	opacity: clamp(0, 1 - var(--zoom) * 2.6, 1);
	transition:
		opacity 0.6s ease var(--delay, 0ms),
		transform 1.6s cubic-bezier(0.2, 0.7, 0.1, 1) var(--delay, 0ms);
}

.colophon {
	min-height: 150vh;
}

.credits {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
	line-height: 1.7;
	color: rgba(201, 243, 216, 0.8);
}

.nav {
	margin-top: 2.6rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(124, 224, 163, 0.25);
	font-size: 14px;
	color: var(--fiberglass);
}

/* Apollo-style readout, only once you are seated. */
.dsky {
	position: fixed;
	top: 52px;
	right: 18px;
	z-index: 30;
	display: grid;
	gap: 6px;
	width: 236px;
	padding: 10px;
	background: linear-gradient(170deg, #4b4a46, #2d2c29);
	border-radius: 6px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
	font-size: 10px;
	color: var(--phosphor);
	opacity: var(--seated);
	transform: translateY(calc((1 - var(--seated)) * -20px));
	pointer-events: none;
}

.dsky-lamps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
}

.dsky-lamps span {
	padding: 3px 0;
	text-align: center;
	font-family: var(--condensed);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b675d;
	background: #1b1a18;
	border-radius: 2px;
}

.dsky-lamps span.on {
	color: #1e1608;
	background: var(--amber);
	box-shadow: 0 0 10px rgba(230, 178, 58, 0.7);
}

.dsky-lamps span.on.cool {
	background: #f4f2ee;
	box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dsky-row,
.dsky-reg {
	display: grid;
	align-items: center;
	padding: 4px 6px;
	background: #0b120e;
	border-radius: 2px;
}

.dsky-row {
	grid-template-columns: auto 1fr auto 1fr auto 1fr;
	gap: 4px;
}

.dsky-reg {
	grid-template-columns: 1fr auto;
}

.dsky label {
	font-family: var(--condensed);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(124, 224, 163, 0.55);
}

.dsky output {
	font-size: 17px;
	font-weight: 500;
	text-align: right;
	font-variant-numeric: tabular-nums;
	text-shadow: 0 0 8px rgba(124, 224, 163, 0.8);
}

/* The chair arm: six square buttons that change the slide, as in the original room. */
.armrest {
	position: fixed;
	right: 18px;
	bottom: 70px;
	z-index: 30;
	display: grid;
	grid-template-columns: repeat(3, 46px);
	gap: 7px;
	padding: 10px;
	background: linear-gradient(160deg, #fbfaf7, var(--fiberglass) 55%, #c4beb3);
	border-radius: 10px 10px 18px 18px;
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 #fff;
	opacity: var(--seated);
	transform: translateY(calc((1 - var(--seated)) * 30px));
	pointer-events: none;
}

.seated .armrest {
	pointer-events: auto;
}

.armrest button {
	position: relative;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: linear-gradient(180deg, #4a443b, var(--carpet));
	box-shadow: 0 3px 0 #211d18, inset 0 1px 0 rgba(255, 255, 255, 0.15);
	cursor: pointer;
	color: var(--fiberglass);
	font: 600 9px var(--mono);
}

.armrest button:active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #211d18;
}

.armrest button.on {
	background: linear-gradient(180deg, #ff7448, var(--orange));
	box-shadow: 0 3px 0 #8f2f12, 0 0 14px rgba(226, 85, 42, 0.6);
}

.armrest button:focus-visible {
	outline: 2px solid var(--phosphor);
	outline-offset: 2px;
}

.armrest span {
	position: absolute;
	right: 4px;
	bottom: 2px;
	opacity: 0.7;
}

.g {
	position: absolute;
	inset: 12px;
	border: 2px solid currentColor;
}

.g-room {
	border-radius: 50% 50% 0 0;
}

.g-loop {
	border-radius: 50%;
	border-right-color: transparent;
}

.g-slides {
	inset: 13px 10px;
}

.g-status {
	border: 0;
	background: repeating-linear-gradient(180deg, currentColor 0 3px, transparent 3px 7px);
}

.g-door {
	inset: 11px 15px;
	border-bottom: 0;
}

@media (max-width: 900px) {
	.dsky {
		display: none;
	}
	.vsm {
		margin-right: 0;
	}
}
