/* =============================================================================
   PIN VERSE BLOG — main.css  (v3.0)
   Elevated design system. Applies ui-ux-pro-max guidance:
   - Semantic color tokens + paired dark mode (color-semantic, dark-mode-pairing)
   - Modular type scale, 4/8px spacing rhythm (font-scale, spacing-scale)
   - Accessibility: focus rings, reduced-motion, AA contrast (§1)
   - Performance: aspect-ratio for CLS, GPU-only animation (§3, §7)
   ============================================================================= */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* ---- Brand palette (raw values — do not use directly in components) ---- */
  --c-cream:       #F6EFDC;
  --c-cream-deep:  #EFE4C7;
  --c-paper:       #FBF7EC;
  --c-brown:       #5F2E1C;
  --c-brown-deep:  #43200F;
  --c-terracotta:  #C2703D;
  --c-terra-soft:  #D98E5A;
  --c-brick:       #9E3B2E;
  --c-ink:         #2B2620;
  --c-ink-soft:    #5C5648;
  --c-gold:        #E6A427;
  --c-white:       #FFFFFF;

  /* ---- Semantic tokens (USE THESE in components) ---- */
  --bg:            var(--c-cream);
  --surface:       var(--c-paper);
  --surface-2:     var(--c-cream-deep);
  --surface-inv:   var(--c-brown-deep);   /* dark strips on light theme */
  --on-surface-inv:#F6EFDC;
  --text:          var(--c-ink);
  --text-soft:     var(--c-ink-soft);
  --text-on-dark:  #F6EFDC;
  --primary:       var(--c-terracotta);
  --primary-hover: var(--c-brick);
  --accent:        var(--c-brown);
  --accent-deep:   var(--c-brown-deep);
  --gold:          var(--c-gold);
  --footer-bg:     var(--c-ink);
  --footer-text:   #D8D2C4;

  /* ---- Lines, focus, shadow ---- */
  --line:    rgba(43, 38, 32, .14);
  --focus:   #1F6FEB;                       /* high-contrast focus ring */
  --shadow-1: 0 4px 14px -8px rgba(43,38,32,.4);
  --shadow-2: 0 18px 40px -22px rgba(43,38,32,.45);
  --shadow-3: 0 26px 50px -22px rgba(43,38,32,.5);

  /* ---- Radius scale ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* ---- Spacing rhythm (4 / 8 base) ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* ---- Modular type scale (1.25 ratio, 16px base) ---- */
  --fs-xs:   .75rem;   /* 12 */
  --fs-sm:   .875rem;  /* 14 */
  --fs-base: 1rem;     /* 16 */
  --fs-md:   1.125rem; /* 18 */
  --fs-lg:   1.4rem;   /* ~22 */
  --fs-xl:   1.9rem;   /* ~30 */
  --fs-2xl:  2.6rem;   /* ~42 */
  --fs-3xl:  clamp(2.6rem, 5.5vw, 4.4rem);

  /* ---- Fonts ---- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Karla', system-ui, -apple-system, sans-serif;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .18s;
  --dur-mid:  .28s;

  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Dark Mode — paired variant (not inverted). Toggled via [data-theme="dark"].
   Designed for AA contrast independently of light mode.
   -------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  --bg:            #1A1410;
  --surface:       #241C16;
  --surface-2:     #2E241C;
  --surface-inv:   #2E241C;
  --on-surface-inv:#F3E9D6;
  --text:          #F3E9D6;
  --text-soft:     #C3B6A4;
  --text-on-dark:  #F3E9D6;
  --primary:       #E08A52;   /* lifted terracotta for dark bg contrast */
  --primary-hover: #EBA374;
  --accent:        #D98E5A;
  --accent-deep:   #C2703D;
  --gold:          #F0B948;
  --footer-bg:     #120D0A;
  --footer-text:   #C3B6A4;
  --line:    rgba(243, 233, 214, .14);
  --shadow-1: 0 4px 14px -8px rgba(0,0,0,.6);
  --shadow-2: 0 18px 40px -22px rgba(0,0,0,.7);
  --shadow-3: 0 26px 50px -22px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* Honour OS preference when no explicit choice is stored */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:#1A1410; --surface:#241C16; --surface-2:#2E241C; --surface-inv:#2E241C;
    --on-surface-inv:#F3E9D6; --text:#F3E9D6; --text-soft:#C3B6A4; --text-on-dark:#F3E9D6;
    --primary:#E08A52; --primary-hover:#EBA374; --accent:#D98E5A; --accent-deep:#C2703D;
    --gold:#F0B948; --footer-bg:#120D0A; --footer-text:#C3B6A4;
    --line:rgba(243,233,214,.14);
    --shadow-1:0 4px 14px -8px rgba(0,0,0,.6);
    --shadow-2:0 18px 40px -22px rgba(0,0,0,.7);
    --shadow-3:0 26px 50px -22px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}

