/* Everlight Stories — Nightfall design system
   From "Nightfall Journey.dc.html" (Claude Design, Everlight Stories Homepage Directions)
   Palette: night #0b0d13 / deep #080a12 / panel #11141d · gold #e8d9a8 / #c9b988
   Type: Instrument Serif (display + story prose) · Jost (UI) · IBM Plex Mono (labels) */

:root {
  --night: #0b0d13;
  --deep: #080a12;
  --panel: #11141d;
  --ink-hi: #f4f2ea;
  --ink: #e6e8f2;
  --prose: #dcdfec;
  /* Muted tones raised one step for WCAG AA on the #0b0d13 ground
     (was #8d93ab / #6f7590 / #7d84a0 — all below 4.5:1 at small sizes). */
  --body: #b0b6cb;
  --muted: #a0a6bd;
  --nav: #aab0c6;
  --faint: #949ab3;
  --byline: #9aa1b9;
  --annot: #c8cbdb;
  --gold: #e8d9a8;
  --gold-deep: #c9b988;
  --on-gold: #12141f;
  --line: rgba(230, 232, 242, 0.12);
  --line-strong: rgba(230, 232, 242, 0.16);
  --gold-line: rgba(214, 198, 142, 0.5);
  --gold-line-hi: rgba(214, 198, 142, 0.55);
  --gold-wash: rgba(232, 217, 168, 0.05);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Jost", "Avenir Next", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--night);
  color: var(--ink);
  line-height: 1.7;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Kickers & labels ---------- */

.kicker {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 400;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 19, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.03em;
  color: var(--ink-hi);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark { height: 68px; width: auto; flex: none; }
.brand:hover { text-decoration: none; }

.nav-right { display: flex; align-items: center; gap: 14px; }

a.share-pill {
  padding: 9px 18px;
  border: 1px solid var(--gold-line);
  color: var(--gold);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
}
a.share-pill:hover { background: var(--gold); color: var(--on-gold); text-decoration: none; }

.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
}
.nav-toggle:hover { border-color: var(--gold-line); }
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--night);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--gold-line);
  display: flex;
  flex-direction: column;
  padding: 8px 28px 18px;
}
.menu a {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--nav);
  transition: color 0.2s;
}
.menu[hidden] { display: none; }
.menu a:last-child { border-bottom: none; }
.menu a:hover { color: var(--ink-hi); text-decoration: none; }
.menu a[aria-current="page"] { color: var(--gold); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-gold {
  background: var(--gold);
  color: var(--on-gold) !important;
}
.btn-gold:hover { box-shadow: 0 0 34px rgba(232, 217, 168, 0.25); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(230, 232, 242, 0.22);
  color: var(--ink) !important;
}
.btn-ghost:hover { border-color: rgba(230, 232, 242, 0.45); }

/* ---------- Glow ---------- */

.glow-wrap { position: relative; overflow: hidden; }

.glow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.glow-hero {
  top: -200px;
  width: 900px;
  height: 620px;
  background: radial-gradient(ellipse at center, rgba(214, 198, 142, 0.22), rgba(8, 10, 18, 0) 68%);
}
.glow-soft {
  top: -320px;
  width: 800px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(214, 198, 142, 0.14), rgba(8, 10, 18, 0) 68%);
}
.glow-received {
  top: -160px;
  width: 900px;
  height: 700px;
  background: radial-gradient(ellipse at center, rgba(214, 198, 142, 0.26), rgba(8, 10, 18, 0) 68%);
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  text-align: center;
  padding: 92px 28px 68px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}
.hero > * { position: relative; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7.5vw, 72px);
  line-height: 1.02;
  max-width: 760px;
  color: var(--ink-hi);
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--gold); }

