/* GhostRoom landing page — ghostroom.video
 *
 * Standalone from the app bundle on purpose: a marketing page must paint before
 * anything downloads App.tsx. Tokens are mirrored from src/client/styles/v3.css
 * (:root, lines 13-31) rather than imported, so the two can drift only
 * deliberately. If you change a colour there, change it here.
 *
 * Fonts are self-hosted (DSGVO — never the Google Fonts CDN), copied from the
 * @fontsource packages the app already depends on.
 */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-600-italic.woff2?v=4") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jost-latin-400-normal.woff2?v=4") format("woff2");
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jost-latin-500-normal.woff2?v=4") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-500-normal.woff2?v=4") format("woff2");
}

:root {
  --bg: #14151c;
  --bg-deep: #0e0f14;
  --surface: rgba(26, 28, 38, 0.86);
  --surface-2: rgba(38, 40, 54, 0.9);
  --ink: #eceef4;
  --ink-soft: #aab0c2;
  --ink-faint: #7a8094;
  --line: rgba(236, 238, 244, 0.16);
  --line-strong: rgba(236, 238, 244, 0.3);
  --accent: #8a7fb0;
  --accent-bright: #a89ed0;
  --accent-2: #8aab97;
  --rec: #d96a78;

  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Jost", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wide: 1040px;
  --pad: 32px;
}

* { box-sizing: border-box; }

/* No global `scroll-behavior: smooth`: it animates EVERY programmatic scroll —
   anchor jumps, find-in-page, focus-into-view — not just the one place we want
   it. The CTA passes behavior:"smooth" to scrollTo() itself. */
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: color-mix(in oklab, var(--accent) 40%, transparent); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------ type ----- */

.d {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
h1.d { font-size: clamp(42px, 6.2vw, 78px); line-height: 1.04; }
h2.d { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.08; }
h3.d { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; }

.m {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.lead { font-size: clamp(17px, 2vw, 20px); line-height: 1.62; color: var(--ink-soft); }
.body { font-size: 18px; line-height: 1.68; color: var(--ink-soft); }
.body p { margin: 0; }
.body-stack { display: flex; flex-direction: column; gap: 16px; }
.pull {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.45;
}

/* --------------------------------------------------------- layout ----- */

.wrap { max-width: var(--wide); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.narrow { max-width: 720px; }
.mid { max-width: 900px; }

section { padding-top: 96px; padding-bottom: 96px; }
.band { background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
}
/* Media-left on desktop, but text always leads on mobile — a stacked section
   that opens with a picture of nothing in particular reads as decoration. */
.split.media-left > .media { order: -1; }
@media (max-width: 760px) {
  .split.media-left > .media { order: 1; }
  section { padding-top: 72px; padding-bottom: 72px; }
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 26px; padding-bottom: 26px;
}
.wordmark { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 22px; }

/* ---------------------------------------------------------- room ------ */
/* The signature motif: face tiles accumulating around a seed frame. Tiles hold
   a constant size — the ring never shrinks, same rule as the product. */

.room { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; position: relative; }
.room-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.tile {
  position: relative;
  width: 72px; height: 72px;
  flex: none;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  /* Shows through until (and if) the image loads — the tile is never empty. */
  background: radial-gradient(92% 78% at 50% 34%,
    color-mix(in oklab, var(--accent) 42%, var(--surface)) 0%,
    color-mix(in oklab, var(--accent-2) 24%, var(--bg-deep)) 68%,
    var(--bg-deep) 100%);
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Vignette + bottom shade sit ON TOP of the photo, so a filled tile still reads
   as a lit tile in a dark room rather than a pasted-in snapshot. */
.tile::before, .tile::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tile::before { background: radial-gradient(48% 42% at 50% 40%, rgba(242, 240, 235, 0.16), transparent 72%); }
.tile::after { background: linear-gradient(180deg, transparent 44%, rgba(14, 15, 20, 0.5)); }

.tile.is-you { border: 2px solid var(--accent); }
.tile.is-you .you-label {
  position: absolute; left: 6px; bottom: 5px; z-index: 3;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; color: var(--accent-bright);
}
.tile.is-arriving { box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent); border-color: var(--accent-bright); }

.seed {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 60% at 68% 30%, color-mix(in oklab, var(--accent-2) 16%, transparent), transparent 60%),
    radial-gradient(150% 130% at 50% -10%, color-mix(in oklab, var(--accent) 20%, var(--bg-deep)), var(--bg-deep) 66%);
}
.seed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.seed::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.42));
}
.seed-play {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid rgba(242, 240, 235, 0.4);
  background: color-mix(in oklab, var(--bg-deep) 40%, transparent);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 15px; padding-left: 3px;
}
.seed-label {
  position: absolute; z-index: 3; left: 13px; bottom: 13px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; color: var(--ink-soft);
}
.seed-bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(236, 238, 244, 0.16); }
.seed-bar > i { display: block; height: 100%; width: 38%; background: var(--accent-bright); }
.seed-rec { position: absolute; z-index: 4; top: 11px; left: 11px; }