/* --------------------------------------------------------------------------
   3. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background var(--dur-mid) var(--ease-out), color var(--dur-mid) var(--ease-out);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---- Accessibility: visible focus ring on keyboard nav (§1 focus-states) ---- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Skip link (§1 skip-links) ---- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-sm) 0;
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   4. Layout utilities
   -------------------------------------------------------------------------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-5); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: var(--fs-xs);
  color: var(--primary);
}

section { padding: var(--sp-9) 0; }

.sec-head { text-align: center; margin-bottom: var(--sp-7); }
.sec-head h2 { font-size: var(--fs-xl); color: var(--accent-deep); }
:root[data-theme="dark"] .sec-head h2 { color: var(--text); }
.sec-head h2 em { font-style: italic; color: var(--primary); }
.sec-head p { color: var(--text-soft); margin-top: var(--sp-3); max-width: 52ch; margin-inline: auto; }

/* --------------------------------------------------------------------------
   5. Announcement bar
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--surface-inv);
  color: var(--on-surface-inv);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--sp-2) var(--sp-4);
  letter-spacing: .03em;
}
.topbar a { text-decoration: underline; font-weight: 700; }
.topbar a:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   6. Header & navigation
   -------------------------------------------------------------------------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: var(--sp-4); }

.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }
.logo-badge {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--c-brick);
  display: grid; place-items: center;
  border: 3px solid var(--c-ink);
  box-shadow: 0 4px 0 rgba(43,38,32,.18);
  flex-shrink: 0;
}
:root[data-theme="dark"] .logo-badge { border-color: #000; }
.logo-badge svg { width: 26px; height: 26px; }

.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; letter-spacing: .02em; line-height: 1; }
.brand-name span {
  display: block; font-family: var(--font-body); font-weight: 700;
  font-size: .58rem; letter-spacing: .42em; color: var(--primary); margin-top: 3px;
}

nav.menu { display: flex; }
nav.menu ul { display: flex; gap: var(--sp-6); align-items: center; list-style: none; }
nav.menu a {
  font-weight: 600; font-size: var(--fs-sm); position: relative;
  padding: var(--sp-2) 0; display: inline-block;
}
nav.menu a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--primary); transition: width var(--dur-mid) var(--ease-out);
}
nav.menu a:hover::after,
nav.menu .current-menu-item a::after { width: 100%; }
nav.menu .current-menu-item a { color: var(--primary); }

.nav-tools { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }

.nav-cta {
  background: var(--accent); color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 700; letter-spacing: .03em;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast);
  white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-cta:hover { background: var(--accent-deep); transform: translateY(-2px); }
:root[data-theme="dark"] .nav-cta { color: #1A1410; }

/* Theme toggle button (44px touch target) */
.theme-toggle {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.theme-toggle:hover { background: var(--surface-2); transform: translateY(-2px); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* Burger (mobile) */
.burger {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: none; border: 0; cursor: pointer;
}
.burger span { width: 24px; height: 2px; background: var(--text); display: block; border-radius: 2px; transition: transform var(--dur-fast); }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-sm);
  padding: var(--sp-3) var(--sp-5); min-height: 48px;
  border-radius: var(--r-pill); cursor: pointer; border: 2px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), color var(--dur-fast);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-3px); }
