/* davidmtb.com — main.css
   Mountain-bike profile site for David English (@d.emtb)
   Mobile-first. 375 → 600 → 900 → 1200.
   Palette: deep forest + dirt clay on near-black, cream paper for cards.
   Display: Anton (condensed, heavy). Body: Fraunces (editorial serif). Meta: IBM Plex Mono.
*/

:root {
  --ink:        #0c0e0b;       /* near-black, slight green undertone */
  --ink-2:      #16190f;       /* card on dark */
  --paper:      #f4efe5;       /* cream */
  --paper-2:    #ebe4d4;       /* warm cream */
  --forest:     #1f3d2b;       /* deep forest green accent */
  --forest-2:   #2f6045;       /* hover */
  --clay:       #b76b3f;       /* dirt clay */
  --clay-2:     #d68856;       /* hover */
  --bone:       #d8d2c2;       /* soft off-white text on dark */
  --mute:       #8b8678;       /* muted captions */
  --line:       #2a2d24;       /* hairline on dark */
  --line-paper: #cfc8b7;       /* hairline on paper */

  --max:        1280px;
  --gutter:     clamp(20px, 5vw, 64px);

  --display:    'Anton', 'Bebas Neue', Impact, 'Arial Narrow Bold', sans-serif;
  --body:       'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --mono:       'IBM Plex Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;

  --ease:       cubic-bezier(.22,.61,.36,1);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--bone);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--clay); color: var(--ink); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- TYPE ---------- */
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: .9;
  text-transform: uppercase;
}
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---------- LAYOUT ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- HEADER / NAV ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 14, 11, .82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 28px);
  letter-spacing: .04em;
  color: var(--paper);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
}
.brand .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--clay);
  display: inline-block;
  align-self: center;
  box-shadow: 0 0 0 3px rgba(183,107,63,.18);
}
.brand .handle {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--mute);
  text-transform: lowercase;
}

/* Desktop nav */
.nav-desk { display: none; gap: 24px; align-items: center; }
.nav-desk a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bone);
  padding: 14px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav-desk a:hover,
.nav-desk a:focus-visible { border-bottom-color: var(--clay); color: var(--paper); }
@media (min-width: 900px) { .nav-desk { display: inline-flex; } }

/* Mobile hamburger */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--bone);
}
.nav-toggle:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.nav-toggle svg { width: 20px; height: 20px; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* Mobile drawer */
.nav-mob {
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 32px var(--gutter);
  transform: translateY(-110%);
  transition: transform .35s var(--ease);
  z-index: 49;
  overflow-y: auto;
}
.nav-mob.open { transform: translateY(0); }
.nav-mob a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 16px 0;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav-mob a:active { color: var(--clay); }
@media (min-width: 900px) { .nav-mob { display: none; } }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08);
  animation: kenburns 22s var(--ease) infinite alternate;
  opacity: .72;
}
@keyframes kenburns {
  0%   { transform: scale(1.08) translate3d(0, 0, 0); }
  100% { transform: scale(1.18) translate3d(-2%, -2%, 0); }
}
.hero-bg::after {
  /* Dark gradient + grain overlay */
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(12,14,11,.25) 0%, rgba(12,14,11,.55) 55%, rgba(12,14,11,.98) 100%),
    radial-gradient(ellipse at top right, rgba(31,61,43,.35), transparent 60%);
}
.hero-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: overlay;
  z-index: 1;
}
.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  padding: 24px var(--gutter) 56px;
  max-width: var(--max);
  margin: 0 auto;
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clay-2);
  margin: 0 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero-kicker::before {
  content: '';
  width: 22px; height: 1px; background: var(--clay-2);
  display: inline-block;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  /* Massive on desktop, still readable on iPhone SE (375px) */
  font-size: clamp(56px, 16vw, 184px);
  line-height: .85;
  letter-spacing: .005em;
  margin: 0 0 18px;
  color: var(--paper);
  text-transform: uppercase;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--clay-2); }