.room.is-dim::after {
  content: ""; position: absolute; inset: -4px; z-index: 5; pointer-events: none; border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 15, 20, 0.26), rgba(14, 15, 20, 0.64));
}
.room-caption { text-align: center; margin-top: 15px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-faint); }

/* The AI-origin disclosure (Art. 50(4) AI Act). Deliberately --ink-soft, not
   the --ink-faint the other captions inherit: faint measures 4.36:1 on
   --surface, under the 4.5:1 floor, and the two §5 cards it sits on are raised
   surfaces where the page already overrides it elsewhere. A legally required
   disclosure has to be legible before it is discreet. */
.room-caption.is-disclosure { color: var(--ink-soft); }
/* §11b stacks this under the existing "fades on 30 nov" caption. */
.room-caption + .room-caption { margin-top: 4px; }
/* The hero only. That room is ~690px tall, so a caption below it needs
   scrolling on every ordinary viewport while the faces are already on screen —
   the one place where "below the block" and "at first exposure" conflict. */
.room-caption.is-above { margin-top: 0; margin-bottom: 14px; }

/* Small rooms (the day 1/4/12 triptych) keep the tile-to-seed ratio readable. */
.room.is-small .tile { width: 34px; height: 34px; border-radius: 8px; }
.room.is-small { gap: 6px; }
.room.is-small .room-row { gap: 5px; }
.room.is-small .seed-play { width: 30px; height: 30px; font-size: 10px; }

/* The rec pill — rose is reserved for recording, nothing else on this page. */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  border-radius: 999px; padding: 6px 12px;
  border: 1px solid var(--line); background: color-mix(in oklab, var(--bg-deep) 70%, transparent);
  backdrop-filter: blur(6px); color: var(--ink-soft);
}
.pill.rec { color: var(--rec); border-color: color-mix(in oklab, var(--rec) 45%, transparent); }
.rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rec); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .rec-dot { animation: rec-pulse 1.8s ease-in-out infinite; }
}
@keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* --------------------------------------------------- divider motif ---- */
/* Gains one more face each time it recurs, so the page itself fills as you scroll. */

.motif { display: flex; justify-content: center; gap: 8px; padding: 8px var(--pad); }
.motif i { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); display: block; }
.motif i.on {
  border-color: transparent;
  background: radial-gradient(92% 78% at 50% 34%,
    color-mix(in oklab, var(--accent) 42%, var(--surface)) 0%,
    color-mix(in oklab, var(--accent-2) 24%, var(--bg-deep)) 68%,
    var(--bg-deep) 100%);
}

/* ---------------------------------------------------------- bits ------ */

.card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 24px; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--accent-bright); }
/* An <h2> now (it titles the sections under it), so reset the UA heading
   margin/weight and keep the act break looking like a rule, not a headline. */
.rule { border-top: 1px solid var(--line); padding-top: 20px; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.08em; color: var(--ink-faint); margin: 0; }

.claims { display: flex; flex-direction: column; gap: 14px; margin: 0 0 20px; }
.claims > div { padding-left: 16px; border-left: 1px solid var(--line-strong); font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.claims strong { color: var(--ink); font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  font-family: var(--mono); font-size: 12px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; line-height: 1.3;
}

.glyphs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.glyph-col { display: flex; flex-direction: column; gap: 16px; }
.glyph-col svg { color: var(--ink-soft); }
.glyph-col h3 { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 24px; color: var(--ink); margin: 0; }
.glyph-col p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0; }

/* section 3 — the tools that demand "be here now" */
.mock { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 16px 18px; }
/* --surface is a raised card, so --ink-faint drops to 4.36:1 here too. */
.mock .m { color: var(--ink-soft); }
.mock-times { display: flex; gap: 16px; margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.mock-thread { border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); padding: 14px 18px; display: flex; flex-direction: column; gap: 9px; }
.mock-thread div { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }

/* section 10a — the filmstrip */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.strip figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.strip .shot {
  position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-deep);
}
.strip .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip .shot.is-focus { border-color: var(--accent); }
.strip figcaption { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); text-align: center; }
.strip .is-focus + figcaption { color: var(--accent-bright); }

/* section 10b — the shared timeline */
.beat { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-deep); }
.beat img { width: 100%; height: 100%; object-fit: cover; display: block; }
.beat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 52%, rgba(14, 15, 20, 0.5)); }
.beat .seed-label { bottom: 12px; left: 13px; font-size: 10px; z-index: 3; }
.timeline { margin-top: 14px; position: relative; height: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.timeline i { position: absolute; left: 0; top: -1px; height: 4px; width: 62%; border-radius: 999px; background: color-mix(in oklab, var(--accent) 55%, transparent); }
.timeline b { position: absolute; left: 62%; top: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-bright); border: 2px solid var(--bg); }
.timeline-legend { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }

