/* ============================================================
   ThreeLeaf Digital — v2 Imagery-led overrides
   Filmic photograph treatment + new structural sections
   ============================================================ */

/* ---------- Type system v2 ---------- */
:root {
  --sans:  "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "DM Serif Display", ui-serif, Georgia, serif;
}

/* Editorial Modern (default) */
body.font-editorial {
  --sans:  "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "DM Serif Display", ui-serif, Georgia, serif;
}
body.font-editorial .hero-headline,
body.font-editorial .section-headline,
body.font-editorial .fit-headline,
body.font-editorial .manifest-headline,
body.font-editorial .origin-headline,
body.font-editorial .final-headline,
body.font-editorial .speed-headline,
body.font-editorial .card-body h3 {
  font-variation-settings: "opsz" 72;
}

/* Quiet Confident — Geist + Instrument Serif + Geist Mono (Swissier, calmer) */
body.font-quiet {
  --sans:  "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono:  "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
}
body.font-quiet .hero-headline,
body.font-quiet .section-headline,
body.font-quiet .fit-headline,
body.font-quiet .manifest-headline,
body.font-quiet .origin-headline,
body.font-quiet .final-headline,
body.font-quiet .speed-headline,
body.font-quiet .card-body h3 {
  font-variation-settings: normal;
  letter-spacing: -0.03em;
  font-weight: 500;
}

/* Bold Classical — Archivo + Playfair Display Italic + JetBrains Mono */
body.font-bold {
  --sans:  "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Playfair Display", ui-serif, Georgia, serif;
}
body.font-bold .hero-headline,
body.font-bold .section-headline,
body.font-bold .fit-headline,
body.font-bold .manifest-headline,
body.font-bold .origin-headline,
body.font-bold .final-headline,
body.font-bold .speed-headline,
body.font-bold .card-body h3 {
  font-variation-settings: normal;
  letter-spacing: -0.02em;
  font-weight: 700;
}
body.font-bold .serif-em,
body.font-bold .serif-em-light {
  font-weight: 500;
  letter-spacing: 0;
}

/* Stout Display — Anton condensed display + Manrope body + Playfair italic accent */
body.font-stout {
  --sans:  "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Playfair Display", ui-serif, Georgia, serif;
}
body.font-stout .hero-headline,
body.font-stout .section-headline,
body.font-stout .fit-headline,
body.font-stout .manifest-headline,
body.font-stout .origin-headline,
body.font-stout .final-headline,
body.font-stout .speed-headline {
  font-family: "Anton", "Manrope", sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-variation-settings: normal;
  text-transform: uppercase;
  line-height: 0.92;
}
body.font-stout .card-body h3 {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  font-variation-settings: normal;
}
body.font-stout .serif-em,
body.font-stout .serif-em-light {
  text-transform: none;
  font-weight: 500;
}

/* Editorial Serif — Newsreader serif headlines + Manrope body */
body.font-serif {
  --sans:  "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Newsreader", ui-serif, Georgia, serif;
}
body.font-serif .hero-headline,
body.font-serif .section-headline,
body.font-serif .fit-headline,
body.font-serif .manifest-headline,
body.font-serif .origin-headline,
body.font-serif .final-headline,
body.font-serif .speed-headline,
body.font-serif .card-body h3 {
  font-family: "Newsreader", ui-serif, Georgia, serif;
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  letter-spacing: -0.02em;
}
body.font-serif .serif-em,
body.font-serif .serif-em-light {
  font-style: italic;
  font-weight: 500;
}