:root[data-theme="dark"] .btn-primary { color: #1A1410; }
.btn-ghost { background: transparent; border-color: var(--accent); color: var(--accent-deep); }
:root[data-theme="dark"] .btn-ghost { color: var(--text); border-color: var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch; min-height: 560px; }
.hero-copy { padding: var(--sp-9) var(--sp-7) var(--sp-9) 0; display: flex; flex-direction: column; justify-content: center; }
.hero-copy .eyebrow { margin-bottom: var(--sp-4); }
.hero h1 { font-size: var(--fs-3xl); font-weight: 900; color: var(--accent-deep); }
:root[data-theme="dark"] .hero h1 { color: var(--text); }
.hero h1 em { font-style: italic; color: var(--primary); font-weight: 400; }
.hero p.lead { margin: var(--sp-5) 0 var(--sp-6); font-size: var(--fs-md); color: var(--text-soft); max-width: 32ch; }
.hero-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.hero-media { position: relative; border-radius: var(--r-lg) 0 0 var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); aspect-ratio: 2 / 3; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-tag {
  position: absolute; left: var(--sp-5); bottom: var(--sp-5);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--text);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  font-weight: 700; font-size: var(--fs-sm);
  display: flex; align-items: center; gap: var(--sp-2); box-shadow: var(--shadow-2);
}
.hero-tag b { color: var(--primary); }

/* Value strip */
.hero-strip { background: var(--surface-inv); color: var(--on-surface-inv); }
.hero-strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); font-weight: 600; }
.hero-strip span { display: flex; align-items: center; gap: var(--sp-2); }
.hero-strip svg { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------------------
   9. Browse-by-method
   -------------------------------------------------------------------------- */
.methods { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-4); }
.method { display: flex; flex-direction: column; align-items: center; gap: var(--sp-3); width: 108px; transition: transform var(--dur-fast) var(--ease-out); padding: var(--sp-2); border-radius: var(--r-md); }
.method:hover { transform: translateY(-5px); }
.method .ic { width: 74px; height: 74px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; box-shadow: var(--shadow-1); }
.method .ic svg { width: 34px; height: 34px; color: var(--accent); }
:root[data-theme="dark"] .method .ic svg { color: var(--primary); }
.method:nth-child(2n) .ic { background: var(--surface-2); }
.method b { font-size: var(--fs-sm); font-weight: 700; text-align: center; }

/* --------------------------------------------------------------------------
   10. Recipe cards
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-5); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-2);
  transition: transform var(--dur-mid) var(--ease-out), box-shadow var(--dur-mid);
  display: flex; flex-direction: column; border: 1px solid var(--line);
}
.card:hover { transform: translateY(-7px); box-shadow: var(--shadow-3); }
.card .thumb { position: relative; aspect-ratio: 2 / 3; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card:hover .thumb img { transform: scale(1.07); }

.chip {
  position: absolute; top: var(--sp-3); left: var(--sp-3);
  background: color-mix(in srgb, var(--accent) 92%, transparent);
  color: #fff; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 5px 11px; border-radius: var(--r-pill);
}
.card .body { padding: var(--sp-4) var(--sp-4) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.card h3 { font-size: var(--fs-md); color: var(--text); }
.card .meta { display: flex; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--text-soft); font-weight: 600; margin-top: auto; }
.card .meta span { display: flex; align-items: center; gap: var(--sp-1); }
.card .meta svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   11. Featured split
   -------------------------------------------------------------------------- */
.feature-band { background: var(--surface-2); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.feature-card { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 11; display: flex; align-items: flex-end; box-shadow: var(--shadow-2); }
.feature-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-out); }
.feature-card:hover img { transform: scale(1.05); }
.feature-card .ov { position: relative; padding: var(--sp-6); color: #fff; background: linear-gradient(to top, rgba(20,16,12,.85), rgba(20,16,12,0) 75%); width: 100%; }
.feature-card h3 { font-size: var(--fs-xl); color: #fff; }
.feature-card p { font-size: var(--fs-sm); opacity: .92; margin: var(--sp-1) 0 var(--sp-4); max-width: 34ch; }
.pill-link { display: inline-flex; align-items: center; gap: var(--sp-2); background: #fff; color: var(--c-ink); font-weight: 700; font-size: var(--fs-sm); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-pill); min-height: 44px; transition: gap var(--dur-fast) var(--ease-out); }
.pill-link:hover { gap: var(--sp-4); }

/* --------------------------------------------------------------------------
   12. Category grid — auto-rhythm bento (works for ANY number of categories)
   -------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);   /* 6-col base = clean 2- & 3-wide tiles */
  grid-auto-rows: 220px;
  grid-auto-flow: dense;                    /* back-fill gaps automatically */
  gap: var(--sp-4);
}
.btile {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: flex-end;
  grid-column: span 2;                      /* default tile = 2 of 6 cols (3 per row) */
  isolation: isolate;
  transition: transform var(--dur-mid) var(--ease-out), box-shadow var(--dur-mid);
}
.btile:hover { transform: translateY(-4px); box-shadow: var(--shadow-3); }

.btile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease-out);
  z-index: -2;
}
.btile:hover img { transform: scale(1.06); }

