/* Uogo Karts — editorial system */

:root {
  --ink: #0e0e0e;
  --graphite: #1a1a1a;
  --paper: #f5f1ea;
  --paper-2: #ece6d9;
  --paper-3: #dcd2bd;
  --gold: #b8935a;
  --gold-soft: #c9a76a;
  --bordeaux: #6b1f2a;
  --silver: #d8cfbf;
  --rule: rgba(14, 14, 14, 0.14);
  --rule-strong: rgba(14, 14, 14, 0.32);
  --muted: #6b655a;

  --serif: "Prata", "GT Super", "Canela", "Bodoni Moda", Georgia, serif;
  --sans: "Inter", "Söhne", "GT America", system-ui, sans-serif;
  --mono: "JetBrains Mono", "GT America Mono", ui-monospace, SFMono-Regular, monospace;

  --px-max: 1440px;
  --gut: clamp(24px, 4vw, 72px);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Hard-stop horizontal scroll. Anything that wants to overflow must opt-in. */
  overflow-x: hidden;
  max-width: 100vw;
}
img, video, svg { max-width: 100%; height: auto; }
/* Long words / URLs shouldn't push layouts wide */
h1, h2, h3, h4, p, li, a, span { overflow-wrap: anywhere; }
/* Display headings use text-wrap: balance and must not break inside words */
.display, .display-2, .display-3 { overflow-wrap: normal; word-break: normal; }

/* Lineup (/models) trim card hover */
.lineup-trim-card:hover { border-color: var(--ink) !important; }

body.theme-dark {
  background: var(--ink);
  color: var(--paper);
  --rule: rgba(245, 241, 234, 0.14);
  --rule-strong: rgba(245, 241, 234, 0.35);
  --muted: #9c958a;
  --paper: #0e0e0e;
  --paper-2: #16140f;
  --paper-3: #1f1c15;
}

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

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

::selection { background: var(--gold); color: var(--ink); }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border-radius: 10px; }

/* ────────────────────────────────────── Typography */

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.sc {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
}
.sc-lg {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: var(--gold);
}

h1, h2, h3 { margin: 0; font-weight: 400; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(54px, 8.4vw, 148px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.display-2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display-3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.005em;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.4;
  color: var(--ink);
  text-wrap: pretty;
}
body.theme-dark .lead { color: var(--paper); }

.body-copy {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 62ch;
  text-wrap: pretty;
}
body.theme-dark .body-copy { color: var(--paper); }

.muted { color: var(--muted); }

/* Hairline rule — brand organizing element */
.hairline {
  height: 1px;
  width: 100%;
  background: var(--gold);
  opacity: 0.8;
  border: 0;
  margin: 0;
}
.hairline.faint { background: var(--rule); opacity: 1; }

/* Livery pinstripe — double stripe signature motif */
.pinstripe {
  position: relative;
  height: 8px;
  width: 100%;
}
.pinstripe::before,
.pinstripe::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold);
}
.pinstripe::before { top: 0; }
.pinstripe::after { top: 3px; background: var(--bordeaux); height: 1px; }

/* ────────────────────────────────────── Layout */

