/* ERND — shared styles
   Palette: B&W foundation, optional signal red accent (#C1292E) currently OFF.
   Type: Instrument Serif (display) + Satoshi (body/UI).
*/

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400;1,6..72,500&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=switzer@400,500,700&display=swap');

:root {
  --bg: #0e0e0c;
  --fg: #f5f0e8;
  --muted: #9a9084;
  --rule: #252219;
  --accent: #f5f0e8;
  --max: 1200px;
}

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Switzer', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.7; }

img { max-width: 100%; display: block; }

/* Layout */
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
section { padding: 120px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }

/* Type */
h1, h2, h3, h4 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
h1 { font-size: clamp(48px, 8vw, 120px); }
h2 { font-size: clamp(36px, 5vw, 72px); margin-bottom: 32px; }
h3 { font-size: clamp(24px, 2.5vw, 36px); margin-bottom: 16px; }
.eyebrow {
  font-family: 'Switzer', sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c8bfb0;
  margin-bottom: 24px;
  display: block;
  font-weight: 500;
}
p { font-size: 18px; max-width: 65ch; margin-bottom: 20px; color: #ddd6c8; }
p.lead { font-size: 24px; line-height: 1.5; color: #ece5d8; }
em, .italic { font-style: italic; font-family: 'Newsreader', Georgia, serif; }

/* Header / Nav */
header.site {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14,14,12,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px;
  max-width: var(--max); margin: 0 auto;
}
.mark {
  font-family: 'Switzer', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 14px;
  border: 1.5px solid var(--fg);
  padding: 8px 12px;
}
.nav ul { list-style: none; display: flex; gap: 36px; }
.nav ul a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav ul a.active { border-bottom: 1px solid var(--fg); padding-bottom: 4px; }

/* Hero */
.hero { padding: 180px 0 140px; border-bottom: 1px solid var(--rule); }
.hero h1 { max-width: 14ch; }
.hero .lead { margin-top: 40px; max-width: 56ch; }

/* Buttons */
.btn-row { display: flex; gap: 16px; margin-top: 48px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  font-family: 'Switzer', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 18px 32px;
  border: 1.5px solid var(--fg);
  transition: all 0.2s ease;
}
.btn:hover { background: var(--fg); color: var(--bg); opacity: 1; }
.btn.ghost { border-color: var(--muted); color: var(--muted); }
.btn.ghost:hover { border-color: var(--fg); color: var(--bg); background: var(--fg); }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--fg);
  color: var(--fg);
  cursor: pointer;
  width: 44px;
  height: 44px;
  position: relative;
  flex-shrink: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--fg);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.25s ease;
}
.nav-toggle span { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle span::before { content: ''; position: absolute; top: -6px; left: 0; width: 18px; }
.nav-toggle span::after  { content: ''; position: absolute; top:  6px; left: 0; width: 18px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* CTA buttons — equal sizing */
.btn-row .btn {
  min-width: 220px;
  text-align: center;
  padding: 18px 32px;
}

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 48px; }
  section { padding: 80px 0; }
  .hero { padding: 100px 0 80px; }

  /* Mobile nav */
  .nav-toggle { display: block; }
  .nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(14,14,12,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px 32px 32px;
    gap: 0;
    border-bottom: 1px solid var(--rule);
  }
  .nav ul.open { display: flex; }
  .nav ul li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav ul li:last-child { border-bottom: none; }
  .nav ul a { font-size: 14px; }

  /* Mobile buttons — full width, equal */
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; min-width: unset; text-align: center; }

  /* Footer legal stack */
  footer.site .legal { flex-direction: column; gap: 8px; }
}

/* Capability cards */
.cap {
  border-top: 1px solid var(--rule);
  padding: 40px 0;
}
.cap:last-child { border-bottom: 1px solid var(--rule); }
.cap-num {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  color: var(--muted);
  font-size: 18px;
  display: block;
  margin-bottom: 12px;
}
.cap h3 { margin-bottom: 12px; }
.cap p { margin-bottom: 0; }

/* Founder photo */
.founder-photo {
  width: 100%;
  max-width: 400px;
  filter: grayscale(100%) contrast(1.05) brightness(1.02);
  border-radius: 2px;
  margin-bottom: 32px;
}

/* Pull quotes */
.pull {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.2;
  font-style: italic;
  max-width: 22ch;
  margin: 0 auto;
  text-align: center;
}

/* Article list */
.article-list { display: flex; flex-direction: column; }
.article {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 32px;
  align-items: baseline;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.article:last-child { border-bottom: 1px solid var(--rule); }
.article time {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.article h3 { margin: 0; font-size: 28px; }
.article .arrow { color: var(--muted); font-size: 24px; }

/* Footer */
footer.site {
  padding: 80px 0 60px;
  border-top: 1px solid var(--rule);
}
footer.site .row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 48px; flex-wrap: wrap;
}
footer.site .col { flex: 1; min-width: 220px; }
footer.site h4 {
  font-family: 'Switzer', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
footer.site ul { list-style: none; }
footer.site li { padding: 6px 0; font-size: 14px; }
footer.site .sign {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 48px;
  font-style: italic;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
footer.site .legal {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted);
  margin-top: 32px; letter-spacing: 0.05em;
}

/* Visually hidden (a11y) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Form */
.form { max-width: 640px; }
.form label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 8px;
}
.form input, .form textarea, .form select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  color: var(--fg);
  font-family: 'Switzer', sans-serif;
  font-size: 18px;
  padding: 12px 0;
  outline: none;
}
.form input:focus, .form textarea:focus, .form select:focus {
  border-bottom-color: var(--fg);
}
.form textarea { min-height: 120px; resize: vertical; }
