/* ============================================================
   Upgrade with AI — Editorial Design System
   Locked: 2026-05-07 for May 26 launch
   Foundation: cream paper + ink + emerald (primary jewel tone)
   Type: Fraunces (display serif) + Inter (body sans)
   Reference: Every.to, Penguin Classics, The New Yorker
   ============================================================ */

/* ---------- 0. Tokens ---------- */
:root {
  /* Foundation */
  --paper: #F4EDE0;
  --paper-deep: #ECE3D3;          /* slightly darker cream for sections */
  --paper-light: #FAF5EA;         /* lifted cream for cards/modals */
  --ink: #0F0F0F;
  --ink-soft: #2A2A28;            /* secondary body text */
  --ink-mute: #6B675F;            /* tertiary/labels */
  --rule: #D9CFB8;                /* hairline rule on cream */

  /* Jewel tones (one per piece) */
  --emerald: #0F6B4D;
  --emerald-deep: #0A4F39;
  --emerald-tint: #E2EBDF;        /* 10% on cream for soft fills */
  --teal: #0D6B6B;
  --cobalt: #2347C5;
  --brick: #A03A2A;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Hoefler Text", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale (8pt grid, doubled for editorial whitespace) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 96px;
  --s-9: 128px;
  --s-10: 160px;

  /* Layout */
  --container-narrow: 720px;       /* article-width copy */
  --container-content: 960px;      /* default content */
  --container-wide: 1200px;        /* full-bleed sections */
  --container-pad: clamp(20px, 4vw, 40px);

  /* Type scale (fluid) */
  --t-eyebrow: 12px;
  --t-small: 14px;
  --t-body: 17px;
  --t-lead: clamp(19px, 1.6vw, 22px);
  --t-h4: clamp(20px, 1.6vw, 24px);
  --t-h3: clamp(26px, 2.2vw, 32px);
  --t-h2: clamp(34px, 3.4vw, 48px);
  --t-h1: clamp(48px, 6vw, 84px);
  --t-display: clamp(64px, 8vw, 112px);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --speed-fast: 160ms;
  --speed-base: 240ms;
}

/* ---------- 1. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { padding: 0; margin: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--s-7) 0; }
::selection { background: var(--emerald); color: var(--paper); }

/* ---------- 2. Typography ---------- */
.display, h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;          /* Fraunces 400 reads as a confident book weight */
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 var(--s-4) 0;
}
.display {
  font-size: var(--t-display);
  font-weight: 300;          /* lighter for the hero */
  letter-spacing: -0.02em;
  line-height: 1.02;
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; }
h4 { font-size: var(--t-h4); line-height: 1.3; font-weight: 500; }

p {
  margin: 0 0 var(--s-4) 0;
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink-soft);
}
.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: var(--s-4);
}
.small { font-size: var(--t-small); color: var(--ink-mute); }
em, .em { font-style: italic; color: var(--emerald); font-weight: inherit; }
strong { font-weight: 600; color: var(--ink); }

.serif-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
}

/* Drop cap for editorial article-style sections */
.dropcap::first-letter {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 4.4em;
  float: left;
  line-height: 0.86;
  margin: 0.06em 0.08em 0 -0.04em;
  color: var(--emerald);
}

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-content);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.container-narrow { max-width: var(--container-narrow); }
.container-wide   { max-width: var(--container-wide); }

.section {
  padding: var(--s-9) 0;
}
.section-sm { padding: var(--s-7) 0; }
.section-lg { padding: var(--s-10) 0; }

.section-paper-deep { background: var(--paper-deep); }
.section-ink {
  background: var(--ink);
  color: var(--paper);
}
.section-ink h1, .section-ink h2, .section-ink h3, .section-ink h4 { color: var(--paper); }
.section-ink p { color: rgba(244, 237, 224, 0.78); }
.section-ink .eyebrow { color: var(--emerald); }
.section-ink em { color: var(--paper); }

/* Hairline rule between editorial sections */
.section + .section { border-top: 1px solid var(--rule); }
.section.section-ink + .section { border-top: 0; }
.section + .section.section-ink { border-top: 0; }

/* Two-column editorial layout */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
}
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}
.cols-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
}