/* section 11a — three doors into one room */
.doors { display: flex; flex-direction: column; gap: 12px; }
.door { display: flex; align-items: center; gap: 14px; }
.door .icon { flex: none; width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.door span { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.door .fill { flex: 1; height: 1px; background: var(--line); }

/* --------------------------------------------------------- buttons ---- */

.btn {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  border-radius: 999px; padding: 14px 28px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  min-height: 44px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #14121c; font-weight: 500; }
.btn.primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
/* aria-disabled reads the same as disabled here: the submit button goes
   unavailable while a request is in flight without being natively disabled,
   which would throw away the focus the visitor is standing on. */
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta .m { letter-spacing: 0.05em; }
/* Same contrast failure as .consent — --ink-faint on --surface: the sub-label
   sits on the raised offer card, not the page background. */
.offer .cta .m { color: var(--ink-soft); }

/* ------------------------------------------------------------ faq ----- */

.faq { display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: none; cursor: pointer; text-align: left;
  padding: 24px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  color: var(--ink); font-family: var(--display); font-style: italic; font-weight: 600; font-size: 22px; line-height: 1.3;
}
.faq-sign { flex: none; font-family: var(--mono); font-size: 20px; color: var(--accent-bright); font-style: normal; }
.faq-a { font-size: 16px; line-height: 1.66; color: var(--ink-soft); margin: 0; padding: 0 0 26px; max-width: 640px; }
.faq-a[hidden] { display: none; }

/* ----------------------------------------------------------- form ----- */

.offer { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 44px 40px; backdrop-filter: blur(10px); text-align: center; }
@media (max-width: 520px) { .offer { padding: 32px 22px; } }
.offer-body { font-size: 16px; line-height: 1.66; color: var(--ink-soft); margin: 0 0 32px; text-align: left; }

.form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.input {
  width: 100%; background: var(--bg-deep); border: 1px solid var(--line); border-radius: 999px;
  padding: 14px 20px; color: var(--ink); font-family: var(--body); font-size: 15px; outline: none;
  min-height: 44px;
}
.input:focus { border-color: var(--accent); }
/* This has to out-specify `.input { outline: none }` above, which is the same
   (0,1,0) as the global :focus-visible and comes later in the file — so it was
   silently winning and leaving the only two inputs on the page with nothing but
   a 1px border-colour change to mark focus. */
.input:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }
.input::placeholder { color: var(--ink-faint); }
/* --ink-faint is 4.36:1 on the .offer card's --surface — under the 4.5:1 floor,
   and this is the GDPR processing notice. It clears the bar on the page's --bg;
   raised surfaces need --ink-soft (7.85:1). */
.consent { font-size: 12px; line-height: 1.55; color: var(--ink-soft); margin: 4px 0 0; }
.consent a { color: var(--ink-soft); text-decoration: underline; }
.form-error { font-family: var(--mono); font-size: 12px; color: var(--rec); }
/* Empty is the resting state, not `hidden` — the live region must stay in the
   accessibility tree. It has no height of its own, so only .form's 12px gap
   would show; cancel exactly that. */
.form-error:empty { margin-top: -12px; }
/* Visually hidden but read by screen readers — the placeholder is not a label. */
.vh { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Honeypot. Offscreen rather than display:none — bots fill what they can read.
   Deliberately NOT sharing a class with .vh, so skipping one doesn't skip both. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Submission outcomes. Hidden by default and revealed two ways, because the
   page has to answer with and without JavaScript:
     :target      — the server redirected a plain form post to #seat-…, so CSS
                    alone renders the result. This is the no-JS path.
     .is-shown    — landing.js revealed it after a fetch().
   Deliberately not the `hidden` attribute: overriding a UA display rule to
   reveal an element that still says hidden="" is a lie to assistive tech. */
.outcome { display: none; }
.outcome:target,
.outcome.is-shown { display: block; }
/* Success replaces the form. The ID+combinator outranks `.form`'s display, and
   the general sibling combinator keeps it working wherever the panel sits, as
   long as it stays ahead of the form. */
#seat-requested:target ~ .form,
.form.is-hidden { display: none; }
.done { border: 1px solid var(--accent); border-radius: 8px; background: color-mix(in oklab, var(--accent) 12%, transparent); padding: 24px; }
/* Same shape as .done, in the recording rose — this is a state to act on, and
   it is never colour-only: the heading says what happened. */
.warn { border: 1px solid var(--rec); border-radius: 8px; background: color-mix(in oklab, var(--rec) 12%, transparent); padding: 24px; margin-bottom: 20px; }
/* An <h3> now. 600 is the only weight of the display face we ship, so state it
   rather than letting the UA ask for 700 and get a synthesised bold. */
.done-head { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 24px; color: var(--ink); margin: 0 0 8px; }

footer.colophon {
  max-width: 1100px; margin: 0 auto; padding: 40px var(--pad) 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.colophon-links { display: flex; gap: 14px; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }
/* `a { text-decoration: none }` is global, and these links share their colour,
   size and face with the plain <span> next to them — a 1:1 ratio between link
   and non-link text, which is WCAG 1.4.1. The underline is the only thing that
   distinguishes them. */
.colophon-links a { color: var(--ink-faint); text-decoration: underline; text-underline-offset: 3px; }
.colophon-links a:hover { color: var(--ink-soft); }

/* --------------------------------------------------------- reveal ----- */
/* Set by JS only when the observer is actually wired, so a JS failure can never
   leave the page invisible. */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-reveal [data-reveal].shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .tile.is-arriving { box-shadow: none; }
}
