/* ==========================================================================
   CellarShip design system
   Estate refined: aged burgundy, limestone, vine gold.
   Prata for display, Questrial for body. Vineyard row diagonals, wax seals.
   ========================================================================== */

:root {
  /* Core palette from the brief */
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --ink: #231519;
  --primary: #6B1F31;
  --accent: #B08D3F;
  --muted: #6F625F;

  /* Derived burgundy range */
  --primary-050: #F7EDEF;
  --primary-100: #EFDCE0;
  --primary-200: #DCB8C0;
  --primary-400: #9A3E51;
  --primary-600: #5B1929;
  --primary-800: #3A0F1B;
  --primary-900: #2A0B14;

  /* Derived vine gold range */
  --accent-050: #FBF5E8;
  --accent-100: #F4E9CF;
  --accent-200: #E6D2A2;
  --accent-400: #C9A65A;
  --accent-600: #8F7030;
  --accent-700: #6E5624;

  /* Limestone neutrals */
  --stone-050: #FDFBF8;
  --stone-100: #F3EEE6;
  --stone-200: #E7E0D4;
  --stone-300: #D6CCBC;
  --stone-400: #B8AC99;

  --ink-soft: #4A3238;
  --ink-faint: #8A7B78;

  /* Type */
  --font-display: "Prata", "Hoefler Text", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Questrial", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;

  --fs-xs: 0.78rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.02rem;
  --fs-md: 1.14rem;
  --fs-lg: 1.34rem;
  --fs-xl: 1.7rem;
  --fs-2xl: 2.15rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.5rem;
  --fs-5xl: 4.4rem;

  /* Spacing scale */
  --sp-1: 0.28rem;
  --sp-2: 0.56rem;
  --sp-3: 0.85rem;
  --sp-4: 1.15rem;
  --sp-5: 1.6rem;
  --sp-6: 2.2rem;
  --sp-7: 3rem;
  --sp-8: 4.2rem;
  --sp-9: 5.8rem;
  --sp-10: 7.5rem;

  /* Radii */
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 12px;
  --r-arch: 220px 220px 6px 6px;
  --r-pill: 999px;

  /* Shadows, kept soft like light in a cellar */
  --sh-1: 0 1px 2px rgba(35, 21, 25, 0.05);
  --sh-2: 0 10px 26px -18px rgba(35, 21, 25, 0.5);
  --sh-3: 0 26px 56px -34px rgba(35, 21, 25, 0.55);
  --sh-seal: 0 8px 18px -8px rgba(58, 15, 27, 0.6);

  --rule: 1px solid var(--stone-200);
  --rule-gold: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);

  --maxw: 1180px;
  --maxw-narrow: 760px;

  --ease-slow: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-press: cubic-bezier(0.34, 1.36, 0.64, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.72;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Limestone grain plus the faint vineyard rows that run under the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(114deg,
      rgba(107, 31, 49, 0.035) 0 1px,
      transparent 1px 34px),
    radial-gradient(1200px 700px at 82% -8%, rgba(176, 141, 63, 0.10), transparent 62%);
}

body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0 0 var(--sp-4);
  color: var(--ink);
}

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-400); }

ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.15rem; }
li { margin-bottom: var(--sp-2); }

strong { font-weight: 400; color: var(--primary); }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stone-300), transparent);
  margin: var(--sp-7) 0;
}

/* ---------- utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

.wrap-narrow { max-width: var(--maxw-narrow); }

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--r-md) var(--r-md);
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 220ms var(--ease-slow);
}
.skip-link:focus { top: 0; color: #fff; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.on-dark :focus-visible { outline-color: var(--accent-200); }

::selection { background: var(--accent-100); color: var(--primary-800); }

/* ---------- engraved rule and kickers ---------- */
.kicker {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin: 0 0 var(--sp-3);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.kicker::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--accent);
  flex: none;
}
.kicker.is-centered { justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.92rem 1.6rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 300ms var(--ease-slow), color 300ms var(--ease-slow),
              border-color 300ms var(--ease-slow), transform 300ms var(--ease-press),
              box-shadow 300ms var(--ease-slow);
}

.btn-primary {
  background: var(--primary);
  color: #FFF8F2;
  border-color: var(--primary);
  box-shadow: var(--sh-2);
}
.btn-primary:hover {
  background: var(--primary-600);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--sh-3);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 32%, transparent);
}
.btn-ghost:hover {
  background: var(--primary-050);
  border-color: var(--primary);
  color: var(--primary-600);
}

.btn-gold {
  background: var(--accent);
  color: var(--primary-900);
  border-color: var(--accent-600);
}
.btn-gold:hover { background: var(--accent-400); color: var(--primary-900); }

.btn-sm { padding: 0.62rem 1.05rem; font-size: var(--fs-xs); }
.btn-wide { width: 100%; }

