/* ============================================================
   PublicationOS — pre-launch site
   Design system: "press furniture on a system surface"
   Serif = the publication. Mono = the machine. Paper = the output.
   ============================================================ */

:root {
  /* Surfaces */
  --ink:        #060F1A;
  --ink-raise:  #0B1826;
  --ink-panel:  #0E1E30;
  --ink-deep:   #030A12;
  --paper:      #F0EDE6;
  --paper-2:    #E4E0D6;

  /* Type colour */
  --text:        #EEF3F8;   /* 17.2:1 on ink */
  --text-2:      #A9B8C9;   /*  9.5:1 */
  --text-3:      #8195A9;   /*  6.2:1 — lowest muted permitted */
  --paper-ink:   #14181C;   /* 15.3:1 on paper */
  --paper-muted: #4A5560;   /*  6.5:1 on paper */

  /* Accent — one chromatic accent, plus one stamp red used exactly once */
  --signal:     #56DBCB;
  --signal-14:  rgba(86, 219, 203, .14);
  --signal-28:  rgba(86, 219, 203, .28);
  --stamp:      #E2543F;

  /* Rules */
  --rule:    rgba(226, 238, 255, .12);
  --rule-2:  rgba(226, 238, 255, .22);
  --rule-3:  rgba(226, 238, 255, .34);

  /* Type */
  --serif: "Newsreader", Lora, Georgia, "Times New Roman", serif;
  --sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Metrics */
  --measure: 1240px;
  --gutter:  clamp(20px, 4vw, 40px);
  --bar:     72px;   /* masthead height */
  --strip:   34px;   /* dateline height */
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--measure));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Visible keyboard focus, everywhere, on both surfaces. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}
.paper :where(a, button, input, select, textarea):focus-visible {
  outline-color: #0F5F58;
}

.skip {
  position: fixed; z-index: 999; top: 12px; left: 12px;
  transform: translateY(-200%);
  padding: 10px 16px;
  background: var(--paper); color: var(--paper-ink);
  font: 600 .82rem/1 var(--sans);
}
.skip:focus { transform: translateY(0); }

/* Fixed masthead would otherwise crop every anchored heading. */
[id] { scroll-margin-top: calc(var(--bar) + var(--strip) + 24px); }

/* ---------- shared type devices ---------- */

/* Mono utility label — the "machine" voice */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
}
.tag-quiet { color: var(--text-3); }

