/* Hotel Night Shift front page.
   The look comes from the game: a hotel lobby at 3 AM seen through its own
   security cameras. Night blue walls, one warm desk lamp, the red of a bellhop
   uniform, the green of an exit sign, and the purple of something that should
   not be standing there. */

:root {
  --night: #070912;
  --wall: #0d1122;
  --panel: #131830;
  --line: #232a4a;
  --text: #eceef7;
  --muted: #9aa3c2;
  --lamp: #f6b93b;
  --lamp-soft: #ffd98a;
  --purple: #a974ff;
  --bellhop: #e5484d;
  --exit: #2bd47d;
  --exit-deep: #17a35c;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --maxw: 1200px;
  --gutter: clamp(18px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 16.5px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.04; text-wrap: balance; letter-spacing: -0.015em; }
em { font-style: italic; font-weight: 600; color: var(--lamp-soft); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--lamp); color: #000; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--night) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 18px; white-space: nowrap; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--text); }

/* The Sanity meter: it drains as you read down the page, the way it does in the game. */
.sanity { display: flex; align-items: center; gap: 8px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sanity-bar { width: 84px; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.sanity-bar i { display: block; height: 100%; width: 100%; background: var(--exit); border-radius: inherit; transition: width .25s linear, background-color .4s; }
.sanity-value { width: 4ch; text-align: right; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 10px;
  font: 700 16px/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .2s, background-color .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:active { transform: translateY(1px); }
.btn-play { background: var(--exit); color: #04130b; box-shadow: 0 0 0 0 color-mix(in srgb, var(--exit) 60%, transparent); }
.btn-play:hover { background: #45e692; box-shadow: 0 0 34px -4px color-mix(in srgb, var(--exit) 70%, transparent); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: color-mix(in srgb, var(--panel) 60%, transparent); }
.btn-ghost:hover { border-color: var(--lamp); color: var(--lamp-soft); }
.btn-small { padding: 10px 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); align-items: center;
  gap: clamp(28px, 4vw, 64px);
  max-width: calc(var(--maxw) + 160px); margin: 0 auto;
  padding: clamp(36px, 7vw, 96px) var(--gutter) clamp(48px, 7vw, 96px);
  position: relative;
}
/* The desk lamp: one warm pool of light in a dark room. */
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lamp) 16%, transparent), transparent 70%);
  pointer-events: none; z-index: -1;
}
.eyebrow, .kicker {
  display: flex; align-items: center; gap: 9px;
  font: 600 12px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lamp);
}
h1 { font-size: clamp(42px, 6.2vw, 84px); margin: 18px 0 22px; }
h1 em { display: inline-block; font-size: .62em; line-height: 1.15; margin-top: .25em; color: var(--purple); }
.lede { font-size: clamp(17px, 1.5vw, 19.5px); color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 6px 34px; margin-top: 38px; padding-top: 22px; border-top: 1px solid var(--line); }
.stats dt { font: 600 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stats dd { font: 800 clamp(22px, 2.4vw, 30px)/1.2 var(--display); font-variant-numeric: tabular-nums; margin-top: 4px; }
.stats div:first-child dd { color: var(--exit); }

/* The security camera feed that frames the key art. */
.feed { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 40px 90px -30px #000, 0 0 0 6px color-mix(in srgb, var(--wall) 80%, transparent); }
.feed img { width: 100%; height: auto; }
.feed::after { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / .13) 2px 3px);
  mix-blend-mode: multiply;
}
.feed-ui { position: absolute; inset: 0; font: 600 12px/1 var(--mono); letter-spacing: .1em; color: #fff; text-shadow: 0 1px 6px #000; z-index: 1; }
.feed-tag { position: absolute; top: 18px; left: 22px; display: flex; align-items: center; gap: 7px; }
.feed-cam { position: absolute; top: 18px; right: 22px; }
.feed-clock { position: absolute; bottom: 18px; right: 22px; font-variant-numeric: tabular-nums; }
.corner { position: absolute; width: 22px; height: 22px; border: 2px solid rgb(255 255 255 / .75); }
.corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }
.rec { width: 9px; height: 9px; border-radius: 50%; background: var(--bellhop); box-shadow: 0 0 10px var(--bellhop); animation: blink 1.4s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 112px) var(--gutter); }
.section > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section.dark { background: linear-gradient(180deg, var(--wall), var(--night)); border-block: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(30px, 4vw, 54px); margin-top: 14px; max-width: 18em; }
.section-lede { color: var(--muted); max-width: 38em; margin-top: 16px; font-size: 17.5px; }
.more { margin-top: 28px; }
.more a { color: var(--lamp); font-weight: 700; text-decoration: none; border-bottom: 1px solid transparent; }
.more a:hover { border-color: currentColor; }

