/* HYPOCENTER V3 — Base stylesheet
 * Public site only. Portal uses depth.css.
 */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500&family=IBM+Plex+Mono:wght@400;500&display=swap');
@import url('./tokens.css');

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }

/* Prose defaults */
h1, h2, h3, h4 { font-weight: 400; margin: 0 0 0.4em; line-height: var(--lh-display); letter-spacing: -0.005em; }
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
p  { margin: 0 0 1em; max-width: var(--measure); }

/* Datum label — the station-log convention */
.datum {
  font-family: var(--font-mono);
  font-size: var(--text-meta);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: var(--lh-meta);
}

/* Links */
a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: color var(--tx-fast) var(--ease); }
a:hover { color: var(--signal); }
a:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

/* Masthead */
.masthead {
  background: var(--depth);
  color: var(--paper);
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
}
@media (max-width: 719px) { .masthead { height: 56px; padding: 0 24px; } }
.masthead .mark {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--paper);
  border: none;
  letter-spacing: 0.01em;
}
.masthead nav { display: flex; gap: 32px; }
.masthead nav a {
  color: var(--paper); opacity: 0.82; border: none;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.02em;
}
.masthead nav a:hover { opacity: 1; color: var(--paper); }
@media (max-width: 719px) {
  .masthead nav { gap: 18px; }
  .masthead nav a { font-size: 12px; }
}

/* Two-column spine */
.spine {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 96px var(--gutter);
  display: grid;
  grid-template-columns: var(--spine) minmax(0, 1fr);
  gap: 48px;
}
@media (max-width: 719px) {
  .spine { grid-template-columns: 1fr; gap: 24px; padding: 48px var(--gutter); }
}
.spine > .margin { }
.spine > .body { max-width: 720px; }

/* Section mark — 2px oxblood bar left of H2 */
section.marked { position: relative; padding-left: 24px; margin: 88px 0; }
section.marked::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 0;
  width: 2px; background: var(--signal);
}
section.marked h2 { margin-top: 0; }
@media (max-width: 719px) { section.marked { margin: 56px 0; } }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--signal);
  color: var(--paper);
  border: none;
  border-radius: 2px;
  padding: 14px 26px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  transition: background var(--tx-fast) var(--ease);
}
.btn:hover { background: var(--signal-hover); color: var(--paper); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

/* Hairline rules */
hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* Footer */
.footer {
  background: var(--depth); color: var(--paper);
  padding: 64px var(--gutter) 40px;
}
.footer-grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px;
}
@media (max-width: 719px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer a { color: var(--paper); opacity: 0.85; border: none; }
.footer a:hover { opacity: 1; color: var(--paper); }
.footer .col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; opacity: 0.6; margin-bottom: 12px; text-transform: none; font-weight: 400;}
.footer .col p, .footer .col a { font-size: 15px; line-height: 1.55; display: block; margin-bottom: 6px; }
.footer .bottom {
  max-width: var(--max-w); margin: 48px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(220,220,220,0.12);
  font-family: var(--font-mono); font-size: 12px; opacity: 0.55; letter-spacing: 0.03em;
}

/* Hero — Home only */
.hero { padding: 120px var(--gutter) 96px; max-width: var(--max-w); margin: 0 auto; }
.hero h1 { max-width: 12ch; letter-spacing: -0.015em; margin: 20px 0 32px; }
.hero .sub { font-size: var(--text-long); color: var(--ink-soft); max-width: 46ch; margin-bottom: 56px; }
.hero .trace { width: 100%; height: 96px; margin: 32px 0 40px; overflow: visible; }
.hero .cta-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
@media (max-width: 719px) { .hero { padding: 64px 24px 48px; } }

/* Long-form (Journal essays, Canon) */
.longform { font-size: var(--text-long); line-height: var(--lh-long); max-width: var(--measure); }
.longform p { margin: 0 0 1.2em; }
.longform h2 { margin-top: 2em; }

/* Utility */
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-soft); }
.tabular { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 1.4em; }