/* ---------- wax seal motif ---------- */
.seal {
  --seal-size: 92px;
  width: var(--seal-size);
  height: var(--seal-size);
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--accent-200);
  background:
    radial-gradient(circle at 34% 30%, var(--primary-400) 0%, var(--primary) 45%, var(--primary-800) 100%);
  border-radius: 50%;
  box-shadow: var(--sh-seal), inset 0 2px 5px rgba(255, 236, 214, 0.22),
              inset 0 -4px 9px rgba(42, 11, 20, 0.55);
  /* the pressed, irregular wax edge */
  clip-path: polygon(
    50% 0%, 62% 4%, 72% 1%, 80% 9%, 91% 12%, 93% 23%, 100% 32%, 96% 43%,
    100% 53%, 93% 62%, 95% 73%, 85% 79%, 81% 90%, 70% 91%, 61% 98%, 50% 94%,
    39% 99%, 30% 92%, 19% 90%, 14% 80%, 5% 74%, 7% 62%, 0% 52%, 4% 42%,
    0% 32%, 8% 23%, 9% 12%, 20% 9%, 28% 1%, 38% 4%
  );
}
.seal::after {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent-200) 55%, transparent);
}
.seal svg { width: 46%; height: auto; position: relative; }

.seal-sm { --seal-size: 54px; }
.seal-xs { --seal-size: 38px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid transparent;
  transition: background 320ms var(--ease-slow), border-color 320ms var(--ease-slow),
              box-shadow 320ms var(--ease-slow);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  box-shadow: 0 12px 30px -26px rgba(35, 21, 25, 0.8);
}
.site-header.is-stuck::after { opacity: 1; }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  min-height: 78px;
  padding-block: var(--sp-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.42rem;
  letter-spacing: 0.005em;
  line-height: 1;
}
.brand-name b { font-weight: 400; color: var(--primary); }
.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-top: 0.28rem;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
}
.nav-list a {
  font-size: var(--fs-sm);
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.35rem 0;
  position: relative;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 320ms var(--ease-slow);
}
.nav-list a:hover { color: var(--primary); }
.nav-list a:hover::after { right: 0; }

.nav-toggle {
  display: none;
  width: 46px; height: 42px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--stone-300);
  border-radius: var(--r-sm);
  color: var(--primary);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: var(--sp-9) var(--sp-8);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(114deg,
      rgba(107, 31, 49, 0.055) 0 1px,
      transparent 1px 46px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 78%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 78%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: var(--sp-8);
  align-items: center;
}

.hero-title {
  /* Capped below the display scale on purpose: the 5xl step read oversized in the hero. */
  font-size: clamp(2.35rem, 4.05vw, 3.4rem);
  line-height: 1.06;
  margin-bottom: var(--sp-5);
  max-width: 15ch;
}
.hero-title em {
  font-style: normal;
  color: var(--primary);
  position: relative;
  white-space: nowrap;
}
.hero-title em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 0.34em;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 34%, transparent),
    color-mix(in srgb, var(--accent) 8%, transparent));
  z-index: -1;
}

.hero-lede {
  font-size: var(--fs-md);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-bottom: var(--sp-6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-5);
  list-style: none;
  margin: 0;
  padding: var(--sp-4) 0 0;
  border-top: var(--rule-gold);
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  letter-spacing: 0.03em;
}
.trust-strip svg { width: 17px; height: 17px; color: var(--accent-600); flex: none; }

/* the cellar arch frame */
.hero-figure {
  position: relative;
  margin: 0;
}
.arch {
  position: relative;
  border-radius: var(--r-arch);
  overflow: hidden;
  border: 1px solid var(--stone-300);
  box-shadow: var(--sh-3);
  background: var(--stone-100);
}
.arch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(196deg, rgba(42, 11, 20, 0.06) 0%, transparent 42%,
              rgba(58, 15, 27, 0.28) 100%);
  pointer-events: none;
}
.arch img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.arch-wide img { aspect-ratio: 3 / 2; }

.hero-figure .seal {
  position: absolute;
  left: -26px;
  bottom: 46px;
  z-index: 2;
}

.figure-note {
  position: absolute;
  right: -14px;
  top: 34px;
  background: var(--surface);
  border: var(--rule);
  border-left: 3px solid var(--accent);
  padding: 0.7rem 1rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  box-shadow: var(--sh-2);
  max-width: 200px;
  line-height: 1.5;
}
.figure-note b { display: block; font-family: var(--font-display); font-size: 1.1rem; color: var(--primary); }

/* ---------- generic section frame ---------- */
.section { padding-block: var(--sp-9); position: relative; }
.section-tight { padding-block: var(--sp-8); }

.section-stone {
  background: var(--stone-100);
  border-block: var(--rule);
}
.section-dark {
  background:
    radial-gradient(900px 500px at 12% 0%, rgba(176, 141, 63, 0.20), transparent 60%),
    linear-gradient(168deg, var(--primary-800), var(--primary-900));
  color: var(--stone-100);
}
.section-dark h2, .section-dark h3 { color: #FFF6EC; }
.section-dark p { color: color-mix(in srgb, var(--stone-100) 82%, transparent); }
.section-dark .kicker { color: var(--accent-200); }
.section-dark .kicker::before { background: var(--accent-200); }

/* vineyard rows running diagonally through a band */
.rows-band { position: relative; overflow: hidden; }
.rows-band::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: repeating-linear-gradient(114deg,
    color-mix(in srgb, var(--accent) 26%, transparent) 0 1px,
    transparent 1px 40px);
  opacity: 0.5;
  pointer-events: none;
}

