/* ============================================================
   jenni.download — single stylesheet (dark mode)
   Tokens → fonts → reset → base → components → page-specific
   ============================================================ */

:root {
  --paper:        #1A140D;       /* warm near-black */
  --paper-deep:   #221C13;       /* elevated band */
  --ink:          #F2EAD9;       /* warm cream */
  --ink-muted:    #A89A82;       /* warm tan-grey */
  --accent:       #F0A06A;       /* bright terracotta */
  --accent-dark:  #E08850;       /* link default — AA on dark */
  --accent-soft:  #3A2418;       /* deep terracotta surface */
  --accent-bright:#F8B987;       /* hover for big mailto */
  --code-bg:      #221C13;
  --rule:         #3A2F26;

  --max-content:  1280px;
  --pad-mobile:   24px;
  --pad-desktop:  48px;

  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body:    "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;
}

/* --- @font-face --- */

@font-face {
  font-family: "Source Serif 4";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/source-serif-4-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/source-serif-4-700.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/static/fonts/ibm-plex-mono-400.woff2") format("woff2");
}

/* --- reset --- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, figure, blockquote, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

/* --- base typography --- */

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* warm grain (light flecks on dark) */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='white' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  color: var(--ink);
}

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

small, .meta { color: var(--ink-muted); font-size: 15px; }

/* --- links --- */

a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- code --- */

code, pre {
  font-family: var(--font-mono);
  font-size: 15px;
}
pre {
  background: var(--code-bg);
  color: var(--ink);
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
  border: 1px solid var(--rule);
}
:not(pre) > code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}

/* --- container --- */

.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--pad-mobile);
  position: relative;
  z-index: 2;
}
@media (min-width: 1024px) { .container { padding: 0 var(--pad-desktop); } }

main {
  flex: 1;
  padding-top: 96px;
  position: relative;
  z-index: 2;
}
@media (min-width: 1024px) { main { padding-top: 128px; } }

/* === HEADER (full-bleed, edge-anchored) === */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  background: color-mix(in oklab, var(--paper) 85%, transparent);
  border-bottom: 1px solid var(--rule);
  padding: 14px 24px;
}
@media (min-width: 1024px) { .site-nav { padding: 16px 32px; } }
.site-nav .row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
}
.site-nav .wordmark {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav .wordmark .dot { color: var(--accent); }
.site-nav .wordmark[aria-current="page"] { pointer-events: none; }
.site-nav nav {
  display: flex; align-items: center; gap: 20px;
  font-family: var(--font-mono); font-size: 13px;
}
.site-nav nav a {
  color: var(--ink); text-decoration: none;
  opacity: 0.72;
  transition: opacity 200ms, color 200ms;
}
.site-nav nav a:hover, .site-nav nav a[aria-current="page"] {
  color: var(--accent); opacity: 1;
}
.site-nav nav .sep { opacity: 0.3; color: var(--ink-muted); }

/* === FOOTER === */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 24px;
  position: relative; z-index: 2;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-muted);
  background: var(--paper);
}
@media (min-width: 1024px) { .site-footer { padding: 28px 32px; } }
.site-footer .row {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  align-items: center; justify-content: space-between;
}
.site-footer .left {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
}
.site-footer a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.site-footer a:hover { color: var(--accent); }

/* === HERO === */

.hero { padding-bottom: 56px; }
@media (min-width: 1024px) { .hero { padding-bottom: 80px; } }

.h-mega {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 0.86;
  font-weight: 700;
  letter-spacing: -0.055em;
  margin: 0;
}
.h-mega .accent { color: var(--accent); }

.lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.45;
  max-width: 32ch;
  margin: 0;
  font-style: italic;
  color: var(--ink-muted);
}
.lead em { font-style: italic; color: var(--ink); }
.lead .highlight { color: var(--ink); font-style: italic; }
.lead .diff-y { color: #6F6555; font-style: italic; font-weight: 400; }
.lead .diff-i { color: var(--accent); font-style: italic; font-weight: 700; }

.meta-tag {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.meta-tag .num { color: var(--accent); font-feature-settings: "tnum"; }
.meta-tag .bar {
  display: inline-block; height: 1px; width: 48px;
  background: var(--accent-dark);
}

.hero-grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: 24px; margin-top: 36px; align-items: start;
}
@media (min-width: 1024px) { .hero-grid { margin-top: 48px; gap: 32px; } }
.hero-lead-col { grid-column: span 12; }
.hero-side-col { grid-column: span 12; }
@media (min-width: 1024px) {
  .hero-lead-col { grid-column: 1 / span 7; }
  .hero-side-col { grid-column: 9 / span 4; }
}

.side-note {
  font-family: var(--font-mono); font-size: 13px;
  line-height: 1.65;
  color: var(--ink-muted);
}
.side-note .rule {
  display: block; height: 1px; width: 100%;
  background: var(--rule); margin-bottom: 16px;
}
.side-note strong { color: var(--ink); font-weight: 600; }
.side-note code {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink); background: transparent; padding: 0;
}