.hero-tag {
  font-family: var(--body);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(17px, 2.4vw, 24px);
  line-height: 1.35;
  max-width: 32ch;
  margin: 0 0 28px;
  color: var(--bone);
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 32px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span + span::before {
  content: '';
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--mute);
  display: inline-block;
  margin-right: 10px;
  margin-left: -8px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.btn-primary {
  background: var(--clay);
  color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover { background: var(--clay-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(216, 210, 194, .35);
}
.btn-ghost:hover { border-color: var(--paper); background: rgba(255,255,255,.04); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--mute);
  z-index: 2;
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  animation: cue 2.4s var(--ease) infinite;
}
.scroll-cue::after {
  content: ''; width: 1px; height: 22px;
  background: linear-gradient(180deg, var(--mute), transparent);
}
@keyframes cue {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: .85; }
  50%      { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ---------- SECTION SHELL ---------- */
.section {
  padding: 88px 0;
  background: var(--ink);
  position: relative;
}
.section.paper { background: var(--paper); color: var(--ink); }
.section.paper .mono { color: #6a665a; }
.section.paper .sec-num { color: var(--clay); }
.section.paper .sec-title { color: var(--ink); }
.section.paper hr.rule { background: var(--line-paper); }
.section.paper a.text-link { color: var(--forest); }

.sec-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 40px;
}
@media (min-width: 700px) {
  .sec-head {
    grid-template-columns: 100px 1fr;
    align-items: baseline;
    gap: 24px;
  }
}
.sec-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--clay-2);
}
.sec-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 80px);
  line-height: .92;
  letter-spacing: .01em;
  margin: 0;
  color: var(--paper);
  text-transform: uppercase;
  text-wrap: balance;
}
.sec-sub {
  margin: 14px 0 0;
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.5;
  color: var(--mute);
  max-width: 56ch;
  grid-column: 1 / -1;
}
@media (min-width: 700px) {
  .sec-sub { grid-column: 2; }
}
hr.rule { border: 0; height: 1px; background: var(--line); margin: 0 0 40px; }

/* ---------- ABOUT ---------- */
.about-body {
  max-width: 640px;
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
}
.about-body p {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
  margin: 0 0 22px;
  color: var(--ink);
}
.about-body p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 4.6em;
  float: left;
  line-height: .85;
  padding: 8px 12px 0 0;
  color: var(--clay);
}
.about-meta {
  margin: 32px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line-paper);
}
.about-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6a665a;
  margin-bottom: 2px;
}
.about-meta dd {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .02em;
  margin: 0;
  color: var(--ink);
  text-transform: uppercase;
}

/* ---------- RIDES (TikTok gallery) ---------- */
.rides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 600px) { .rides-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
@media (min-width: 900px) { .rides-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.ride-card {
  display: block;
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  text-align: left;
  width: 100%;
  padding: 0;
  color: inherit;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.ride-card:hover,
.ride-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--clay);
  outline: none;
}
.ride-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
}
.ride-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.ride-card:hover .ride-thumb img { transform: scale(1.04); }
.ride-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.78) 100%);
}
.ride-play {
  position: absolute;
  left: 50%; top: 50%;
  width: 64px; height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(12,14,11,.65);
  border: 1px solid rgba(255,255,255,.65);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background .2s var(--ease), transform .25s var(--ease);
}
.ride-card:hover .ride-play { background: var(--clay); transform: translate(-50%, -50%) scale(1.06); }
.ride-play svg { width: 22px; height: 22px; color: #fff; margin-left: 3px; }
.ride-duration {
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  color: #fff;
  background: rgba(12,14,11,.7);
  padding: 4px 8px;
  border-radius: 2px;
  letter-spacing: .04em;
}
.ride-body { padding: 16px 16px 18px; }
.ride-caption {
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--bone);
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ride-meta {
  display: flex; gap: 14px; align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}
.ride-meta .dotsep::before {
  content: '·'; margin: 0 8px; color: var(--mute);
}
.rides-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--mute);
  font-family: var(--body);
  font-style: italic;
  border: 1px dashed var(--line);
  border-radius: 4px;
}
.rides-footer {
  margin-top: 32px;
  text-align: center;
}
.rides-footer a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay-2);
  border-bottom: 1px solid var(--clay-2);
  padding-bottom: 4px;
  min-height: 44px;
  display: inline-flex; align-items: center;
}
.rides-footer a:hover { color: var(--paper); border-bottom-color: var(--paper); }

/* Lightbox */
dialog.tiktok-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  color: var(--bone);
}
dialog.tiktok-modal::backdrop {
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
}
.tiktok-modal-inner {
  position: relative;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  width: min(420px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
}
.tiktok-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--bone);
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 2;
}
.tiktok-close:hover { color: var(--clay); border-color: var(--clay); }
.tiktok-modal blockquote.tiktok-embed { margin: 0 auto !important; }

