/* ============================================================
   Mainmade Studio — styles.css (v2 "Atelier, louder")
   Fraunces (display) · Inter (body) · IBM Plex Mono (labels)
   Cream / Ink / Awning Green / Brass  ·  no build step
   ============================================================ */

:root {
  /* ---- fixed brand colours: identical in both themes ----
     --cream and --ink are the literal inks used ON green and ON brass,
     so they must never follow the theme. Page surfaces use the
     semantic tokens below instead. */
  --green: #1E4034;
  --green-deep: #16332A;
  --green-black: #0F241D;
  --cream: #FAF6EF;
  --ink: #1C1B18;
  --brass: #B8862D;
  --brass-soft: #D4AF5E;
  --cream-on-green: rgba(250, 246, 239, 0.84);
  --cream-dim-on-green: rgba(250, 246, 239, 0.65);
  --hairline-on-green: rgba(250, 246, 239, 0.14);

  /* ---- semantic tokens: these flip with the theme ---- */
  --bg: #FAF6EF;            /* page background */
  --bg-soft: #F4EDE0;       /* tinted sections */
  --fg: #1C1B18;            /* body text */
  --surface: #FFFFFF;       /* cards, inputs */
  --border: #E3DCCB;
  --muted: #6B675E;
  --brass-text: #8A6114;    /* brass legible at small sizes (5.1:1 on cream) */
  --tint: #F4EBD9;          /* warm accent cell */
  --tint-border: #EADFC6;
  --input-hover: #CFC5AC;
  --danger: #C2402A;
  --prose-text: #3D3B36;
  --cell-ink-bg: #1C1B18;   /* the dark bento cell */
  --footer-bg: #0F241D;
  --frame-bg: #FFFFFF;      /* iframe/preview backing, stays white */
  --header-bg: rgba(250, 246, 239, 0.86);
  --grain-blend: multiply;
  --grain-opacity: 0.05;
  --cream-soft: var(--bg-soft); /* legacy alias */

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --wrap: 1200px;
  --r-btn: 6px;
  --r-card: 12px;
  --header-h: 72px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 24px 48px -24px rgba(28, 27, 24, 0.18);
  --shadow-deep: 0 40px 80px -32px rgba(15, 36, 29, 0.45);
}

/* ---------- Dark theme ----------
   Applied when the visitor's system prefers dark (unless they have
   explicitly chosen light), or when they pick dark with the toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101C17;
    --bg-soft: #16241E;
    --fg: #EFE9DE;
    --surface: #18271F;
    --border: #2B3B33;
    --muted: #9EAAA1;
    --brass-text: #D4AF5E;
    --tint: #1F2E25;
    --tint-border: #2E4034;
    --input-hover: #3C4F44;
    --danger: #E8705A;
    --prose-text: #CFC8BC;
    --cell-ink-bg: #22312A;
    --footer-bg: #0B1611;
    --header-bg: rgba(16, 28, 23, 0.88);
    --grain-blend: overlay;
    --grain-opacity: 0.035;
    --shadow-card: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
    --shadow-deep: 0 40px 80px -32px rgba(0, 0, 0, 0.75);
  }
}
:root[data-theme="dark"] {
  --bg: #101C17;
  --bg-soft: #16241E;
  --fg: #EFE9DE;
  --surface: #18271F;
  --border: #2B3B33;
  --muted: #9EAAA1;
  --brass-text: #D4AF5E;
  --tint: #1F2E25;
  --tint-border: #2E4034;
  --input-hover: #3C4F44;
  --danger: #E8705A;
  --prose-text: #CFC8BC;
  --cell-ink-bg: #22312A;
  --footer-bg: #0B1611;
  --header-bg: rgba(16, 28, 23, 0.88);
  --grain-blend: overlay;
  --grain-opacity: 0.035;
  --shadow-card: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  --shadow-deep: 0 40px 80px -32px rgba(0, 0, 0, 0.75);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
::selection { background: var(--brass); color: var(--cream); }

/* film grain over everything */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.h-display { font-size: clamp(46px, 6.2vw, 84px); line-height: 1.05; }
h2, .h-section { font-size: clamp(34px, 5vw, 64px); line-height: 1.06; }
h3 { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.28; }
h1 em, h2 em, h3 em, .vow em {
  font-style: italic;
  line-height: 1;
  padding-bottom: 0.07em;
}
.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.65; color: var(--muted); max-width: 56ch; }
.eyebrow {
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-text);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--brass);
}
.on-green .eyebrow { color: var(--brass-soft); }
.on-green .eyebrow::before { background: var(--brass-soft); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 4vw, 36px); }
/* adjacent sections each contribute this, so the visible gap is double it:
   152px was producing 304px of empty space between every section */
section { padding-block: clamp(64px, 7.5vw, 104px); position: relative; }
.section-head { max-width: 820px; margin-bottom: clamp(44px, 6vw, 80px); }
.section-head p { margin-top: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 600 15px/1 var(--font-body);
  padding: 17px 32px;
  border-radius: var(--r-btn);
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out),
              border-color 140ms var(--ease-out), transform 140ms var(--ease-out),
              box-shadow 140ms var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--green); color: var(--cream); }