/* Bodoni Punch — high-contrast didone display + Manrope body */
body.font-punch {
  --sans:  "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Bodoni Moda", ui-serif, Georgia, serif;
}
body.font-punch .hero-headline,
body.font-punch .section-headline,
body.font-punch .fit-headline,
body.font-punch .manifest-headline,
body.font-punch .origin-headline,
body.font-punch .final-headline,
body.font-punch .speed-headline,
body.font-punch .card-body h3 {
  font-family: "Bodoni Moda", ui-serif, Georgia, serif;
  font-variation-settings: "opsz" 96;
  font-weight: 600;
  letter-spacing: -0.025em;
}
body.font-punch .serif-em,
body.font-punch .serif-em-light {
  font-style: italic;
  font-weight: 500;
}
body {
  font-family: var(--sans);
  font-feature-settings: "ss01", "ss02", "ss03";
  font-variation-settings: "opsz" 16;
}
.hero-headline,
.section-headline,
.fit-headline,
.manifest-headline,
.origin-headline,
.final-headline,
.speed-headline {
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  letter-spacing: -0.035em;
}
.card-body h3 {
  font-variation-settings: "opsz" 48;
  letter-spacing: -0.025em;
}
.brand-word { font-variation-settings: "opsz" 24; letter-spacing: -0.025em; }

/* DM Serif Display has more contrast \u2014 dial down size slightly */
.serif-em,
.serif-em-light {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
}

/* ---------- Full ThreeLeaf wordmark (header + footer) ---------- */
.brand-full {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.foot-brand-full {
  height: 36px;
  margin-bottom: 14px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}
.foot-brand .brand-mark { width: 36px; height: 36px; margin-bottom: 14px; display: block; }

/* ---------- Alternate color schemes ---------- */
/* Scheme B — Plum & Coral (warm editorial) */
body.scheme-plum {
  --ink-0:   oklch(0.16 0.025 320);
  --ink-1:   oklch(0.21 0.030 320);
  --ink-2:   oklch(0.26 0.035 318);
  --ink-3:   oklch(0.36 0.040 315);
  --ink-4:   oklch(0.52 0.04  310);
  --ink-5:   oklch(0.70 0.03  300);
  --cream:   oklch(0.96 0.020 75);
  --cream-2: oklch(0.90 0.025 70);
  --cream-3: oklch(0.78 0.025 70);
  --sage:    oklch(0.66 0.16   35);  /* coral / clay — primary brand signal */
  --sage-2:  oklch(0.52 0.14   30);
  --signal:  oklch(0.84 0.16   55);  /* warm peach signal */
  --brass:   oklch(0.70 0.10  80);
  --brass-2: oklch(0.58 0.10  65);
}

/* Scheme C — Midnight Steel (cool confident — DEFAULT) */
body.scheme-steel {
  --ink-0:   oklch(0.14 0.025 245);
  --ink-1:   oklch(0.19 0.030 245);
  --ink-2:   oklch(0.24 0.032 245);
  --ink-3:   oklch(0.34 0.035 245);
  --ink-4:   oklch(0.50 0.025 240);
  --ink-5:   oklch(0.68 0.020 235);
  --cream:   oklch(0.95 0.010 250);
  --cream-2: oklch(0.88 0.012 250);
  --cream-3: oklch(0.76 0.015 245);
  --sage:    oklch(0.72 0.13  195);   /* electric teal — primary brand signal */
  --sage-2:  oklch(0.58 0.12  200);
  --signal:  oklch(0.85 0.14  180);   /* aqua signal — for CTAs */
  --brass:   oklch(0.72 0.12   55);   /* copper accent */
  --brass-2: oklch(0.60 0.12   50);
}

/* ---------- Style switcher (palettes + type) ---------- */
.style-switcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: calc(100vw - 40px);
  gap: 10px;
  padding: 10px 14px;
  background: color-mix(in oklab, oklch(0.13 0.012 145) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid oklch(0.35 0.02 145 / 0.6);
  border-radius: 18px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.78 0.015 90);
}
.style-switcher .ss-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.style-switcher .ss-divider {
  width: 1px;
  height: 22px;
  background: oklch(0.35 0.02 145 / 0.5);
}
.style-switcher .ss-label {
  margin-right: 4px;
  color: oklch(0.65 0.015 90);
}
.style-switcher button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .2s, border-color .2s;
  background: transparent;
  color: oklch(0.92 0.015 90);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  display: grid;
  place-items: center;
}
.style-switcher button:hover { transform: scale(1.1); }
.style-switcher button.active { border-color: oklch(0.88 0.19 125); }