/* Two-stop scrim for label legibility (always meets contrast over photos) */
.btile::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(20,16,12,.82) 0%, rgba(20,16,12,.28) 38%, rgba(20,16,12,0) 70%);
  transition: background var(--dur-mid);
}
.btile:hover::after {
  background: linear-gradient(to top, rgba(20,16,12,.88) 0%, rgba(20,16,12,.38) 42%, rgba(94,46,28,.12) 100%);
}

.btile .lab {
  position: relative; z-index: 1; margin: var(--sp-5);
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg);
  display: flex; align-items: center; gap: var(--sp-2);
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  line-height: 1.1;
}
.btile .lab .count {
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-xs);
  opacity: .85; background: rgba(255,255,255,.16); backdrop-filter: blur(4px);
  padding: 3px 9px; border-radius: var(--r-pill); align-self: center;
}
.btile .lab .arrow {
  width: 18px; height: 18px; flex: none; margin-left: auto;
  opacity: 0; transform: translateX(-8px);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.btile:hover .lab .arrow { opacity: 1; transform: none; }

/*
 * Auto-rhythm: the FIRST tile is a hero (tall + wide), then every 5th tile
 * downstream becomes a wide accent. grid-auto-flow:dense keeps it gap-free
 * no matter how many categories WordPress outputs. No per-tile classes needed.
 */
.btile:first-child            { grid-column: span 3; grid-row: span 2; }
.btile:nth-child(6n + 4)      { grid-column: span 4; }   /* periodic wide accent */
.btile:nth-child(6n + 4) .lab { font-size: var(--fs-xl); }

/* Optional manual overrides still respected if present */
.btile.is-wide { grid-column: span 4; }
.btile.is-tall { grid-row: span 2; }

/* --------------------------------------------------------------------------
   13. Newsletter
   -------------------------------------------------------------------------- */
.news {
  background: var(--surface-inv); color: var(--on-surface-inv);
  border-radius: var(--r-lg); padding: var(--sp-8);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--sp-7);
  align-items: center; box-shadow: var(--shadow-2);
}
.news h2 { color: #fff; font-size: var(--fs-xl); }
:root[data-theme="dark"] .news h2 { color: var(--text); }
.news p { opacity: .9; margin-top: var(--sp-3); }
.news form { display: flex; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); }
.news label.field { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: var(--sp-1); }
.news label.field span { font-size: var(--fs-xs); font-weight: 600; opacity: .85; }
.news input { width: 100%; padding: var(--sp-4) var(--sp-4); border-radius: var(--r-pill); border: 2px solid transparent; font-family: inherit; font-size: var(--fs-base); min-height: 48px; }
.news input:focus-visible { outline-offset: 3px; }
.news .btn-primary { background: var(--gold); color: var(--c-ink); align-self: flex-end; }
.news .btn-primary:hover { background: #fff; }
.news small { display: block; opacity: .75; margin-top: var(--sp-3); font-size: var(--fs-xs); }
.form-feedback { width: 100%; font-weight: 700; color: var(--gold); min-height: 1.2em; }

/* --------------------------------------------------------------------------
   14. About
   -------------------------------------------------------------------------- */
.about {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: var(--sp-7); align-items: center;
  background: var(--surface); border-radius: var(--r-lg); padding: var(--sp-7);
  box-shadow: var(--shadow-2); border: 1px solid var(--line);
}
.about-photo { aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about h2 { font-size: var(--fs-xl); color: var(--accent-deep); margin-bottom: var(--sp-2); }
:root[data-theme="dark"] .about h2 { color: var(--text); }
.about p { color: var(--text-soft); margin-bottom: var(--sp-3); }
.socials { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.socials a { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; transition: background var(--dur-fast), transform var(--dur-fast), color var(--dur-fast); }
.socials a:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   15. Banner
   -------------------------------------------------------------------------- */
.banner { position: relative; min-height: 460px; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(20,16,12,.5), rgba(20,16,12,.62)); }
.banner .inner { position: relative; z-index: 2; padding: var(--sp-7); max-width: 60ch; }
.banner h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); color: #fff; }
.banner h2 em { font-style: italic; color: var(--gold); }
.banner p { margin: var(--sp-4) auto var(--sp-6); opacity: .94; }

/* --------------------------------------------------------------------------
   16. Trust badges
   -------------------------------------------------------------------------- */
.trust { background: var(--surface); }
.trust .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.tb { display: flex; gap: var(--sp-4); align-items: flex-start; }
.tb .ic { width: 48px; height: 48px; flex: none; border-radius: var(--r-sm); background: var(--surface-2); display: grid; place-items: center; }
.tb .ic svg { width: 24px; height: 24px; color: var(--primary); }
.tb h4 { font-size: var(--fs-md); font-family: var(--font-body); font-weight: 700; }
.tb p { font-size: var(--fs-sm); color: var(--text-soft); }

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
footer.site { background: var(--footer-bg); color: var(--footer-text); padding: var(--sp-8) 0 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--sp-6); padding-bottom: var(--sp-7); }
.foot-brand .brand-name { color: #fff; }
.foot-brand p { font-size: var(--fs-sm); margin-top: var(--sp-4); max-width: 34ch; opacity: .82; }
footer.site h5 { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: var(--fs-xs); color: var(--gold); margin-bottom: var(--sp-4); }
footer.site ul { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
footer.site ul a { font-size: var(--fs-sm); opacity: .85; transition: opacity var(--dur-fast), color var(--dur-fast); }
footer.site ul a:hover { opacity: 1; color: var(--c-terra-soft); }
.foot-news label { display: block; font-size: var(--fs-xs); margin-bottom: var(--sp-2); opacity: .85; }
.foot-news input { width: 100%; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); border: 0; margin-bottom: var(--sp-3); font-family: inherit; min-height: 44px; }
.foot-news button { width: 100%; background: var(--primary); color: #fff; border: 0; padding: var(--sp-3); border-radius: var(--r-sm); font-weight: 700; cursor: pointer; font-family: inherit; min-height: 44px; transition: background var(--dur-fast); }
.foot-news button:hover { background: var(--primary-hover); }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: var(--sp-5) 0; text-align: center; font-size: var(--fs-xs); opacity: .72; }
.foot-bottom a:hover { color: var(--c-terra-soft); }

/* --------------------------------------------------------------------------
   18. Scroll-reveal w/ stagger (§7 stagger-sequence)
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.js .stagger > * { opacity: 0; transform: translateY(24px); }
.stagger.in > * { opacity: 1; transform: none; transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.stagger.in > *:nth-child(2) { transition-delay: 60ms; }
.stagger.in > *:nth-child(3) { transition-delay: 120ms; }
.stagger.in > *:nth-child(4) { transition-delay: 180ms; }
.stagger.in > *:nth-child(5) { transition-delay: 240ms; }
.stagger.in > *:nth-child(6) { transition-delay: 300ms; }

/* --------------------------------------------------------------------------
   19. Responsive — tablet (≤ 980px)
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .hero-inner   { grid-template-columns: 1fr; }
  .hero-copy    { padding: var(--sp-8) 0 var(--sp-6); }
  .hero-media   { border-radius: var(--r-lg); aspect-ratio: 4 / 3; }
  .grid-4       { grid-template-columns: repeat(2, 1fr); }
  .bento        { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; }
  .btile        { grid-column: span 2; }
  .btile:first-child       { grid-column: span 2; grid-row: span 2; }
  .btile:nth-child(6n + 4) { grid-column: span 2; }
  .btile.is-wide           { grid-column: span 2; }
  .news, .about { grid-template-columns: 1fr; padding: var(--sp-6); }
  .feature-grid { grid-template-columns: 1fr; }
  .trust .wrap  { grid-template-columns: 1fr; }
  .foot-grid    { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------------------
   20. Responsive — mobile (≤ 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  nav.menu          { display: none; }
  .burger           { display: flex; }
  .grid-4, .grid-3  { grid-template-columns: 1fr 1fr; }
  .bento            { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .btile,
  .btile:first-child,
  .btile:nth-child(6n + 4),
  .btile.is-wide,
  .btile.is-tall    { grid-column: auto; grid-row: auto; }
  .btile:first-child { grid-column: 1 / -1; grid-row: span 2; }
  .btile .lab,
  .btile:nth-child(6n + 4) .lab { font-size: var(--fs-md); }
  .foot-grid        { grid-template-columns: 1fr; }
  section           { padding: var(--sp-7) 0; }
  .hero h1          { font-size: clamp(2.2rem, 9vw, 3rem); }

  /* Mobile drawer */
  nav.menu.is-open {
    display: flex; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; background: var(--surface);
    padding: var(--sp-5); box-shadow: var(--shadow-2); z-index: 99;
    border-bottom: 1px solid var(--line);
  }
  nav.menu.is-open ul { flex-direction: column; gap: var(--sp-5); align-items: flex-start; width: 100%; }
}