.btn-primary:hover { background: var(--green-deep); box-shadow: 0 12px 28px -14px rgba(30, 64, 52, 0.55); }
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: var(--brass-soft); box-shadow: 0 12px 28px -12px rgba(184, 134, 45, 0.55); }
.btn-ghost { background: transparent; border: 1.5px solid rgba(250, 246, 239, 0.38); color: var(--cream); padding: 15.5px 30.5px; }
.btn-ghost:hover { border-color: rgba(250, 246, 239, 0.9); background: rgba(250, 246, 239, 0.06); }
.btn-outline { background: transparent; border: 1.5px solid var(--fg); color: var(--fg); padding: 15.5px 30.5px; }
.btn-outline:hover { background: var(--fg); color: var(--bg); }

a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--ink); color: var(--cream);
  padding: 10px 18px; border-radius: var(--r-btn); text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out),
              backdrop-filter 240ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.36em;
  font: 600 25px/1 var(--font-display);
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: color 240ms var(--ease-out);
}
/* The awning. Canopy is currentColor so the mark follows the wordmark onto the green hero
   and into dark theme; only the brass bays are pinned to a token. */
.wordmark__mark { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.wordmark__mark .bay { fill: var(--brass); }
/* The brass period is the mark: a finished sentence, a shipped site. It is deliberately
   NOT followed by a TLD — a wordmark reading "mainmade.studio" sends anyone who types
   what they see to a domain we do not own. Fraunces' period at 25px is ~2px wide, so
   size it up rather than tightening spacing. */
.wordmark .dot { color: var(--brass); font-size: 1.25em; line-height: 0; }
/* header sits over the green hero until scroll */
.header-on-hero:not(.scrolled) { color: var(--cream); }
.header-on-hero:not(.scrolled) .site-nav a:not(.btn) { color: var(--cream); }
.header-on-hero:not(.scrolled) .wordmark .dot { color: var(--brass-soft); }
.header-on-hero:not(.scrolled) .wordmark__mark .bay { fill: var(--brass-soft); }
.header-on-hero:not(.scrolled) .btn-primary { background: var(--brass); color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav a:not(.btn) {
  font: 500 15px/1 var(--font-body);
  text-decoration: none;
  color: var(--fg);
  position: relative;
  transition: color 240ms var(--ease-out);
}
.site-nav a:not(.btn)::after {
  content: '';
  position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease-out);
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.site-nav .btn { padding: 12px 22px; }
@media (max-width: 800px) {
  .site-nav a:not(.btn) { display: none; }
}

/* theme toggle */
.theme-toggle {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}
.theme-toggle:hover { background: var(--surface); border-color: var(--input-hover); }
.header-on-hero:not(.scrolled) .theme-toggle {
  border-color: rgba(250, 246, 239, 0.32);
}
.header-on-hero:not(.scrolled) .theme-toggle:hover {
  background: rgba(250, 246, 239, 0.08);
  border-color: rgba(250, 246, 239, 0.7);
}
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
/* show the icon for the theme you would switch TO */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 700px at 82% -10%, rgba(212, 175, 94, 0.16), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(15, 36, 29, 0.9), transparent 60%),
    var(--green);
  color: var(--cream);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--header-h) + 24px) clamp(120px, 14vw, 168px);
}
.hero .wrap {
  position: relative; z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero h1 { color: var(--cream); }
.hero h1 em { color: var(--brass-soft); }
.hero .lead { color: var(--cream-on-green); margin-top: 26px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 42px; }
.hero-mark {
  position: absolute;
  right: -4vw;
  bottom: -34vw;
  font: 600 52vw/1 var(--font-display);
  color: var(--brass-soft);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* hero preview stack */
.hero-stage { position: relative; z-index: 1; min-height: 480px; }
.shot {
  position: absolute;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  border: 1px solid rgba(250, 246, 239, 0.12);
  will-change: transform;
}
.shot-a { width: 78%; top: 4%; left: 0; transform: rotate(-2.4deg); z-index: 2; }
.shot-b { width: 62%; right: -2%; bottom: 0; transform: rotate(2.2deg); z-index: 3; }
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-stage { min-height: 0; height: clamp(300px, 48vw, 420px); margin-top: 8px; }
  .shot-a { width: 58%; }
  .shot-b { width: 46%; }
  .hero-stage .mini { font-size: clamp(8px, 1.4vw, 13px); }
}
@media (max-width: 560px) {
  .hero { padding-bottom: 48px; }
  .hero-stage { height: 300px; }
  .shot-a { width: 76%; }
  .shot-b { width: 60%; }
  .hero-stage .mini { font-size: clamp(8px, 2.1vw, 12px); }
}

/* ---------- Mini site previews (real composed components) ---------- */
.mini {
  display: flex;
  flex-direction: column;
  aspect-ratio: 4 / 2.9;
  font-size: clamp(8px, 0.85vw, 10px);
}
.mini-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2em 1.6em;
}
.mini-logo { font: 600 1.5em/1 var(--font-display); letter-spacing: -0.01em; }
.mini-links { display: flex; gap: 1em; }
.mini-links i { display: block; width: 2.6em; height: 0.5em; border-radius: 99px; background: currentColor; opacity: 0.28; }
.mini-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 1.6em 1.2em; }
.mini-kicker { font: 500 0.72em/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.62; }
.mini-title { font: 600 2.6em/1.06 var(--font-display); letter-spacing: -0.015em; margin-top: 0.35em; max-width: 12ch; }
.mini-title em { font-style: italic; }
.mini-cta {
  display: inline-block; width: max-content;
  font: 600 0.8em/1 var(--font-body);
  padding: 0.9em 1.6em; border-radius: 0.45em;
  margin-top: 1.4em;
}
.mini-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7em; padding: 0 1.6em 1.6em; }
.mini-cell { height: 4.2em; border-radius: 0.6em; }

