/* The Watch Room (/undrworld) */
:root { --red: #c8ff00; --ink: #f1ece4; --muted: #9a948c; --gutter: clamp(16px, 3.6vw, 56px); --display: "Anton", Impact, sans-serif; --sans: "Inter", system-ui, sans-serif; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #030303; color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
#room { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#room:active { cursor: grabbing; }

/* arrival */
.r-intro { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; text-align: center; background: #030303; transition: opacity 1.2s .2s, visibility 1.2s .2s; }
body.in .r-intro { opacity: 0; visibility: hidden; }
.r-intro-k { font: 500 10px var(--sans); letter-spacing: .4em; text-transform: uppercase; color: var(--red); }
.r-intro-t { font: 400 clamp(54px, 9vw, 130px)/.9 var(--display); text-transform: uppercase; margin: 14px 0 26px; }
.r-intro-t em { font-style: normal; color: transparent; -webkit-text-stroke: 2px var(--red); }
.r-bar { width: 220px; height: 2px; margin: 0 auto; background: rgba(255,255,255,.1); overflow: hidden; }
.r-bar i { display: block; height: 100%; width: 40%; background: var(--red); box-shadow: 0 0 12px var(--red); animation: load 1.2s ease-in-out infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* HUD */
.r-top { position: fixed; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 20px var(--gutter);
  background: linear-gradient(rgba(3,3,3,.7), transparent); }
.r-logo { display: inline-flex; align-items: center; gap: 12px; color: #f5f1e8; }
.r-logo svg { width: 28px; height: 26px; }
.r-logo .door { fill: var(--red); filter: drop-shadow(0 0 8px rgba(200,255,0,.8)); }
.r-logo span { font: 800 12.5px "Orbitron", sans-serif; letter-spacing: .26em; }
.r-nav { display: flex; gap: 22px; align-items: center; font-size: 13px; color: #bdb7af; }
.r-nav a:hover { color: var(--ink); }
.r-nav .r-cta { color: #0a0a0a; background: var(--red); padding: 10px 16px; border-radius: 40px; font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 10px 30px rgba(200,255,0,.3); }
.r-nav .r-cta:hover { color: #0a0a0a; }
.r-title { position: fixed; left: var(--gutter); top: 96px; z-index: 5; pointer-events: none; opacity: 0; transition: opacity 1s 2.2s; }
body.in .r-title { opacity: 1; }
.r-k { font: 500 10px var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--red); }
.r-title h2 { font: 400 clamp(30px, 3.4vw, 54px)/.95 var(--display); text-transform: uppercase; margin-top: 8px; text-shadow: 0 4px 30px #000; }
.r-title em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--red); }
.r-chips { position: fixed; left: 50%; bottom: 58px; transform: translateX(-50%); z-index: 6; display: flex; gap: 6px; padding: 6px; border-radius: 40px;
  background: rgba(10,10,10,.7); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); max-width: calc(100vw - 24px); overflow-x: auto;
  opacity: 0; transition: opacity 1s 2.4s; scrollbar-width: none; }
body.in .r-chips { opacity: 1; }
.r-chips button { flex: none; background: none; border: 0; border-radius: 30px; padding: 9px 14px; font: 500 12px var(--sans); color: #bdb7af; cursor: pointer; white-space: nowrap; }
.r-chips button sup { font-size: 9px; color: var(--red); margin-left: 3px; }
.r-chips button.on { background: var(--red); color: #0a0a0a; }
.r-chips button.on sup { color: #0a0a0a; }
.r-hint { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 6; font: 500 10px var(--sans); letter-spacing: .26em; text-transform: uppercase; color: #6f6a64; white-space: nowrap; }

/* hover card */
.r-tip { position: fixed; left: 0; top: 0; z-index: 8; pointer-events: none; display: grid; gap: 3px; padding: 12px 16px; border-radius: 14px; max-width: 280px;
  background: rgba(8,8,8,.86); border: 1px solid rgba(200,255,0,.45); box-shadow: 0 0 30px rgba(200,255,0,.2); backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s; }
.r-tip.on { opacity: 1; }
.r-tip b { font: 400 22px/1 var(--display); text-transform: uppercase; }
.r-tip span { font-size: 12.5px; color: #b9b3ab; }
.r-tip i { font-style: normal; font: 600 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin-top: 4px; }

/* the dive: rings rush at you as the screen fills the view */
.r-dive { position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: 0; }
body.diving .r-dive { opacity: 1; }
body.diving .r-dive::after { content: ''; position: absolute; inset: 0; background: #050505; opacity: 0; animation: blackout .5s .8s forwards; }
.r-dive i { position: absolute; left: 50%; top: 50%; width: 20vmax; height: 20vmax; margin: -10vmax 0 0 -10vmax; border-radius: 50%; border: 2px solid var(--red);
  box-shadow: 0 0 40px var(--red); opacity: 0; }
body.diving .r-dive i { animation: rush 1s cubic-bezier(.6,0,.9,.4) forwards; }
body.diving .r-dive i:nth-child(2) { animation-delay: .1s; } body.diving .r-dive i:nth-child(3) { animation-delay: .2s; }
body.diving .r-dive i:nth-child(4) { animation-delay: .3s; } body.diving .r-dive i:nth-child(5) { animation-delay: .4s; }
@keyframes rush { 0% { transform: scale(6); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(.05); opacity: 0; } }
@keyframes blackout { to { opacity: 1; } }
body.diving .r-title, body.diving .r-chips, body.diving .r-hint, body.diving .r-top { opacity: 0; transition: opacity .3s; }

.r-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.r-nojs { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; }
.r-nojs a { color: var(--red); }

@media (max-width: 760px) {
  .r-nav a:not(.r-cta) { display: none; }
  .r-title { top: 78px; }
  .r-title h2 { font-size: 28px; }
  .r-chips { bottom: 46px; }
  .r-hint { bottom: 16px; font-size: 9px; letter-spacing: .18em; }
}

/* ---------- the way to the Motion Lab ---------- */
.to-lab { position: fixed; right: var(--gutter); top: 96px; z-index: 6; display: grid; justify-items: end; gap: 4px; padding: 14px 18px; border-radius: 16px; cursor: pointer;
  background: rgba(10,10,10,.7); border: 1px solid rgba(200,255,0,.45); color: var(--ink); text-align: right; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 0 30px rgba(200,255,0,.15); opacity: 0; transition: opacity 1s 2.6s, border-color .25s, box-shadow .25s; font-family: var(--sans); }
body.in .to-lab { opacity: 1; }
.to-lab:hover { border-color: var(--red); box-shadow: 0 0 40px rgba(200,255,0,.35); }
.to-lab span { font: 400 26px/1 var(--display); text-transform: uppercase; }
.to-lab i { font-style: normal; font-size: 11.5px; color: #b9b3ab; max-width: 220px; }
body.in-lab .r-title, body.in-lab .r-chips, body.in-lab .r-hint, body.in-lab .to-lab, body.in-lab .r-tip { display: none; }

/* ---------- Motion Lab HUD ---------- */
.lab-hud[hidden] { display: none; }
.lab-back { position: fixed; left: var(--gutter); top: 96px; z-index: 7; background: rgba(10,10,10,.7); border: 1px solid rgba(255,255,255,.18); color: var(--ink); border-radius: 30px;
  padding: 10px 16px; font: 600 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.lab-back:hover { border-color: var(--red); }
.lab-now { position: fixed; left: var(--gutter); top: 150px; z-index: 6; max-width: 340px; }
.lab-name { font: 400 clamp(34px, 3.6vw, 56px)/.95 var(--display); text-transform: uppercase; margin: 8px 0 8px; text-shadow: 0 4px 30px #000; }
.lab-line { color: #c4beb6; font-size: 14px; }
.lab-open { display: inline-block; margin-top: 14px; font: 600 11px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.lab-bar { position: fixed; left: 50%; bottom: 124px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 12px; width: min(520px, calc(100vw - 32px)); }
.lab-pp { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(200,255,0,.6); background: rgba(10,10,10,.7); cursor: pointer; position: relative; }
.lab-pp::before, .lab-pp::after { content: ''; position: absolute; top: 11px; width: 3px; height: 11px; background: var(--red); }
.lab-pp::before { left: 12px; } .lab-pp::after { left: 18px; }
.lab-pp.paused::before { left: 13px; width: 0; height: 0; background: none; border-left: 10px solid var(--red); border-top: 6px solid transparent; border-bottom: 6px solid transparent; top: 11px; }
.lab-pp.paused::after { display: none; }
.lab-scrub { flex: 1; accent-color: #c8ff00; height: 4px; cursor: pointer; }
.lab-list { position: fixed; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 6; display: flex; gap: 8px; max-width: calc(100vw - 24px); overflow-x: auto; padding: 4px; scrollbar-width: none; }
.lab-list button { flex: none; display: grid; gap: 4px; width: 104px; padding: 4px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1); background: rgba(10,10,10,.7); cursor: pointer; color: #bdb7af; }
.lab-list button img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; opacity: .7; }
.lab-list button span { font: 500 10px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-list button.on { border-color: var(--red); color: var(--ink); box-shadow: 0 0 18px rgba(200,255,0,.3); }
.lab-list button.on img { opacity: 1; }
.lab-hint { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; font: 500 9.5px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #6f6a64; white-space: nowrap; }

/* ---------- warp between rooms ---------- */
.r-warp { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; }
.r-warp.on { animation: warpBg 1.1s ease forwards; }
.r-warp i { position: absolute; left: 50%; top: 50%; width: 24vmax; height: 24vmax; margin: -12vmax 0 0 -12vmax; border-radius: 50%; border: 2px solid var(--red); box-shadow: 0 0 40px var(--red); opacity: 0; }
.r-warp.on i { animation: warpRing 1.1s cubic-bezier(.5,0,.5,1) forwards; }
.r-warp.on i:nth-child(2) { animation-delay: .08s; } .r-warp.on i:nth-child(3) { animation-delay: .16s; }
@keyframes warpBg { 0% { opacity: 0; background: #030303; } 45%, 55% { opacity: 1; background: #030303; } 100% { opacity: 0; background: #030303; } }
@keyframes warpRing { 0% { transform: scale(.05); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(4); opacity: 0; } }

@media (max-width: 760px) {
  .to-lab { top: auto; bottom: 104px; right: 12px; padding: 10px 14px; }
  .to-lab span { font-size: 20px; }
  .to-lab i { display: none; }
  .r-chips { bottom: 46px; }
  .lab-back { top: 78px; }
  .lab-now { top: 124px; max-width: 70vw; }
  .lab-name { font-size: 30px; }
  .lab-line { font-size: 12.5px; }
  .lab-bar { bottom: 118px; }
  .lab-list button { width: 86px; }
}