.wrap {
  width: 100%;
  max-width: var(--px-max);
  margin: 0 auto;
  padding: 0 var(--gut);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

section { padding: clamp(80px, 10vw, 160px) 0; }
section.tight { padding: clamp(48px, 6vw, 96px) 0; }

/* ────────────────────────────────────── Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px var(--gut);
  gap: 24px;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links.right { justify-content: flex-end; }
.nav-link {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms, color 200ms;
}
.nav-link:hover { border-bottom-color: var(--gold); }
.nav-link.active { border-bottom-color: var(--gold); color: var(--ink); }
body.theme-dark .nav-link { color: var(--paper); }
body.theme-dark .nav { background: color-mix(in oklab, #0e0e0e 88%, transparent); }

/* Wordmark — two-line small caps with flared M apex + gold rule */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  line-height: 1;
  text-align: center;
  color: inherit;
  user-select: none;
}
.wordmark .wm-top, .wordmark .wm-bot {
  display: block;
  font-family: var(--serif);
  letter-spacing: 0.26em;
  font-weight: 400;
}
.wordmark .wm-top { font-size: 18px; }
.wordmark .wm-bot { font-size: 11px; letter-spacing: 0.42em; }
.wordmark .wm-rule {
  width: 36px; height: 1px; background: var(--gold);
  margin: 2px 0;
}
.wordmark.lg .wm-top { font-size: 44px; }
.wordmark.lg .wm-bot { font-size: 22px; }
.wordmark.lg .wm-rule { width: 90px; }
.wordmark.xl .wm-top { font-size: 88px; letter-spacing: 0.22em; }
.wordmark.xl .wm-bot { font-size: 40px; letter-spacing: 0.42em; }
.wordmark.xl .wm-rule { width: 180px; }

/* Monogram MM */
.monogram {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  color: inherit;
}
.monogram em { font-style: normal; color: var(--gold); }

/* ────────────────────────────────────── Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms, color 200ms, border-color 200ms, transform 200ms;
  font-family: var(--sans);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn .arrow { transition: transform 220ms; }
.btn:hover .arrow { transform: translateX(4px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--paper); }

.btn.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.btn.gold:hover { background: var(--ink); color: var(--gold); border-color: var(--ink); }

body.theme-dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body.theme-dark .btn:hover { background: transparent; color: var(--paper); }
body.theme-dark .btn.ghost { background: transparent; color: var(--paper); border-color: var(--paper); }
body.theme-dark .btn.ghost:hover { background: var(--paper); color: var(--ink); }

/* ── Buttons sitting on dark hero surfaces (hero image, commission bars) — */
/*    force-override any theme-level :hover so they always stay readable. */
.btn.on-dark { color: var(--ink); }
.btn.on-dark.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.on-dark.gold:hover,
body.theme-dark .btn.on-dark.gold:hover { background: var(--paper) !important; color: var(--ink) !important; border-color: var(--paper) !important; }

.btn.on-dark.ghost { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn.on-dark.ghost:hover,
body.theme-dark .btn.on-dark.ghost:hover { background: var(--paper) !important; color: var(--ink) !important; border-color: var(--paper) !important; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  cursor: pointer;
  transition: gap 220ms, border-color 220ms;
}
.link-arrow:hover { gap: 16px; border-color: var(--gold); }
body.theme-dark .link-arrow { border-color: var(--paper); }
body.theme-dark .link-arrow:hover { border-color: var(--gold); }

/* (on-dark button rules moved up with base .btn styles) */

/* ────────────────────────────────────── Showcase video */
.film {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
}
.film video, .film .film-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.film .film-poster { filter: brightness(0.72) contrast(1.05); transition: filter 400ms; }
.film:hover .film-poster { filter: brightness(0.82) contrast(1.05); }
.film-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,14,14,0.15) 0%, rgba(14,14,14,0.05) 40%, rgba(14,14,14,0.7) 100%);
  pointer-events: none;
}
.film-overlay.film-overlay--light {
  /* Quieter overlay for the autoplay reel — keep the car readable */
  background: linear-gradient(180deg, rgba(14,14,14,0.28) 0%, rgba(14,14,14,0.0) 30%, rgba(14,14,14,0.0) 65%, rgba(14,14,14,0.6) 100%);
}
.film-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 0 rgba(184,147,90,0.55);
  animation: filmDotPulse 2200ms ease-out infinite;
}
@keyframes filmDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(184,147,90,0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(184,147,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(184,147,90,0); }
}
.film--ambient { cursor: default; }
.film--ambient:hover .film-poster { filter: brightness(0.72) contrast(1.05); }
.film-top {
  position: absolute; top: 28px; left: var(--gut); right: var(--gut);
  display: flex; justify-content: space-between;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  pointer-events: none;
}
.film-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 1px solid var(--paper);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  transition: transform 300ms, background 300ms;
  background: rgba(14,14,14,0.25);
  backdrop-filter: blur(4px);
}
.film:hover .film-play { transform: translate(-50%, -50%) scale(1.06); background: rgba(184,147,90,0.35); border-color: var(--gold); }
.film-bottom {
  position: absolute; left: var(--gut); right: var(--gut); bottom: 28px;
  color: var(--paper);
  display: flex; justify-content: space-between; align-items: end;
  pointer-events: none;
}
.film-bottom .title { font-family: var(--serif); font-size: clamp(28px, 3.2vw, 44px); line-height: 1; }
.film-bottom .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.7; }

