/* ──────────────────────────────────────────────────
   brand.css — shared tokens + primitives across all 9 site variants
   Atelier palette, Newsreader serif, Manrope sans, JetBrains mono.
   ────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..700;1,6..72,300..700&family=Manrope:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Surfaces */
  --cream:      #fcf9f4;
  --cream-2:    #f4efe5;
  --cream-3:    #ede7d9;
  --cream-4:    #e6dfce;
  --ink:        #1c1c19;
  --ink-muted:  #55534c;
  --ink-faint:  #8a857a;
  --hairline:   rgba(28,28,25,0.08);
  --hairline-2: rgba(28,28,25,0.14);

  /* Brand */
  --green:      #154212;
  --green-hi:   #1d5719;
  --green-soft: #d9e2d3;
  --plum:       #6b3b52;

  /* Category palette */
  --cat-home:       #B06640;
  --cat-connect:    #35707A;
  --cat-transport:  #8E4838;
  --cat-energy:     #B88D2A;
  --cat-comm:       #6B4E71;
  --cat-science:    #154212;
  --cat-medicine:   #9A4558;

  /* Shadows */
  --shadow-soft: 0 1px 2px rgba(74,55,30,0.04), 0 6px 18px rgba(74,55,30,0.05);
  --shadow-card: 0 1px 2px rgba(74,55,30,0.05), 0 12px 30px rgba(74,55,30,0.07);
  --shadow-hero: 0 2px 4px rgba(74,55,30,0.06), 0 20px 48px rgba(74,55,30,0.09);

  /* Type */
  --serif: "Newsreader", ui-serif, Georgia, serif;
  --sans:  "Manrope",    ui-sans-serif, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ─── Wordmark: HOW{things}WORK ──────────────────── */
.wm {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 1.2px;
  display: inline-flex; align-items: baseline; gap: 0.4em;
  line-height: 1;
  color: var(--ink);
}
.wm .word  { color: inherit; }
.wm .brace {
  font-family: var(--mono);
  font-size: 0.9em;
  font-weight: 400;
  font-style: normal;
  color: var(--cat, var(--green));
}
.wm .slot {
  font-style: italic;
  font-weight: 500;
  color: var(--cat, var(--green));
}
.wm.dark         { color: var(--cream-2); }
.wm.mono-ink .brace,
.wm.mono-ink .slot { color: var(--ink); }

/* ─── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.1px;
  border-radius: 999px;
  padding: 11px 20px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 120ms ease, background 160ms ease, color 160ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-ink    { background: var(--ink);  color: var(--cream); }
.btn-ink:hover { background: #2a2823; }
.btn-cream  { background: var(--cream-2); color: var(--ink); }
.btn-cream:hover { background: var(--cream-3); }
.btn-green  { background: var(--green); color: var(--cream); }
.btn-green:hover { background: var(--green-hi); }
.btn-ghost  { background: transparent; color: var(--ink); border: 1px solid var(--hairline-2); }
.btn-ghost:hover { background: var(--cream-2); }

/* ─── Eyebrow / microtype ────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ─── Download badges (iOS / Android) ─────────────── */
.badges { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px 10px 14px;
  border-radius: 12px;
  font-family: var(--sans);
  text-decoration: none;
  transition: background 160ms ease;
  min-height: 52px;
}
.badge:hover { background: #2a2823; }
.badge .badge-icon { width: 28px; height: 28px; flex-shrink: 0; }
.badge .badge-text { display: flex; flex-direction: column; line-height: 1; }
.badge .badge-kicker {
  font-size: 9.5px; letter-spacing: 1px; text-transform: uppercase;
  opacity: 0.7; margin-bottom: 3px; font-weight: 500;
}
.badge .badge-store {
  font-size: 16px; font-weight: 600; letter-spacing: -0.2px;
  font-family: var(--serif);
}
.badge.badge-cream { background: var(--cream-2); color: var(--ink); }
.badge.badge-cream:hover { background: var(--cream-3); }
.badge.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}
.badge.disabled .badge-kicker { opacity: 0.6; }
.coming-soon-tag {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--cream-3);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9px; font-weight: 500;
  letter-spacing: 1.1px; text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--hairline-2);
}

/* ─── Free-forever pill ──────────────────────────── */
.free-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 1.4px; text-transform: uppercase;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--ink);
}
.free-pill::before {
  content: '';
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--green);
}

/* ─── Category dot ───────────────────────────────── */
.cat-dot {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--cat, var(--green));
}

