/* ────────────────────────────────────────────────────────────────────────────
   home.css — the landing page, in the same language as /status.

   Two families do all the work: IBM Plex Sans for words, IBM Plex Mono for
   anything that is a number, an id or a state. Small type, hairlines, one
   accent. The media on this page is evidence, not decoration, so it is never
   allowed to be the biggest thing in a row.
   ──────────────────────────────────────────────────────────────────────────── */

:root {
  --ink:        #111318;
  --ink-soft:   #5F6368;
  --ink-faint:  #9AA0A6;
  --line:       #DADCE0;
  --line-soft:  #ECEEF1;
  --paper:      #FFFFFF;
  --ground:     #F6F7F9;
  --flow:       #2563EB;
  --on:         #22C55E;

  --gut: 26px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .04em;
}
.dim { color: var(--ink-faint); }
.flow { color: var(--flow); }

/* ── bar ─────────────────────────────────────────────────────────────────── */

#bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 13px var(--gut);
  background: rgba(246,247,249,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
#bar .logo { height: 17px; width: auto; }
.bar-nav { display: flex; gap: 18px; }
.bar-nav a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.bar-nav a:hover { color: var(--ink); border-color: var(--ink); }
#bar .stamp {
  margin-left: auto;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .04em; color: var(--ink-faint);
}

/* ── page rhythm ─────────────────────────────────────────────────────────── */

#page { padding: 0 var(--gut) 40px; max-width: 1560px; margin: 0 auto; }
#bar, #foot { max-width: 1560px; margin: 0 auto; width: 100%; }

.band {
  position: relative;
  padding: 78px 0;
  border-top: 1px solid var(--line);
}
.band:first-child { border-top: none; }

/* the numbered spine down the left of every stage */
.stage { display: grid; grid-template-columns: 96px 1fr; gap: 0; }
.spine {
  position: relative;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .06em; color: var(--ink-faint);
}
.spine .rail {
  position: absolute; left: 3px; top: 22px; bottom: -78px;
  width: 1px; background: var(--line);
}
.spine .dot {
  position: absolute; left: 0; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ground); border: 1px solid var(--ink-faint);
}
.spine .dot.live { border-color: var(--flow); background: var(--flow); }
.spine span { display: block; padding-left: 16px; }
.spine span + span { margin-top: 2px; }

.band-open { padding-top: 62px; }
.open { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.02fr);
        gap: 58px; align-items: start; }
@media (max-width: 900px) { .open { grid-template-columns: 1fr; gap: 26px; } }

h1 {
  font-size: 40px; font-weight: 500; letter-spacing: -.026em; line-height: 1.1;
  margin: 0 0 22px; max-width: 21ch;
}
h2 {
  font-size: 27px; font-weight: 500; letter-spacing: -.022em; line-height: 1.15;
  margin: 0 0 12px;
}
.lede { font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 54ch; margin: 0 0 30px; }
.note { font-size: 13px; line-height: 1.6; color: var(--ink-soft); max-width: 52ch; margin: 0 0 22px; }
.cap-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 9px;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 16px; display: block;
}

/* ── the hairline that draws itself in ───────────────────────────────────── */

.rule {
  height: 1px; background: var(--line);
  transform: scaleX(0); transform-origin: left;
  transition: transform .7s cubic-bezier(.22,.61,.36,1);
  margin: 18px 0;
}
.in .rule { transform: scaleX(1); }

/* rows arrive one after the other, once */
.stagger > * { opacity: 0; transform: translateY(5px); }
.in .stagger > * {
  opacity: 1; transform: none;
  transition: opacity .45s ease, transform .45s ease;
}
.in .stagger > *:nth-child(2) { transition-delay: .05s; }
.in .stagger > *:nth-child(3) { transition-delay: .10s; }
.in .stagger > *:nth-child(4) { transition-delay: .15s; }
.in .stagger > *:nth-child(5) { transition-delay: .20s; }
.in .stagger > *:nth-child(6) { transition-delay: .25s; }

/* ── figures ─────────────────────────────────────────────────────────────── */

.figs { display: flex; flex-wrap: wrap; gap: 44px; }
.fig .n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 27px; font-weight: 500; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.fig .k {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 6px;
}

/* ── spec tables ─────────────────────────────────────────────────────────── */

.spec { width: 100%; border-collapse: collapse; }
.spec td {
  padding: 5px 0; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.spec td:first-child {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); width: 132px; padding-right: 14px; white-space: nowrap;
}
.spec td:last-child { font-size: 12.5px; }
.spec .v-mono { font-family: 'IBM Plex Mono', monospace; font-size: 11px; }

/* ── two-column band ─────────────────────────────────────────────────────── */

.cols { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: 46px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; gap: 28px; } }

/* ── media: always small, always labelled ────────────────────────────────── */