/* ────────────────────────────────────── Hero (homepage) */

.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 60px);
  min-height: 640px;
  max-height: 1040px;
  overflow: hidden;
  background: var(--ink);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.78) contrast(1.04);
}
.hero-grain {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0,0,0,0.25) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.1;
  mix-blend-mode: multiply;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14,14,14,0.25) 0%,
    rgba(14,14,14,0.05) 30%,
    rgba(14,14,14,0.05) 60%,
    rgba(14,14,14,0.8) 100%
  );
}
.hero-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 var(--gut) clamp(40px, 6vw, 80px);
  color: var(--paper);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.hero-content .display {
  color: var(--paper);
}
.hero-content .lead { color: rgba(245, 241, 234, 0.86); }
.hero-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 32px var(--gut);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero-top span { opacity: 0.7; }

/* ────────────────────────────────────── Pillars */

.pillar-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.pillar {
  padding: 40px 28px;
  border-left: 1px solid var(--rule);
}
.pillar:first-child { border-left: 0; }
.pillar .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.2em;
}
.pillar h3 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
  margin: 18px 0 12px;
}
.pillar p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ────────────────────────────────────── Big numerals / spec table */

.spec-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr 1fr;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.spec-row:last-child { border-bottom: 1px solid var(--rule); }
.spec-row .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec-row .big {
  font-family: var(--serif);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1;
}
.spec-row .unit { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-left: 6px; }
.spec-row .note { font-size: 13px; color: var(--muted); max-width: 32ch; }

/* ────────────────────────────────────── Cards / tiles */

.tile {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms cubic-bezier(.2,.7,.2,1); }
.tile:hover img { transform: scale(1.03); }
.tile-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px;
  display: flex; justify-content: space-between; align-items: end;
  color: var(--paper);
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
}

/* ────────────────────────────────────── Full-bleed quote */

/* ── The Car section (home) — one model, two trims */
.catalogue-split {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.catalogue-hero {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  cursor: pointer;
  min-height: 620px;
}
.catalogue-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(.2,.7,.2,1);
}
.catalogue-hero:hover img { transform: scale(1.03); }
.catalogue-hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px;
  display: flex; justify-content: space-between; align-items: end;
  color: var(--paper);
  background: linear-gradient(180deg, transparent 0%, rgba(14,14,14,0.7) 100%);
}

.catalogue-trims {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 24px;
}
.trim-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 260ms, border-color 260ms, transform 260ms;
  min-height: 290px;
}
.trim-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.trim-card--dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.trim-card--dark:hover { border-color: var(--gold); }

.trim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
}
.trim-card--dark .trim-head { border-bottom-color: rgba(245,241,234,0.18); opacity: 1; }
.trim-card--dark .trim-head .mono:first-child { color: rgba(245,241,234,0.55); }
.trim-rule { font-style: italic; font-family: var(--serif); letter-spacing: 0; text-transform: none; font-size: 14px; opacity: 0.7; }
.trim-card--dark .trim-rule { opacity: 0.8; }