.hero .sub {
  font-size: 17px;
  line-height: 1.8;
  color: var(--body);
  max-width: 560px;
  text-wrap: pretty;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Night-sky panel (image slot) ---------- */

.nightsky {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(1.5px 1.5px at 15% 30%, rgba(244, 242, 234, 0.9), transparent 100%),
    radial-gradient(1px 1px at 30% 62%, rgba(244, 242, 234, 0.6), transparent 100%),
    radial-gradient(1.5px 1.5px at 44% 22%, rgba(244, 242, 234, 0.75), transparent 100%),
    radial-gradient(1px 1px at 58% 55%, rgba(244, 242, 234, 0.55), transparent 100%),
    radial-gradient(1.8px 1.8px at 70% 30%, rgba(232, 217, 168, 0.9), transparent 100%),
    radial-gradient(1px 1px at 82% 64%, rgba(244, 242, 234, 0.6), transparent 100%),
    radial-gradient(1.2px 1.2px at 91% 25%, rgba(244, 242, 234, 0.7), transparent 100%),
    radial-gradient(1px 1px at 8% 75%, rgba(244, 242, 234, 0.5), transparent 100%),
    radial-gradient(ellipse 120% 90% at 50% 120%, rgba(214, 198, 142, 0.28), transparent 65%),
    linear-gradient(180deg, #0d1020 0%, #080a12 100%);
}

/* ---------- Sections ---------- */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px 28px;
  position: relative;
}
.section-narrow { max-width: 736px; }

.section-kicker-title { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

h2.display, h1.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 50px);
  line-height: 1.06;
  color: var(--ink-hi);
  text-wrap: balance;
}

/* ---------- Story cards (home) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.story-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: inherit;
}
.story-card:hover { text-decoration: none; }
.story-card:hover .card-title { color: var(--gold); }

.story-card .tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-card .card-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.18;
  color: var(--ink-hi);
  transition: color 0.2s;
}

.story-card .byline { font-size: 14px; line-height: 1.65; color: var(--muted); }

/* Invitation tile in the story grid */
.invite-card { border-top-color: var(--gold-line); }
.invite-card .card-title { color: var(--gold); }
.invite-card:hover .card-title { color: var(--gold); }

.invite-plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.invite-plus svg { width: 17px; height: 17px; display: block; }
.invite-card:hover .invite-plus {
  background: var(--gold);
  color: var(--on-gold);
  transform: rotate(90deg);
}

/* ---------- Stories index ---------- */

.filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 28px 0 4px;
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 300;
  border: 1px solid var(--line-strong);
  color: var(--nav);
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip:hover { color: var(--ink-hi); }
.chip.active {
  border-color: rgba(214, 198, 142, 0.6);
  color: var(--gold);
  background: rgba(232, 217, 168, 0.08);
}

.search-input {
  margin-left: auto;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--ink);
  background: transparent;
  min-width: 190px;
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { outline: none; border-color: var(--gold-line); }

.story-list { display: flex; flex-direction: column; }

.story-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  align-items: start;
  color: inherit;
}
.story-row .row-title:hover { color: var(--gold); text-decoration: none; }

.story-row .col { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }

.story-row .tag {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.story-row .row-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 29px;
  line-height: 1.15;
  color: var(--ink-hi);
  transition: color 0.2s;
}

.story-row .blurb {
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  max-width: 520px;
  text-wrap: pretty;
}

.story-row .byline { font-size: 13px; color: var(--byline); text-align: right; padding-top: 8px; }

.empty-note { padding: 40px 0; color: var(--faint); border-top: 1px solid var(--line); }

/* ---------- Story detail ---------- */

.story-hero { height: 250px; margin: 6px 28px 0; }
@media (min-width: 900px) { .story-hero { margin: 6px auto 0; max-width: 1064px; } }

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 44px;
  align-items: start;
}

.story-article .meta { font-family: var(--font-body); font-size: 14px; color: var(--muted); margin: 10px 0 28px; }

.story-article h1.display { margin-top: 16px; }

.story-article p {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.7;
  color: var(--prose);
  margin-bottom: 20px;
  text-wrap: pretty;
}

.pullquote {
  padding: 22px 26px;
  border-left: 2px solid var(--gold);
  background: var(--gold-wash);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.6;
  color: var(--gold);
  margin: 2px 0 20px;
}

.story-side { display: flex; flex-direction: column; gap: 20px; padding-top: 6px; position: sticky; top: 100px; }
.story-side .divider { height: 1px; background: var(--line); }
.story-side .filed { font-size: 14px; line-height: 1.7; color: var(--annot); }
.story-side .promise { font-size: 14px; line-height: 1.7; color: var(--body); }
.story-side .btn { text-align: center; padding: 13px 22px; }

/* ---------- Audio player ---------- */

.audio-player {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: rgba(232, 217, 168, 0.03);
  margin: 0 0 30px;
  max-width: 480px;
}
.audio-player.playing { border-color: var(--gold-line); }