.style-switcher button[data-scheme="forest"] {
  background: linear-gradient(135deg, oklch(0.18 0.013 145) 0% 50%, oklch(0.66 0.10 148) 50% 75%, oklch(0.88 0.19 125) 75% 100%);
}
.style-switcher button[data-scheme="plum"] {
  background: linear-gradient(135deg, oklch(0.21 0.030 320) 0% 50%, oklch(0.66 0.16 35) 50% 75%, oklch(0.84 0.16 55) 75% 100%);
}
.style-switcher button[data-scheme="steel"] {
  background: linear-gradient(135deg, oklch(0.19 0.030 245) 0% 50%, oklch(0.72 0.13 195) 50% 75%, oklch(0.85 0.14 180) 75% 100%);
}

.style-switcher button[data-font="editorial"] { font-family: "Bricolage Grotesque", sans-serif; }
.style-switcher button[data-font="quiet"]     { font-family: "Geist", sans-serif; }
.style-switcher button[data-font="bold"]      { font-family: "Playfair Display", serif; font-style: italic; }
.style-switcher button[data-font="stout"]     { font-family: "Anton", sans-serif; letter-spacing: 0.02em; }
.style-switcher button[data-font="serif"]     { font-family: "Newsreader", serif; font-style: italic; font-weight: 500; }
.style-switcher button[data-font="punch"]     { font-family: "Bodoni Moda", serif; font-weight: 700; }

.style-switcher .ss-thumb {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1.5px solid transparent;
  outline: 1px solid oklch(0.35 0.02 145 / 0.6);
  outline-offset: -1px;
}
.style-switcher .ss-thumb.active { border-color: oklch(0.88 0.19 125); outline-color: transparent; }

@media (max-width: 760px) {
  .style-switcher { right: 12px; bottom: 12px; padding: 8px 10px; gap: 6px; }
  .style-switcher .ss-label { display: none; }
}

/* ---------- Body-only font overrides (independent of headline preset) ---------- */
/* These override --sans for descendants except headlines, by targeting specific text elements. */
body.body-bricolage { --body-font: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif; }
body.body-manrope   { --body-font: "Manrope", ui-sans-serif, system-ui, sans-serif; }
body.body-geist     { --body-font: "Geist", ui-sans-serif, system-ui, sans-serif; }
body.body-plex      { --body-font: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif; }
body.body-dm        { --body-font: "DM Sans", ui-sans-serif, system-ui, sans-serif; }
body.body-bevn      { --body-font: "Be Vietnam Pro", ui-sans-serif, system-ui, sans-serif; }
body.body-karla     { --body-font: "Karla", ui-sans-serif, system-ui, sans-serif; }

/* Apply --body-font to non-headline body copy when set */
body[class*="body-"] p,
body[class*="body-"] li,
body[class*="body-"] .hero-lede,
body[class*="body-"] .hero-sub,
body[class*="body-"] .section-lede,
body[class*="body-"] .final-body,
body[class*="body-"] .final-disclaim,
body[class*="body-"] .card-body p,
body[class*="body-"] .origin-body p,
body[class*="body-"] .pull,
body[class*="body-"] .btn,
body[class*="body-"] .site-nav,
body[class*="body-"] .foot-col a,
body[class*="body-"] .foot-brand p {
  font-family: var(--body-font);
}

/* Body font swatch previews */
.style-switcher button[data-body="bricolage"] { font-family: "Bricolage Grotesque", sans-serif; }
.style-switcher button[data-body="manrope"]   { font-family: "Manrope", sans-serif; font-weight: 600; }
.style-switcher button[data-body="geist"]     { font-family: "Geist", sans-serif; }
.style-switcher button[data-body="plex"]      { font-family: "IBM Plex Sans", sans-serif; }
.style-switcher button[data-body="dm"]        { font-family: "DM Sans", sans-serif; font-weight: 500; }
.style-switcher button[data-body="bevn"]      { font-family: "Be Vietnam Pro", sans-serif; font-weight: 500; }
.style-switcher button[data-body="karla"]     { font-family: "Karla", sans-serif; font-weight: 600; }

/* legacy class — keep for backward-compat */
.scheme-switcher { display: none; }
.hero-headline em,
.section-headline em,
.fit-headline em,
.manifest-headline em,
.origin-headline em,
.final-headline em,
.speed-headline em { font-size: 1.0em; }
.hero-meta .num { font-family: var(--serif); font-style: italic; }
.proc-num { font-family: var(--serif); font-style: italic; }

