/**
 * @file The public landing page and its « Ta partie est prête » step (lobby/page.js, js/hosted/home.js): the
 * Tantale's on-board screens at full size. base.css gives the palette and the monospace face; this sheet adds a
 * HUD strip, framed captures like the GM's monitors, and scan lines. One dark world on purpose.
 */
.landing {
  --gutter: clamp(16px, 4vw, 48px);
  --width: 1120px;
  --hud: 34px;
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}
/* Scan lines over everything, as on the TV and the phones. */
.landing::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
  z-index: 50;
}
.landing a {
  color: var(--amber);
}
.landing :focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
.landing h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 18px;
  text-wrap: balance;
  font-weight: 600;
}
.landing h3 {
  font-size: 18px;
  color: var(--amber);
  margin: 0 0 10px;
  letter-spacing: 0.03em;
}
.landing p {
  margin: 0 0 12px;
  max-width: 64ch;
}
.landing em {
  font-style: italic;
  color: #ffe2a3;
}

/* --- The HUD strip: the ship's status line, like the GM console's map header --- */
.hud {
  position: fixed;
  inset: 0 0 auto;
  height: calc(var(--hud) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--amber2);
  background: linear-gradient(rgba(5, 5, 5, 0.92), rgba(5, 5, 5, 0.6));
  border-bottom: 1px solid var(--line);
  z-index: 40;
  white-space: nowrap;
  overflow: hidden;
}
.hud .rec {
  color: var(--red);
}
.hud .rec::before {
  content: '●';
  margin-right: 6px;
  animation: blink 1.6s steps(1) infinite;
}
.hud .clock {
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
@keyframes blink {
  50% {
    opacity: 0.2;
  }
}

/* --- Sections --- */
#landing > section,
.landing footer {
  max-width: var(--width);
  margin: 0 auto;
  padding: 72px var(--gutter);
}
#landing > section + section {
  border-top: 1px solid var(--line);
}

/* --- Hero: the Tantale drifting, the title in its light --- */
#landing > .hero {
  max-width: none;
  position: relative;
  min-height: min(94vh, 920px);
  display: grid;
  align-items: end;
  padding: calc(var(--hud) + 48px) var(--gutter) 64px;
  overflow: hidden;
}
.hero-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.85) 0%, rgba(5, 5, 5, 0.2) 60%),
    linear-gradient(0deg, var(--bg) 0%, transparent 45%);
}
.hero-text {
  position: relative;
  z-index: 1;
  max-width: var(--width);
  width: 100%;
  margin: 0 auto;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber2);
}
.hero h1 {
  font-size: clamp(64px, 15vw, 184px);
  line-height: 0.95;
  letter-spacing: 0.16em;
  margin: 8px 0 20px -0.06em;
  color: var(--amber);
  font-weight: 700;
  text-shadow: 0 0 28px rgba(255, 176, 0, 0.35);
}
.lede {
  font-size: clamp(15px, 1.6vw, 18px);
  color: #ffdf99;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.landing .button {
  display: inline-block;
  border: 1px solid var(--amber2);
  padding: 0.7em 1.2em;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 14px;
  background: rgba(5, 5, 5, 0.5);
}
.landing .button:hover {
  background: rgba(255, 176, 0, 0.12);
}
.landing .primary {
  background: var(--amber);
  color: #000;
  border-color: var(--amber);
  font-weight: 600;
}
.landing .button.primary {
  color: #000;
}
.landing .primary:hover {
  background: #ffc53d;
}
.landing button.primary,
.landing button.red {
  padding: 0.8em 1.4em;
  font-size: 15px;
}

/* --- The wake-up: the read-aloud text and the table in four numbers --- */
.wake {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 40px;
  align-items: center;
}
.terminal {
  border: 1px solid var(--line);
  background: var(--bg2);
  padding: 22px 24px;
  min-width: 0;
}
.terminal-head {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--amber2);
}
.terminal blockquote {
  margin: 0;
  padding-left: 14px;
  border-left: 3px solid var(--amber);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.55;
  color: #fff3d6;
}
.facts {
  display: grid;
  gap: 14px;
}
.facts p {
  margin: 0;
  display: flex;
  gap: 14px;
  align-items: baseline;
  color: var(--text);
}
.facts b {
  font-size: 34px;
  color: var(--amber);
  min-width: 2.2ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Trailer --- */
.trailer video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  display: block;
}
.note {
  font-size: 13px;
  color: var(--dim);
  margin-top: 10px;
}