.section-head { max-width: 62ch; margin-bottom: var(--sp-7); }
.section-head.is-centered { margin-inline: auto; text-align: center; }
.section-head.is-centered .kicker { justify-content: center; }
.section-title { font-size: clamp(1.9rem, 3.6vw, var(--fs-3xl)); margin-bottom: var(--sp-3); }
.section-lede { font-size: var(--fs-md); color: var(--muted); margin: 0; }
.section-dark .section-lede { color: color-mix(in srgb, var(--stone-100) 78%, transparent); }

/* ---------- problem cards ---------- */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: var(--sp-4);
}
.pain-card {
  background: var(--surface);
  border: var(--rule);
  border-top: 2px solid var(--primary);
  padding: var(--sp-5) var(--sp-5) var(--sp-5);
  position: relative;
  box-shadow: var(--sh-1);
  transition: transform 420ms var(--ease-slow), box-shadow 420ms var(--ease-slow);
}
.pain-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.pain-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.pain-card p { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-4); }
.pain-cost {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--primary);
  border-top: var(--rule-gold);
  padding-top: var(--sp-3);
  line-height: 1.35;
}
.pain-cost span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: 0.2rem;
}

/* ---------- how it works ---------- */
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: var(--sp-8);
  align-items: start;
}

.steps { list-style: none; margin: 0; padding: 0; }
.step {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: var(--sp-4);
  padding-bottom: var(--sp-6);
  position: relative;
  margin: 0;
}
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 38px;
  top: 68px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 12%, transparent));
}
.step-num {
  width: 78px; height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 1.55rem;
  color: var(--primary);
  position: relative;
  box-shadow: inset 0 0 0 5px var(--bg);
}
.step-num::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 34%, transparent);
}
.step h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); padding-top: 0.6rem; }
.step p { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.step-tag {
  display: inline-block;
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-700);
  background: var(--accent-050);
  border: 1px solid var(--accent-200);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
}

/* ---------- feature cards with engraved icons ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: var(--sp-4);
}
.feature-card {
  background: var(--surface);
  border: var(--rule);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  position: relative;
  overflow: hidden;
  /* clipped corner, like a wine label notch */
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  transition: transform 420ms var(--ease-slow), border-color 420ms var(--ease-slow);
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(114deg,
    rgba(107, 31, 49, 0.05) 0 1px, transparent 1px 26px);
  opacity: 0;
  transition: opacity 500ms var(--ease-slow);
  pointer-events: none;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--accent-200); }
.feature-card:hover::before { opacity: 1; }
.feature-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.feature-card p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }

.icon-plate {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-050);
  border: 1px solid var(--accent-200);
  color: var(--primary);
  margin-bottom: var(--sp-4);
}
.icon-plate svg { width: 27px; height: 27px; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- outcomes ---------- */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: var(--sp-6) var(--sp-5);
}
.outcome {
  padding-top: var(--sp-4);
  border-top: 1px solid color-mix(in srgb, var(--accent-200) 70%, transparent);
}
.outcome-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1;
  color: var(--accent-200);
  margin-bottom: var(--sp-3);
  letter-spacing: -0.02em;
}
.section-dark .outcome-num { color: var(--accent); }
.outcome h3 { font-size: var(--fs-md); margin-bottom: var(--sp-2); }
.outcome p { font-size: var(--fs-sm); margin: 0; }