/* ---------- Photo primitive \u2014 film-still treatment ---------- */
.photo {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-2);
  isolation: isolate;
  display: block;
}
.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.78) contrast(1.06) brightness(0.94) hue-rotate(-4deg);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s;
}
.photo:hover img { transform: scale(1.03); filter: saturate(0.9) contrast(1.08) brightness(1); }

/* warm color wash + bottom vignette */
.photo::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, transparent 55%, color-mix(in oklab, var(--ink-0) 75%, transparent) 100%),
    linear-gradient(160deg, color-mix(in oklab, var(--brass) 6%, transparent) 0%, transparent 50%);
}

/* film grain overlay */
.photo::before {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.95  0 0 0 0 0.9  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

.photo .photo-caption {
  position: absolute; left: 14px; bottom: 14px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cream);
  text-transform: uppercase;
  padding: 5px 9px;
  background: color-mix(in oklab, var(--ink-0) 70%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.photo .photo-caption .pc-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--signal) 22%, transparent);
}
.photo .photo-stamp {
  position: absolute; right: 14px; top: 14px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--cream-2);
  padding: 5px 9px;
  border: 1px solid color-mix(in oklab, var(--cream) 28%, transparent);
  border-radius: 3px;
  background: color-mix(in oklab, var(--ink-0) 35%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-transform: uppercase;
}
.photo .photo-tl, .photo .photo-tr, .photo .photo-bl, .photo .photo-br {
  position: absolute; z-index: 3;
  width: 14px; height: 14px;
  border: 1px solid color-mix(in oklab, var(--cream) 60%, transparent);
}
.photo .photo-tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.photo .photo-tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.photo .photo-bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.photo .photo-br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

/* ---------- HERO v2 — image-led ---------- */
.hero-grid.v2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}
.hero-stack {
  display: grid;
  grid-template-rows: 1fr;
  gap: 16px;
  height: 100%;
  min-height: 520px;
}
.hero-photo { height: 100%; min-height: 360px; }
.hero-photo img { min-height: 360px; }
.hero-photo .photo-stamp { right: 16px; top: 16px; }

.hero-system-inset {
  position: relative;
  border: 1px solid color-mix(in oklab, var(--sage) 28%, transparent);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 50% 60%, color-mix(in oklab, var(--sage) 18%, transparent), transparent 60%),
    color-mix(in oklab, var(--ink-1) 80%, transparent);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: stretch;
}
.hsi-svg { padding: 12px; }
.hsi-svg svg { width: 100%; height: 100%; display: block; }
.hsi-meta {
  border-left: 1px solid color-mix(in oklab, var(--cream) 8%, transparent);
  padding: 20px;
  display: flex; flex-direction: column;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--cream-3);
  background: color-mix(in oklab, var(--ink-0) 30%, transparent);
}
.hsi-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hsi-row .key { color: var(--ink-5); }
.hsi-row .val { color: var(--cream); }
.hsi-row.live .val { color: var(--signal); display: inline-flex; align-items: center; gap: 6px; }
.hsi-foot {
  margin-top: auto;
  font-size: 10px;
  color: var(--ink-5);
  padding-top: 10px;
  border-top: 1px dashed color-mix(in oklab, var(--cream) 12%, transparent);
}
.hsi-svg svg { aspect-ratio: 1/1; }