/* The job: three numbered steps, because the night really does go in this order. */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.step img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.step div { padding: 22px 24px 26px; }
.step h3 { font-size: 25px; display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.step h3 span { font: 600 13px/1 var(--mono); color: var(--lamp); letter-spacing: .08em; }
.step p { color: var(--muted); }

/* Anomalies: a line-up you can scroll along, like checking guests one by one. */
.lineup { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(170px, 19vw, 240px); gap: 14px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; scrollbar-color: var(--line) transparent; }
.lineup img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); scroll-snap-align: start; filter: grayscale(.25); transition: filter .25s, transform .25s; }
.lineup img:hover { filter: none; transform: translateY(-4px); }

/* Residents: case files clipped to camera stills. */
.files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.file { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 24px; position: relative; }
.file-photo { position: relative; border-radius: 9px; overflow: hidden; margin-bottom: 18px; background: #000; }
.file-photo img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; object-position: 50% 22%; filter: grayscale(.55) contrast(1.12) brightness(.92); transition: filter .3s; }
.file:hover .file-photo img { filter: none; }
.file-photo::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 2px, rgb(0 0 0 / .18) 2px 3px), radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / .55)); pointer-events: none; }
.file-id { font: 600 11px/1 var(--mono); letter-spacing: .12em; color: var(--bellhop); }
.file h3 { font-size: 30px; margin: 10px 0 8px; }
.file p { color: var(--muted); }
.file-fix { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 15px; }
.file-fix b { display: block; font: 600 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--exit); }

/* Classes: the staff roster. */
.roster { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.roster li { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.roster img { aspect-ratio: 3 / 4; width: 100%; object-fit: cover; transition: transform .35s; }
.roster li:hover img { transform: scale(1.04); }
.roster span { position: absolute; inset: auto 0 0 0; padding: 34px 12px 12px; background: linear-gradient(transparent, rgb(4 6 14 / .92)); font: 800 17px/1.15 var(--display); }

/* Halloween event. */
.event { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 56px); align-items: center; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }
.event > * { margin: 0; max-width: none; }
.event img { border-radius: 14px; border: 1px solid var(--line); width: 100%; }
.event h2 { font-size: clamp(32px, 4.4vw, 58px); margin: 14px 0 16px; }
.event h2 em { color: #ff9a3d; }
.event p { color: var(--muted); max-width: 30em; margin-bottom: 24px; }

/* Badges. */
.badges { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.badges img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.badges img:hover { transform: scale(1.12) rotate(-4deg); border-color: var(--lamp); }

/* Closing call. */
.closing { text-align: center; padding: clamp(72px, 10vw, 140px) var(--gutter); background: radial-gradient(ellipse 60% 70% at 50% 100%, color-mix(in srgb, var(--lamp) 14%, transparent), transparent 70%); }
.closing .kicker { justify-content: center; }
.closing h2 { font-size: clamp(40px, 7vw, 92px); margin: 16px 0 6px; }
.closing .cta { justify-content: center; }

/* Footer. */
.footer { display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; padding: 38px var(--gutter) 46px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.footer .brand { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: start; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.legal { grid-column: 1 / -1; font-size: 13px; opacity: .75; max-width: 60em; }

/* Sections ease in once, as you reach them. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Smaller screens ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .feed { order: -1; }
  .steps, .files { grid-template-columns: 1fr; }
  .step { flex-direction: row; }
  .step img { width: 40%; aspect-ratio: auto; }
  .file { display: grid; grid-template-columns: 38% 1fr; column-gap: 18px; align-content: start; }
  .file-photo { grid-row: span 5; margin: 0; }
  .roster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .event { grid-template-columns: 1fr; }
  .badges { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .nav-links { display: none; }
  .sanity { margin-left: auto; }
}
@media (max-width: 560px) {
  .sanity-label { display: none; }
  .sanity-bar { width: 56px; }
  .brand span { display: none; }
  .stats { grid-template-columns: repeat(2, auto); gap: 16px 34px; }
  .step { flex-direction: column; }
  .step img { width: 100%; aspect-ratio: 16 / 10; }
  .file { display: block; }
  .file-photo { margin-bottom: 18px; }
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badges { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feed-cam { display: none; }
  .btn { width: 100%; }
  .btn-small { width: auto; }
  .footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rec { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sanity-bar i, .btn, .lineup img, .roster img, .badges img { transition: none; }
}