/* ---------- testimonials ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(292px, 1fr));
  gap: var(--sp-5);
  margin-bottom: var(--sp-8);
}
.testimonial {
  background: var(--surface);
  border: var(--rule);
  padding: var(--sp-7) var(--sp-5) var(--sp-5);
  margin: 0;
  position: relative;
  box-shadow: var(--sh-1);
}
.testimonial::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.testimonial .seal {
  position: absolute;
  top: -24px;
  right: var(--sp-5);
}
.testimonial p {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  line-height: 1.58;
  color: var(--ink);
  margin-bottom: var(--sp-5);
}
.quote-attr {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-top: var(--rule-gold);
  padding-top: var(--sp-4);
  font-style: normal;
}
.quote-initials {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-050);
  border: 1px solid var(--primary-200);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
}
.quote-attr b { display: block; font-weight: 400; color: var(--ink); font-size: var(--fs-sm); }
.quote-attr span { display: block; font-size: var(--fs-xs); color: var(--muted); letter-spacing: 0.04em; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-5);
  background: var(--surface);
  border: var(--rule);
  border-top: 2px solid var(--accent);
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
}
.metric b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.7rem);
  color: var(--primary);
  line-height: 1.05;
}
.metric span {
  display: block;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: var(--sp-2);
}

/* ---------- pricing ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: var(--sp-5);
  align-items: start;
}
.price-card {
  background: var(--surface);
  border: var(--rule);
  padding: var(--sp-6) var(--sp-5);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-1);
  transition: transform 420ms var(--ease-slow), box-shadow 420ms var(--ease-slow);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.price-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-1);
}
.price-for {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: var(--sp-4);
}
.price-amount {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--primary);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: var(--sp-2);
}
.price-amount small {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--muted);
  letter-spacing: 0.05em;
}
.price-note { font-size: var(--fs-sm); color: var(--muted); margin-bottom: var(--sp-5); }
.price-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-6);
  flex: 1;
  border-top: var(--rule);
  padding-top: var(--sp-4);
}
.price-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  margin-bottom: var(--sp-3);
}
.price-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 9px; height: 9px;
  border-left: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(-45deg);
}

.price-card--featured {
  border: 1px solid var(--primary);
  box-shadow: var(--sh-3);
  background:
    linear-gradient(180deg, var(--primary-050), var(--surface) 32%);
}
.price-card--featured::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  pointer-events: none;
}
.price-flag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--accent-100);
  font-size: var(--fs-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  white-space: nowrap;
  z-index: 2;
}
.billing-note {
  margin-top: var(--sp-6);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--muted);
  border-top: var(--rule-gold);
  padding-top: var(--sp-4);
}

/* ---------- faq ---------- */
.faq-list {
  border-top: 1px solid var(--stone-300);
  max-width: 860px;
  margin-inline: auto;
}
.faq-item { border-bottom: 1px solid var(--stone-300); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  background: transparent;
  border: 0;
  padding: var(--sp-5) 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--ink);
  line-height: 1.4;
  transition: color 280ms var(--ease-slow);
}
.faq-q:hover { color: var(--primary); }
.faq-mark {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  position: relative;
  margin-top: 2px;
}
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  background: var(--accent-600);
  transform: translate(-50%, -50%);
  transition: transform 360ms var(--ease-slow), opacity 360ms var(--ease-slow);
}
.faq-mark::before { width: 11px; height: 1px; }
.faq-mark::after { width: 1px; height: 11px; }
.faq-q[aria-expanded="true"] .faq-mark::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-q[aria-expanded="true"] .faq-mark { background: var(--accent-050); }
.faq-a {
  overflow: hidden;
  max-height: 0;
  transition: max-height 460ms var(--ease-slow), opacity 360ms var(--ease-slow);
  opacity: 0;
}
.faq-a[data-open="true"] { max-height: 620px; opacity: 1; }
.faq-a > div { padding: 0 0 var(--sp-5); max-width: 74ch; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: var(--sp-8);
  align-items: start;
}
.contact-aside .seal { margin-bottom: var(--sp-5); }
.contact-points {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0 0;
}
.contact-points li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-3);
}
.contact-points svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--accent); }

.form-panel {
  background: var(--surface);
  border: 1px solid var(--stone-300);
  border-radius: 6px;
  padding: var(--sp-6);
  box-shadow: var(--sh-3);
  position: relative;
}
.form-panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  pointer-events: none;
  border-radius: 3px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field-wide { grid-column: 1 / -1; }

.field label,
.consent-row span.label-text {
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field .req { color: var(--primary); }

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--stone-050);
  border: 1px solid var(--stone-300);
  border-radius: var(--r-sm);
  padding: 0.78rem 0.85rem;
  width: 100%;
  transition: border-color 260ms var(--ease-slow), box-shadow 260ms var(--ease-slow),
              background 260ms var(--ease-slow);
}
.field textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent-600) 50%),
                    linear-gradient(135deg, var(--accent-600) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--stone-400); }
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
  outline: none;
}
.field [aria-invalid="true"] {
  border-color: var(--primary-400);
  background: var(--primary-050);
}

.field-error {
  font-size: var(--fs-xs);
  color: var(--primary);
  letter-spacing: 0.04em;
  min-height: 0;
  display: none;
}
.field-error.is-shown { display: block; }