/* Editorial kicker → headline → deck, the actual structure of a news story */
.kicker {
  display: block;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.head {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.018em;
  line-height: 1.04;
  text-wrap: balance;
}
.head-sm { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.head-md { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.intro   { max-width: 46ch; }

.deck {
  margin-top: 20px;
  max-width: 60ch;
  color: var(--text-2);
  font-size: 1.06rem;
  line-height: 1.68;
  text-wrap: pretty;
}

/* ---------- masthead ---------- */
.masthead {
  position: fixed; z-index: 60; inset: 0 0 auto;
  background: rgba(6, 15, 26, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.masthead.is-stuck {
  background: rgba(6, 15, 26, .94);
  border-bottom-color: var(--rule-2);
}
.masthead-in {
  height: var(--bar);
  display: flex; align-items: center; gap: 24px;
}

.logo { display: inline-flex; align-items: baseline; gap: 12px; }
.logo-word {
  font-family: var(--serif);
  font-size: 1.24rem;
  letter-spacing: -.02em;
}
.logo-word b { font-weight: 600; }
.logo-word i { font-style: normal; color: var(--signal); }

/* The one red mark on the site: a proof stamp, the way a page is marked
   before it is cleared to run. It earns the second colour. */
.stamp {
  padding: 3px 7px;
  border: 1px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .16em;
  transform: rotate(-1.5deg);
}

.nav {
  margin-left: auto;
  display: flex; align-items: center; gap: 30px;
  font-size: .88rem;
  color: var(--text-2);
}
.nav a { transition: color .2s ease; }
.nav a:hover { color: var(--text); }
.nav-cta {
  padding: 9px 16px;
  border: 1px solid var(--rule-3);
  color: var(--text);
}
.nav-cta:hover { border-color: var(--signal); }

.burger {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  border: 1px solid var(--rule-2);
}
.burger i {
  display: block; height: 1px; margin: 5px auto;
  width: 18px; background: var(--text);
  transition: transform .25s ease, opacity .25s ease;
}
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.drawer {
  border-top: 1px solid var(--rule);
  background: var(--ink-raise);
  padding: 6px var(--gutter) 22px;
}
.drawer a {
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1.02rem;
}
.drawer a:last-child { border-bottom: 0; }

/* ---------- dateline strip ---------- */
.dateline {
  position: relative; z-index: 5;
  margin-top: var(--bar);
  border-bottom: 1px solid var(--rule);
  background: var(--ink-deep);
}
.dateline-in {
  height: var(--strip);
  display: flex; align-items: center; gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.dateline-in::-webkit-scrollbar { display: none; }
.dateline-in span { display: inline-flex; align-items: center; gap: 8px; }
.dateline-in span + span::before {
  content: ""; width: 3px; height: 3px;
  background: var(--rule-3); border-radius: 50%;
}
.live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px var(--signal-14);
}

/* ---------- bands ---------- */
.band { padding: clamp(72px, 9vw, 128px) 0; }
.band-rule { border-top: 1px solid var(--rule); }

/* the inverted "paper" band — the design event of the page */
.paper {
  background: var(--paper);
  color: var(--paper-ink);
}
.paper .kicker { color: var(--paper-muted); }
.paper .deck   { color: var(--paper-muted); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 8vw, 112px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60rem 32rem at 12% -10%, rgba(86,219,203,.10), transparent 70%),
    linear-gradient(180deg, transparent, rgba(3,10,18,.6));
  pointer-events: none;
}
.hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.9rem, 6.6vw, 5.1rem);
  max-width: 15ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--signal);
}
.hero .head-sm { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.head-md { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.intro   { max-width: 46ch; }

.deck { font-size: clamp(1.02rem, 1.5vw, 1.18rem); max-width: 54ch; }

.actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 34px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 22px;
  border: 1px solid transparent;
  font-size: .9rem; font-weight: 600; letter-spacing: -.005em;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-solid { background: var(--signal); color: #04231F; }
.btn-solid:hover { background: #7CE7DA; }
.btn-line { border-color: var(--rule-3); color: var(--text); }
.btn-line:hover { border-color: var(--signal); color: var(--signal); }
.btn-block { width: 100%; }
.btn-arrow { transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.hero-note {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  max-width: 52ch;
  color: var(--text-3);
  font-size: .84rem;
  line-height: 1.6;
}

/* ---------- SIGNATURE: the operating ledger ---------- */
/* Replaces the old floating node diagram. Honest development states,
   set like a press-room status board. */
.ledger {
  border: 1px solid var(--rule-2);
  background: linear-gradient(170deg, var(--ink-panel), var(--ink-raise));
}
.ledger-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule-2);
}
.ledger-head h2 {
  font-family: var(--mono);
  font-size: .7rem; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-2);
}
.ledger-phase {
  font-family: var(--mono); font-size: .66rem;
  letter-spacing: .14em; color: var(--signal);
}
.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--rule);
}
.ledger-row:last-of-type { border-bottom: 0; }
.ledger-row b {
  display: block;
  font-weight: 500; font-size: .95rem;
}
.ledger-row small {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: .76rem;
}
.state {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3);
}
.state::before {
  content: ""; width: 22px; height: 3px;
  background: var(--rule-3);
}
.state-build { color: var(--signal); }
.state-build::before { background: var(--signal); }
.state-design::before {
  background: repeating-linear-gradient(90deg, var(--rule-3) 0 3px, transparent 3px 6px);
}
.ledger-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--rule-2);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: .63rem;
  line-height: 1.6;
  letter-spacing: .04em;
}

/* ---------- audience strip ---------- */
.audience { border-block: 1px solid var(--rule); background: var(--ink-deep); }
.audience-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 22px 0;
}
.audience-in li { color: var(--text-2); font-size: .88rem; }
.audience-in li.tag-quiet { font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }

/* ---------- paper band: the situation ---------- */
.situation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 76px); align-items: start; }
.situation h2 {
  font-size: clamp(2rem, 3.6vw, 3.15rem);
  max-width: 18ch;
}
.situation-body { columns: 1; }
.situation-body p + p { margin-top: 18px; }
.situation-body p {
  color: var(--paper-muted);
  font-size: 1.02rem;
  line-height: 1.72;
  max-width: 46ch;
}
.situation-body p:first-child {
  color: var(--paper-ink);
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.5;
}
.pullquote {
  margin-top: 30px;
  padding: 22px 0 0;
  border-top: 2px solid var(--paper-ink);
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-muted);
}

