/* ============================================================
   Secular Labs — design tokens
   Ink navy + ledger brass + petrol teal. Serif headlines (journal /
   working-paper register) paired with a plain grotesk for body & UI.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;600&display=swap');

:root{
  --ink: #12151C;
  --ink-soft: #262B36;
  --paper: #F4F5F7;
  --paper-dim: #EAEBEF;
  --rule: #D6D9E0;
  --brass: #4A4E9E;
  --brass-deep: #34386F;
  --petrol: #B5652E;
  --grey: #5B616B;
  --grey-light: #8A909B;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max: 1120px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin:0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
}

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

a{ color: var(--petrol); text-decoration: none; }
a:hover{ text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

h1,h2,h3,h4{
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1{ font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 500; }
h2{ font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3{ font-size: 1.25rem; }

p{ margin: 0 0 1.1em; max-width: 62ch; }
p.wide{ max-width: none; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.section{
  padding: 88px 0;
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type{ border-bottom: none; }
.section.dim{ background: var(--paper-dim); }
.section.ink{ background: var(--ink); color: var(--paper); }
.section.ink p{ color: #C7CBD4; }
.section.ink h2, .section.ink h3{ color: var(--paper); }

.kicker{
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brass-deep);
  margin-bottom: 0.9em;
}
.section.ink .kicker{ color: #E3A876; }
.section.ink .seq .n{ color: #E3A876; }

/* ---------- Header / nav ---------- */
header.site{
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 20px 28px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand{
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ink);
  display:flex;
  align-items:center;
  gap: 10px;
}
.brand:hover{ text-decoration:none; }
.brand .mark{ display:block; }
nav.links{
  display:flex;
  gap: 30px;
  font-size: 0.95rem;
}
nav.links a{ color: var(--ink-soft); }
nav.links a.current{ color: var(--brass-deep); font-weight: 500; }
.nav-cta{
  border: 1px solid var(--ink);
  padding: 8px 16px;
  border-radius: 2px;
  color: var(--ink) !important;
  font-size: 0.9rem;
}
.nav-cta:hover{ background: var(--ink); color: var(--paper) !important; text-decoration:none; }

.menu-btn{ display:none; background:none; border:none; cursor:pointer; padding:6px; }
.menu-btn span{ display:block; width:22px; height:2px; background:var(--ink); margin:5px 0; }

@media (max-width: 780px){
  nav.links{
    display:none;
    position:absolute;
    left:0; right:0; top:100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }
  nav.links.open{ display:flex; }
  nav.links a{ padding: 12px 28px; border-top: 1px solid var(--rule); }
  .nav-cta{ margin: 12px 28px; display:inline-block; width:fit-content; }
  .menu-btn{ display:block; }
  header.site{ position: sticky; }
}

/* ---------- Hero ---------- */
.hero{
  padding: 76px 0 60px;
}
.hero-grid{
  display:grid;
  grid-template-columns: 1.05fr 0.85fr;
  gap: 56px;
  align-items:center;
}
@media (max-width: 900px){
  .hero-grid{ grid-template-columns: 1fr; }
}
.hero-diagram{ width:100%; height:auto; }
.eyebrow-line{
  display:flex;
  align-items:center;
  gap: 12px;
  color: var(--grey);
  font-size: 0.92rem;
  margin-bottom: 22px;
}
.eyebrow-line .dash{ width: 28px; height:1px; background: var(--brass); display:inline-block; }

.lede{ font-size: 1.15rem; color: var(--ink-soft); max-width: 52ch; }

.btn-row{ display:flex; gap: 16px; flex-wrap:wrap; margin-top: 30px; }
.btn{
  display:inline-block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.96rem;
  padding: 13px 24px;
  border-radius: 2px;
  border: 1px solid var(--ink);
}
.btn.primary{ background: var(--ink); color: var(--paper); }
.btn.primary:hover{ background: var(--ink-soft); text-decoration:none; }
.btn.ghost{ background: transparent; color: var(--ink); }
.btn.ghost:hover{ background: var(--paper-dim); text-decoration:none; }
.section.ink .btn.ghost{ border-color: #5A5F6A; color: var(--paper); }
.section.ink .btn.ghost:hover{ background: var(--ink-soft); }

/* ---------- Stat strip ---------- */
.stat-strip{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding-top: 30px;
  margin-top: 46px;
  border-top: 1px solid var(--rule);
}
.stat{
  border: 1px solid var(--rule);
  background: var(--paper-dim);
  padding: 22px 24px;
}
.stat .num{ font-family: var(--serif); font-size: 1.9rem; color: var(--brass-deep); display:block; margin-bottom: 8px; }
.stat .label{ font-size: 0.85rem; color: var(--grey); }

/* ---------- Section label + content (stacked, not split-column) ---------- */
.row{ display:block; max-width: 760px; margin: 0 auto; }
.col-label{
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 16px;
  display: block;
}
.section.ink .col-label{ color: var(--paper); }

/* ---------- Numbered list (genuine sequences only) ---------- */
.seq{ list-style:none; margin:0; padding:0; }
.seq li{
  display:grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
}
.seq li:last-child{ border-bottom: 1px solid var(--rule); }
.seq .n{
  font-family: var(--serif);
  color: var(--brass-deep);
  font-size: 1.2rem;
}
.seq h3{ margin-bottom: 0.35em; }
.seq p{ margin-bottom: 0; color: var(--ink-soft); }

/* ---------- Plain divided list (non-sequential items) ---------- */
.divided{ list-style:none; margin:0; padding:0; }
.divided li{
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  display:grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
}
.divided li:last-child{ border-bottom: 1px solid var(--rule); }
@media (max-width: 700px){
  .divided li{ grid-template-columns: 1fr; gap: 8px; }
}
.divided h3{ margin-bottom: 0.2em; font-size: 1.1rem; }
.divided p{ margin-bottom: 0; color: var(--ink-soft); max-width: 60ch; }
.tile-label svg{ display:block; margin-bottom: 10px; }
.tile-label h3{ margin-bottom: 0; }

/* ---------- Tables (architecture / tool reference) ---------- */
table.stack{
  width:100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin: 8px 0 0;
}
table.stack th{
  text-align:left;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--grey);
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 0.85rem;
}
table.stack td{
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-soft);
}
table.stack td.tool{ color: var(--ink); font-weight: 500; white-space: nowrap; }