@media (max-width: 860px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; gap: var(--s-6); }
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 2px;          /* sharp/bookish, not pill */
  transition: background var(--speed-base) var(--ease),
              color var(--speed-base) var(--ease),
              border-color var(--speed-base) var(--ease),
              transform var(--speed-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

.btn-primary {
  background: var(--emerald);
  color: var(--paper);
  border-color: var(--emerald);
}
.btn-primary:hover { background: var(--emerald-deep); border-color: var(--emerald-deep); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding-left: 0;
  padding-right: 0;
  border-color: transparent;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}
.btn-ghost:hover { color: var(--emerald); border-bottom-color: var(--emerald); }

.btn-on-ink {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.btn-on-ink:hover { background: var(--emerald); color: var(--paper); border-color: var(--emerald); }

/* Inline editorial link */
.link {
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  transition: color var(--speed-base) var(--ease), border-color var(--speed-base) var(--ease);
}
.link:hover { color: var(--emerald); border-bottom-color: var(--emerald); }

/* ---------- 5. Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 237, 224, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--container-wide);
  margin-inline: auto;
  padding: 0 var(--container-pad);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}
.nav-logo {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nav-logo .accent { color: var(--emerald); font-style: italic; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-6);
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  transition: color var(--speed-base) var(--ease);
}
.nav-links a:hover { color: var(--emerald); }
.nav-cta { padding: 9px 18px; font-size: 14px; }

.nav-burger {
  display: none;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
  content: '';
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform var(--speed-base) var(--ease);
}
.nav-burger span::before { position: absolute; top: -7px; }
.nav-burger span::after  { position: absolute; top: 7px;  }

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
}

/* ---------- 6. Hero (editorial) ---------- */
.hero {
  padding: var(--s-9) 0 var(--s-8);
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  max-width: var(--container-narrow);
}
.hero-headline {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--s-5);
}
.hero-headline .accent {
  color: var(--emerald);
  font-style: italic;
  font-weight: 300;
}
.hero-sub {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: var(--s-6);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}
.hero-fine {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: var(--s-4);
}


/* ---------- 7. Section header (editorial) ---------- */
.section-head {
  max-width: var(--container-narrow);
  margin: 0 auto var(--s-7);
  text-align: left;
}
.section-head .eyebrow { color: var(--emerald); }
.section-head h2 {
  font-size: var(--t-h2);
  font-weight: 400;
  margin-bottom: var(--s-4);
}
.section-head p {
  font-size: var(--t-lead);
  color: var(--ink-soft);
  margin-bottom: 0;
}

/* ---------- 8. Cards & content blocks ---------- */
.card {
  background: var(--paper-light);
  border: 1px solid var(--rule);
  padding: var(--s-6);
  position: relative;
}
.card.card-bordered-top { border-top: 3px solid var(--emerald); }
.card .card-eyebrow {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: var(--s-3);
}
.card h3 { margin-bottom: var(--s-3); }
.card p:last-child { margin-bottom: 0; }

/* Numbered editorial cards (1./2./3.) */
.card-num {
  position: relative;
  padding: var(--s-6);
  border-top: 1px solid var(--rule);
}
.card-num::before {
  content: counter(card-num, decimal-leading-zero);
  counter-increment: card-num;
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
  color: var(--emerald);
  position: absolute;
  top: var(--s-5);
  right: 0;
}
.cols-3-num, .cols-2-num { counter-reset: card-num; }

/* ---------- 9. Stats / numbers ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-7) 0;
}
.stat {
  text-align: left;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--emerald);
  margin-bottom: var(--s-2);
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
@media (max-width: 760px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}

/* ---------- 10. Pull quote ---------- */
.pullquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.25;
  color: var(--ink);
  border-left: 2px solid var(--emerald);
  padding: var(--s-3) 0 var(--s-3) var(--s-5);
  margin: var(--s-7) 0;
  max-width: var(--container-narrow);
}
.pullquote-attr {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: var(--s-4);
}

/* ---------- 11. Three-ways / offer cards ---------- */
.offer {
  border: 1px solid var(--rule);
  background: var(--paper-light);
  padding: var(--s-7) var(--s-6);
  display: flex;
  flex-direction: column;
}
.offer-eyebrow {
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: var(--s-3);
}
.offer h3 {
  font-size: var(--t-h3);
  margin-bottom: var(--s-3);
}
.offer-price {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-mute);
  font-size: 16px;
  margin-bottom: var(--s-4);
}
.offer ul {
  margin: 0 0 var(--s-6);
  padding: 0;
  list-style: none;
}
.offer li {
  position: relative;
  padding-left: var(--s-4);
  margin-bottom: var(--s-3);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
}
.offer li::before {
  content: '—';
  color: var(--emerald);
  position: absolute;
  left: 0;
}
.offer .btn { margin-top: auto; }

