/* transmission — the public slice. Monochrome, live grain, ONE accent colour that means something
   (the signal). No inline styles anywhere (strict CSP). */
:root {
  --bg: #000;
  --fg: rgba(255, 255, 255, 0.86);
  --dim: rgba(255, 255, 255, 0.42);
  --faint: rgba(255, 255, 255, 0.14);
  --accent: #ff3b1f;
  --mono: ui-monospace, "SF Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --grain: 0.11;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); }
body {
  font: 17px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; }
.dim { color: var(--dim); }
.accent { color: var(--accent); }

/* Unapproved copy. html[data-draft="false"] (site.yaml → draft_markers) hides the markers. */
.draft { color: var(--accent); border: 1px dashed var(--accent); padding: 2px 6px; display: inline-block; }
html[data-draft="false"] .draft { display: none; }

/* ------------------------------------------------------------- grain (live, over everything) */
.grain {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  pointer-events: none; z-index: 10;
  opacity: var(--grain); mix-blend-mode: screen;
  image-rendering: pixelated;
}
body[data-screen="door"] { --grain: 0.14; }
body[data-screen="transmission"] { --grain: 0.08; }
body[data-screen="soon"] { --grain: 0.12; }

/* ------------------------------------------------------------- screens */
.screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 32px 16px; text-align: center;
  animation: arrive 900ms ease-out both;
}
@keyframes arrive { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: none; } }