/* ---------- SHOP ---------- */
.shop-hero {
  margin-bottom: 40px;
  max-width: 720px;
}
.shop-hero h3 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1;
  letter-spacing: .02em;
  margin: 0 0 14px;
  color: var(--paper);
  text-transform: uppercase;
}
.shop-hero p {
  font-family: var(--body);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
  color: var(--bone);
}
.shop-hero .climate-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--forest-2);
  background: rgba(47,96,69,.14);
  border: 1px solid var(--forest);
  border-radius: 2px;
}
.shop-hero .climate-tag::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--forest-2);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 600px) { .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 900px) { .shop-grid { grid-template-columns: repeat(4, 1fr); gap: 28px; } }

.product {
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.product:hover { transform: translateY(-3px); border-color: var(--clay); }
.product-img {
  aspect-ratio: 4 / 5;
  background: #1a1d15;
  overflow: hidden;
}
.product-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.product:hover .product-img img { transform: scale(1.04); }
.product-body {
  padding: 14px 14px 18px;
  display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.product-name {
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
  color: var(--paper);
  line-height: 1.05;
}
.product-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
}
.product-price {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .02em;
  color: var(--clay-2);
  margin: 4px 0 0;
}
.product-buy {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--clay);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
  transition: background .2s var(--ease);
}
.product-buy:hover { background: var(--clay-2); }
.shop-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--mute);
  font-family: var(--body);
  font-style: italic;
  border: 1px dashed var(--line);
  border-radius: 4px;
}

/* ---------- CONTACT ---------- */
.contact {
  background: var(--paper);
  color: var(--ink);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; }
}
.contact-lead h3 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: .02em;
  margin: 0 0 16px;
  color: var(--ink);
  text-transform: uppercase;
}
.contact-lead p {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  color: #3a3a30;
  margin: 0;
  max-width: 42ch;
}

form.contact-form {
  display: flex; flex-direction: column; gap: 14px;
}
.contact-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6a665a;
}
.contact-form input,
.contact-form textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font-family: var(--body);
  font-size: 17px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-paper);
  border-radius: 2px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--body);
  line-height: 1.5;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(31,61,43,.12);
}
.contact-form .hp {
  /* honeypot */
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.contact-form button {
  min-height: 52px;
  padding: 14px 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  align-self: flex-start;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.contact-form button:hover { background: var(--clay); color: var(--ink); border-color: var(--clay); }
.contact-form button:disabled { opacity: .55; cursor: wait; }
.form-msg {
  font-family: var(--body);
  font-size: 15px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 2px;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.ok { background: rgba(31,61,43,.1); color: var(--forest); border: 1px solid rgba(31,61,43,.35); }
.form-msg.err { background: rgba(176,49,75,.08); color: #8a213a; border: 1px solid rgba(176,49,75,.35); }

/* ---------- FOOTER ---------- */
.site-foot {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 48px 0 56px;
}
.site-foot .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: end;
}
@media (min-width: 700px) {
  .site-foot .wrap { grid-template-columns: 1fr auto; gap: 32px; }
}
.foot-brand {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: .04em;
  color: var(--paper);
  text-transform: uppercase;
}
.foot-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 8px 0 0;
}
.foot-line a { color: var(--bone); border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.foot-line a:hover { border-bottom-color: var(--clay); }
.foot-social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.foot-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--bone);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.foot-social a:hover { border-color: var(--clay); color: var(--clay); }
.foot-social svg { width: 18px; height: 18px; }

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Stagger children */
.reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 60ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 120ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 180ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 300ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 360ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 420ms; }

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

/* =========================================================
   ARTICLE / INFO / BLOG PAGES
   ========================================================= */
.page-head {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 36px;
}
.page-head .wrap {
  max-width: 880px;
}
.page-head .crumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 18px;
}
.page-head .crumbs a {
  color: var(--bone);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: border-color .2s var(--ease);
}
.page-head .crumbs a:hover { border-color: var(--clay); }
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(38px, 7vw, 72px);
  line-height: .95;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 14px;
}
.page-head .lede {
  font-family: var(--body);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: var(--bone);
  margin: 0;
  max-width: 60ch;
}
.page-head .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 18px 0 0;
}
.page-head .meta a { color: var(--bone); }