/* ─── Article / topic chip ───────────────────────── */
.topic-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--cream-2);
  border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  color: var(--ink);
}
.topic-chip .cat-dot { width: 8px; height: 8px; }

/* ─── Footer (shared across all 9) ───────────────── */
.ft {
  padding: 72px 40px 40px;
  background: var(--cream-2);
  color: var(--ink);
}
.ft-inner { max-width: 1200px; margin: 0 auto; }
.ft-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--hairline-2);
}
.ft-news h3 {
  font-family: var(--serif); font-weight: 500; font-size: 22px;
  letter-spacing: -0.3px; margin: 0 0 8px;
}
.ft-news p {
  font-size: 13.5px; color: var(--ink-muted); margin: 0 0 16px;
  max-width: 320px; line-height: 1.55;
}
.ft-news form {
  display: flex; gap: 8px; max-width: 360px;
}
.ft-news input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--hairline-2);
  background: var(--cream);
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
}
.ft-news input:focus { border-color: var(--ink); }
.ft-news button {
  background: var(--ink); color: var(--cream);
  border: none; padding: 12px 18px;
  border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 600;
}
.ft-col h4 {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.ft-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ft-col a {
  font-size: 14px; color: var(--ink);
}
.ft-col a:hover { color: var(--green); }
.ft-coming a {
  color: var(--ink-faint);
  cursor: not-allowed;
}
.ft-coming .soon {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.7;
}
.ft-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-size: 12px; color: var(--ink-faint);
  flex-wrap: wrap; gap: 16px;
}
.ft-bottom .wm { font-size: 16px; }
.ft-end { display: flex; align-items: center; gap: 20px; }
.ft-socials { display: flex; gap: 12px; }
.ft-socials a {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--cream-3);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink);
  transition: background 160ms ease;
}
.ft-socials a:hover { background: var(--cream-4); }
.ft-socials svg { width: 15px; height: 15px; }

@media (max-width: 820px) {
  .ft-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .ft-news { grid-column: span 2; }
}

/* ─── Phone frame (used in several variants) ─────── */
.phone {
  width: 320px; aspect-ratio: 9/19.5;
  background: var(--cream);
  border-radius: 40px;
  padding: 14px;
  box-shadow: var(--shadow-hero), inset 0 0 0 1px var(--hairline);
  position: relative;
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--cream);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}
.phone .notch {
  position: absolute; top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 94px; height: 26px;
  background: var(--ink);
  border-radius: 999px;
  z-index: 2;
}

/* ─── Site nav (top bar across content pages) ───── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 40px;
  border-bottom: 1px solid var(--hairline);
  background: var(--cream);
}
.nav-left { display: flex; align-items: center; gap: 28px; }
.nav .wm { font-size: 17px; }
.nav-links {
  display: flex; align-items: center; gap: 22px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--ink-muted);
}
.nav-links a { color: var(--ink-muted); transition: color 140ms ease; }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-right .free-pill { display: inline-flex; }
@media (max-width: 720px) {
  .nav { flex-direction: column; gap: 14px; padding: 18px 24px; }
  .nav-left { width: 100%; justify-content: center; flex-wrap: wrap; }
  .nav-links { gap: 14px; font-size: 10.5px; }
  .nav-right { display: none; }
}

/* ─── Long-form content page (about, contact, privacy, notes) ── */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 40px 100px;
}
.page-eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 56px);
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.05;
  margin: 0 0 24px;
  text-wrap: balance;
}
.page-title em { font-style: italic; font-weight: 500; }
.page-lede {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink-muted);
  margin: 0 0 56px;
  text-wrap: pretty;
  font-weight: 300;
}
.page h2 {
  font-family: var(--serif);
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.3px;
  margin: 48px 0 14px;
}
.page h3 {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ink-faint);
  margin: 36px 0 10px;
}
.page p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.page p.muted { color: var(--ink-muted); }
.page ul, .page ol {
  font-size: 16px; line-height: 1.65;
  color: var(--ink); padding-left: 22px;
  margin: 0 0 18px;
}
.page li { margin-bottom: 6px; }
.page a.inline {
  color: var(--green);
  border-bottom: 1px solid var(--green-soft);
  transition: border-color 140ms ease;
}
.page a.inline:hover { border-bottom-color: var(--green); }
.page hr {
  border: 0; border-top: 1px solid var(--hairline-2);
  margin: 56px 0;
}

/* Utility */
.sr { position: absolute; left: -9999px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