/* ---------- desks ---------- */
.desks {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.desk {
  padding: 30px 28px 34px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background .25s ease;
}
.desk:hover { background: rgba(86, 219, 203, .04); }
.desk h3 {
  margin: 18px 0 12px;
  font-family: var(--serif);
  font-size: 1.32rem;
  letter-spacing: -.012em;
}
.desk p { color: var(--text-2); font-size: .92rem; line-height: 1.66; }

/* ---------- sequence (order genuinely carries meaning here) ---------- */
.sequence { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 90px); align-items: start; }
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--signal);
  padding-top: 3px;
}
.step b { display: block; font-family: var(--serif); font-size: 1.24rem; font-weight: 400; }
.step small { display: block; margin-top: 6px; color: var(--text-2); font-size: .9rem; line-height: 1.62; }

.aside-note {
  margin-top: 28px;
  padding-left: 18px;
  border-left: 2px solid var(--signal-28);
  color: var(--text-3);
  font-size: .86rem;
  line-height: 1.65;
  max-width: 48ch;
}

/* ---------- principles ---------- */
.principles { margin-top: 48px; border-top: 1px solid var(--rule); }
.principle {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 20px 56px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.principle h3 { font-family: var(--serif); font-size: 1.36rem; }
.principle p { color: var(--text-2); max-width: 62ch; }

/* ---------- partner / form ---------- */
.partner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.partner h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); max-width: 17ch; }
.partner-list { margin-top: 30px; border-top: 1px solid var(--rule); }
.partner-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text-2);
  font-size: .92rem;
}

.form {
  padding: 28px;
  border: 1px solid var(--rule-2);
  background: var(--ink-raise);
}
.form h3 { font-family: var(--serif); font-size: 1.5rem; margin: 10px 0 8px; }
.form-intro { color: var(--text-3); font-size: .82rem; line-height: 1.6; }
.field { display: block; margin-top: 18px; }
.field > span {
  display: block; margin-bottom: 7px;
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--rule-2);
  background: var(--ink);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 104px; }
.field input::placeholder, .field textarea::placeholder { color: #5D7086; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--rule-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-14);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--stamp); }
.field-error { display: block; margin-top: 6px; color: var(--stamp); font-size: .74rem; min-height: 0; }

/* honeypot — hidden from humans, reachable by naive bots */
.trap {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form .btn { margin-top: 24px; }
.form-status {
  margin-top: 12px;
  min-height: 1.2em;
  font-size: .8rem;
  line-height: 1.55;
  color: var(--text-2);
}
.form-status[data-tone="ok"]   { color: var(--signal); }
.form-status[data-tone="bad"]  { color: var(--stamp); }
.form-fine { margin-top: 14px; color: var(--text-3); font-size: .72rem; line-height: 1.6; }
.form-fine a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule-2);
  background: var(--ink-deep);
  padding: 56px 0 28px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 36px;
}
.foot-grid h4 {
  font-family: var(--mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.foot-links li { padding: 5px 0; font-size: .88rem; color: var(--text-2); }
.foot-links a:hover { color: var(--signal); }
.foot-blurb { margin-top: 14px; color: var(--text-3); font-size: .86rem; max-width: 34ch; line-height: 1.6; }

/* Colophon — where a publication states how it was made. */
.colophon {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 10px 30px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .08em;
  color: var(--text-3);
  line-height: 1.7;
}

/* ---------- legal page ---------- */
.doc { max-width: 68ch; }
.doc h2 { font-family: var(--serif); font-size: 1.6rem; margin: 44px 0 12px; }
.doc p, .doc li { color: var(--text-2); margin-top: 12px; }
.doc ul { list-style: disc; padding-left: 22px; }
.doc a { color: var(--signal); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- reveal ---------- */
.rise { opacity: 0; transform: translateY(14px); transition: opacity .65s ease, transform .65s ease; }
.rise.shown { opacity: 1; transform: none; }
.rise-2 { transition-delay: .1s; }

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .hero-in, .situation, .sequence, .partner { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .desks { grid-template-columns: repeat(2, 1fr); }
  .principle { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 820px) {
  .nav { display: none; }
  .burger { display: block; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  :root { --bar: 62px; }
  .desks { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 3.6rem); }
  .actions .btn { width: 100%; }
  .form { padding: 20px; }
  .step { grid-template-columns: 40px 1fr; gap: 14px; }
  .colophon { flex-direction: column; }
  .stamp { display: none; }
}

/* ---------- motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .rise { opacity: 1; transform: none; }
}

@media print {
  .masthead, .dateline, .burger, .form, .hero::before { display: none !important; }
  body { background: #fff; color: #000; }
  .band { padding: 24px 0; }
}