.consent-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-top: var(--rule);
  padding-top: var(--sp-4);
}
.consent-row input {
  width: 19px; height: 19px;
  margin-top: 4px;
  accent-color: var(--primary);
  flex: none;
}
.consent-row label { font-size: var(--fs-sm); color: var(--muted); letter-spacing: 0; text-transform: none; }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  margin-top: var(--sp-2);
}
.form-reassure {
  margin-top: var(--sp-4);
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- author byline ---------- */
.byline {
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  border: var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: var(--sp-5);
  margin-top: var(--sp-8);
}
.byline img { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; flex: none; }
.byline p { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.byline b { font-weight: 400; font-family: var(--font-display); color: var(--ink); font-size: var(--fs-md); }

/* ---------- footer ---------- */
.site-footer {
  background:
    repeating-linear-gradient(114deg, rgba(176, 141, 63, 0.07) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, var(--primary-800), var(--primary-900));
  color: color-mix(in srgb, var(--stone-100) 80%, transparent);
  padding-top: var(--sp-8);
  margin-top: 0;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-7);
}
.site-footer h2 {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}
.site-footer a { color: color-mix(in srgb, var(--stone-100) 86%, transparent); text-decoration: none; }
.site-footer a:hover { color: var(--accent-200); text-decoration: underline; }
.foot-list { list-style: none; margin: 0; padding: 0; }
.foot-list li { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.foot-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: var(--sp-4); }
.foot-brand svg { width: 32px; height: 32px; }
.foot-brand span { font-family: var(--font-display); font-size: 1.3rem; color: #FFF6EC; }
.foot-line { font-size: var(--fs-sm); max-width: 34ch; margin-bottom: var(--sp-5); }

.social { display: flex; gap: 0.55rem; }
.social a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 50%;
  color: var(--accent-200);
  transition: background 300ms var(--ease-slow), color 300ms var(--ease-slow),
              border-color 300ms var(--ease-slow);
}
.social a:hover { background: var(--accent); color: var(--primary-900); border-color: var(--accent); }
.social svg { width: 17px; height: 17px; }

.publisher-line { font-size: var(--fs-xs); letter-spacing: 0.1em; color: var(--accent-200); margin-top: var(--sp-4); }

.base-bar {
  border-top: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  padding-block: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  justify-content: space-between;
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
}

/* ---------- inner pages ---------- */
.page-head {
  padding-block: var(--sp-8) var(--sp-7);
  border-bottom: var(--rule);
  background:
    repeating-linear-gradient(114deg, rgba(107, 31, 49, 0.045) 0 1px, transparent 1px 42px),
    var(--stone-100);
}
.page-head h1 { font-size: clamp(2.1rem, 4.4vw, var(--fs-4xl)); max-width: 20ch; margin-bottom: var(--sp-3); }
.page-head p { color: var(--muted); max-width: 62ch; margin: 0; }

.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0; margin: 0 0 var(--sp-4);
  font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.crumbs a { text-decoration: none; color: var(--accent-600); }
.crumbs li + li::before { content: "/"; margin-right: 0.45rem; color: var(--stone-400); }

.prose { max-width: 74ch; }
.prose h2 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-7);
  padding-top: var(--sp-4);
  border-top: var(--rule-gold);
}
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { font-size: var(--fs-md); margin-top: var(--sp-5); }
.prose ul { padding-left: 1.2rem; }
.prose li { color: var(--ink-soft); }
.prose dl { margin: 0 0 var(--sp-4); }
.prose dt { font-family: var(--font-display); color: var(--primary); margin-top: var(--sp-3); }
.prose dd { margin: 0 0 var(--sp-2); color: var(--ink-soft); }

.fact-card {
  background: var(--surface);
  border: var(--rule);
  border-left: 3px solid var(--primary);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}
.fact-card dl { display: grid; grid-template-columns: minmax(150px, 34%) 1fr; gap: 0.5rem var(--sp-4); margin: 0; }
.fact-card dt { margin: 0; font-family: var(--font-body); font-size: var(--fs-xs); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-600); }
.fact-card dd { margin: 0; font-size: var(--fs-sm); }

.author-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--sp-8);
  align-items: start;
}
.author-portrait {
  border: 1px solid var(--stone-300);
  border-radius: 160px 160px 4px 4px;
  overflow: hidden;
  box-shadow: var(--sh-3);
  background: var(--stone-100);
}
.author-portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.author-card {
  background: var(--surface);
  border: var(--rule);
  padding: var(--sp-5);
  margin-top: var(--sp-5);
}
.author-card h2 { font-size: var(--fs-md); margin-bottom: var(--sp-3); border: 0; padding: 0; margin-top: 0; }
.profile-list { list-style: none; padding: 0; margin: 0; }
.profile-list li { margin-bottom: var(--sp-2); font-size: var(--fs-sm); }

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  gap: var(--sp-5);
}
.map-card {
  background: var(--surface);
  border: var(--rule);
  border-top: 2px solid var(--accent);
  padding: var(--sp-5);
}
.map-card h2 { font-size: var(--fs-lg); margin: 0 0 var(--sp-4); border: 0; padding: 0; }
.map-card ul { list-style: none; padding: 0; margin: 0; }
.map-card li { margin-bottom: var(--sp-4); font-size: var(--fs-sm); }
.map-card a { font-family: var(--font-display); font-size: var(--fs-md); text-decoration: none; }
.map-card a:hover { text-decoration: underline; }
.map-card span { display: block; color: var(--muted); font-size: var(--fs-sm); }

.status-card {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  background: var(--surface);
  border: var(--rule);
  padding: var(--sp-8) var(--sp-6);
  box-shadow: var(--sh-2);
  position: relative;
}
.status-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  pointer-events: none;
}
.status-card .seal { margin: 0 auto var(--sp-5); }
.status-card h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.status-card p { color: var(--muted); }
.status-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; margin-top: var(--sp-6); }

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 15vw, 9rem);
  line-height: 0.9;
  color: var(--accent-200);
  margin: 0 0 var(--sp-3);
}

/* ---------- reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 900ms var(--ease-slow), transform 900ms var(--ease-slow);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

/* diagonal vineyard reveal, the content wipes in along the row angle */
.reveal-row {
  opacity: 0;
  clip-path: polygon(0 0, 0 0, -28% 100%, 0 100%);
  transition: opacity 700ms var(--ease-slow), clip-path 1100ms var(--ease-slow);
}
.reveal-row.is-in {
  opacity: 1;
  clip-path: polygon(0 0, 128% 0, 100% 100%, 0 100%);
}