button, .ghost, .primary {
  font: inherit; color: var(--fg); background: none; cursor: pointer;
  border: 1px solid var(--faint); padding: 10px 18px; text-decoration: none;
  transition: border-color 200ms, color 200ms, background 200ms;
}
.ghost { color: var(--dim); }
button:hover, .ghost:hover { color: var(--fg); border-color: var(--dim); }
.primary { border-color: var(--accent); color: #fff; }
.primary:hover { background: var(--accent); color: #000; border-color: var(--accent); }
button.mono, a.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------- door */
.signal-line { color: var(--dim); }
.signal-line .off { animation: flicker 3.7s steps(1) infinite; }
@keyframes flicker { 0%, 61%, 66%, 100% { opacity: 1; } 62%, 65% { opacity: 0.1; } }

.beacon {
  width: 14px; height: 14px; border-radius: 50%;
  background: #1a0805; box-shadow: 0 0 0 1px rgba(255, 59, 31, 0.15);
  transition: background 40ms, box-shadow 40ms;
}
.beacon.on { background: var(--accent); box-shadow: 0 0 18px 4px rgba(255, 59, 31, 0.55), 0 0 80px 20px rgba(255, 59, 31, 0.18); }
.beacon.open { animation: swell 900ms ease-in forwards; }
@keyframes swell { to { transform: scale(60); opacity: 0; } }

.door-form { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(360px, 100%); }
.door-form input {
  width: 100%; padding: 12px 14px; text-align: center; text-transform: uppercase;
  color: #fff; background: transparent; border: 0; border-bottom: 1px solid var(--faint);
  font-size: 18px; letter-spacing: 0.35em; caret-color: var(--accent);
}
.door-form input:focus { outline: none; border-bottom-color: var(--accent); }
.feedback { min-height: 1.6em; margin: 0; color: var(--fg); }
.hint { min-height: 1.6em; margin: 0; max-width: 36ch; }
.shake { animation: shake 360ms; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ------------------------------------------------------------- gate */
.gate-card { max-width: 34rem; text-align: left; display: flex; flex-direction: column; gap: 14px; }
.gate-h { font-weight: 400; font-size: clamp(26px, 6vw, 38px); line-height: 1.15; margin: 0; color: #fff; }
.gate-card p { margin: 0; }
.descriptors { margin: 0; padding-left: 1.2em; color: var(--dim); }
.descriptors li { margin: 4px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }

/* ------------------------------------------------------------- transmission */
.transmission { padding: 0; gap: 0; background: #000; position: relative; }
.tx-video { width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; background: #000; }
.tx-label { position: fixed; top: 14px; left: 16px; margin: 0; z-index: 11; }
.tx-label::before { content: "● "; color: var(--accent); animation: flicker 1.3s steps(1) infinite; }
.skip { position: fixed; right: 16px; bottom: 16px; z-index: 11; padding: 6px 12px; opacity: 0.5; }
.skip:hover { opacity: 1; }

.unmute { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 11; }

/* ------------------------------------------------------------- sound */
.sound-toggle { position: fixed; top: 10px; right: 16px; z-index: 11; padding: 4px 10px; opacity: 0.55; }
.sound-toggle:hover { opacity: 1; }
html[data-sound="off"] .sound-toggle { color: var(--accent); border-color: rgba(255, 59, 31, 0.4); }
.sound-note { margin: 0; transition: opacity 600ms; }
html[data-audio="unlocked"] .sound-note { opacity: 0; }

/* ------------------------------------------------------------- the creature, behind the waitlist (after the room) */
.soon { position: relative; }
.soon-card { position: relative; z-index: 2; }
.been-here { margin-top: 18px; color: inherit; }
.creature { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

/* ------------------------------------------------------------- coming soon (waitlist) + link pages */
.soon-card { max-width: 34rem; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 14px; }
.soon-card p { margin: 0; }
.soon-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.soon-form input[type="email"] {
  width: 100%; padding: 12px 2px; color: #fff; background: transparent; border: 0;
  border-bottom: 1px solid var(--faint); font-size: 16px; letter-spacing: 0.04em; caret-color: var(--accent);
}
.soon-form input[type="email"]:focus { outline: none; border-bottom-color: var(--accent); }
.soon-form button { align-self: flex-start; }
.soon-form[data-sent] input, .soon-form[data-sent] button { opacity: 0.4; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.plain-note { font: 13px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--dim); }
.soon .ghost, .link-action .ghost { align-self: flex-start; }

/* ------------------------------------------------------------- left / 404 */
.left .mono, .lost .mono { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .screen, .signal-line .off, .tx-label::before, .shake { animation: none; }
  .beacon.open { animation: none; }
}

/* ------------------------------------------------------------- the key screen (rows-20; only when site.yaml → key_screen) */
body[data-screen="key"] { --grain: 0.08; }
.key { justify-content: flex-start; }
.key-card { max-width: 40rem; width: 100%; text-align: left; display: flex; flex-direction: column; gap: 14px; }
.key-card p { margin: 0; }
.key-film { width: 100%; display: block; background: #000; }
.key-stills { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.key-stills img { width: 100%; display: block; }
.key .ghost { align-self: flex-start; }

/* sunday-6: the front (site.yaml → front: slit). The game's pictures full screen, each opening from a thin line of light;
   the words low; the game's grain over all (the page's own canvas); its blue sparingly; the ember edge on the button. */
.screen.front { display: block; padding: 0; gap: 0; text-align: left; animation: none;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif; }
.screen.front[hidden] { display: none; }
.front-hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: #000; }
.front-slide { position: absolute; inset: 0; clip-path: inset(50% 0 50% 0); transition: clip-path 2.4s cubic-bezier(.6, 0, .2, 1); }
.front-slide.on { clip-path: inset(0 0 0 0); z-index: 2; }
.front-slide.was { clip-path: inset(0 0 0 0); z-index: 1; }
.front-slide img, .front-slide video, .front-slide picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.front-shade { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(to top, rgba(6, 6, 7, .92) 0, rgba(6, 6, 7, .35) 45%, rgba(6, 6, 7, 0) 70%); }
.front-words { position: absolute; z-index: 4; left: 0; right: 0; bottom: 7svh; padding: 0 20px; }
.front-city { font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: #3594d6; margin: 0 0 10px; }
.front-name { margin: 0 -.3em 0 0; font-weight: 700; font-size: min(8.2vw, 76px); letter-spacing: .3em; line-height: 1.1;
  color: #e6e8ee; text-shadow: 0 2px 18px rgba(0, 0, 0, .7); }
.front-line { margin: 12px 0 22px; font-size: 15px; color: #c9ccd4; max-width: 34em; text-shadow: 0 1px 8px #000; }
.front-cta { display: inline-block; color: #e6e8ee; text-decoration: none; font-size: 12px; letter-spacing: .32em;
  text-transform: uppercase; padding: 15px 26px; border: 1px solid rgba(230, 232, 238, .5); background: rgba(6, 6, 7, .55);
  border-bottom: 2px solid #ff7a2a; }
.front-adult { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #8d9099; margin: 14px 0 0; }
.front-key { max-width: 560px; margin: 0 auto; padding: 56px 20px 48px; }
.front-key p { color: #8d9099; font-size: 15px; margin: 10px 0; }
.front-label { display: block; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: #8d9099; margin: 26px 0 8px; }
#front-email { width: 100%; font: inherit; font-size: 18px; padding: 15px 14px; border: 1px solid #6d727d; border-radius: 2px;
  background: #101114; color: #e6e8ee; }
#front-email:focus { outline: none; border-color: #3594d6; }
.front-tick { display: flex; gap: 12px; align-items: center; margin: 14px 0; font-size: 15px; color: #e6e8ee; }
.front-tick input { width: 22px; height: 22px; accent-color: #3594d6; }
.front-ask { width: 100%; font: inherit; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; padding: 16px;
  border: 1px solid rgba(230, 232, 238, .5); border-bottom: 2px solid #ff7a2a; border-radius: 2px; background: #16181c; color: #e6e8ee; }
.front-ask:disabled { opacity: .4; }
.front-feedback { min-height: 1.5em; color: #e6e8ee !important; }
.front-deeper { font-size: 12px !important; }
.front-link { background: none; border: 0; padding: 0; font: inherit; color: #8d9099; text-decoration: underline; cursor: pointer; }
@media (min-width: 900px) { .front-words { padding: 0 64px; } }
@media (prefers-reduced-motion: reduce) { .front-slide { transition: none; } }