.ap-play {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: var(--on-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.ap-play:hover { box-shadow: 0 0 26px rgba(232, 217, 168, 0.3); transform: scale(1.04); }
.ap-play svg { width: 15px; height: 15px; }

.ap-body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.ap-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.ap-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ap-track {
  height: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.ap-track::before { content: ""; }
.ap-track { position: relative; }
.ap-track::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--line-strong);
}
.ap-fill {
  position: relative;
  z-index: 1;
  height: 2px;
  width: 0%;
  background: var(--gold);
  transition: width 0.15s linear;
}

/* compact variant — one per row on the stories index */
.audio-player.ap-compact {
  margin: 4px 0 0;
  padding: 9px 14px 9px 10px;
  gap: 12px;
  max-width: 330px;
  background: none;
}
.ap-compact .ap-play { width: 34px; height: 34px; }
.ap-compact .ap-play svg { width: 11px; height: 11px; }
.ap-compact .ap-body { gap: 6px; }
.ap-compact .mono-label { font-size: 9px; }

/* ---------- Share flow ---------- */

.flow {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 28px 80px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: relative;
}

.flow-head { display: flex; flex-direction: column; gap: 14px; text-align: center; }

.flow-head h1,
.flow-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5.5vw, 46px);
  line-height: 1.08;
  color: var(--ink-hi);
}

.flow-head .sub { font-size: 16px; line-height: 1.75; color: var(--body); text-wrap: pretty; }

.progress { display: flex; gap: 6px; justify-content: center; }
.progress span { width: 90px; height: 2px; background: var(--line-strong); }
.progress span.done { background: rgba(214, 198, 142, 0.4); }
.progress span.current { background: var(--gold); }

.field { display: flex; flex-direction: column; gap: 8px; }

.field textarea {
  padding: 16px 18px;
  border: 1px solid var(--gold-line-hi);
  border-radius: 4px;
  background: rgba(232, 217, 168, 0.04);
  min-height: 220px;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.65;
  color: var(--prose);
  resize: vertical;
}
.field textarea:focus { outline: none; border-color: var(--gold); }
.field textarea::placeholder { color: #5f657e; font-style: italic; }

.field input, .field select {
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 16px;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--ink);
  background: transparent;
}
.field input::placeholder { color: #5f657e; }
.field input:focus, .field select:focus { outline: none; border-color: var(--gold-line); }
.field select { appearance: none; -webkit-appearance: none; }
.field select option { background: var(--panel); color: var(--ink); }

.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

.flow-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.flow-foot .quiet { font-size: 13px; color: var(--muted); }
.flow-foot .backlink { font-size: 14px; color: var(--muted); cursor: pointer; background: none; border: none; font-family: var(--font-body); }
.flow-foot .backlink:hover { color: var(--ink); }

/* identity option cards */

.option-stack { display: flex; flex-direction: column; gap: 12px; }

.option {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.option:hover { border-color: rgba(230, 232, 242, 0.3); }
.option.selected { border-color: var(--gold-line-hi); background: var(--gold-wash); }

.option .radio {
  width: 16px; height: 16px;
  border-radius: 50%;
  margin-top: 5px;
  flex: 0 0 16px;
  border: 1px solid rgba(230, 232, 242, 0.3);
  transition: background 0.2s, border-color 0.2s;
}
.option.selected .radio { border-color: var(--gold); background: var(--gold); }

.option .opt-body { display: flex; flex-direction: column; gap: 6px; }
.option .opt-title { font-size: 17px; color: var(--ink); }
.option .opt-desc { font-size: 14px; line-height: 1.65; color: var(--body); }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--body);
  cursor: pointer;
}
.consent input {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 2px;
  border: 1px solid rgba(230, 232, 242, 0.35);
  flex: 0 0 15px;
  margin-top: 4px;
  cursor: pointer;
}
.consent input:checked { background: var(--gold); border-color: var(--gold); }

.form-status {
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 14px;
  display: none;
  line-height: 1.6;
}
.form-status.error { display: block; border: 1px solid rgba(224, 130, 130, 0.4); color: #e0a3a3; background: rgba(224, 130, 130, 0.06); }

/* ---------- Received ---------- */

.received {
  max-width: 640px;
  margin: 0 auto;
  padding: 104px 28px 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  text-align: center;
  position: relative;
}

.orb {
  width: 54px; height: 54px;
  border-radius: 50%;
  margin: 0 auto 6px;
  background: radial-gradient(circle at 34% 30%, #fff6dd, #d8c07f);
  box-shadow: 0 0 60px rgba(232, 217, 168, 0.45);
}

.received h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 52px);
  line-height: 1.06;
  color: var(--ink-hi);
}