.reveal-seal {
  opacity: 0;
  transform: scale(1.45) rotate(-11deg);
  transition: opacity 420ms var(--ease-slow), transform 720ms var(--ease-press);
}
.reveal-seal.is-in { opacity: 1; transform: scale(1) rotate(0deg); }

.reveal-d1 { transition-delay: 110ms; }
.reveal-d2 { transition-delay: 220ms; }
.reveal-d3 { transition-delay: 330ms; }
.reveal-d4 { transition-delay: 440ms; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-6) var(--sp-5); }
  .hero-grid { gap: var(--sp-6); }
  .author-grid { grid-template-columns: 250px minmax(0, 1fr); gap: var(--sp-6); }
}

@media (max-width: 900px) {
  :root { --sp-9: 4.4rem; --sp-8: 3.2rem; }
  .header-inner { gap: var(--sp-3); }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--bg);
    border-top: var(--rule);
    border-bottom: 1px solid var(--accent-200);
    box-shadow: var(--sh-3);
    padding: var(--sp-4) var(--sp-5) var(--sp-5);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list li { border-bottom: var(--rule); }
  .nav-list li:last-child { border-bottom: 0; }
  .nav-list a { display: block; padding: 0.85rem 0; font-size: var(--fs-md); }
  .header-cta { display: none; }
  .hero-grid, .how-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { max-width: 520px; margin-inline: auto; }
  .hero-figure .seal { left: -14px; bottom: 24px; }
  .arch img { aspect-ratio: 3 / 2; }
  .author-grid { grid-template-columns: minmax(0, 1fr); }
  .author-portrait { max-width: 300px; }
}

@media (max-width: 640px) {
  :root { --sp-9: 3.6rem; --sp-8: 2.8rem; --sp-7: 2.2rem; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .figure-note { position: static; max-width: none; margin-top: var(--sp-4); }
  .step { grid-template-columns: 58px 1fr; gap: var(--sp-3); }
  .step-num { width: 58px; height: 58px; font-size: 1.2rem; }
  .step:not(:last-child)::before { left: 28px; top: 50px; }
  .fact-card dl { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .fact-card dd { margin-bottom: var(--sp-3); }
  .base-bar { justify-content: flex-start; }
  .metric-strip { padding: var(--sp-5) var(--sp-4); }
  .quote-attr { flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .wrap { padding-inline: var(--sp-4); }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
}

@media (min-width: 1440px) {
  :root { --maxw: 1260px; }
}

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .hero-actions, .form-panel { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-row, .reveal-seal {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
}

/* ==========================================================================
   Cellar & Club, the magazine
   Same tokens, same typefaces, same vineyard geometry as the rest of the site.
   ========================================================================== */

.mag-page .site-header { border-bottom-color: var(--accent-200); }
.mag-dot {
  display: inline-block;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 0.55rem;
}

/* ---------- magazine index ---------- */
.mag-index-head { padding-bottom: var(--sp-5); }
.mag-index-head h1 {
  font-size: clamp(2.4rem, 6vw, var(--fs-4xl));
  max-width: 14ch;
  margin-bottom: var(--sp-4);
}
.mag-index-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.16rem, 2.3vw, var(--fs-lg));
  line-height: 1.42;
  color: var(--primary);
  max-width: 46ch;
  margin: 0 0 var(--sp-4);
}
.mag-index-note {
  color: var(--muted);
  font-size: var(--fs-sm);
  max-width: 64ch;
  margin: 0;
  padding-top: var(--sp-4);
  border-top: var(--rule-gold);
}
.mag-index-section { padding-top: var(--sp-7); }

.mag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6) var(--sp-5);
}

