/* The blog: index and articles. Same paper as the landing — the app's LIGHT
   rung (DesignSystem.swift Palette, DS3 § 21.1): a card is the lightest layer
   on its ground, no strokes, the hairline is the only line. UI in Onest; the
   article body in Literata, a face drawn for long reading on screens.

   The reading column is 680 px (~68 characters of Literata at 20 px). Pictures
   break out of it on purpose, in three widths: the column, 920 (a pair of
   phones), 1200 (a wide photo). */

:root {
  --bg: #FBEFDD;
  --panel: #FDF5E9;
  --card: #FFFDF9;
  --surface-hi: #F0E4D0;
  --ink: #1A1A1A;
  --muted: #62594F;
  --faint: #8A8177;
  --brand: #8F5B14;
  --hairline: rgba(26, 26, 26, .08);
  --press-gold-face: #D9AC62;
  --press-gold-lip: #B98A3E;
  --press-gold-edge: #8F5B14;
  --press-edge-w: 1.5px;
  --ease-down: cubic-bezier(.4, 0, .2, 1);      --dur-down: 100ms;
  --ease-release: cubic-bezier(.3, .7, .4, 1.4); --dur-release: 180ms;
  --gutter: clamp(20px, 5vw, 48px);
  --serif: Literata, Georgia, "Times New Roman", serif;
}
@media (prefers-contrast: more) { :root { --press-edge-w: 2px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Onest, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

/* ── Header / footer (the landing's) ─────────────────────────────────────── */
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; padding-block: 22px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark img { width: 32px; height: 32px; border-radius: 8px; }
.wordmark span { font-size: 26px; font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.top nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); font-size: 15px; font-weight: 500; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a.strong, .top nav a[aria-current] { color: var(--ink); font-weight: 600; }
.legal { border-top: 1px solid var(--hairline); margin-top: clamp(72px, 9vw, 112px); }
.legal .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; padding-block: 28px 40px; font-size: 14px; color: var(--muted); }
.legal nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
.legal nav a { color: var(--muted); text-decoration: none; }
@media (max-width: 30rem) { .legal nav { margin-left: 0; } }

/* ── Press (DS3 § 7), light rung ─────────────────────────────────────────── */
.press {
  --h: 3.25rem; --lip: 4px; --lip-p: 2px; --r: 16px; --px: 1.375rem; --fs: 1.03125rem;
  position: relative; isolation: isolate; display: inline-flex; vertical-align: top;
  padding: 0 0 var(--lip); border-radius: var(--r);
  font: 600 var(--fs)/1.15 Onest, ui-sans-serif, -apple-system, sans-serif;
  color: var(--ink); text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
}
.press::before {
  content: ""; position: absolute; z-index: -1; inset: var(--lip) 0 0 0;
  background: var(--press-gold-lip); border: var(--press-edge-w) solid var(--press-gold-edge); border-radius: var(--r);
}
.press__face {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: var(--h); padding: 0 var(--px);
  background: var(--press-gold-face); border: var(--press-edge-w) solid var(--press-gold-edge); border-radius: var(--r);
  transition: transform var(--dur-release) var(--ease-release), filter var(--dur-release) ease;
}
.press:active .press__face { transform: translateY(calc(var(--lip) - var(--lip-p))); transition-duration: var(--dur-down); transition-timing-function: var(--ease-down); }
@media (hover: hover) and (pointer: fine) { .press:hover .press__face { filter: brightness(1.04); } }
.press:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: var(--r); }
@media (prefers-reduced-motion: reduce) { .press__face { transition: transform var(--dur-down) var(--ease-down), filter var(--dur-down) ease; } }

/* ── Index ───────────────────────────────────────────────────────────────── */
.blog-hero { padding-top: clamp(32px, 5vw, 64px); }
.eyebrow { margin: 0 0 16px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.blog-hero h1 { margin: 0 0 18px; font-size: clamp(44px, 6vw, 84px); font-weight: 600; letter-spacing: -.045em; line-height: 1; }
.blog-hero p { margin: 0; max-width: 34rem; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--muted); }
.featured { display: flex; flex-wrap: wrap; align-items: center; gap: 28px clamp(32px, 5vw, 64px); margin-top: clamp(40px, 5vw, 64px); text-decoration: none; color: var(--ink); }
/* Direct children only: the card also carries the author's avatar, and a
   descendant selector stretched it into a 3:2 slab. */
