/* Backstager artist portal — Brand Kit V1 / UX Board V1 implementation (#3).
   Mobile-first (board: "PORTAL — PHONE 390 · ALL TARGETS ≥44PX · ONE COLUMN ·
   SAME TOKENS"). Gold is the screen's ONE primary action — never a stage,
   never decoration ("GOLD IS NEVER A STAGE"). Calm, premium, not a social app.
   The external portal never renders any manager/admin surface. */

/* --- Self-hosted fonts (SIL OFL, see fonts/LICENSE.txt) — no CDN ---------- */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-var.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plexmono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* --- Tokens (Brand Kit V1) ------------------------------------------------ */
:root {
  --bg: #100d0b;            /* page: deepest warm black */
  --bg-panel: #17130f;      /* panels / header band */
  --card: #1e1815;          /* cards */
  --card-2: #2a211c;        /* chips / inset surfaces */
  --ink: #f4ede1;           /* cream */
  --muted: #a79a8c;         /* warm taupe */
  --faint: #6e6157;
  --gold: #d9a441;          /* THE accent — one primary moment per screen */
  --gold-light: #e9c177;
  --gold-deep: #be8a2e;
  --on-gold: #100d0b;
  --border: #2a211c;
  --danger: #e26d5a;
  --ok: #6fbf8a;
  /* board: RADII — chip 999 · field/btn 8 · card 10 · panel 14 */
  --r-chip: 999px;
  --r-btn: 8px;
  --r-card: 10px;
  --r-panel: 14px;
  --font-display: "Archivo", "Hanken Grotesk", -apple-system, sans-serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font-body);
}

/* board: focus ring 2px #D9A441, offset 2, everywhere */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- Shell: wordmark header + single column ------------------------------ */
.portal-top {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 640;
  letter-spacing: 0.16em;      /* brand kit: Archivo Expanded 640, tracked +16% */
  font-size: 0.92rem;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}
.portal-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
}

.portal {
  max-width: 640px;
  margin: 0 auto;
  padding: 26px 18px 48px;
  overflow-wrap: anywhere;
}

.kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.rel-header h1 {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 640;
  font-size: 1.65rem;
  line-height: 1.15;
  margin: 0 0 8px;
}

.artists {
  font-family: "Instrument Serif", Georgia, serif;  /* the sparing serif moment */
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 20px;
}

/* Days-to-release strip (board: "DAYS TO RELEASE DAY") */
.countdown {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-panel);
}
.countdown .n {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
}
.countdown .lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Label/value rows stack cleanly on a phone. */
.rel-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 18px;
  margin: 20px 0;
}
.rel-meta dt { color: var(--muted); }
.rel-meta dd { margin: 0; }

/* Stage badge: quiet chip — informational, NOT gold. */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-chip);
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.86rem;
}

.greeting { margin-top: 22px; color: var(--muted); }
.muted { color: var(--muted); }

.beta-note {
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.section-title {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 12px;
}

/* --- Pipeline — muted chips, one family; current = cream emphasis -------- */
.pipeline { margin-top: 30px; }
.pipeline-track {
  list-style: none;
  margin: 0;
  padding: 2px 0 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;              /* scrolls inside itself; page never overflows */
  -webkit-overflow-scrolling: touch;
}
.pipeline-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;              /* board: all targets >= 44px */
  padding: 8px 14px;
  border-radius: var(--r-chip);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--faint);
  font-size: 0.85rem;
  white-space: nowrap;
}
/* Current stage: cream, raised, clearly "you are here" — never gold. */
.pipeline-stage.is-current {
  background: var(--card-2);
  border-color: var(--muted);
  color: var(--ink);
  font-weight: 600;
}
.stage-count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
}
.pipeline-stage.is-current .stage-count { color: var(--muted); }

/* --- Cards (assets + tasks) — board: list rows, radius 10 ---------------- */
.assets, .tasks { margin-top: 30px; }
.asset-list, .task-list { list-style: none; margin: 0; padding: 0; }

.asset-card, .task-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  min-height: 56px;              /* board: LIST 56 */
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.asset-main, .task-main { display: flex; flex-direction: column; min-width: 0; }
.asset-title, .task-title { font-weight: 600; overflow-wrap: anywhere; }
.asset-meta, .task-meta {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

/* Task state: a 3px rail + tag, muted hues (gold is never a status). */
.task-card { border-left: 3px solid var(--border); }
.task-card.is-overdue { border-left-color: var(--danger); }
.task-card.is-done { border-left-color: var(--ok); opacity: 0.72; }
.task-card.is-done .task-title { text-decoration: line-through; }
.task-status { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-chip);
  background: var(--card-2);
  color: var(--muted);
  font-size: 0.8rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.tag-overdue { background: #3a221c; color: var(--danger); }
.tag-done { background: #1d2b21; color: var(--ok); }

/* --- THE gold moment: download / primary action --------------------------- */
.btn-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--r-btn);
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.btn-download:hover { background: var(--gold-light); }
.btn-download:active { background: var(--gold-deep); }

.empty { padding: 8px 0; }

/* Empty states — "the one place motifs are welcome" (board) */
.empty-state {
  padding: 26px 18px;
  border: 1px dashed var(--border);
  border-radius: var(--r-panel);
  text-align: center;
  color: var(--muted);
}

/* --- Updates / activity --------------------------------------------------- */
.activity { margin-top: 30px; }
.activity p { margin: 0; font-size: 0.9rem; }

/* --- Error / expired / landing states ------------------------------------ */
.state-page { padding-top: 10px; }
.state-page h1 {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 640;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 12px;
}
.state-page p { color: var(--muted); max-width: 46ch; }

/* Slightly larger headings on wider screens — mobile is the baseline. */
@media (min-width: 680px) {
  .rel-header h1 { font-size: 2.1rem; }
}