@media (max-width: 380px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   21. Reduced motion (§1 reduced-motion / §7 animation-optional)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   22. Print
   -------------------------------------------------------------------------- */
@media print {
  header.site, .topbar, .hero-strip, .news, .banner, footer.site, .theme-toggle, .burger { display: none !important; }
  body { background: #fff; color: #000; }
}


/* =============================================================================
   v3 additions: placeholders, lists, single post, archives, TOC, author box,
   disclosure, search, comments, pagination, widgets, Pin button
   ============================================================================= */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; background: var(--surface); padding: var(--sp-3); z-index: 1000; }
img { max-width: 100%; height: auto; }

/* Local gradient placeholder (replaces hotlinked stock photos) */
.ph { display: grid; place-items: center; width: 100%; height: 100%; min-height: 100%;
  background: linear-gradient(145deg, hsl(var(--ph-h) 45% 82%), hsl(calc(var(--ph-h) + 40) 40% 66%)); }
.ph span { font-family: var(--font-display); font-size: clamp(2.5rem, 7vw, 5rem); color: rgba(255,255,255,.85); font-weight: 900; }
.btile .ph, .feature-card .ph { position: absolute; inset: 0; }
.hero-media .ph { position: absolute; inset: 0; }

/* Lists that were divs before */
.methods, .hero-strip ul, .chip-list, .foot-grid ul, .legal-menu { list-style: none; margin: 0; padding: 0; }
.methods li { display: contents; }
.hero-strip ul { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); font-weight: 600; }
.hero-strip li { display: flex; align-items: center; gap: var(--sp-2); }
.hero-strip svg { width: 18px; height: 18px; flex: none; }

