@font-face { font-family: "Saira"; src: url("fonts/saira-latin.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 50% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Saira"; src: url("fonts/saira-latin-italic.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 50% 125%; font-style: italic; font-display: swap; }

:root {
  --gloss: #FAFAF8; --plate: #FFFFFF; --ink: #1A1714; --ink-2: #5A534C; --rule: #D9D4CC;
  --espresso: #2A1A12; --espresso-deep: #140C08; --scrim: rgba(20,12,8,.78); --on-espresso: #F4EEE6; --on-espresso-2: #C9B9A8; --espresso-rule: #4A3628;
  --orange: #C44A16; --on-orange: #FFFFFF; --orange-rule: #DB7A50;
  --mustard: #E3A72F; --rust: #7A2A12;
  --wa: #25D366; --wa-pressed: #1EBE5A; --on-wa: #0B1F14;
  --gutter: 20px; --max: 1180px;
  --font: "Saira", "Arial Narrow", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--rust) var(--gloss); }
body { margin: 0; background: var(--gloss); color: var(--ink); font: 400 18px/1.5 var(--font); font-stretch: 100%;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
::selection { background: var(--mustard); color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sprite { position: absolute; }
[hidden] { display: none !important; }

/* Catalogue stripe */
.stripe { display: grid; grid-template-rows: repeat(3, 7px); }
.stripe i { display: block; transform-origin: left; }
.stripe i:nth-child(1) { background: var(--mustard); }
.stripe i:nth-child(2) { background: var(--orange); }
.stripe i:nth-child(3) { background: var(--rust); }
.stripe.thin { grid-template-rows: repeat(3, 3px); }

/* Dash list (Marco's items) */
.dash { list-style: none; margin: 0; padding: 0; }
.dash li { position: relative; padding: 6px 0 6px 20px; line-height: 1.4; }
.dash li::before { content: ""; position: absolute; left: 0; top: 1em; width: 10px; height: 2px; background: var(--rust); }

/* WhatsApp button */
.wa { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 58px; padding: 0 22px;
  border-radius: 2px; background: var(--wa); color: var(--on-wa); text-decoration: none;
  font: 700 18px/1 var(--font); font-stretch: 112%; letter-spacing: .01em;
  transition: background-color 120ms ease, transform 120ms var(--ease-out); -webkit-tap-highlight-color: transparent; }
.wa:hover { background: var(--wa-pressed); }
.wa:active { transform: scale(.98); }
.wa svg { width: 26px; height: 26px; flex: none; }

/* ---------- Cover ---------- */
.cover-band { background: var(--espresso); color: var(--on-espresso); padding: 14px var(--gutter) 10px; }
.cover-band .inner { max-width: var(--max); margin: 0 auto; }
.marque { display: block; width: 100%; height: auto; }
.marque text { font-family: var(--font); font-weight: 800; font-stretch: 125%; fill: var(--on-espresso); }
.cover-photo { height: clamp(280px, 42svh, 520px); overflow: hidden; background: var(--rule); }
.cover-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; }
.cover-copy { display: flex; flex-direction: column; padding: 20px var(--gutter) 32px; }
.cover-copy h1 { order: 1; margin: 0; font: 700 26px/1.1 var(--font); font-stretch: 118%; letter-spacing: -.005em; }
.cover-copy .price { order: 2; margin: 6px 0 16px; }
.cover-copy .wa { order: 3; }
.cover-copy .keys { order: 4; margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 17px; }
.price { display: block; font: 800 clamp(46px, 13vw, 80px)/1 var(--font); font-stretch: 125%; letter-spacing: -.015em; }

/* ---------- Section scaffolding ---------- */
.page { padding: 72px 0; }
.page-head { margin-bottom: 26px; }
.page-head h2 { margin: 0; font: 800 clamp(38px, 10.5vw, 80px)/.95 var(--font); font-stretch: 125%; letter-spacing: -.015em; text-wrap: balance; }
.page-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 36rem; }

/* ---------- Gallery (espresso) ---------- */
.espresso { background: var(--espresso); color: var(--on-espresso); }
.espresso .page-head p { color: var(--on-espresso-2); }
.stage { position: relative; margin: 0 calc(var(--gutter) * -1); background: var(--espresso-deep); aspect-ratio: 4 / 5; overflow: hidden; touch-action: pan-y; }
.stage img { width: 100%; height: 100%; object-fit: contain; transition: opacity 220ms ease; }
.stage img.swap { opacity: 0; }
.count { position: absolute; top: 12px; left: 12px; padding: 7px 11px; background: var(--scrim); color: var(--on-espresso);
  font: 700 14px/1 var(--font); font-stretch: 118%; letter-spacing: .06em; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 2px; border: 0;
  background: var(--scrim); color: var(--on-espresso); display: grid; place-items: center; cursor: pointer;
  transition: background-color 150ms ease; }
.nav:hover { background: var(--orange); }
.nav svg { width: 22px; height: 22px; }
.nav.prev { left: 10px; } .nav.next { right: 10px; }
.expand { position: absolute; top: 10px; right: 10px; height: 40px; padding: 0 12px; border: 0; background: var(--scrim);
  color: var(--on-espresso); display: flex; align-items: center; gap: 8px; cursor: pointer; font: 600 13px/1 var(--font); font-stretch: 118%; letter-spacing: .08em; }
.expand svg { width: 16px; height: 16px; }
.stage-cap { display: flex; gap: 10px; align-items: baseline; min-height: 2.8em; margin: 12px 0 4px; color: var(--on-espresso-2); font-size: 16px; line-height: 1.4; }
.stage-cap b { flex: none; font: 700 13px/1.4 var(--font); font-stretch: 118%; letter-spacing: .1em; text-transform: uppercase; color: var(--mustard); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 8px; scrollbar-width: thin; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.thumbs a { flex: 0 0 72px; height: 72px; display: block; background: var(--espresso-deep); scroll-snap-align: start;
  outline: 3px solid transparent; outline-offset: -3px; transition: opacity 150ms ease; }
.thumbs a img { width: 100%; height: 100%; object-fit: cover; }
.thumbs a[aria-current="false"] { opacity: .62; }
.thumbs a[aria-current="false"]:hover { opacity: .9; }
.thumbs a[aria-current="true"] { opacity: 1; outline-color: var(--mustard); }

/* ---------- Descripción ---------- */
.drawing { position: relative; margin: 6px calc(var(--gutter) * -1) 44px; padding: 0 8px; }
.drawing svg { display: block; width: 100%; height: auto; overflow: visible; }
.hatch-line { stroke: var(--ink); }
.hub { fill: var(--gloss); }
.lamp-front { fill: var(--mustard); }
.lamp-rear { fill: var(--orange); }
.ln { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ln.fine { stroke-width: 1; }
.ln.heavy { stroke-width: 3; }
.ln.lead { stroke: var(--orange); stroke-width: 1.4; stroke-dasharray: none; }
.tip { fill: var(--orange); }
/* Draw-on. Dashes can't measure a non-scaling stroke, so while it draws the stroke scales with the
   car and --k (viewBox units per screen pixel, from main.js) keeps its width. */
.armed .ln, .armed .hatch-fill, .armed .wash, .armed .tip { opacity: 0; }
.armed.drawn .ln { vector-effect: none; stroke-width: calc(1.6px * var(--k)); stroke-dasharray: 1;
  animation: draw var(--dur, 1200ms) cubic-bezier(.45, 0, .55, 1) var(--wait) both; }
.armed.drawn .ln.fine { stroke-width: calc(1px * var(--k)); }
.armed.drawn .ln.heavy { stroke-width: calc(3px * var(--k)); }
.armed.drawn .ln.lead { stroke-width: calc(1.4px * var(--k)); }
.armed.drawn .hatch-fill, .armed.drawn .wash, .armed.drawn .tip { opacity: 1; transition: opacity 800ms ease 2800ms; }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 0; } 4% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }
/* Full size from 390px up; padding, type and tracking tighten below it so both rows fit at 320px. */
.tag { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; height: 40px; text-decoration: none; padding: 0 clamp(6px, 8.6vw - 21.5px, 12px); border: 1.5px solid var(--ink); background: var(--plate);
  font: 700 clamp(11px, 1.43vw + 6.5px, 12px)/1 var(--font); font-stretch: 118%; letter-spacing: clamp(.4px, 1.15vw - 3.25px, .1em); text-transform: uppercase; white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.tag.motor { left: 17%; top: 6%; }
.tag.interior { left: 50%; top: 6%; }
.tag.audio { left: 84%; top: 6%; }
.tag.frenos { left: 23.4%; top: 93%; }
.tag.carroceria { left: 52%; top: 93%; }
.tag.escape { left: 89%; top: 93%; }
.tag:hover { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }

.groups { columns: 1; }
.group { break-inside: avoid; margin: 0 0 34px; scroll-margin-top: 24px; transition: background-color 900ms ease; }
.group.lit { background-color: color-mix(in srgb, var(--mustard) 30%, transparent); transition: none; }
.group h3 { margin: 0 0 4px; padding-top: 10px; border-top: 2px solid var(--ink); font: 800 22px/1.15 var(--font); font-stretch: 118%; }
.group .dash li { border-bottom: 1px solid var(--rule); font-size: 17px; padding-top: 8px; padding-bottom: 8px; }
.group .dash li::before { top: 1.2em; }
.group .lead-in { display: block; font-weight: 600; }
.group .dash .dash li { border: 0; padding: 3px 0 3px 18px; color: var(--ink-2); font-size: 16.5px; }
.group .dash .dash li::before { width: 7px; background: var(--mustard); top: .95em; }
.group .dash .dash { margin-top: 4px; }
.group p.note { margin: 6px 0 0 0; font: italic 400 16px/1.4 var(--font); color: var(--ink-2); }

/* ---------- Engine (orange) ---------- */
.orange { background: var(--orange); color: var(--on-orange); scroll-margin-top: 0; }
.orange .page-head p { color: var(--on-orange); }
.engine-photo { margin: 0 calc(var(--gutter) * -1) 28px; }
.engine-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 55%; }
.highlights { list-style: none; margin: 0 0 36px; padding: 0; border-top: 2px solid var(--on-orange); }
.highlights li { padding: 14px 0; border-bottom: 1px solid var(--orange-rule); font: 800 clamp(22px, 6vw, 30px)/1.08 var(--font); font-stretch: 118%; letter-spacing: -.005em; }
.orange .dash li { border-bottom: 1px solid var(--orange-rule); padding: 9px 0 9px 20px; font-size: 17px; }
.orange .dash li::before { background: var(--mustard); top: 1.2em; }

/* ---------- Back cover ---------- */
.back { background: var(--espresso); color: var(--on-espresso); padding: 56px 0 140px; }
.back .marque { margin-bottom: 28px; }
.back .price { color: var(--on-espresso); margin-bottom: 22px; }
.back .wa:focus-visible { outline-color: var(--mustard); }

/* ---------- Sticky bar ---------- */
.sticky { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--plate);
  transform: translateY(110%); transition: transform 320ms var(--ease-out); }
.sticky.show { transform: none; }
.sticky .row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); }
.sticky .p { font: 800 24px/1 var(--font); font-stretch: 125%; }
.sticky .p small { display: block; margin-top: 3px; font: 600 11px/1 var(--font); letter-spacing: .14em; color: var(--ink-2); }
.sticky .wa { width: auto; height: 50px; font-size: 16px; }