.mag-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-1);
  transition: transform 480ms var(--ease-slow), box-shadow 480ms var(--ease-slow),
              border-color 480ms var(--ease-slow);
}
.mag-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-2);
  border-color: var(--accent-200);
}
.mag-card-media {
  position: relative;
  overflow: hidden;
  background: var(--stone-100);
}
.mag-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(114deg,
    rgba(107, 31, 49, 0.10) 0 1px, transparent 1px 30px);
  opacity: 0.5;
}
.mag-card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 900ms var(--ease-slow);
}
.mag-card:hover .mag-card-media img { transform: scale(1.035); }
.mag-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5);
  flex: 1;
}
.mag-card-angle {
  margin: 0;
  font-size: var(--fs-xs);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent-600);
}
.mag-card-title {
  font-size: var(--fs-lg);
  line-height: 1.2;
  margin: 0;
}
.mag-card-title a { color: var(--ink); text-decoration: none; }
.mag-card-title a:hover { color: var(--primary); text-decoration: underline; }
.mag-card-dek {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.62;
}
.mag-card-meta {
  margin: auto 0 0;
  padding-top: var(--sp-3);
  border-top: var(--rule);
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* the lead card takes the full row and reads as the cover story */
.mag-card.lead {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
  border-color: var(--accent-200);
  box-shadow: var(--sh-2);
}
.mag-card.lead .mag-card-media { flex: 0 0 56%; }
.mag-card.lead .mag-card-media img { height: 100%; aspect-ratio: auto; min-height: 340px; }
.mag-card.lead .mag-card-body {
  justify-content: center;
  padding: var(--sp-7);
  gap: var(--sp-3);
}
.mag-card.lead .mag-card-title { font-size: clamp(1.6rem, 2.9vw, var(--fs-2xl)); }
.mag-card.lead .mag-card-dek { font-size: var(--fs-md); color: var(--ink-soft); }

.mag-index-cta { margin: var(--sp-7) 0 0; text-align: center; }

/* ---------- article page ---------- */
.mag-top { padding-top: var(--sp-7); }
.mag-crumbs .crumbs { margin-bottom: var(--sp-5); }
.mag-head { max-width: none; }
.mag-title {
  font-size: clamp(2.05rem, 4.4vw, var(--fs-3xl));
  max-width: 24ch;
  margin-bottom: var(--sp-4);
}
.mag-standfirst {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.1vw, var(--fs-lg));
  line-height: 1.48;
  color: var(--primary);
  max-width: 58ch;
  margin: 0 0 var(--sp-5);
}
.mag-byline {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  border-top: var(--rule-gold);
  border-bottom: var(--rule);
  max-width: 62ch;
}
.mag-byline-face {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--accent-200);
}
.mag-byline-text { margin: 0; font-size: var(--fs-sm); }
.mag-byline-text a { color: var(--primary); text-decoration: none; }
.mag-byline-text a:hover { text-decoration: underline; }
.mag-byline-meta {
  display: inline-block;
  margin-top: 0.16rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.mag-figure { margin: var(--sp-6) 0 0; }
.mag-figure-frame {
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--stone-200);
  box-shadow: var(--sh-3);
  position: relative;
}
.mag-figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(42, 11, 20, 0.16));
}
.mag-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-figure figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  color: var(--ink-faint);
  max-width: 70ch;
}

.mag-body-wrap { padding-block: var(--sp-7) var(--sp-8); }

/* body typography: a measure of 64 to 75 characters and a slow vertical rhythm */
.mag-body {
  max-width: 68ch;
  font-size: var(--fs-md);
  line-height: 1.78;
  color: var(--ink-soft);
}
.mag-body > p { margin: 0 0 var(--sp-5); max-width: 72ch; }
.mag-body h2 {
  font-size: clamp(1.5rem, 2.7vw, var(--fs-xl));
  line-height: 1.22;
  color: var(--ink);
  margin: var(--sp-8) 0 var(--sp-4);
  padding-top: var(--sp-4);
  border-top: var(--rule-gold);
}
.mag-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.mag-body h3 {
  font-size: var(--fs-lg);
  color: var(--primary);
  margin: var(--sp-6) 0 var(--sp-3);
}
.mag-body ul, .mag-body ol { margin: 0 0 var(--sp-5); padding-left: 1.35rem; max-width: 70ch; }
.mag-body li { margin-bottom: var(--sp-3); }
.mag-body li::marker { color: var(--accent-600); }
.mag-body blockquote {
  margin: var(--sp-6) 0;
  padding: var(--sp-4) 0 var(--sp-4) var(--sp-5);
  border-left: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  line-height: 1.45;
  color: var(--primary);
}
.mag-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-sm);
}
.mag-body th, .mag-body td {
  text-align: left;
  padding: var(--sp-3);
  border-bottom: var(--rule);
}
.mag-body th {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--primary);
  border-bottom: 1px solid var(--accent-200);
}
.mag-body a { color: var(--primary); text-underline-offset: 3px; }

.inline-read {
  margin: var(--sp-6) 0;
  padding: var(--sp-4) var(--sp-5);
  background: var(--accent-050);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  color: var(--accent-700);
  max-width: 70ch;
}
.inline-read a {
  font-family: var(--font-display);
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-200);
}
.inline-read a:hover { border-bottom-color: var(--primary); }

/* ---------- call to action after the body ---------- */
.mag-cta {
  position: relative;
  max-width: 72ch;
  margin: var(--sp-8) 0 0;
  padding: var(--sp-7) var(--sp-6);
  background: var(--primary-900);
  color: #FFF6EC;
  border-radius: var(--r-md);
  border: 1px solid var(--primary-800);
  overflow: hidden;
}
.mag-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(114deg,
    rgba(176, 141, 63, 0.16) 0 1px, transparent 1px 32px);
}
.mag-cta > * { position: relative; }
.mag-cta h2 {
  color: #FFF6EC;
  font-size: var(--fs-xl);
  margin: var(--sp-4) 0 var(--sp-3);
}
.mag-cta p { color: color-mix(in srgb, var(--stone-100) 84%, transparent); font-size: var(--fs-sm); }
.mag-cta .seal { margin: 0; }
.mag-cta-action { margin: var(--sp-5) 0 0; }
.mag-cta .btn-primary { background: var(--accent); color: var(--primary-900); border-color: var(--accent); }
.mag-cta .btn-primary:hover { background: var(--accent-200); color: var(--primary-900); }
.mag-cta :focus-visible { outline-color: var(--accent-200); }