.featured > img { flex: 1 1 520px; min-width: 0; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 24px; }
.featured > span { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.meta { font-size: 14px; font-weight: 500; color: var(--faint); }
.meta b { font-weight: 500; color: var(--brand); }
.featured .title { font-size: clamp(30px, 3.2vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
.featured .dek { font-size: 18px; line-height: 1.55; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.3; color: var(--muted); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-hi); }
.byline b { display: block; color: var(--ink); font-weight: 600; }

.band { margin-top: clamp(72px, 9vw, 112px); background: var(--panel); border-radius: 32px; padding: clamp(28px, 4vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.band > div { flex: 1 1 360px; display: flex; align-items: center; gap: 22px; }
.band > div > img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.band p { margin: 0; }
.band .t { margin-bottom: 4px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.band .s { font-size: 16px; color: var(--muted); }

/* ── Article ─────────────────────────────────────────────────────────────── */
.post-head { max-width: 760px; margin: 0 auto; padding: clamp(24px, 4vw, 56px) var(--gutter) 0; }
.crumbs { margin-bottom: 22px; font-size: 14px; font-weight: 500; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a + span + a { color: var(--brand); }
.crumbs span { margin: 0 8px; }
.post-head h1 { margin: 0 0 20px; font-size: clamp(34px, 4.6vw, 60px); font-weight: 600; letter-spacing: -.035em; line-height: 1.06; }
.post-head .dek { margin: 0 0 28px; font-family: var(--serif); font-size: clamp(19px, 1.6vw, 23px); line-height: 1.5; color: var(--muted); text-wrap: pretty; }

figure { margin: 0; }
figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--faint); }
figcaption a { color: var(--muted); }
.fig-hero { max-width: 1200px; margin: clamp(32px, 4vw, 48px) auto 0; padding: 0 var(--gutter); }
.fig-hero img { width: 100%; aspect-ratio: 16 / 9; min-height: 220px; object-fit: cover; border-radius: 24px; }
.fig-hero figcaption, .fig-wide figcaption, .fig-pair figcaption { max-width: 680px; margin-inline: auto; }

.prose { font-family: var(--serif); font-size: clamp(18px, 1.4vw + 10px, 20px); line-height: 1.7; }
.col { max-width: calc(680px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.col:first-child { padding-top: clamp(40px, 5vw, 64px); }
.prose p { margin: 0 0 1.15em; }
.prose h2 { margin: 64px 0 16px; font-family: Onest, ui-sans-serif, sans-serif; font-size: clamp(26px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.025em; line-height: 1.2; scroll-margin-top: 24px; }
.prose a { text-underline-offset: 3px; }
.prose figcaption { font-family: Onest, ui-sans-serif, sans-serif; }

.toc { margin: 36px 0 8px; padding: 24px 28px; border-radius: 20px; background: var(--panel); font-family: Onest, ui-sans-serif, sans-serif; }
.toc p { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.toc ol { margin: 0; padding-left: 22px; columns: 2 240px; column-gap: 32px; font-size: 16px; font-weight: 500; line-height: 1.5; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { text-decoration: none; }

/* Phones: honest bezels around real captures, never cropped by a box. */
.phone { margin: 0; padding: 7px; border-radius: 36px; background: #1A1A1A; }
.phone img { width: 100%; border-radius: 30px; }
.fig-pair { max-width: calc(920px + 2 * var(--gutter)); margin: 40px auto; padding: 0 var(--gutter); }
.fig-pair .stage { display: flex; justify-content: center; gap: clamp(14px, 4vw, 48px); padding: clamp(24px, 4vw, 48px) clamp(14px, 4vw, 48px); border-radius: 24px; background: var(--panel); }
.fig-pair .phone { flex: 0 1 260px; min-width: 0; }
.fig-single { margin: 40px 0; }
.fig-single .stage { display: flex; justify-content: center; padding: clamp(24px, 4vw, 40px) 16px; border-radius: 24px; background: var(--panel); }
.fig-single .phone { width: min(100%, 250px); }
.beside { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 40px; }
.beside > div { flex: 1 1 300px; min-width: 0; }
.beside figure { flex: 0 1 220px; margin: 6px auto 1.4em; }
.fig-wide { max-width: 1200px; margin: 48px auto; padding: 0 var(--gutter); }
.fig-wide img { width: 100%; aspect-ratio: 21 / 9; min-height: 200px; object-fit: cover; border-radius: 24px; }
.fig-col { margin: 40px 0; }
.fig-col img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; }

.pull { margin: 40px 0 48px; padding: 0; text-align: center; }
.pull p { margin: 0; font-style: italic; font-size: clamp(25px, 2.6vw, 32px); line-height: 1.32; letter-spacing: -.01em; text-wrap: balance; }
.pull span { color: var(--brand); }

.try { margin: 32px 0 36px; padding: 22px 24px; border-radius: 20px; background: var(--card); display: flex; gap: 18px; align-items: flex-start; font-family: Onest, ui-sans-serif, sans-serif; }
.try > img { flex: none; width: 44px; height: 44px; border-radius: 10px; }
.try .t { margin: 0 0 6px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.try .s { margin: 0 0 12px; font-size: 16px; line-height: 1.55; color: var(--muted); }
.try a { font-size: 15px; font-weight: 600; text-decoration: none; }

.check { margin: 40px 0 0; padding: 28px; border-radius: 20px; background: var(--panel); }
.check > p { margin: 0 0 14px; font-family: Onest, ui-sans-serif, sans-serif; font-size: 18px; font-weight: 600; }
.check ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check li { display: flex; gap: 14px; align-items: baseline; }
.check li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 4px; background: var(--press-gold-face); transform: translateY(-3px); }

.author { margin: 56px 0 0; padding-top: 28px; border-top: 1px solid var(--hairline); display: flex; gap: 16px; align-items: flex-start; font-family: Onest, ui-sans-serif, sans-serif; }
.author .avatar { width: 52px; height: 52px; }
.author p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.author b { display: block; margin-bottom: 4px; font-size: 17px; color: var(--ink); }