/* Brand without logo image */
.logo-badge { color: #F6EFDC; font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; }
.brand-logo img { max-height: 56px; width: auto; }

/* Card link structure (title is the link; thumb is a mirrored link) */
.card { position: relative; }
.card .thumb { display: block; }
.card-title { font-size: var(--fs-md); line-height: 1.3; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card-title a:focus-visible { outline: none; }

/* Header icons + search drawer */
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg, .theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun, .theme-toggle .moon { display: grid; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root:not([data-theme="dark"]) .theme-toggle .moon { display: none; }
.header-search { border-top: 1px solid var(--line); padding: var(--sp-4) 0; background: var(--surface); }
.search-form { display: flex; gap: var(--sp-2); max-width: 560px; }
.search-field { flex: 1; min-height: 48px; padding: 0 var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--text); font: inherit; }
.search-form .btn { min-height: 48px; padding: 0 var(--sp-5); }
.search-form .btn svg { width: 20px; height: 20px; }

/* Section helpers */
section { padding: var(--sp-8) 0; }
.more { text-align: center; margin-top: var(--sp-6); }
.empty-state { text-align: center; padding: var(--sp-7) 0; color: var(--text-soft); }
.empty-state .search-form { margin: var(--sp-4) auto 0; }
.admin-hint { font-size: var(--fs-sm); background: #fff6d6; color: #5c4400; border: 1px dashed #c9a100; border-radius: var(--r-sm); padding: var(--sp-3); }
.h3 { font-size: var(--fs-xl); }
.tb h3 { font-size: var(--fs-md); font-family: var(--font-body); font-weight: 700; }
.foot-title { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .16em; font-size: var(--fs-xs); color: var(--gold); margin-bottom: var(--sp-4); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); align-items: center; }
.legal-menu { display: flex; flex-wrap: wrap; gap: var(--sp-4); }

/* Newsletter (real form) */
.news-form { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.news-form input { flex: 1; min-width: 200px; }
.foot-news .news-form { flex-direction: column; }
.foot-news .news-form input { width: 100%; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); border: 0; min-height: 44px; font: inherit; }
.foot-news .news-form .btn { width: 100%; border-radius: var(--r-sm); }
.news-privacy { display: block; opacity: .75; margin-top: var(--sp-3); font-size: var(--fs-xs); }

/* Archive header */
.archive-head { padding: var(--sp-7) 0 var(--sp-5); text-align: center; }
.archive-head h1 { font-size: var(--fs-2xl); color: var(--accent-deep); }
:root[data-theme="dark"] .archive-head h1 { color: var(--text); }
.archive-desc { color: var(--text-soft); max-width: 62ch; margin: var(--sp-3) auto 0; }
.archive-head .search-form { margin: var(--sp-5) auto 0; }
.archive-author { display: flex; gap: var(--sp-5); align-items: center; justify-content: center; text-align: left; }
.archive-author img { border-radius: 50%; }
.archive-list { padding-top: var(--sp-4); }
.chip-list { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; margin-top: var(--sp-4); }
.chip-list a, .chip-link { display: inline-block; position: static; padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font-size: var(--fs-sm); font-weight: 600; }
.chip-list a:hover { background: var(--primary); color: #fff; }

/* Pagination */
.pagination { margin-top: var(--sp-7); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: center; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: grid; place-items: center; padding: 0 var(--sp-3); border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 700; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Breadcrumbs */
.crumbs { font-size: var(--fs-sm); color: var(--text-soft); margin-bottom: var(--sp-4); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); padding: 0; margin: 0; }
.archive-head .crumbs ol { justify-content: center; }
.crumbs li + li::before { content: "›"; margin-right: var(--sp-2); opacity: .6; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }

/* Single post */
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--sp-5); }
.entry-header { padding-top: var(--sp-7); }
.entry-header .eyebrow { display: inline-block; margin-bottom: var(--sp-3); }
.entry-title { font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.12; color: var(--accent-deep); }
:root[data-theme="dark"] .entry-title { color: var(--text); }
.entry-lead { font-size: var(--fs-md); color: var(--text-soft); margin-top: var(--sp-4); }
.byline { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0 var(--sp-6); font-size: var(--fs-sm); color: var(--text-soft); }
.byline-avatar { border-radius: 50%; }
.byline-author { font-weight: 700; color: var(--text); }
.byline .sep { margin: 0 var(--sp-1); }
.entry-layout { max-width: 760px; margin: 0 auto; padding: 0 var(--sp-5); }
.has-sidebar .entry-layout { max-width: 1160px; display: grid; grid-template-columns: minmax(0, 760px) 320px; gap: var(--sp-7); justify-content: center; }
.entry-sidebar { position: sticky; top: 100px; align-self: start; }
.entry-hero { margin: 0 0 var(--sp-6); border-radius: var(--r-lg); overflow: hidden; }
.entry-hero img { width: 100%; }
.entry-hero figcaption { font-size: var(--fs-sm); color: var(--text-soft); padding: var(--sp-2) 0; }

.disclosure { font-size: var(--fs-sm); background: var(--surface-2); border-left: 4px solid var(--gold); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); margin-bottom: var(--sp-5); color: var(--text-soft); }
.disclosure a { text-decoration: underline; }