.trail-large {
  display: block; margin-top: 36px;
  width: 100%; max-width: 640px; height: 40px;
  color: var(--accent);
}
@media (min-width: 1024px) { .trail-large { margin-top: 48px; } }

/* === PITCH BAND === */

.pitch-band {
  background: var(--paper-deep);
  position: relative; z-index: 2;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pitch-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px;
  padding: 64px 0;
}
@media (min-width: 1024px) { .pitch-grid { padding: 96px 0; } }
.pitch-meta { grid-column: span 12; }
.pitch-text-col { grid-column: span 12; }
@media (min-width: 1024px) {
  .pitch-meta { grid-column: span 3; padding-top: 12px; }
  .pitch-text-col { grid-column: span 9; }
}
.pitch-meta {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ink-muted);
}
.pitch-meta .num { color: var(--accent); font-feature-settings: "tnum"; }

.pitch-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.18; letter-spacing: -0.018em;
  margin: 0 0 32px;
  font-weight: 700;
}
.pitch-text em { font-style: italic; }

.three-things {
  list-style: none; margin: 0 0 32px; padding: 0;
  display: flex; flex-direction: column; gap: 20px;
}
.three-things li {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.45;
}
.three-things li::before {
  content: "→"; color: var(--accent); margin-right: 14px; font-weight: 700;
}
.three-things strong { color: var(--accent); font-weight: 600; }
.three-things code, .three-things .slug-pill {
  font-family: var(--font-mono); font-size: 0.78em;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 4px; white-space: nowrap;
}

.slug-pill {
  font-family: var(--font-mono); font-size: 0.78em;
  color: var(--accent); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 4px; white-space: nowrap;
}

.pitch-closing {
  font-family: var(--font-body);
  font-size: 17px; line-height: 1.65;
  color: var(--ink-muted);
  max-width: 60ch;
  margin-top: 32px;
}
.pitch-closing code {
  font-family: var(--font-mono); font-size: 0.92em;
  color: var(--ink); background: var(--code-bg);
  padding: 1px 6px; border-radius: 3px;
}
.pitch-closing strong { color: var(--ink); font-weight: 600; }

/* === FEATURES TEASER === */

.features-teaser { position: relative; z-index: 2; padding: 80px 0 40px; }
.features-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px;
  align-items: end;
}
.features-main { grid-column: span 12; }
.features-side { grid-column: span 12; }
@media (min-width: 1024px) {
  .features-main { grid-column: 1 / span 7; }
  .features-side { grid-column: 9 / span 4; }
}
.features-main h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05; letter-spacing: -0.025em; font-weight: 700;
  margin: 16px 0 0;
}
.features-main h2 .accent { color: var(--accent); }

/* === FEATURES FULL LIST === */

.features-full {
  display: flex; flex-direction: column;
  margin: 48px 0 0;
  list-style: none; padding: 0;
}
.features-full li {
  display: grid; grid-template-columns: 64px 1fr; gap: 24px;
  align-items: start;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.features-full li:first-child { padding-top: 0; }
.features-full li:last-child { border-bottom: 0; }
.features-full .num {
  font-family: var(--font-display); font-weight: 700;
  color: var(--accent);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1;
  font-feature-settings: "tnum";
}
.features-full strong {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.25;
  display: block; margin-bottom: 8px; color: var(--ink);
}
.features-full p {
  margin: 0; color: var(--ink-muted);
  font-size: 17px; line-height: 1.65; max-width: 56ch;
}
.features-full code {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--ink); background: var(--code-bg);
  padding: 1px 6px; border-radius: 3px;
}

/* === CODE SAMPLE SECTION === */

.code-sample { padding: 80px 0; position: relative; z-index: 2; }
.code-sample h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1; letter-spacing: -0.02em; font-weight: 700;
  margin: 0 0 32px;
}
.terminal-wrapper {
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--rule);
  max-width: 760px;
  background: var(--code-bg);
}
.terminal-bar {
  display: flex; gap: 6px; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
}
.terminal-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--rule); display: inline-block;
}
.terminal-bar .dot.accent { background: var(--accent-dark); }
.terminal-bar .label {
  margin-left: 12px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink-muted); letter-spacing: 0.05em;
}
.terminal-wrapper pre {
  border: 0; border-radius: 0;
  margin: 0; padding: 20px 24px;
  background: var(--code-bg);
}
.code-sample .closing {
  margin-top: 24px; max-width: 56ch;
  color: var(--ink-muted); font-size: 17px;
}

/* === STORY SECTION (used by "why I built this" on home, etc.) === */