/* bakery: warm rust */
.mini-bakery { background: #FBF3E8; color: #2A1D14; }
.mini-bakery .mini-title em { color: #B4532A; }
.mini-bakery .mini-cta { background: #B4532A; color: #FBF3E8; }
.mini-bakery .mini-cell { background: linear-gradient(145deg, #E9CDA8, #D9A16B); }
.mini-bakery .mini-cell:nth-child(2) { background: linear-gradient(145deg, #B4532A, #8E3C1D); }
.mini-bakery .mini-cell:nth-child(3) { background: linear-gradient(145deg, #F0E2CC, #E4CBA4); }

/* barber: ink and brass */
.mini-barber { background: #14120F; color: #F3EEE4; }
.mini-barber .mini-title em { color: #D4AF5E; }
.mini-barber .mini-cta { background: #D4AF5E; color: #14120F; }
.mini-barber .mini-cell { background: linear-gradient(145deg, #2A2620, #1C1915); }
.mini-barber .mini-cell:nth-child(2) { background: linear-gradient(145deg, #D4AF5E, #A9832F); }
.mini-barber .mini-cell:nth-child(3) { background: linear-gradient(145deg, #3A342B, #242019); }

/* cafe: deep green */
.mini-cafe { background: #1E4034; color: #FAF6EF; }
.mini-cafe .mini-title em { color: #D4AF5E; }
.mini-cafe .mini-cta { background: #FAF6EF; color: #1E4034; }
.mini-cafe .mini-cell { background: linear-gradient(145deg, #2C5546, #1A382D); }
.mini-cafe .mini-cell:nth-child(2) { background: linear-gradient(145deg, #D4AF5E, #B8862D); }
.mini-cafe .mini-cell:nth-child(3) { background: linear-gradient(145deg, #35604F, #223F34); }

/* ---------- Stats band: card overlapping the hero edge ---------- */
.stats {
  padding-block: 0;
  margin-top: clamp(-92px, -7vw, -60px);
  /* balance the 90px of green above the card with cream below it,
     otherwise its shadow butts straight into the next section */
  margin-bottom: clamp(48px, 5vw, 64px);
  position: relative;
  z-index: 5;
}
.stats-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.stat { padding: clamp(30px, 3.4vw, 44px) clamp(20px, 2.4vw, 32px); border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat b {
  display: block;
  font: 600 clamp(32px, 3.6vw, 48px)/1.05 var(--font-display);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.stat b::after {
  content: '';
  display: block;
  width: 22px; height: 2px;
  background: var(--brass);
  margin-top: 16px;
}
.stat span {
  display: block;
  margin-top: 14px;
  font: 500 12px/1.5 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 760px) {
  .stats-card { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
}

/* ---------- Manifesto ---------- */
.manifesto {
  padding-block: clamp(76px, 9vw, 124px);
  background:
    radial-gradient(900px 600px at 88% -20%, rgba(212, 175, 94, 0.18), transparent 60%),
    var(--green);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.manifesto .wrap { max-width: 1020px; position: relative; z-index: 1; }
/* oversized quotation mark as a ground device */
.manifesto::before {
  content: '\201C';
  position: absolute;
  top: -0.3em; right: 3vw;
  font: 600 clamp(280px, 34vw, 520px)/1 var(--font-display);
  color: var(--brass-soft);
  opacity: 0.13;
  pointer-events: none;
  user-select: none;
}
.manifesto-text {
  font: 600 clamp(28px, 4vw, 52px)/1.28 var(--font-display);
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--cream);
}
.manifesto-text .w { opacity: 0.24; transition: opacity 120ms linear; }
.manifesto-text .w.lit { opacity: 1; }
.manifesto-text em { color: var(--brass-soft); }
.manifesto-foot {
  margin-top: 44px;
  padding-top: 30px;
  border-top: 1px solid var(--hairline-on-green);
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--cream-on-green);
  max-width: 52ch;
}
.manifesto-foot strong { color: var(--cream); font-weight: 600; }

/* ---------- Marquee ---------- */
.marquee {
  padding-block: clamp(28px, 3.5vw, 44px);
  border-block: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; align-items: baseline; will-change: transform; }
.marquee-track span {
  font: 600 clamp(30px, 4.5vw, 60px)/1 var(--font-display);
  letter-spacing: -0.015em;
  padding-right: 0.55em;
}
.marquee-track span i { font-style: normal; color: var(--brass); padding-left: 0.55em; }
.marquee-track em { color: var(--muted); font-style: italic; }

/* ---------- Work ---------- */
.work { border-bottom: 1px solid var(--border); }
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 36px);
  row-gap: clamp(36px, 4.5vw, 56px);
}
.work-card { text-decoration: none; display: block; }
.work-frame {
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(28, 27, 24, 0.02);
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.work-frame img {
  width: 100%;
  /* the width/height HTML attributes map to CSS height as a presentational
     hint; without this the fixed height makes aspect-ratio inert */
  height: auto;
  aspect-ratio: 10 / 7;
  object-fit: cover;
  object-position: top;
  background: var(--cream-soft);
  transition: transform 400ms var(--ease-out);
}
.work-card:hover .work-frame {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}
.work-card:hover .work-frame img { transform: scale(1.03); }
.work-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 4px 0; }
.work-meta b { font: 600 17px/1.4 var(--font-body); }
.work-meta span { font: 500 12px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.work-note { margin-top: 40px; font-size: 15px; color: var(--muted); max-width: 64ch; }
.work-note a { color: var(--fg); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--brass); padding-bottom: 2px; }
.work-note a:hover { border-bottom-color: var(--fg); }
@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
}

/* ---------- Process ---------- */
/* two-column process: sticky photograph beside the steps */
.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: start;
}
.process-media {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-deep);
  background: var(--green-deep);
}
.process-media img { width: 100%; height: 100%; object-fit: cover; }
.process-badge {
  position: absolute;
  left: 0; bottom: 0;
  background: var(--green);
  color: var(--cream);
  padding: 22px 26px 20px;
  border-top-right-radius: var(--r-card);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.process-badge b { font: 600 clamp(40px, 4.6vw, 58px)/1 var(--font-display); color: var(--brass-soft); }
.process-badge span {
  font: 500 11.5px/1.35 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-on-green);
}
.process-body .section-head { margin-bottom: clamp(28px, 3.5vw, 44px); }
@media (max-width: 900px) {
  .process-grid { grid-template-columns: 1fr; }
  .process-media { position: static; aspect-ratio: 16 / 10; max-height: 340px; }
  .process-body .section-head { margin-top: 8px; }
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: clamp(18px, 2.5vw, 28px);
  padding-block: clamp(28px, 3.4vw, 40px);
  border-top: 1px solid var(--border);
  align-items: start;
}
.step:last-of-type { border-bottom: 1px solid var(--border); }
.step-num {
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--brass-text);
  padding-top: 9px;
}
.step h3 { font-size: clamp(21px, 2.2vw, 27px); margin-bottom: 10px; }
.step p { color: var(--muted); max-width: 52ch; font-size: clamp(15px, 1.3vw, 16.5px); }
@media (max-width: 560px) {
  .step { grid-template-columns: 1fr; gap: 8px; }
  .step-num { padding-top: 0; }
}

/* ---------- Includes bento ---------- */
.includes { background: var(--cream-soft); border-block: 1px solid var(--border); }
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: clamp(18px, 2.5vw, 28px);
}
.cell {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.cell:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.cell h3 { font-size: 21px; }
.cell p { font-size: 15px; color: var(--muted); max-width: 40ch; line-height: 1.55; }
.cell-hero {
  grid-column: span 2;
  grid-row: span 2;
  background:
    radial-gradient(700px 420px at 90% -20%, rgba(212, 175, 94, 0.22), transparent 60%),
    var(--green);
  border-color: var(--green);
  justify-content: space-between;
  min-height: 400px;
  padding: clamp(36px, 3.5vw, 48px);
}
.cell-hero h3 { color: var(--cream); font-size: clamp(28px, 3.2vw, 40px); max-width: 14ch; }
.cell-hero h3 em { color: var(--brass-soft); }
.cell-hero p { color: var(--cream-on-green); font-size: 15.5px; }
.cell-hero .cell-mark { font: 600 clamp(56px, 6vw, 84px)/1 var(--font-display); color: var(--brass-soft); }
.cell-tint { background: var(--tint); border-color: var(--tint-border); }
.cell-ink { background: var(--cell-ink-bg); border-color: var(--cell-ink-bg); }
.cell-ink b { font: 600 clamp(40px, 4vw, 54px)/1 var(--font-display); letter-spacing: -0.01em; color: var(--brass-soft); }
.cell-ink h3 { color: var(--cream); }
.cell-ink p { color: rgba(250, 246, 239, 0.6); }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .cell-hero { grid-column: span 2; grid-row: span 1; min-height: 300px; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .cell-hero { grid-column: span 1; }
}

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.5vw, 28px);
  align-items: stretch;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: clamp(30px, 3.5vw, 48px);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.plan-featured {
  background:
    radial-gradient(600px 380px at 100% -10%, rgba(212, 175, 94, 0.18), transparent 55%),
    var(--green);
  border-color: var(--green);
  color: var(--cream);
}
.plan-featured:hover { box-shadow: var(--shadow-deep); }
.plan-name {
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; justify-content: space-between;
}
.plan-featured .plan-name { color: var(--cream-dim-on-green); }
.plan-badge {
  font: 600 12px/1 var(--font-body);
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--brass-soft);
  padding: 7px 12px;
  border-radius: 999px;
  text-transform: none;
}
.plan-price {
  font: 600 clamp(52px, 5.5vw, 72px)/1 var(--font-display);
  margin-top: 22px;
  letter-spacing: -0.02em;
}
.plan-price small {
  font: 500 16px/1 var(--font-mono);
  color: var(--muted);
  margin-left: 8px;
  letter-spacing: 0;
}
.plan-featured .plan-price small { color: var(--cream-on-green); }
.plan-tag { margin-top: 12px; font-size: 15px; color: var(--muted); }
.plan-featured .plan-tag { color: var(--cream-on-green); }
.plan ul { list-style: none; margin: 28px 0 36px; display: grid; gap: 12px; }
.plan li { font-size: 15px; padding-left: 26px; position: relative; }
.plan li::before {
  content: '';
  position: absolute; left: 0; top: 0.6em;
  width: 13px; height: 2px;
  background: var(--brass);
}
.plan-featured li::before { background: var(--brass-soft); }
.plan .btn { margin-top: auto; }
.plan-featured .btn-primary { background: var(--brass); color: var(--ink); }
.plan-featured .btn-primary:hover { background: var(--brass-soft); }
.plan-custom {
  margin-top: clamp(18px, 2.5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: clamp(28px, 3vw, 40px) clamp(30px, 3.5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.plan-custom h3 { font-size: clamp(22px, 2.4vw, 27px); }
.plan-custom p { color: var(--muted); margin-top: 8px; max-width: 52ch; }
.pricing-note { margin-top: 30px; font-size: 14px; color: var(--muted); max-width: 70ch; }
@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
}

/* ---------- Ownership ---------- */
.ownership { border-top: 1px solid var(--border); }
.ownership .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.ownership h2 { max-width: 13ch; }
.ownership .lead { margin-top: 26px; }
.ownership-link {
  display: inline-block;
  margin-top: 30px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 2px solid var(--brass);
  padding-bottom: 3px;
  transition: border-color 140ms var(--ease-out);
}
.ownership-link:hover { border-bottom-color: var(--fg); }
.vow {
  background:
    radial-gradient(560px 360px at 100% 0%, rgba(212, 175, 94, 0.2), transparent 55%),
    var(--green);
  border-radius: var(--r-card);
  padding: clamp(44px, 5vw, 72px) clamp(34px, 4vw, 56px);
  color: var(--cream);
  box-shadow: var(--shadow-deep);
  transform: rotate(-1.2deg);
}
.vow blockquote { font: 600 clamp(28px, 3.2vw, 42px)/1.22 var(--font-display); letter-spacing: -0.01em; }
.vow blockquote em { color: var(--brass-soft); }
.vow figcaption {
  margin-top: 26px;
  font: 500 12px/1.5 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim-on-green);
}
@media (max-width: 820px) {
  .ownership .wrap { grid-template-columns: 1fr; }
  .vow { transform: rotate(0deg); }
}

/* ---------- FAQ ---------- */
.faq { background: var(--cream-soft); border-top: 1px solid var(--border); }
.faq .wrap {
  max-width: var(--wrap);
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.faq .section-head {
  position: sticky;
  top: calc(var(--header-h) + 40px);
  margin-bottom: 0;
}
.faq .section-head p { color: var(--muted); font-size: 16px; max-width: 34ch; }
@media (max-width: 900px) {
  .faq .wrap { grid-template-columns: 1fr; }
  .faq .section-head { position: static; margin-bottom: 36px; }
}
.faq details { border-top: 1px solid var(--border); }
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 4px;
  font: 600 clamp(17px, 1.9vw, 21px)/1.4 var(--font-body);
  /* summary does not reliably inherit colour through the UA styles,
     so set it explicitly or it keeps the light-theme ink in dark mode */
  color: var(--fg);
  cursor: pointer;
  transition: color 140ms var(--ease-out);
}
.faq summary:hover { color: var(--brass-text); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font: 400 26px/1 var(--font-display);
  color: var(--brass);
  flex-shrink: 0;
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 28px; color: var(--muted); max-width: 62ch; }

/* ---------- Final CTA ---------- */
.cta-final {
  padding-block: clamp(88px, 10vw, 136px);
  background:
    radial-gradient(1200px 800px at 50% 130%, rgba(212, 175, 94, 0.2), transparent 60%),
    var(--green);
  color: var(--cream);
  overflow: hidden;
  text-align: center;
}
.cta-final h2 { color: var(--cream); font-size: clamp(40px, 6vw, 80px); max-width: 16ch; margin-inline: auto; }
.cta-final h2 em { color: var(--brass-soft); }
.cta-final .lead { color: var(--cream-on-green); margin: 26px auto 0; }
.cta-final .btn { margin-top: 44px; }
.cta-final .cta-sub {
  display: block;
  margin-top: 22px;
  font: 500 12px/1.6 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim-on-green);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--cream);
  padding-top: clamp(56px, 7vw, 88px);
  overflow: hidden;
}
.site-footer.slim { padding-top: 10px; }
.site-footer.slim a { color: inherit; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  padding-bottom: 56px;
  border-bottom: 1px solid var(--hairline-on-green);
}
.site-footer .wordmark { color: var(--cream); font-size: 30px; }
.site-footer .wordmark .dot { color: var(--brass-soft); }
.site-footer .wordmark__mark .bay { fill: var(--brass-soft); }
.footer-tag { margin-top: 18px; color: var(--cream-dim-on-green); max-width: 30ch; font-size: 15px; }
.footer-col h3 {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream-dim-on-green);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; display: grid; gap: 13px; }
.footer-col a { color: var(--cream-on-green); text-decoration: none; font-size: 15px; transition: color 140ms var(--ease-out); }
.footer-col a:hover { color: var(--brass-soft); }
.footer-bottom {
  padding-block: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--cream-dim-on-green);
}
.footer-mark {
  /* sized for "mainmade.studio" — 15 characters, not the old 9. At 18vw the longer
     string ran off the page, and body's overflow-x:clip cropped it rather than scrolling. */
  font: 600 clamp(30px, 11vw, 164px)/0.78 var(--font-display);
  letter-spacing: -0.03em;
  text-align: center;
  color: rgba(250, 246, 239, 0.05);
  user-select: none;
  pointer-events: none;
  margin-bottom: -0.12em;
}
.footer-mark i { font-style: normal; color: rgba(212, 175, 94, 0.18); }
@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- Reveal (JS adds .in; without JS everything is visible) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(22px); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee-track { transform: none !important; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Forms (start page) ---------- */
.page-narrow { max-width: 700px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 32px); }
.page-head { padding-top: calc(var(--header-h) + clamp(48px, 7vw, 88px)); }
.page-head h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; }
.page-head .lead { margin-top: 22px; }
.form { margin-top: 48px; padding-bottom: clamp(84px, 10vw, 128px); }
.field { margin-bottom: 28px; }
.field > label, .field > .field-label {
  display: block;
  font: 600 14px/1.4 var(--font-body);
  margin-bottom: 9px;
}
.field .hint { font-size: 13px; color: var(--muted); margin-top: 7px; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  padding: 15px 16px;
  font: 400 16px/1.5 var(--font-body);
  color: var(--fg);
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
input:hover, textarea:hover { border-color: var(--input-hover); }
input:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(30, 64, 52, 0.12); }
textarea { min-height: 120px; resize: vertical; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: 20px;
  cursor: pointer;
  transition: border-color 140ms var(--ease-out), transform 140ms var(--ease-out);
  display: block;
}
.choice:hover { border-color: var(--input-hover); transform: translateY(-2px); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: block; font-family: var(--font-display); font-size: 23px; font-weight: 600; }
.choice small { display: block; margin-top: 5px; color: var(--muted); font-size: 13.5px; }
.choice:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 1.5px var(--green); }
.choice:has(input:focus-visible) { outline: 2px solid var(--brass); outline-offset: 3px; }
.choice-stack { display: grid; gap: 10px; }
.choice-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 17px 18px; }
.choice-row b { font: 500 15.5px/1.4 var(--font-body); }
.choice-row small { margin: 0; font: 500 13px/1 var(--font-mono); color: var(--brass-text); }
/* full-width submit applies only to a button that is a direct child of the form,
   never to the wizard's nav buttons */
.form > .btn { width: 100%; padding: 19px; font-size: 16px; }
.form-note {
  margin-top: 18px;
  text-align: center;
  font: 500 12.5px/1.7 var(--font-mono);
  color: var(--muted);
}
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }

/* ---------- Photo band ---------- */
.photo-band {
  padding-block: 0;
  height: clamp(320px, 52vh, 560px);
  overflow: hidden;
  position: relative;
  border-block: 1px solid var(--border);
}
.photo-band img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center 40%;
  will-change: transform;
}

/* ---------- Bento photo cell ---------- */
.cell-photo { padding: 0; position: relative; overflow: hidden; background: var(--green-deep); }
.cell-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}
.cell-photo:hover img { transform: scale(1.04); }
.cell-photo .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15, 36, 29, 0.1) 0%, rgba(15, 36, 29, 0.6) 55%, rgba(15, 36, 29, 0.92) 100%);
}
.cell-photo .cell-copy { position: relative; padding: 32px; margin-top: auto; }
.cell-photo h3 { color: var(--cream); }
.cell-photo p { color: var(--cream-on-green); }

/* ---------- Preview modal ---------- */
.preview-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.preview-modal.open { display: block; }
.pm-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 36, 29, 0.74);
  backdrop-filter: blur(8px);
  border: 0; padding: 0; width: 100%; height: 100%; cursor: pointer;
}
.pm-panel {
  position: absolute; inset: clamp(10px, 3vw, 40px);
  background: var(--bg);
  border-radius: 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.6);
}
@media (prefers-reduced-motion: no-preference) {
  .preview-modal.open .pm-backdrop { animation: pmFade 220ms var(--ease-out); }
  .preview-modal.open .pm-panel { animation: pmRise 320ms var(--ease-out); }
}
@keyframes pmFade { from { opacity: 0; } }
@keyframes pmRise { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
.pm-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pm-title { font: 600 15px/1.3 var(--font-body); padding-left: 6px; }
.pm-title span {
  display: block;
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.pm-devices { display: flex; gap: 6px; background: var(--cream-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.pm-dev {
  font: 600 13px/1 var(--font-body);
  padding: 9px 16px;
  min-height: 38px;
  border-radius: 999px;
  border: 0; background: transparent; color: var(--muted);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.pm-dev:hover { color: var(--fg); }
.pm-dev.active { background: var(--green); color: var(--cream); }
.pm-actions { display: flex; align-items: center; gap: 10px; }
.pm-open { font: 600 13px/1 var(--font-body); padding: 10px 16px; }
.pm-close {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font: 400 20px/1 var(--font-display);
  color: var(--fg);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.pm-close:hover { background: var(--fg); color: var(--bg); }
.pm-stage {
  flex: 1;
  background: var(--cream-soft);
  padding: clamp(10px, 2vw, 26px);
  display: flex;
  justify-content: center;
  overflow: auto;
}
.pm-frame {
  width: 100%; height: 100%;
  max-width: 100%;
  background: var(--frame-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: max-width 320ms var(--ease-out);
  flex-shrink: 0;
}
.preview-modal[data-device="desktop"] .pm-frame { max-width: 100%; }
.preview-modal[data-device="tablet"] .pm-frame { max-width: 768px; }
.preview-modal[data-device="mobile"] .pm-frame { max-width: 390px; }
.pm-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--frame-bg); }
body.modal-open { overflow: hidden; }
.pm-open .short { display: none; }
@media (max-width: 640px) {
  .pm-bar { padding: 10px 12px; flex-wrap: nowrap; }
  .pm-title { display: none; }
  .pm-dev { padding: 9px 11px; font-size: 12.5px; }
  .pm-devices { gap: 2px; padding: 3px; }
  .pm-open { padding: 10px 12px; font-size: 12.5px; }
  .pm-open .full { display: none; }
  .pm-open .short { display: inline; }
  .pm-close { width: 44px; height: 44px; }
  .pm-actions { gap: 8px; }
}

/* ---------- Checkout (start page) ---------- */
.checkout-wrap { max-width: 1080px; margin-inline: auto; padding-inline: clamp(20px, 4vw, 32px); }
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(32px, 4.5vw, 64px);
  align-items: start;
  margin-top: 36px;
  padding-bottom: clamp(72px, 8vw, 104px);
}
/* checkout leads with the form, so the head sits tighter than on other pages */
.checkout-wrap .page-head { padding-top: calc(var(--header-h) + clamp(24px, 3vw, 36px)); }
.checkout-wrap .page-head .lead { margin-top: 16px; }
.checkout .form { margin-top: 0; padding-bottom: 0; }
.summary {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background:
    radial-gradient(480px 320px at 100% -10%, rgba(212, 175, 94, 0.18), transparent 55%),
    var(--green);
  color: var(--cream);
  border-radius: var(--r-card);
  padding: 30px;
  box-shadow: var(--shadow-deep);
}
.summary h2 {
  font-size: 22px;
  color: var(--cream);
  display: flex; align-items: baseline; justify-content: space-between;
}
.summary h2 span {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cream-dim-on-green);
}
.sum-lines { margin-top: 18px; }
.sum-line {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 12px;
  border-bottom: 1px solid var(--hairline-on-green);
  font-size: 14.5px;
}
.sum-line span:first-child { color: var(--cream-on-green); }
.sum-line span:last-child { font: 500 14px/1.5 var(--font-mono); }
.sum-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 18px;
}
.sum-total b { font: 600 34px/1 var(--font-display); }
.sum-total span { font: 500 12px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cream-dim-on-green); }
.sum-monthly { margin-top: 10px; font-size: 13.5px; color: var(--cream-on-green); }
.sum-note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-on-green);
  font: 500 12px/1.7 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--cream-dim-on-green);
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
}

/* ---------- Wizard ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 40px;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 2px solid var(--border);
  font: 500 12px/1.3 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 240ms var(--ease-out), border-color 240ms var(--ease-out);
}
.steps li b {
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: grid; place-items: center;
  font: 500 12px/1 var(--font-mono);
  transition: all 240ms var(--ease-out);
}
.steps li.done { border-top-color: var(--green); color: var(--green); }
.steps li.done b { background: var(--green); border-color: var(--green); color: var(--cream); }
.steps li.current { border-top-color: var(--brass); color: var(--ink); }
.steps li.current b { border-color: var(--brass); color: var(--ink); background: var(--surface); }
@media (max-width: 640px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .steps li { justify-content: center; padding-top: 12px; position: relative; }
  /* visually hidden, still announced by screen readers */
  .steps li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* these are <section> elements: cancel the global section padding */
.step-panel { display: none; padding-block: 0; }
.step-panel.active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .step-panel.active { animation: stepIn 420ms var(--ease-out); }
}
@keyframes stepIn { from { opacity: 0; transform: translateY(14px); } }
.step-panel > h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin-bottom: 8px;
}
.step-panel > .step-sub {
  color: var(--muted);
  margin-bottom: 30px;
  font-size: 15.5px;
  max-width: 48ch;
}

.wizard-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.wizard-nav .btn { flex: 0 0 auto; width: auto; }
.wizard-nav .grow { flex: 1 1 auto; }
.wizard-nav [data-back] { order: -1; }
@media (max-width: 520px) {
  .wizard-nav { flex-wrap: wrap; }
  .wizard-nav .btn { width: 100%; }
}

.field-error {
  display: none;
  margin-top: 7px;
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
}
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field.invalid input:focus, .field.invalid textarea:focus { box-shadow: 0 0 0 3px rgba(194, 64, 42, 0.14); }

/* review step */
.review {
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
}
.review-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.review-row:last-child { border-bottom: 0; }
.review-row dt {
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.review-row dd { text-align: right; max-width: 60%; }
.review-edit {
  background: none; border: 0; padding: 0;
  font: 600 13px/1 var(--font-body);
  color: var(--fg);
  border-bottom: 1.5px solid var(--brass);
  padding-bottom: 2px;
  margin-left: 12px;
  position: relative;
}
.review-edit::after { content: ''; position: absolute; inset: -14px -10px; }
.review-edit:hover { border-bottom-color: var(--fg); }
.review-note { margin-top: 22px; font-size: 14px; color: var(--muted); }

/* ---------- Payment modal ---------- */
.pay-modal { position: fixed; inset: 0; z-index: 210; display: none; }
.pay-modal.open { display: grid; place-items: center; padding: clamp(12px, 4vw, 40px); }
.pay-panel {
  position: relative;
  width: min(460px, 100%);
  max-height: 92dvh;
  overflow: auto;
  background: var(--bg);
  border-radius: 14px;
  padding: clamp(28px, 4vw, 40px);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.6);
}
@media (prefers-reduced-motion: no-preference) {
  .pay-modal.open .pay-panel { animation: pmRise 320ms var(--ease-out); }
}
.pay-panel h2 { font-size: 27px; }
.pay-panel .pay-sub { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.pay-lines { margin: 24px 0 0; }
.pay-lines .sum-line { border-bottom-color: var(--border); }
.pay-lines .sum-line span:first-child { color: var(--ink); }
.pay-lines .sum-line span:last-child { color: var(--ink); }
.pay-total-row {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-top: 18px; margin-bottom: 24px;
}
.pay-total-row span { font: 500 12px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.pay-total-row b { font: 600 36px/1 var(--font-display); }
#paypal-buttons { min-height: 52px; }
.pay-status {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  padding: 14px 0;
}
.pay-secure {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font: 500 12px/1.7 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.pay-later {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 0;
  background: none;
  border: 0;
  font: 500 14px/1.5 var(--font-body);
  color: var(--muted);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pay-later:hover { color: var(--fg); }
.pay-close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font: 400 19px/1 var(--font-display);
  color: var(--fg);
}
.pay-close:hover { background: var(--fg); color: var(--bg); }

/* success state */
.checkout-done { display: none; padding: clamp(48px, 8vw, 96px) 0 clamp(84px, 10vw, 128px); text-align: center; }
.checkout-done.show { display: block; }
.checkout-done .mark {
  width: 68px; height: 68px;
  margin: 0 auto 28px;
  border-radius: 999px;
  background: var(--green);
  color: var(--brass-soft);
  display: grid; place-items: center;
  font: 600 32px/1 var(--font-display);
}
.checkout-done h1 { font-size: clamp(34px, 5vw, 52px); }
.checkout-done p { margin: 20px auto 0; color: var(--muted); max-width: 46ch; font-size: 17px; }
.checkout-done .btn { margin-top: 36px; }

/* ---------- Prose (policies) ---------- */
.prose { padding-bottom: clamp(84px, 10vw, 128px); }
.prose h2 {
  font-size: clamp(25px, 2.7vw, 32px);
  margin: 56px 0 16px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.prose p { margin-bottom: 16px; max-width: 62ch; color: var(--prose-text); }
.prose p strong { color: var(--fg); }
.prose a {
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--brass);
  padding-bottom: 1px;
  transition: border-color 140ms var(--ease-out);
}
.prose a:hover { border-bottom-color: var(--fg); }
.prose { counter-reset: policy; }
.prose h2 {
  counter-increment: policy;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.prose h2::before {
  content: counter(policy, decimal-leading-zero);
  font: 500 14px/1 var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--brass-text);
}
.prose ul { margin: 0 0 16px 20px; max-width: 60ch; color: var(--prose-text); }
.prose li { margin-bottom: 8px; }