.trim-name {
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.trim-card--dark .trim-name { color: var(--paper); }

.trim-stats {
  display: flex;
  gap: 40px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
}
.trim-card--dark .trim-stats { border-color: rgba(245,241,234,0.14); }
.trim-num { font-family: var(--serif); font-size: 32px; line-height: 1; }
.trim-unit { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; opacity: 0.55; margin-top: 4px; }

.trim-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  flex: 1;
  margin-bottom: 18px;
  max-width: 38ch;
}
.trim-card--dark .trim-body { color: rgba(245,241,234,0.72); }

.trim-arrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.trim-card--dark .trim-arrow { border-top-color: rgba(245,241,234,0.14); color: var(--gold); }
.trim-card:hover .trim-arrow .arrow { transform: translateX(4px); }
.trim-arrow .arrow { transition: transform 220ms; }

@media (max-width: 960px) {
  .catalogue-split { grid-template-columns: 1fr; }
  .catalogue-hero { min-height: 420px; }
  .catalogue-trims { grid-template-rows: auto; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .catalogue-trims { grid-template-columns: 1fr; }
  .trim-card { min-height: 0; padding: 28px 24px; }
}

.quote-block {
  padding: clamp(80px, 10vw, 160px) var(--gut);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}
.quote-block .display-2 { color: var(--paper); }
.quote-block .author {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ────────────────────────────────────── Footer */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 80px var(--gut) 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(245,241,234,0.12);
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,241,234,0.5);
}
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,241,234,0.5);
  font-weight: 500;
  margin: 0 0 20px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer a { opacity: 0.85; border-bottom: 1px solid transparent; }
.footer a:hover { border-bottom-color: var(--gold); opacity: 1; }

/* ────────────────────────────────────── Configurator */

.cfg-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--paper-2);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.cfg-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 600ms ease;
}
.cfg-topo {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.15;
}
.cfg-hud {
  position: absolute; top: 24px; left: 24px; right: 24px;
  display: flex; justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.cfg-hud .dot { width: 6px; height: 6px; background: var(--gold); border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle; }
.cfg-stamp {
  position: absolute; bottom: 24px; right: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.7;
}

.cfg-panel {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 32px;
}
.cfg-section + .cfg-section { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--rule); }
.cfg-section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 20px;
}
.cfg-section-head .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.cfg-section-head .value { font-family: var(--serif); font-size: 18px; }

.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid var(--rule-strong);
  transition: transform 180ms, box-shadow 180ms;
  position: relative;
}
.swatch:hover { transform: scale(1.08); }
.swatch.active { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--ink); }
body.theme-dark .swatch.active { box-shadow: 0 0 0 2px var(--ink), 0 0 0 3px var(--paper); }

.option-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.option {
  padding: 14px 12px;
  border: 1px solid var(--rule);
  cursor: pointer;
  text-align: left;
  background: transparent;
  color: inherit;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: border-color 200ms, background 200ms;
}
.option .sub { display: block; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 0.12em; margin-top: 4px; text-transform: none; }
.option:hover { border-color: var(--ink); }
.option.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.option.active .sub { color: rgba(245,241,234,0.6); }
body.theme-dark .option.active { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body.theme-dark .option.active .sub { color: rgba(14,14,14,0.6); }

/* ────────────────────────────────────── Tweaks panel */

.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  width: 300px;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 18px;
  font-family: var(--sans);
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  transform: translateY(120%);
  transition: transform 300ms cubic-bezier(.2,.7,.2,1);
}
.tweaks.open { transform: translateY(0); }
.tweaks h4 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex; justify-content: space-between; align-items: center;
}
.tweak-row { padding: 10px 0; border-top: 1px solid var(--rule); }
.tweak-row:first-of-type { border-top: 0; }
.tweak-row label { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.tweak-row .opts { display: flex; gap: 6px; flex-wrap: wrap; }
.tweak-chip {
  padding: 6px 10px;
  border: 1px solid var(--rule-strong);
  font-size: 11px;
  letter-spacing: 0.1em;
  cursor: pointer;
  background: transparent;
  color: inherit;
  font-family: var(--sans);
  text-transform: uppercase;
}
.tweak-chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body.theme-dark .tweaks { background: var(--graphite); border-color: var(--paper); color: var(--paper); }
body.theme-dark .tweak-chip.active { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* WhatsApp FAB */
.fab-whatsapp {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 14px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  border: 1px solid var(--ink);
  transition: transform 200ms, background 200ms;
}
.fab-whatsapp:hover { transform: translateY(-2px); }
.fab-whatsapp .wa-ic {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
body.theme-dark .fab-whatsapp { background: var(--paper); color: var(--ink); border-color: var(--paper); }
body.theme-dark .fab-whatsapp .wa-ic { background: var(--gold); color: var(--ink); }

/* ────────────────────────────────────── Page transitions */
.page-enter { animation: page-in 500ms cubic-bezier(.2,.7,.2,1); }
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ────────────────────────────────────── Gallery */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.gal { overflow: hidden; position: relative; }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms cubic-bezier(.2,.7,.2,1); }
.gal:hover img { transform: scale(1.04); }
.gal-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px;
  color: var(--paper);
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
}

/* Commission bar */
.commission-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 40px;
  background: var(--ink);
  color: var(--paper);
  margin: 0 var(--gut);
}