/* ---------- 12. Newsletter strip ---------- */
.newsletter-strip {
  background: var(--ink);
  color: var(--paper);
}
.newsletter-strip .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: center;
  padding-block: var(--s-7);
}
.newsletter-strip h3 {
  color: var(--paper);
  font-size: var(--t-h3);
  margin-bottom: var(--s-2);
}
.newsletter-strip p {
  color: rgba(244, 237, 224, 0.7);
  margin: 0;
}
.newsletter-form {
  display: flex;
  gap: var(--s-2);
}
.newsletter-form input[type="email"] {
  background: transparent;
  border: 1px solid rgba(244, 237, 224, 0.3);
  color: var(--paper);
  padding: 12px 16px;
  font: inherit;
  min-width: 280px;
  border-radius: 2px;
}
.newsletter-form input[type="email"]::placeholder { color: rgba(244, 237, 224, 0.4); }
.newsletter-form input[type="email"]:focus { outline: 0; border-color: var(--emerald); }
@media (max-width: 760px) {
  .newsletter-strip .container { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; align-items: stretch; }
  .newsletter-form input[type="email"] { min-width: 0; }
}

/* ---------- 13. Footer ---------- */
.footer {
  background: var(--paper-deep);
  border-top: 1px solid var(--rule);
  padding: var(--s-7) 0 var(--s-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-7);
}
.footer-mark {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
}
.footer-mark .accent { color: var(--emerald); font-style: italic; }
.footer-tag {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-mute);
  margin-top: var(--s-2);
  max-width: 32ch;
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--s-3);
}
.footer-col ul li {
  margin-bottom: var(--s-2);
  font-size: 14px;
}
.footer-col a:hover { color: var(--emerald); }
.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-mute);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-meta { flex-direction: column; gap: var(--s-3); align-items: flex-start; }
}

/* ---------- 13b. Figure plates (editorial illustrations) ---------- */
/* Used inline within article copy. The illustration sits on its jewel-tone background
   (the emerald rectangle), framed by a hairline rule, with an italic caption. */
.figure-plate {
  margin: var(--s-7) 0;
  display: block;
}
.figure-plate-img {
  aspect-ratio: 3 / 2;
  background: var(--emerald);
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.figure-plate-img.brick   { background: var(--brick); }
.figure-plate-img.teal    { background: var(--teal); }
.figure-plate-img.cobalt  { background: var(--cobalt); }
.figure-plate-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.figure-plate-placeholder {
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(244, 237, 224, 0.85);
  font-size: 16px;
  text-align: center;
  padding: var(--s-5);
  line-height: 1.4;
}
.figure-plate figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-mute);
  margin-top: var(--s-3);
  text-align: center;
  line-height: 1.45;
}

/* Square plate variant (for sidebar / inline icons) */
.figure-plate.square .figure-plate-img { aspect-ratio: 1 / 1; }
.figure-plate.tall   .figure-plate-img { aspect-ratio: 4 / 5; }
.figure-plate.wide   .figure-plate-img { aspect-ratio: 21 / 9; }

/* ---------- 14. Editorial flourishes ---------- */
/* Hairline divider with center mark */
.divider-mark {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-7) auto;
  max-width: var(--container-narrow);
  color: var(--ink-mute);
}
.divider-mark::before,
.divider-mark::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.divider-mark span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
}

/* Date / issue meta */
.meta {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- 15. Utilities ---------- */
.text-emerald { color: var(--emerald); }
.text-teal    { color: var(--teal); }
.text-cobalt  { color: var(--cobalt); }
.text-brick   { color: var(--brick); }

.bg-paper       { background: var(--paper); }
.bg-paper-deep  { background: var(--paper-deep); }
.bg-paper-light { background: var(--paper-light); }
.bg-ink         { background: var(--ink); color: var(--paper); }

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }

/* Skip-to-content for a11y */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--s-4);
  background: var(--ink);
  color: var(--paper);
  padding: 8px 12px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}