/* Table of contents */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4) var(--sp-5); margin: 0 0 var(--sp-6); }
.toc summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 1.3rem; color: var(--primary); }
.toc[open] summary::after { content: "–"; }
.toc ol { margin: var(--sp-3) 0 0 var(--sp-5); display: grid; gap: var(--sp-2); }
.toc a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.toc a:hover { color: var(--primary); }

/* Article typography */
.entry-content { font-size: 1.08rem; line-height: 1.75; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2 { font-size: var(--fs-xl); margin-top: 2em; color: var(--accent-deep); scroll-margin-top: 100px; }
.entry-content h3 { font-size: var(--fs-lg); margin-top: 1.6em; scroll-margin-top: 100px; }
:root[data-theme="dark"] .entry-content h2 { color: var(--text); }
.entry-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote { border-left: 4px solid var(--primary); padding: var(--sp-2) var(--sp-5); font-style: italic; color: var(--text-soft); }
.entry-content img, .entry-content figure { border-radius: var(--r-md); }
.entry-content figcaption { font-size: var(--fs-sm); color: var(--text-soft); text-align: center; margin-top: var(--sp-2); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: var(--sp-3); text-align: left; vertical-align: top; }
.entry-content th { background: var(--surface-2); }
.entry-content .wp-block-button__link { background: var(--primary); color: #fff; text-decoration: none; border-radius: var(--r-pill); }
.entry-content .alignwide { margin-left: calc(-1 * var(--sp-7)); margin-right: calc(-1 * var(--sp-7)); }
.entry-content .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.entry-content .has-background { padding: var(--sp-5); border-radius: var(--r-md); }
.entry-footer { margin-top: var(--sp-6); }
.entry-footer .chip-list { justify-content: flex-start; }
.after-post { margin-top: var(--sp-6); }

/* Pin "Save" button on images */
.pin-wrap { position: relative; display: block; }
.pin-btn { position: absolute; top: 12px; left: 12px; background: #E60023; color: #fff; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--r-pill); padding: 6px 14px; opacity: 0; transition: opacity var(--dur-fast); text-decoration: none !important; }
.pin-wrap:hover .pin-btn, .pin-btn:focus-visible { opacity: 1; }
@media (hover: none) { .pin-btn { opacity: 1; } }

/* Author box */
.author-box { display: flex; gap: var(--sp-5); align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); margin-top: var(--sp-7); }
.author-avatar { border-radius: 50%; flex: none; }
.author-name { font-size: var(--fs-lg); margin: var(--sp-1) 0 var(--sp-2); }
.author-box p { color: var(--text-soft); font-size: var(--fs-sm); }
.author-links { display: flex; gap: var(--sp-4); margin-top: var(--sp-3); font-weight: 700; }
.author-links a { color: var(--primary); }

/* Related + comments */
.related { background: var(--surface-2); margin-top: var(--sp-8); }
.comments { padding: var(--sp-7) 0; }
.comments-title, .comment-reply-title { font-size: var(--fs-lg); margin-bottom: var(--sp-4); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: var(--sp-6); }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); margin-bottom: var(--sp-4); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: var(--sp-2); }
.comment-metadata { font-size: var(--fs-xs); color: var(--text-soft); margin: var(--sp-1) 0 var(--sp-3); }
.comment-form p { margin-bottom: var(--sp-4); }
.comment-form label { display: block; font-weight: 600; margin-bottom: var(--sp-1); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; }
.comment-form .submit { background: var(--primary); color: #fff; border: 0; border-radius: var(--r-pill); padding: var(--sp-3) var(--sp-6); font-weight: 700; cursor: pointer; min-height: 44px; }

/* Widgets */
.widget { margin-bottom: var(--sp-6); }
.widget-title { font-size: var(--fs-md); margin-bottom: var(--sp-3); }

@media (max-width: 980px) {
  .has-sidebar .entry-layout { grid-template-columns: 1fr; }
  .entry-sidebar { position: static; }
  .entry-content .alignwide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 640px) {
  .author-box { flex-direction: column; }
  .archive-author { flex-direction: column; text-align: center; }
  .byline { flex-wrap: wrap; }
  .icon-btn { display: none; }
}
@media print {
  header.site, footer.site, .topbar, .related, .comments, .toc, .pin-btn, .after-post { display: none !important; }
}