/* ---------- Manifest full-bleed photo section ---------- */
.manifest {
  position: relative;
  padding: 0;
  min-height: 80vh;
  display: grid;
  align-items: stretch;
}
.manifest-photo {
  position: absolute; inset: 0;
  z-index: 0;
}
.manifest-photo .photo { height: 100%; border-radius: 0; }
.manifest-photo .photo img { height: 100%; min-height: 80vh; }
.manifest-photo .photo::after {
  background:
    linear-gradient(105deg, color-mix(in oklab, var(--ink-0) 88%, transparent) 0%, color-mix(in oklab, var(--ink-0) 60%, transparent) 40%, transparent 75%),
    linear-gradient(180deg, color-mix(in oklab, var(--ink-0) 60%, transparent) 0%, transparent 30%, color-mix(in oklab, var(--ink-0) 80%, transparent) 100%);
}
.manifest-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 140px var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: end;
}
.manifest-headline {
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--cream);
  margin: 0;
}
.manifest-headline em { font-size: 1.05em; }
.manifest-aside {
  border-left: 1px solid color-mix(in oklab, var(--cream) 18%, transparent);
  padding: 4px 0 4px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.manifest-aside p {
  font-size: clamp(16px, 1.2vw, 18px);
  color: var(--cream-2);
  margin: 0;
  max-width: 36ch;
}
.manifest-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--signal);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---------- Build cards v2: photo + UI vis ---------- */
.stack-card.v2 .card-grid {
  grid-template-columns: 140px minmax(0, 1.2fr) minmax(0, 1fr);
}
.stack-card.v2 .card-visual { padding: 0; }
.stack-card.v2 .vis-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  min-height: 320px;
}
.stack-card.v2 .vis-photo img { height: 100%; }

/* ---------- In the work — filmstrip gallery ---------- */
.gallery {
  padding-top: 100px;
  padding-bottom: 100px;
}
.gallery-head {
  max-width: var(--max);
  margin: 0 auto 40px;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.gallery-head h2 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 500;
  color: var(--cream);
  margin: 0;
  max-width: 16ch;
}
.gallery-head .gh-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cream-3);
  text-transform: uppercase;
  max-width: 32ch;
  text-align: right;
}
.gallery-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 120px;
  gap: 16px;
}
.gallery-grid .photo:nth-child(1) { grid-column: span 7; grid-row: span 3; }
.gallery-grid .photo:nth-child(2) { grid-column: span 5; grid-row: span 2; }
.gallery-grid .photo:nth-child(3) { grid-column: span 5; grid-row: span 2; }
.gallery-grid .photo:nth-child(4) { grid-column: span 4; grid-row: span 3; }
.gallery-grid .photo:nth-child(5) { grid-column: span 4; grid-row: span 2; }
.gallery-grid .photo:nth-child(6) { grid-column: span 4; grid-row: span 2; }
.gallery-grid .photo img { height: 100%; }