/* ────────────────────────────────────── Features grid (Tipo 01) */
.features-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.feature-card {
  padding: 40px 32px 44px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  transition: background 220ms;
}
.feature-card:hover { background: var(--paper-2); }
.feature-num {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.feature-title {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  max-width: 18ch;
}
.feature-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 38ch;
}

@media (max-width: 1000px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; padding: 32px 24px; }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — tablet & mobile
   Mobile sweep covers: nav, hero, grids, type, spec rows, gallery,
   features, configurator, tweaks panel, commission bar, footer.
   ───────────────────────────────────────────────────────────── */

/* Tablet & below */
@media (max-width: 860px) {
  .hero-content { grid-template-columns: 1fr; gap: 24px; }
  .pillar-row { grid-template-columns: 1fr 1fr; }
  .pillar { border-left: 0; border-top: 1px solid var(--rule); }
  .nav-inner { grid-template-columns: auto 1fr; }
  .nav-links.left { display: none; }
  .spec-row { grid-template-columns: 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .commission-bar { grid-template-columns: 1fr; margin: 0; padding: 28px 20px; }
  .gallery-grid { gap: 10px; }
}

/* Phones */
@media (max-width: 720px) {
  :root { --gut: 20px; }

  /* Type — keep it readable, don't let clamp upper bounds run wide */
  .display      { font-size: clamp(44px, 11vw, 64px) !important; line-height: 1.02; letter-spacing: -0.02em; }
  .display-2    { font-size: clamp(34px, 9vw, 50px)  !important; line-height: 1.05; }
  .display-3    { font-size: clamp(26px, 7vw, 36px)  !important; line-height: 1.1; }
  .lead         { font-size: 16px !important; line-height: 1.55; }
  .body-copy    { font-size: 15px; }

  /* Section padding */
  section        { padding: 56px 0; }
  section.tight  { padding: 36px 0; }

  /* Force every 12-col grid to single column on phones, regardless of inline gridColumn rules */
  .grid-12 { grid-template-columns: 1fr !important; gap: 20px; }
  .grid-12 > * { grid-column: 1 / -1 !important; }

  /* Pillars stack */
  .pillar-row { grid-template-columns: 1fr; }

  /* Footer fully stacks */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  /* Nav: kill desktop links, surface monogram + the right-side CTA only */
  .nav-inner { grid-template-columns: 1fr auto !important; padding: 12px var(--gut); }
  .nav-links.left { display: none; }
  .nav-links.right { gap: 14px; flex-wrap: nowrap; }
  .nav-links.right .nav-link { display: none; }
  .nav-links.right .nav-link.cta { display: inline-flex; }
  .nav-link { font-size: 11px; letter-spacing: 0.14em; }
  .nav-link.cta {
    background: var(--ink); color: var(--paper);
    padding: 10px 16px; border-radius: 999px;
    border-bottom-color: transparent !important;
  }
  body.theme-dark .nav-link.cta { background: var(--gold); color: var(--ink); }

  /* Wordmark sizes */
  .wordmark.xl .wm-top { font-size: 48px; letter-spacing: 0.2em; }
  .wordmark.xl .wm-bot { font-size: 22px; letter-spacing: 0.36em; }
  .wordmark.xl .wm-rule { width: 100px; }
  .wordmark.lg .wm-top { font-size: 28px; }
  .wordmark.lg .wm-bot { font-size: 14px; }
  .wordmark.lg .wm-rule { width: 60px; }

  /* Hero — let the image breathe, content stacks */
  .hero { min-height: 90vh; }
  .hero-content { padding: 0 var(--gut); gap: 16px; }
  .hero-top { padding: 16px var(--gut); }

  /* Buttons full-width when in CTA bars */
  .commission-bar .btn,
  .commission-bar .btn.gold { width: 100%; justify-content: center; }
  .commission-bar { gap: 18px; padding: 24px 20px; }
  .commission-bar h3 { font-size: clamp(22px, 6vw, 30px) !important; }

  /* Spec table — ensure numbers don't overflow */
  .spec-row .big { font-size: clamp(36px, 10vw, 56px); }
  .spec-row .label { font-size: 11px; }

  /* Catalogue split — already collapses at 960; tighten further on phones */
  .catalogue-hero { min-height: 320px; }
  .catalogue-trims { grid-template-columns: 1fr !important; }
  .trim-card { padding: 24px 22px; min-height: 0; }
  .trim-name { font-size: 38px; }
  .trim-stats { gap: 28px; padding: 14px 0; margin-bottom: 14px; }
  .trim-num { font-size: 26px; }

  /* Features grid */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 28px 22px; min-height: 0; }
  .feature-title { font-size: 22px; max-width: none; }

  /* Gallery — fan into 2 cols on phones, ignore desktop spans */
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
  .gallery-grid > * { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 4/5; }

  /* Configurator — collapse multi-column layouts */
  .config-shell { grid-template-columns: 1fr !important; gap: 24px; }
  .home-stats-row { grid-template-columns: repeat(2, 1fr) !important; gap: 18px !important; bottom: 24px !important; }
  .home-process-row { grid-template-columns: 1fr !important; }
  .tipo-trim-grid { grid-template-columns: 1fr !important; }
  .lineup-trim-grid { grid-template-columns: 1fr !important; }
  .lineup-spec-strip { grid-template-columns: repeat(2, 1fr) !important; }
  .lineup-spec-strip > div:nth-child(2) { border-right: 0 !important; }
  .tipo-next-row { grid-template-columns: 1fr !important; gap: 16px !important; }
  .swatch-row { flex-wrap: wrap; }
  .option-row { grid-template-columns: repeat(2, 1fr); }
  .config-preview { aspect-ratio: 4/3; }

  /* Tweaks panel — full-width sheet on phones */
  .tweaks-panel,
  .tweaks {
    width: calc(100vw - 24px) !important;
    right: 12px !important;
    left: 12px !important;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* WhatsApp floating CTA */
  .wa-fab { right: 14px !important; bottom: 14px !important; }

  /* Hairline rows — wrap label/right when tight */
  .hairline-row { flex-wrap: wrap; gap: 6px 16px; }

  /* Pull-quote padding */
  .quote-block { padding: 64px var(--gut) !important; }

  /* Big monogram MM page transitions, etc. */
  .monogram { font-size: 18px; }
}

/* Very small phones (≤ 380px) — last-mile breathing room */
@media (max-width: 380px) {
  :root { --gut: 16px; }
  .display { font-size: clamp(38px, 11vw, 54px) !important; }
  .commission-bar { padding: 20px 16px; }
  .trim-stats { gap: 20px; }
}