.article {
  background: var(--paper);
  color: var(--ink);
  padding: 56px 0 88px;
}
.article .wrap { max-width: 760px; }
.article-hero {
  background: var(--ink);
  padding: 0;
  border-bottom: 1px solid var(--line);
}
.article-hero img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}
.prose {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.65;
  color: #2a2a22;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.05;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 2.2em;
  margin-bottom: .4em;
  padding-top: .4em;
  border-top: 1px solid var(--line-paper);
}
.prose h3 {
  font-family: var(--body);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 1.8em;
  margin-bottom: .3em;
}
.prose h4 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--forest);
  margin-top: 1.6em;
  margin-bottom: .2em;
}
.prose p { margin: 0; }
.prose a {
  color: var(--forest);
  border-bottom: 1px solid var(--forest);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.prose a:hover { color: var(--clay); border-bottom-color: var(--clay); }
.prose ul, .prose ol {
  margin: 0;
  padding-left: 1.4em;
}
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--clay); }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--clay);
  background: var(--paper-2);
  font-style: italic;
  font-size: 17px;
  color: #2a2a22;
}
.prose code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--paper-2);
  padding: 1px 6px;
  border-radius: 2px;
}
.prose hr {
  border: 0;
  border-top: 1px solid var(--line-paper);
  margin: 2.4em 0;
}
.prose figure {
  margin: 1.6em 0;
}
.prose figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 8px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin: 1.4em 0;
}
.prose th, .prose td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-paper);
  vertical-align: top;
}
.prose th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-2);
}
.prose .todo {
  display: inline-block;
  background: #fff6da;
  color: #7a5a00;
  border: 1px dashed #b89540;
  padding: 2px 8px;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  margin: 2px 0;
}

.related {
  background: var(--ink);
  color: var(--bone);
  padding: 48px 0 56px;
  border-top: 1px solid var(--line);
}
.related .wrap { max-width: 880px; }
.related h2 {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 18px;
}
.related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 700px) {
  .related ul { grid-template-columns: 1fr 1fr; gap: 8px 28px; }
}
.related li {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.related li a {
  font-family: var(--body);
  font-size: 17px;
  color: var(--bone);
  display: flex;
  align-items: baseline;
  gap: 10px;
  transition: color .2s var(--ease);
}
.related li a:hover { color: var(--clay); }
.related li a::after {
  content: "→";
  color: var(--clay);
  margin-left: auto;
}

/* INDEX (info hub, blog hub) */
.hub {
  background: var(--paper);
  color: var(--ink);
  padding: 56px 0 88px;
}
.hub .wrap { max-width: 1080px; }
.hub-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 28px;
}
@media (min-width: 700px) { .hub-grid { grid-template-columns: 1fr 1fr; gap: 22px; } }
@media (min-width: 1000px) { .hub-grid { grid-template-columns: 1fr 1fr 1fr; } }
.hub-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line-paper);
  border-radius: 3px;
  padding: 22px 22px 24px;
  transition: transform .25s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease);
}
.hub-card:hover {
  transform: translateY(-3px);
  border-color: var(--forest);
  box-shadow: 0 10px 30px -18px rgba(31,61,43,.4);
}
.hub-card .kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay);
}
.hub-card h3 {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 8px 0 10px;
  line-height: 1.05;
}
.hub-card p {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  color: #3a3a30;
  margin: 0;
}

/* BLOG CARDS (with image) */
.post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-paper);
  border-radius: 3px;
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease);
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--forest);
  box-shadow: 0 10px 30px -18px rgba(31,61,43,.4);
}
.post-card .ph {
  aspect-ratio: 16 / 10;
  background: var(--ink-2);
  overflow: hidden;
}
.post-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 18px 20px 22px; }
.post-card .body .kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--clay);
}
.post-card .body h3 {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 8px 0 10px;
  line-height: 1.05;
}
.post-card .body p {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  color: #3a3a30;
  margin: 0;
}

/* TOC-ish lettered jump bar for glossary */
.az-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 24px;
}
.az-bar a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line-paper);
  border-radius: 2px;
  padding: 6px 10px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.az-bar a:hover { background: var(--clay); color: var(--ink); }
.glossary dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 24px;
  margin: 0;
}
@media (min-width: 700px) {
  .glossary dl { grid-template-columns: 200px 1fr; }
}
.glossary dt {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--forest);
  padding-top: 12px;
  border-top: 1px solid var(--line-paper);
}
.glossary dd {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line-paper);
  color: #2a2a22;
}
@media (max-width: 699px) {
  .glossary dd { border-top: 0; padding-top: 0; padding-bottom: 12px; }
}
.glossary h3.letter {
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: .04em;
  color: var(--clay);
  margin: 36px 0 4px;
  padding: 0;
  border: 0;
}