/* ---------- Full screen ---------- */
dialog.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--espresso-deep); color: var(--on-espresso); }
dialog.viewer::backdrop { background: var(--espresso-deep); }
.viewer img { width: 100%; height: 100%; object-fit: contain; }
.viewer .close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; height: 44px; padding: 0 16px; border: 1px solid var(--espresso-rule);
  background: var(--espresso); color: var(--on-espresso); font: 600 14px/1 var(--font); font-stretch: 118%; letter-spacing: .1em; cursor: pointer; }
.viewer .nav { z-index: 1; }
dialog.viewer[open] { animation: open 240ms var(--ease-out); }

/* ---------- Motion ---------- */
.stripe.wipe i { animation: wipe 900ms var(--ease-out) both; }
.stripe.wipe i:nth-child(2) { animation-delay: 90ms; }
.stripe.wipe i:nth-child(3) { animation-delay: 180ms; }
@keyframes wipe { from { transform: scaleX(0); } }
@keyframes open { from { opacity: 0; } }
.static .stripe.wipe i { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stripe.wipe i, dialog.viewer[open] { animation: none; }
  .sticky, .group, .tag, .wa, .stage img { transition: none; }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .cover-band { padding: 20px var(--gutter) 12px; }
  .cover-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-bottom: 64px; }
  .cover-photo { height: min(calc(100vh - 220px), 760px); min-height: 520px; }
  .cover-photo img { object-position: 50% 72%; }
  .cover-copy { max-width: 470px; padding: 0 var(--gutter) 0 0; }
  .cover-copy h1 { font-size: 34px; }
  .cover-copy .keys { order: 2; margin: 18px 0 26px; padding-top: 0; border-top: 0; font-size: 18px; }
  .cover-copy .keys li { border-top: 1px solid var(--rule); padding: 10px 0 10px 20px; }
  .cover-copy .keys li::before { top: 1.25em; }
  .cover-copy .price { order: 3; margin: 0 0 20px; font-size: 76px; }
  .cover-copy .wa { order: 4; max-width: 420px; }
  .stage { margin: 0; aspect-ratio: auto; height: min(72vh, 720px); }
  .nav { width: 56px; height: 56px; }
  .nav.prev { left: 18px; } .nav.next { right: 18px; }
  .thumbs { margin: 0; padding: 4px 0 8px; }
  .thumbs a { flex-basis: 88px; height: 88px; }
  .drawing { margin: 10px 0 56px; padding: 0 40px; }
  .tag { font-size: 13px; height: 38px; padding: 0 16px; }
  .groups { columns: 3; column-gap: 48px; }
  .engine-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
  .engine-photo { margin: 0; position: sticky; top: 24px; }
  .orange .dash { columns: 2; column-gap: 32px; }
  .orange .dash li { break-inside: avoid; }
  .back { padding-bottom: 72px; }
  .back-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
  .back .wa { width: 420px; }
  .sticky { display: none; }
}