/* ---------- Pull quote / positioning statement ---------- */
.pull{
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  color: var(--ink);
  max-width: 46ch;
  margin: 0;
}
.section.ink .pull{ color: var(--paper); }

/* ---------- Footer ---------- */
footer.site{
  background: var(--ink);
  color: #B5B9C4;
  padding: 56px 0 34px;
  font-size: 0.92rem;
}
footer.site a{ color: #E2E5EA; }
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid #262C38;
}
@media (max-width: 700px){
  .footer-grid{ grid-template-columns: 1fr; }
}
footer.site .brand-foot{ font-family: var(--serif); color: var(--paper); font-size: 1.2rem; margin-bottom: 12px; }
footer.site h4{ color: #E2E5EA; font-family: var(--sans); font-size: 0.85rem; font-weight: 500; margin-bottom: 14px; }
footer.site ul{ list-style:none; padding:0; margin:0; }
footer.site li{ margin-bottom: 9px; }
.footer-bottom{ padding-top: 24px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size: 0.85rem; color: var(--grey-light); }

/* ---------- Map embed ---------- */
.map-embed{ border: 1px solid var(--rule); margin: 22px auto 0; max-width: 620px; overflow:hidden; }
.map-embed iframe{ display:block; }
.map-title{ text-align:center; font-weight:600; padding:12px 14px; background:var(--paper-dim); border-bottom:1px solid var(--rule); }

/* ---------- Forms (contact) ---------- */
.field{ margin-bottom: 22px; }
.field label{ display:block; font-size: 0.88rem; color: var(--grey); margin-bottom: 7px; }
.field input, .field textarea, .field select{
  width:100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  border-radius: 2px;
}
.field textarea{ resize: vertical; min-height: 120px; }
.form-note{ font-size: 0.85rem; color: var(--grey); margin-top: 14px; }
.form-status{ margin-top: 16px; font-size: 0.92rem; }
.form-status.ok{
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--brass-deep);
  padding: 14px 16px;
  border-radius: 2px;
}
.form-status.ok a{ font-weight: 600; }
.form-status.error{
  color: #8A2E2E;
  background: var(--paper);
  border: 1px solid #B5652E;
  padding: 14px 16px;
  border-radius: 2px;
}

/* ---------- Plain-terms explainer box ---------- */
.explainer{
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 28px 30px;
  margin: 34px 0;
}
.section.dim .explainer{ background: var(--paper); }
.section.ink .explainer{ background: var(--ink-soft); border-color: #3A3F4C; }
.explainer .term{ font-family: var(--serif); font-size: 1.05rem; color: var(--brass-deep); margin-bottom: 4px; }
.section.ink .explainer .term{ color: #E3A876; }
.explainer .expansion{ font-size: 0.88rem; color: var(--grey); margin-bottom: 14px; }
.section.ink .explainer .expansion{ color: #9AA0AC; }
.explainer p:last-child{ margin-bottom: 0; }

/* ---------- Simple bar-comparison diagram ---------- */
.bar-diagram{ width:100%; height:auto; margin: 10px 0; }
.diagram-caption{ font-size: 0.85rem; color: var(--grey); margin-top: 10px; }

/* ---------- Mini step-flow diagram ---------- */
.flow-diagram{ width:100%; height:auto; margin: 18px 0; }

/* ---------- Insights / article teasers ---------- */
.post{
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.post:last-child{ border-bottom: 1px solid var(--rule); }
.post .tag{ font-size: 0.82rem; color: var(--brass-deep); margin-bottom: 8px; display:block; }
.post h3{ margin-bottom: 0.4em; }
.post p{ color: var(--ink-soft); }

/* ---------- Page hero (non-home pages) ---------- */
.page-hero{ padding: 64px 0 20px; }
.page-hero .lede{ font-size: 1.05rem; }

/* ---------- misc ---------- */
.mono{ font-family: 'Space Grotesk', monospace; }
.small{ font-size: 0.88rem; color: var(--grey); }