.long-form { padding: 80px 0; position: relative; z-index: 2; }
.long-form-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px;
  align-items: start;
}
.long-form-meta { grid-column: span 12; }
.long-form-body { grid-column: span 12; }
@media (min-width: 1024px) {
  .long-form-meta { grid-column: span 3; padding-top: 12px; }
  .long-form-body { grid-column: span 9; }
}
.long-form-meta {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-muted);
}
.long-form-meta .num { color: var(--accent); }
.long-form-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1; letter-spacing: -0.02em; font-weight: 700;
  margin: 0 0 24px;
}
.long-form-body p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6; margin: 0 0 1.4em;
  max-width: 60ch;
}
.long-form-body p:last-child { margin-bottom: 0; }
.long-form-body code {
  font-family: var(--font-mono); font-size: 0.9em;
  color: var(--ink); background: var(--code-bg);
  padding: 1px 6px; border-radius: 3px;
}

/* === CTA SECTION === */

.cta-section {
  position: relative; z-index: 2;
  padding: 80px 0 120px;
  border-top: 1px solid var(--rule);
}
.cta-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px;
}
.cta-meta { grid-column: span 12; }
.cta-body { grid-column: span 12; }
@media (min-width: 1024px) {
  .cta-meta { grid-column: span 3; padding-top: 12px; }
  .cta-body { grid-column: span 9; }
}
.cta-meta {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-muted);
}
.cta-meta .num { color: var(--accent); }
.cta-body p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.25; margin: 0 0 24px;
  max-width: 36ch;
}
.cta-body .mail {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
  letter-spacing: -0.02em;
}
.cta-body .mail:hover {
  color: var(--accent-bright);
  text-decoration-thickness: 3px;
}

/* === STORY PAGE === */

.story-hero { padding-bottom: 48px; }
.story-hero .meta-tag { margin-bottom: 32px; }
.story-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
  font-weight: 700;
}
.story-hero h1 .accent { color: var(--accent); }
.story-hero .lead { max-width: 44ch; }

.story-section {
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  position: relative; z-index: 2;
}
.story-section:first-of-type { border-top: 0; padding-top: 32px; }
@media (min-width: 1024px) { .story-section { padding: 88px 0; } }

.story-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px;
  align-items: start;
}
.story-meta { grid-column: span 12; }
.story-body { grid-column: span 12; }
@media (min-width: 1024px) {
  .story-meta { grid-column: span 3; }
  .story-body { grid-column: span 9; }
}

.story-meta {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-muted);
}
@media (min-width: 1024px) {
  .story-meta { position: sticky; top: 100px; align-self: start; padding-top: 4px; }
}
.story-meta .num {
  color: var(--accent); display: block;
  font-size: 28px; margin-bottom: 6px;
  font-feature-settings: "tnum"; letter-spacing: 0;
  font-family: var(--font-display); font-weight: 700;
}

.story-body h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.05; letter-spacing: -0.025em; font-weight: 700;
  margin: 0 0 32px;
}
.story-body h2 .accent { color: var(--accent); }

.story-body p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  margin: 0 0 1.4em;
  color: var(--ink);
  max-width: 60ch;
}
.story-body p:last-child { margin-bottom: 0; }
.story-body p strong { color: var(--ink); font-weight: 600; }
.story-body p em { font-style: italic; color: var(--ink); }
.story-body code {
  font-family: var(--font-mono); font-size: 0.85em;
  color: var(--ink); background: var(--code-bg);
  padding: 1px 6px; border-radius: 3px;
}

/* drop-cap on the manifesto section first paragraph */
.story-section.manifesto .story-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.5em;
  line-height: 0.9;
  float: left;
  margin: 8px 12px 0 0;
  color: var(--accent);
}

/* === LEGAL PAGES === */

.legal { padding-bottom: 96px; padding-top: 32px; }
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 0 32px;
  font-weight: 700;
}
.legal h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  margin: 48px 0 16px;
  font-weight: 600;
}
.legal p, .legal li, .legal address {
  font-size: 17px; line-height: 1.65; max-width: 64ch;
  color: var(--ink);
}
.legal address { font-style: normal; margin: 16px 0; color: var(--ink); }
.legal ol, .legal ul { padding-left: 1.5em; list-style: revert; margin: 0 0 1em; color: var(--ink); }
.legal li { margin-bottom: 0.6em; }
.legal code {
  font-family: var(--font-mono); font-size: 0.92em;
  color: var(--ink); background: var(--code-bg);
  padding: 1px 6px; border-radius: 3px;
}

/* === 404 === */

.error { text-align: center; padding: 96px 0 120px; }
.error h1 {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 0.9;
  margin: 0 0 24px;
  color: var(--accent);
  letter-spacing: -0.05em;
  font-weight: 700;
}
.error p { color: var(--ink-muted); font-size: 1.2rem; }
.error a {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--accent-dark);
}