/* ---------- Origin v2: real portrait ---------- */
.portrait-frame.v2 { aspect-ratio: 4 / 5; background: transparent; }
.portrait-frame.v2 .portrait-placeholder { inset: 0; }
.portrait-frame.v2 .photo { position: absolute; inset: 0; border-radius: var(--radius); }
.portrait-frame.v2 .photo img { height: 100%; }
.portrait-frame.v2 .portrait-meta {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: auto;
  top: auto;
  z-index: 4;
  text-align: right;
  padding: 10px 14px;
  background: color-mix(in oklab, oklch(0.13 0.012 145) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 6px;
  border: 1px solid color-mix(in oklab, var(--cream) 18%, transparent);
}
.portrait-frame.v2 .pm-name {
  color: var(--cream);
  text-shadow: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.portrait-frame.v2 .pm-role {
  color: var(--cream-3);
  text-shadow: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Final CTA v2: full-bleed atmospheric photo ---------- */
.final.v2 .final-bg { z-index: 0; }
.final.v2 .final-bg .photo { height: 100%; border-radius: 0; }
.final.v2 .final-bg .photo::after {
  background:
    radial-gradient(ellipse at 50% 60%, transparent 0%, color-mix(in oklab, var(--ink-0) 50%, transparent) 60%, color-mix(in oklab, var(--ink-0) 92%, transparent) 100%),
    linear-gradient(180deg, color-mix(in oklab, var(--ink-0) 70%, transparent) 0%, transparent 40%);
}
.final.v2 .final-bg .photo img { filter: saturate(0.7) contrast(1.05) brightness(0.6) hue-rotate(-4deg); height: 100%; }

/* ---------- HERO v2 — full-bleed background image ---------- */
.hero.hero-bg-image {
  position: relative;
  isolation: isolate;
  min-height: 92vh;
  padding-top: 0;
  padding-bottom: 0;
  display: grid;
  align-items: center;
}
.hero.hero-bg-image .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero.hero-bg-image .hero-bg .photo {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.hero.hero-bg-image .hero-bg .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) contrast(1.05) brightness(0.42) hue-rotate(-6deg);
}
.hero.hero-bg-image .hero-bg .photo::after {
  background:
    linear-gradient(105deg, color-mix(in oklab, var(--ink-0) 86%, transparent) 0%, color-mix(in oklab, var(--ink-0) 60%, transparent) 50%, color-mix(in oklab, var(--ink-0) 78%, transparent) 100%),
    radial-gradient(ellipse at 50% 100%, color-mix(in oklab, var(--ink-0) 0%, transparent) 0%, color-mix(in oklab, var(--ink-0) 75%, transparent) 70%),
    linear-gradient(180deg, color-mix(in oklab, var(--ink-0) 65%, transparent) 0%, transparent 25%, transparent 70%, color-mix(in oklab, var(--ink-0) 88%, transparent) 100%);
}
.hero.hero-bg-image .hero-bg .photo::before {
  opacity: 0.18;
}
.hero-grid.v2.single {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  min-height: 92vh;
  position: relative;
  z-index: 2;
  padding: 80px var(--gutter) 100px;
  max-width: var(--max);
  margin: 0 auto;
  align-items: center;
}
.hero.hero-bg-image .hero-copy {
  max-width: 1300px;
}
.hero.hero-bg-image .hero-headline {
  font-size: clamp(40px, 5.6vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.hero.hero-bg-image .hero-headline .hl-row {
  display: block;
  white-space: nowrap;
}
.hero.hero-bg-image .hero-headline .hl-row-2 {
  /* allow shrink-to-fit on narrow screens but never wrap on desktop */
}
@media (max-width: 760px) {
  .hero.hero-bg-image .hero-headline {
    font-size: clamp(36px, 9vw, 56px);
  }
  .hero.hero-bg-image .hero-headline .hl-row { white-space: normal; }
}
.hero.hero-bg-image .hero-lede {
  font-size: clamp(18px, 1.5vw, 22px);
  max-width: 62ch;
}
.hero.hero-bg-image .hero-sub {
  font-size: clamp(15px, 1.1vw, 17px);
  max-width: 58ch;
}

/* ---------- Hero photo: continuous slow-mo Ken Burns drift on ALL hero images ---------- */
.hero.hero-bg-image .hero-bg .photo img {
  animation: heroDrift 45s ease-in-out infinite alternate;
  filter: saturate(0.65) contrast(1.05) brightness(0.6) hue-rotate(-6deg);
  transform-origin: 50% 60%;
}
@keyframes heroDrift {
  0%   { transform: scale(1.08) translate3d(-2.5%, -1.5%, 0); }
  50%  { transform: scale(1.12) translate3d(0%, 1.5%, 0); }
  100% { transform: scale(1.08) translate3d(2.5%, -1%, 0); }
}

/* ---------- Hero stars overlay (animated) ---------- */
.hero-stars .hero-bg .photo img {
  /* base drift already set above; just override filter for starry-sky tone */
  filter: saturate(0.55) contrast(1.05) brightness(0.5) hue-rotate(-8deg);
}
.hero-stars-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.85;
}

/* ---------- City skyline silhouette at bottom of hero ---------- */
.hero-skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(160px, 28vh, 280px);
  z-index: 2;
  pointer-events: none;
}
.skyline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* ambient amber glow above the skyline — like distant city sodium-vapor wash */
.city-glow {
  position: absolute;
  left: 0; right: 0;
  bottom: 60%;
  height: 60%;
  background: radial-gradient(ellipse at 50% 100%,
    color-mix(in oklab, var(--brass) 25%, transparent) 0%,
    color-mix(in oklab, var(--brass) 8%, transparent) 25%,
    transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
}
/* twinkling window lights — generated via radial-gradient dots */
.city-lights {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 80%;
  mix-blend-mode: screen;
  pointer-events: none;
  background-image:
    radial-gradient(circle 1.2px at 6% 78%,  rgba(255,200,120,.95) 0 100%, transparent 0),
    radial-gradient(circle 1px   at 9% 86%,  rgba(255,210,140,.85) 0 100%, transparent 0),
    radial-gradient(circle 1.2px at 13% 70%, rgba(255,190,110,.9)  0 100%, transparent 0),
    radial-gradient(circle 1px   at 17% 82%, rgba(220,235,255,.7)  0 100%, transparent 0),
    radial-gradient(circle 1.4px at 22% 75%, rgba(255,200,120,.95) 0 100%, transparent 0),
    radial-gradient(circle 1px   at 26% 88%, rgba(255,180,100,.9)  0 100%, transparent 0),
    radial-gradient(circle 1.2px at 31% 68%, rgba(255,220,150,.85) 0 100%, transparent 0),
    radial-gradient(circle 1px   at 35% 84%, rgba(255,200,120,.9)  0 100%, transparent 0),
    radial-gradient(circle 1.5px at 39% 72%, rgba(255,180,100,.95) 0 100%, transparent 0),
    radial-gradient(circle 1px   at 43% 88%, rgba(220,235,255,.7)  0 100%, transparent 0),
    radial-gradient(circle 1.2px at 48% 78%, rgba(255,210,140,.9)  0 100%, transparent 0),
    radial-gradient(circle 1px   at 52% 82%, rgba(255,200,120,.85) 0 100%, transparent 0),
    radial-gradient(circle 1.4px at 56% 70%, rgba(255,180,100,.95) 0 100%, transparent 0),
    radial-gradient(circle 1px   at 60% 86%, rgba(255,220,150,.85) 0 100%, transparent 0),
    radial-gradient(circle 1.2px at 64% 76%, rgba(255,200,120,.9)  0 100%, transparent 0),
    radial-gradient(circle 1px   at 68% 88%, rgba(220,235,255,.7)  0 100%, transparent 0),
    radial-gradient(circle 1.3px at 72% 72%, rgba(255,210,140,.95) 0 100%, transparent 0),
    radial-gradient(circle 1px   at 76% 84%, rgba(255,180,100,.9)  0 100%, transparent 0),
    radial-gradient(circle 1.4px at 80% 70%, rgba(255,200,120,.95) 0 100%, transparent 0),
    radial-gradient(circle 1px   at 84% 86%, rgba(255,220,150,.85) 0 100%, transparent 0),
    radial-gradient(circle 1.2px at 88% 78%, rgba(255,200,120,.9)  0 100%, transparent 0),
    radial-gradient(circle 1px   at 92% 88%, rgba(220,235,255,.7)  0 100%, transparent 0),
    radial-gradient(circle 1.3px at 96% 74%, rgba(255,210,140,.95) 0 100%, transparent 0);
  animation: cityFlicker 6s ease-in-out infinite;
}
@keyframes cityFlicker {
  0%, 100% { opacity: 0.95; }
  35%      { opacity: 0.80; }
  55%      { opacity: 1.0; }
  70%      { opacity: 0.88; }
}

@media (prefers-reduced-motion: reduce) {
  .hero.hero-bg-image .hero-bg .photo img { animation: none !important; }
  .hero-stars-canvas { animation: none !important; }
  .city-lights { animation: none !important; }
}

/* ---------- Manifest — text-only section after the full-bleed photo ---------- */
.manifest-text {
  padding: 140px var(--gutter);
  min-height: 0;
  display: block;
}
.manifest-text .manifest-inner {
  position: relative;
  padding: 0;
  margin: 0 auto;
  max-width: var(--max);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: end;
}
.manifest-attrib {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

/* Light variant — cream background, ink type */
.manifest-light {
  background: var(--cream);
  color: var(--ink-0);
}
.manifest-light .manifest-headline {
  color: var(--ink-0);
}
.manifest-light .manifest-headline em.serif-em {
  color: var(--sage-2);
}
.manifest-light .manifest-aside {
  border-left-color: color-mix(in oklab, var(--ink-0) 18%, transparent);
}
.manifest-light .manifest-aside p {
  color: var(--ink-2);
}
.manifest-light .manifest-attrib {
  color: var(--ink-3);
}

/* ---------- Final CTA v2: full-bleed image background ---------- */
.final.v2 {
  padding: 160px 0 180px;
  background: var(--ink-0);
  position: relative;
  overflow: hidden;
}
.final.v2 .final-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.final.v2 .final-bg .photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.final.v2 .final-bg .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.35) contrast(1.08) brightness(0.42) hue-rotate(-6deg);
}
.final.v2 .final-bg .photo::after {
  background:
    radial-gradient(ellipse at 30% 50%, color-mix(in oklab, var(--ink-0) 85%, transparent) 0%, color-mix(in oklab, var(--ink-0) 55%, transparent) 35%, color-mix(in oklab, var(--ink-0) 30%, transparent) 75%),
    linear-gradient(180deg, color-mix(in oklab, var(--ink-0) 60%, transparent) 0%, color-mix(in oklab, var(--ink-0) 35%, transparent) 40%, color-mix(in oklab, var(--ink-0) 75%, transparent) 100%);
}
.final.v2 .final-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
  position: relative;
  z-index: 2;
}
.final.v2 .final-headline {
  font-size: clamp(56px, 7.5vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
}
.final.v2 .window-tag { margin-bottom: 24px; }
.final.v2 .final-side {
  display: flex; flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  padding-bottom: 12px;
}
.final.v2 .final-body {
  font-size: clamp(16px, 1.2vw, 18px);
  margin: 0;
  max-width: 40ch;
  text-align: left;
}
.final.v2 .final-disclaim {
  font-size: 12px;
  color: var(--ink-5);
  max-width: 38ch;
  line-height: 1.5;
  text-align: left;
}
.final.v2 .final-ctas {
  flex-direction: row;
  gap: 14px;
  align-items: center;
}

/* ---------- Responsive — v2 ---------- */

/* ---------- Full-bleed photo strip (between hero and manifest) ---------- */
.photo-strip {
  padding: 0;
  margin: 0;
}
.photo-fullbleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  border-radius: 0;
  aspect-ratio: 21 / 9;
  max-height: 80vh;
}
.photo-fullbleed img { height: 100%; width: 100%; }
.photo-fullbleed::after {
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--ink-0) 30%, transparent) 0%, transparent 25%, transparent 75%, color-mix(in oklab, var(--ink-0) 90%, transparent) 100%);
}