.tile {
  display: block; position: relative;
  background: var(--line-soft);
  border: 1px solid var(--line);
  overflow: hidden;
}
.tile img, .tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-cap {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px; letter-spacing: .05em; color: var(--ink-faint);
  margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* dossier portraits */
.dossier { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.card-id { width: 100%; }
.card-id .tile { aspect-ratio: 3/4; }
.card-id .nm { font-size: 12px; margin-top: 7px; letter-spacing: -.01em; }

/* scene contact sheet */
.sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; max-width: 316px; }
.sheet .tile { aspect-ratio: 1; }

/* output grid */
.out { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.out .tile { aspect-ratio: 9/16; cursor: pointer; }
.out .tile::after {
  content: ''; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(17,19,24,0); transition: box-shadow .2s ease;
}
.out .tile:hover::after { box-shadow: inset 0 0 0 1px var(--ink); }

/* ── the opening board ───────────────────────────────────────────────────── */

.board-wrap { padding-top: 6px; }
.board-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 0 6px; text-transform: uppercase;
}
.board-head + .board { border-top: 1px solid var(--line); }
.board {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px;
  padding: 7px 0; border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.board .slot {
  position: relative; display: block;
  aspect-ratio: 9/16; background: var(--line-soft);
  overflow: hidden;
}
.board .slot-n {
  position: absolute; left: 3px; top: 2px; z-index: 2;
  font-family: 'IBM Plex Mono', monospace; font-size: 8px;
  color: var(--ink-faint); font-style: normal;
}
.board .slot img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  animation: land .5s cubic-bezier(.22,.61,.36,1);
}
.board .slot.hit { outline: 1px solid var(--flow); outline-offset: -1px; }
@keyframes land {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}

/* ── voices ──────────────────────────────────────────────────────────────── */

.voices { display: flex; flex-direction: column; gap: 2px; }
.voice {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0; border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.voice:hover .vname { color: var(--ink); }
.vbtn {
  width: 19px; height: 19px; flex: 0 0 auto;
  border: 1px solid var(--line); background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.voice.playing .vbtn { background: var(--ink); border-color: var(--ink); color: #fff; }
.vname { font-size: 12px; color: var(--ink-soft); flex: 0 0 auto; width: 128px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wave { display: flex; align-items: center; justify-content: space-between;
  gap: 2px; height: 14px; flex: 1 1 auto; min-width: 0; }
.wave i { flex: 1 1 auto; max-width: 2px; background: var(--line); display: block; }
.voice.playing .wave i { background: var(--flow); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* ── watch log (radar) ───────────────────────────────────────────────────── */

.log { border-top: 1px solid var(--line); }
.log-row {
  display: grid; grid-template-columns: 74px 1fr 56px 44px;
  gap: 12px; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--line-soft);
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px;
}
.log-row .h { color: var(--ink-faint); }
.log-head { color: var(--ink-faint); letter-spacing: .08em; text-transform: uppercase; }
.log-row .pick { color: var(--ink); }
.log-row .drop { color: var(--ink-faint); text-decoration: line-through; }
.log-row .sc { text-align: right; font-variant-numeric: tabular-nums; }

.top { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
.top-row {
  display: grid; grid-template-columns: 20px 24px 1fr 78px;
  gap: 11px; align-items: center;
  padding: 3px 0; border-bottom: 1px solid var(--line-soft);
}
.top-row .rk { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--ink-faint); }
.top-row .tile { aspect-ratio: 9/16; }
.top-row .hn { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-row .vw { font-family: 'IBM Plex Mono', monospace; font-size: 11px; text-align: right;
  font-variant-numeric: tabular-nums; }

/* ── the copy chain ──────────────────────────────────────────────────────── */

.chain { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.link {
  flex: 1 1 0; min-width: 104px;
  padding: 11px 13px; border: 1px solid var(--line); border-right: none;
  background: var(--paper);
}
.link:last-child { border-right: 1px solid var(--line); }
.link .s { font-family: 'IBM Plex Mono', monospace; font-size: 9.5px;
  letter-spacing: .1em; color: var(--ink-faint); }
.link .t { font-size: 12px; margin-top: 4px; }

.pair { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.pair .slot-med { width: 112px; }
.pair .slot-med .tile { aspect-ratio: 9/16; }
.pair .arrow {
  align-self: center; font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--ink-faint);
}

/* ── the thread ──────────────────────────────────────────────────────────── */

.thread {
  display: flex; flex-direction: column; gap: 8px;
  max-width: 400px;
}
.msg { display: flex; }
.msg span {
  font-size: 13px; line-height: 1.45;
  padding: 9px 14px; max-width: 78%;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 16px;
}
/* the one square corner is the tail — it says who is speaking, without a cartoon */
.msg.them span { border-bottom-left-radius: 4px; }
.msg.her { justify-content: flex-end; }
.msg.her span {
  background: var(--ink); color: #fff; border-color: var(--ink);
  border-bottom-right-radius: 4px;
}

/* ── footer ──────────────────────────────────────────────────────────────── */

#foot {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 56px var(--gut) 24px;
  margin-top: 46px;
}
.foot-top {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 60px; padding-bottom: 46px;
}
.foot-brand .foot-logo { height: 17px; width: auto; margin-bottom: 15px; display: block; }
.foot-brand p { margin: 0; font-size: 14px; color: var(--ink-soft); max-width: 34ch; }
.foot-links { display: flex; gap: 72px; }
.foot-group { display: flex; flex-direction: column; gap: 9px; }
.foot-h {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 3px;
}
.foot-group a { font-size: 13px; color: var(--ink-soft); width: max-content; }
.foot-group a:hover { color: var(--ink); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px; border-top: 1px solid var(--line-soft);
}
@media (max-width: 760px) {
  .foot-top { grid-template-columns: 1fr; gap: 34px; }
  .foot-links { gap: 48px; }
}

/* ── loading ─────────────────────────────────────────────────────────────── */

.ghost { background: var(--line-soft); }
@media (prefers-reduced-motion: reduce) {
  .rule { transform: none; }
  .stagger > * { opacity: 1; transform: none; }
  .board .slot img { animation: none; }
}