/* ---------- author box ---------- */
.mag-author {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: var(--sp-5);
  align-items: start;
  max-width: 72ch;
  margin: var(--sp-7) 0 0;
  padding: var(--sp-6);
  background: var(--stone-050);
  border: var(--rule);
  border-top: 2px solid var(--accent);
  border-radius: var(--r-md);
}
.mag-author img {
  width: 108px; height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--stone-200);
}
.mag-author-body p { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 var(--sp-3); }
.mag-author-name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  color: var(--ink);
  letter-spacing: 0.02em;
}
.mag-author-link { margin-bottom: 0; }
.mag-author-link a { font-family: var(--font-display); }

/* ---------- read also ---------- */
.mag-related {
  background: var(--stone-100);
  border-top: var(--rule);
  padding-block: var(--sp-8);
}
.mag-related-title {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-3);
  border-bottom: var(--rule-gold);
}
.mag-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
.rel-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: transform 420ms var(--ease-slow), border-color 420ms var(--ease-slow);
}
.rel-card:hover { transform: translateY(-3px); border-color: var(--accent-200); }
.rel-media { background: var(--stone-200); }
.rel-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.rel-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.rel-title { font-size: var(--fs-md); line-height: 1.24; margin: 0; }
.rel-title a { color: var(--ink); text-decoration: none; }
.rel-title a:hover { color: var(--primary); text-decoration: underline; }
.rel-dek {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.58;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rel-meta {
  margin: auto 0 0;
  padding-top: var(--sp-3);
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.mag-related-more { margin: var(--sp-6) 0 0; }
.mag-related-more a { font-family: var(--font-display); font-size: var(--fs-md); }

/* ---------- the magazine teaser on the home page ---------- */
.mag-teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-5);
}
.mag-teaser-more { margin: var(--sp-7) 0 0; text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .mag-grid, .mag-related-grid, .mag-teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mag-card.lead .mag-card-media { flex-basis: 48%; }
  .mag-card.lead .mag-card-body { padding: var(--sp-6); }
}

@media (max-width: 760px) {
  .mag-grid, .mag-related-grid, .mag-teaser-grid { grid-template-columns: minmax(0, 1fr); }
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-card-media { flex: none; }
  .mag-card.lead .mag-card-media img { aspect-ratio: 3 / 2; min-height: 0; }
  .mag-card.lead .mag-card-body { padding: var(--sp-5); }
  .mag-body { font-size: var(--fs-base); }
  .mag-cta { padding: var(--sp-6) var(--sp-5); }
  .mag-cta .btn { width: 100%; }
  .mag-author { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); padding: var(--sp-5); }
  .mag-author img { width: 84px; height: 84px; }
}

@media (max-width: 420px) {
  .mag-top { padding-top: var(--sp-6); }
  .mag-byline { flex-wrap: wrap; gap: var(--sp-3); }
  .mag-byline-meta { letter-spacing: 0.05em; }
  .mag-figure img, .mag-card-media img { aspect-ratio: 4 / 3; }
  .mag-body-wrap { padding-block: var(--sp-6) var(--sp-7); }
  .mag-body h2 { margin-top: var(--sp-7); }
  .mag-card-body, .rel-body { padding: var(--sp-4); }
  .inline-read { padding: var(--sp-3) var(--sp-4); }
  .mag-index-cta .btn { width: 100%; }
}

/* published article list on the author page */
.pub-list { list-style: none; padding: 0; margin: 0 0 var(--sp-5); }
.pub-list li {
  padding: var(--sp-3) 0;
  border-bottom: var(--rule);
  margin-bottom: 0;
}
.pub-list li:first-child { border-top: var(--rule-gold); }
.pub-list a { font-family: var(--font-display); font-size: var(--fs-md); text-decoration: none; }
.pub-list a:hover { text-decoration: underline; }
.pub-meta {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}



/* Network strip: five sibling products, rotated so every site is linked the same
   number of times. Spans the full footer grid rather than adding a fifth column,
   because each footer declares a fixed column count and a fifth item would wrap. */
.site-network { grid-column: 1 / -1; flex-basis: 100%; width: 100%;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.site-network h2 { font: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.7rem; opacity: 0.72; }
.site-network ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-network li + li { margin-top: 0; }
.site-network a { font-size: 0.86rem; text-decoration: none; opacity: 0.9;
  border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 620px) { .site-network ul { gap: 0.45rem 1.1rem; } }


/* Decorative bleed guard. Several sections intentionally hang a rotated or offset
   pseudo element past the viewport edge. overflow-x: clip contains them without
   creating a scroll container, so position: sticky keeps working, unlike overflow
   hidden. Genuine content overflow is still reported by the element level check in
   the browser pass. */
html { overflow-x: clip; }
body { overflow-x: clip; }


/* Wide content on phones. Class names for the prose wrapper differ from site to site,
   so this targets tables and pre blocks directly: they scroll inside their own box
   rather than pushing cells past the right edge, per the build contract. */
@media (max-width: 700px) {
  table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { overflow-wrap: anywhere; }
  pre { overflow-x: auto; max-width: 100%; }
}