/* Fine list — the four-line "what you're buying" */
.fine-list { list-style: none; margin: 0; padding: 0; }
.fine-list li {
  padding: 20px 0; border-top: 1px solid var(--rule);
  font-size: var(--text-long); line-height: 1.55; max-width: 60ch;
}
.fine-list li:last-child { border-bottom: 1px solid var(--rule); }

/* Card grid — For The First Ninety Days blocks */
.block-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 899px) { .block-grid { grid-template-columns: 1fr; gap: 32px; } }
.block { padding-top: 24px; border-top: 2px solid var(--signal); }
.block h3 { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.03em; color: var(--ink-soft); margin-bottom: 12px; text-transform: none; font-weight: 400; }
.block p { font-size: var(--text-body); line-height: 1.55; margin: 0; }

/* Photo + intro combo on Home */
.founder-row { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.founder-row img { border-radius: 0; }
@media (max-width: 719px) { .founder-row { grid-template-columns: 1fr; gap: 24px; } .founder-row img { max-width: 240px; } }

/* About page portrait */
.portrait {
  width: 100%; max-width: 480px; border-radius: 0;
  margin-bottom: 48px;
}
.portrait-caption { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); margin-top: 12px; }

/* Credo strip — full-width dark block under About */
.credo {
  background: var(--depth); color: var(--paper);
  padding: 200px var(--gutter); text-align: center;
}
.credo .line {
  font-family: var(--font-serif); font-size: clamp(28px, 4.5vw, 44px);
  line-height: 1.3; margin: 0 0 20px; letter-spacing: -0.01em;
}
.credo .line:last-child { margin-bottom: 0; }

/* Skip link */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 12px 18px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* Legal/documents body */
.doc h2 { font-family: var(--font-serif); font-size: var(--text-h2); margin-top: 2em; }
.doc p, .doc li { font-size: var(--text-body); line-height: 1.6; max-width: var(--measure); }
.doc ol, .doc ul { padding-left: 1.4em; }

/* Journal index — essay list */
.essay-item { padding: 40px 0; border-top: 1px solid var(--rule); }
.essay-item:first-of-type { border-top: none; padding-top: 0; }
.essay-item h3 { font-family: var(--font-serif); font-size: clamp(26px, 3vw, 32px); margin: 12px 0; }
.essay-item .excerpt { color: var(--ink-soft); font-size: 18px; line-height: 1.55; margin: 0 0 14px; max-width: 62ch; }
.essay-item .read { font-family: var(--font-mono); font-size: 13px; }

/* Subscribe form — plain */
.subscribe { padding: 40px 0 48px; margin-bottom: 24px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.subscribe p { font-size: 17px; margin-bottom: 20px; color: var(--ink-soft); max-width: 50ch; }
.subscribe form { display: flex; gap: 12px; flex-wrap: wrap; }
.subscribe input {
  font-family: var(--font-serif); font-size: 17px;
  background: var(--paper-raised); border: 1px solid var(--rule);
  padding: 12px 16px; border-radius: 0; color: var(--ink);
  min-width: 200px; flex: 1;
}
.subscribe input:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; }
.subscribe button { min-width: 120px; }

/* FAQ */
.faq { display: grid; grid-template-columns: 1fr; gap: 40px; }
.faq-item h3 { font-family: var(--font-serif); font-size: 22px; margin: 0 0 12px; }
.faq-item p { font-size: 17px; line-height: 1.55; max-width: 62ch; margin: 0; }

/* Table of examination — Philosophy */
.exam-table { width: 100%; border-collapse: collapse; margin: 40px 0; font-size: 15px; }
.exam-table th, .exam-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
.exam-table th { font-family: var(--font-mono); font-weight: 400; color: var(--ink-soft); font-size: 12px; letter-spacing: 0.03em; text-transform: none; }

/* Consent page — checkboxes */
.consent-check { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.consent-check input[type="checkbox"] { margin-top: 6px; width: 18px; height: 18px; accent-color: var(--signal); flex-shrink: 0; }
.consent-check label { font-size: 17px; line-height: 1.5; cursor: pointer; }