.received .sub { font-size: 17px; line-height: 1.8; color: var(--body); text-wrap: pretty; }

.wait-list {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.wait-list h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  color: var(--ink-hi);
}

.wait-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(230, 232, 242, 0.1);
  color: inherit;
}
.wait-row:hover { text-decoration: none; }
.wait-row .w-title { font-family: var(--font-display); font-size: 21px; color: var(--prose); }
.wait-row:hover .w-title { color: var(--gold); }
.wait-row .w-byline { font-size: 13px; color: var(--byline); white-space: nowrap; }

/* ---------- Prose pages (about / legal) ---------- */

.prose h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.1;
  color: var(--ink-hi);
  margin-bottom: 6px;
}

.prose .updated { color: var(--faint); font-size: 13px; font-family: var(--font-mono); margin-bottom: 34px; }

.prose h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--ink-hi);
  margin: 36px 0 10px;
}

.prose p, .prose li { color: var(--body); margin-bottom: 14px; font-size: 16px; line-height: 1.75; }
.prose ul { padding-left: 22px; margin-bottom: 16px; }
.prose li::marker { color: var(--gold-deep); }
.prose strong { color: var(--ink); font-weight: 400; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 48px;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  background: var(--deep);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.06em;
}
.footer-inner a { color: var(--faint); }
.footer-inner a:hover { color: var(--gold); }

/* ---------- Share this story ---------- */

.share-block { display: flex; flex-direction: column; gap: 10px; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; }

.share-btn {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: none;
  color: var(--nav);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.share-btn:hover { border-color: var(--gold-line); color: var(--gold); text-decoration: none; }

.share-status { font-size: 12px; color: var(--gold-deep); min-height: 1em; }

/* ---------- Footer signup ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.subscribe {
  max-width: 1120px;
  margin: 0 auto 26px;
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 40px;
  align-items: center;
}

.sub-copy { display: flex; flex-direction: column; gap: 7px; }
.sub-line { font-size: 15px; line-height: 1.6; color: var(--body); max-width: 34ch; }

.sub-form { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-form input[type="email"] {
  flex: 1;
  min-width: 190px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
}
.sub-form input[type="email"]::placeholder { color: var(--faint); }
.sub-form input[type="email"]:focus { outline: none; border-color: var(--gold-line); }
.sub-form .btn { padding: 13px 24px; }

.sub-status { grid-column: 1 / -1; font-size: 13px; min-height: 1em; }
.sub-status.success { color: var(--gold); }
.sub-status.error { color: #e0a3a3; }

/* ---------- Founder ---------- */

/* No card, no placeholder portrait — the bio sits directly on the page and
   uses the full measure. A portrait appears only if public/founder.jpg exists. */
.founder {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border-left: 1px solid var(--gold-line);
  padding: 2px 0 2px 20px;
  margin: 16px 0 24px;
}
.founder-portrait {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  overflow: hidden;
  background: var(--deep);
}
.founder-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }

.founder-body { min-width: 0; }
.founder-body p { margin-bottom: 12px; }
.founder-body p:last-child { margin-bottom: 0; }

/* Name and role share one line, so the block costs two lines instead of three. */
.founder-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 10px !important;
}
.founder-name {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.2;
  color: var(--ink-hi);
}
.founder-role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  white-space: nowrap;
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
  .story-layout { grid-template-columns: 1fr; }
  .story-side { position: static; }
  .story-row { grid-template-columns: 1fr; gap: 8px; }
  .story-row .byline { text-align: left; padding-top: 0; }
}

/* ---------- Analytics consent ---------- */

.consent {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 60; /* above the sticky header */
  margin: 0 auto;
  max-width: 700px;
  background: var(--panel);
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: consent-rise 0.4s ease-out both;
}
.consent[hidden] { display: none; }

@keyframes consent-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.consent-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 22px;
}

.consent-copy {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--body);
}
.consent-copy a { color: var(--gold); }

.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-actions .btn { padding: 11px 20px; font-size: 13px; }

/* The same choice, restated on the privacy page so it can be changed later. */
.consent-control {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--gold-wash);
}
.consent-control[hidden] { display: none; }
.consent-state { margin: 0; flex: 1 1 260px; font-size: 14px; color: var(--prose); }
.consent-control .btn { padding: 11px 20px; font-size: 13px; }
.consent-note { margin: 10px 0 0; font-size: 13px; color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}