/* ---------- Build cards v2: side-by-side photo (default reverted) ---------- */
.stack-card.v2 .card-grid {
  grid-template-columns: 140px minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 56px);
}
.stack-card.v2 .card-visual { padding: 0; }
.stack-card.v2 .vis-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
  min-height: 320px;
}
.stack-card.v2 .vis-photo img { height: 100%; }

/* ---------- Gallery: full viewport bleed ---------- */
.gallery { padding-left: 0; padding-right: 0; }
.gallery-head {
  padding: 0 var(--gutter);
}
.gallery-grid {
  width: 100vw;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 0 var(--gutter);
  gap: 8px;
}
.gallery-grid .photo { border-radius: 0; }

/* ---------- Manifest: tighten gradient now that more imagery flanks it ---------- */

@media (max-width: 1080px) {
  .hero-grid.v2 { grid-template-columns: 1fr; }
  .hero-stack { min-height: auto; }
  .manifest-inner { grid-template-columns: 1fr; gap: 32px; padding: 100px var(--gutter); }
  .gallery-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 100px; }
  .gallery-grid .photo:nth-child(1) { grid-column: span 6; grid-row: span 3; }
  .gallery-grid .photo:nth-child(2) { grid-column: span 3; grid-row: span 2; }
  .gallery-grid .photo:nth-child(3) { grid-column: span 3; grid-row: span 2; }
  .gallery-grid .photo:nth-child(4) { grid-column: span 6; grid-row: span 3; }
  .gallery-grid .photo:nth-child(5) { grid-column: span 3; grid-row: span 2; }
  .gallery-grid .photo:nth-child(6) { grid-column: span 3; grid-row: span 2; }
  .stack-card.v2 .card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery-grid .photo { grid-column: span 1 !important; grid-row: span 1 !important; }
  .hero-system-inset { grid-template-columns: 1fr; }
  .hsi-meta { border-left: 0; border-top: 1px solid color-mix(in oklab, var(--cream) 8%, transparent); }
}