/* --- The three screens, captured from the real app --- */
.intro {
  color: #ffdf99;
}
.screen {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 40px;
  align-items: center;
  margin-top: 56px;
}
.screen.reverse .shots {
  order: 2;
}
.shots {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.copy {
  min-width: 0;
}
.landing figure {
  margin: 0;
}
.landing img {
  display: block;
  max-width: 100%;
  height: auto;
}
/* A capture framed like a monitor of the control room: thin border, HUD corners. */
.frame {
  position: relative;
  border: 1px solid var(--line);
  background: #000;
}
.frame::before,
.frame::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--amber);
  pointer-events: none;
}
.frame::before {
  top: -4px;
  left: -4px;
  border-right: 0;
  border-bottom: 0;
}
.frame::after {
  right: -4px;
  bottom: -4px;
  border-left: 0;
  border-top: 0;
}
.frame figcaption {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 8px;
}
.phones {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 460px;
  justify-self: center;
}
.phone {
  border: 1px solid var(--amber2);
  border-radius: 26px;
  padding: 10px 6px;
  background: #000;
  box-shadow: 0 0 40px rgba(255, 176, 0, 0.08);
}
.phone img {
  border-radius: 16px;
}

/* --- On board: six systems --- */
.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.grid li {
  background: var(--bg);
  padding: 22px;
}
.grid p {
  margin: 10px 0 0;
}
.tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--amber);
  border: 1px solid var(--amber2);
  padding: 2px 8px;
}
.tag.red {
  color: var(--red);
  border-color: var(--red);
}

/* --- What a table needs --- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 32px;
}
.checklist li::before {
  content: '[ ] ';
  color: var(--amber2);
  white-space: pre;
}

/* --- Preparing a game --- */
.gm {
  text-align: center;
}
.gm p {
  margin-inline: auto;
}
.gm #create {
  margin-top: 12px;
}
#error {
  color: var(--red);
  min-height: 1.6em;
}

/* --- The warning before creating --- */
.landing dialog {
  max-width: min(560px, calc(100vw - 32px));
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--red);
  padding: 28px;
}
.landing dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}
.landing dialog h2 {
  color: var(--red);
}

/* --- « Ta partie est prête » --- */
#ready {
  max-width: var(--width);
  margin: 0 auto;
  padding: calc(var(--hud) + 48px) var(--gutter) 72px;
  display: grid;
  gap: 48px;
}
#ready h1 {
  font-size: clamp(34px, 6vw, 64px);
  letter-spacing: 0.08em;
  color: var(--amber);
  margin: 6px 0 0;
  line-height: 1.05;
}
.key {
  border: 1px solid var(--amber);
  background: var(--bg2);
  padding: 22px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.key .url {
  color: #fff;
  font-size: 16px;
  overflow-wrap: anywhere;
  user-select: all;
}
.ready-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.secret {
  border-left: 3px solid var(--red);
  padding-left: 18px;
}
.secret h2 {
  color: var(--red);
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 14px;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3ch minmax(0, 1fr);
  gap: 12px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--amber);
  font-weight: 600;
}
.steps b {
  color: var(--amber);
  font-weight: 600;
}
.tutorial video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
  display: block;
}

/* --- Footer --- */
.landing footer {
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--dim);
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

/* --- Phones and narrow windows --- */
@media (max-width: 820px) {
  .wake,
  .screen,
  .ready-columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .screen.reverse .shots {
    order: 0;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .checklist {
    grid-template-columns: minmax(0, 1fr);
  }
  .hud .clock,
  .hud .wide {
    display: none;
  }
  #landing > section {
    padding-block: 52px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hud .rec::before {
    animation: none;
  }
}