@media (max-width: 720px) {
  .consent { left: 12px; right: 12px; bottom: 12px; }
  .consent-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; }
  .consent-actions .btn { flex: 1; }
}

@media (max-width: 720px) {
  .nav { padding: 16px 20px; }
  .hero { padding: 64px 20px 48px; }
  .field-grid { grid-template-columns: 1fr; }
  .search-input { margin-left: 0; width: 100%; }
  .filter-row { gap: 8px; }
  .founder { gap: 16px; padding-left: 16px; }
  .founder-portrait { width: 52px; height: 52px; }
  /* let the role wrap rather than overflow on narrow phones */
  .founder-role { white-space: normal; letter-spacing: 0.1em; }

  /* Footer signup: single column, and let the email field shrink.
     The 190px min-width was pushing the page wider than the viewport. */
  .subscribe { grid-template-columns: 1fr; }
  .sub-form { flex-direction: column; align-items: stretch; }
  .sub-form input[type="email"] { min-width: 0; width: 100%; }
  .sub-form .btn { width: 100%; }
}

/* ---------- Admin (noindex, phone-first) ---------- */

.form-status.success { display: block; border: 1px solid var(--gold-line); color: var(--gold); background: var(--gold-wash); }

.admin-body { padding-bottom: env(safe-area-inset-bottom); }

.admin-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  background: var(--deep); position: sticky; top: 0; z-index: 40;
}
.admin-bar .brand { font-size: 17px; }
.admin-bar .brand-mark { height: 30px; }
.admin-tag {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-deep);
  border: 1px solid var(--gold-line); border-radius: 2px; padding: 2px 6px;
}

.admin-main { max-width: 680px; margin: 0 auto; padding: 20px 20px 64px; display: flex; flex-direction: column; gap: 20px; }

.admin-tabs { display: flex; gap: 8px; }
.admin-tab {
  flex: 1; padding: 10px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: none; color: var(--nav);
  font-family: var(--font-body); font-size: 13px; letter-spacing: .06em;
}
.admin-tab.active { border-color: var(--gold-line); color: var(--gold); background: var(--gold-wash); }

.admin-view { display: flex; flex-direction: column; gap: 18px; }
.admin-view[hidden] { display: none; }

/* a disabled action should look disabled */
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* recorder */
.recorder {
  display: flex; align-items: center; gap: 18px;
  padding: 22px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--gold-wash);
}
.rec-btn {
  width: 76px; height: 76px; flex: none; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--gold-line); background: transparent;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, box-shadow .2s;
}
.rec-dot { width: 30px; height: 30px; border-radius: 50%; background: #d05b5b; transition: all .2s; }
.rec-btn.recording { border-color: #d05b5b; box-shadow: 0 0 0 6px rgba(208,91,91,.14); }
.rec-btn.recording .rec-dot { border-radius: 5px; width: 24px; height: 24px; }
.rec-meta { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.rec-time { font-family: var(--font-mono); font-size: 24px; color: var(--ink-hi); font-variant-numeric: tabular-nums; }
.rec-level { height: 4px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.rec-level-fill { height: 100%; width: 0; background: var(--gold); transition: width .08s linear; }
.rec-hint { font-size: 13px; color: var(--muted); }

/* job progress — [hidden] must beat display:flex */
.job { display: flex; flex-direction: column; gap: 8px; }
.job[hidden] { display: none; }
.recorder[hidden], .admin-list[hidden] { display: none; }
.job-track { height: 3px; background: var(--line-strong); border-radius: 2px; overflow: hidden; }
.job-fill { height: 100%; width: 0; background: var(--gold); transition: width .4s ease; }

.admin-details { border-top: 1px solid var(--line); padding-top: 12px; }
.admin-details summary { cursor: pointer; }
.transcript { font-size: 14px; line-height: 1.7; color: var(--body); margin-top: 10px; }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px;
}
.admin-row .quiet { display: block; font-size: 12px; color: var(--faint); margin-top: 2px; }
.admin-row .btn { padding: 8px 16px; font-size: 13px; }

@media (max-width: 520px) {
  .admin-main { padding: 16px 16px 64px; }
  .recorder { gap: 14px; padding: 18px; }
  .rec-btn { width: 64px; height: 64px; }
  .flow-foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .flow-foot .btn, .flow-foot label.btn { width: 100%; text-align: center; }
  .flow-foot span { display: flex; gap: 10px; }
  .flow-foot span .btn { flex: 1; }
}
