/* ============================================================
   MASHTI MOTORS — "CIRCUIT"
   Motorsport modern. Archivo Black, IBM Plex Mono, racing red.
   Hard edges, no curves, red used only as a signal — never
   as decoration.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* surface */
  --ink:       #0E0E10;
  --ink-2:     #131316;
  --ink-3:     #17171A;
  --line:      #26262B;
  --line-soft: #1E1E22;

  /* type */
  --paper:     #F2F2F3;
  --mute:      #8E8E93;
  --dim:       #5E5E66;

  /* signal */
  --red:       #E8352A;
  --red-deep:  #C22A20;
  --red-wash:  rgba(232, 53, 42, 0.12);

  /* fonts */
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* rhythm */
  --gut: 1.25rem;
  --section: 5rem;
  --maxw: 1400px;
  --maxw-text: 44rem;

  /* the signature angled cut */
  --cut: polygon(0 0, 100% 0, calc(100% - 13px) 100%, 0 100%);

  --ease: cubic-bezier(0.16, 0.84, 0.44, 1);
}

@media (min-width: 900px) {
  :root { --gut: 2.5rem; --section: 8rem; }
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--red); color: #fff; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
  /* Safety net for very narrow screens (folding phones, heavy zoom). A long
     word like COLLECTION is wider than a ~280px column at the minimum type
     size; without this the whole page scrolls sideways. Never triggers at
     320px and up, so real phones are unaffected. */
  overflow-wrap: break-word;
}

.d1 { font-size: clamp(2.6rem, 10vw, 7rem); }
.d2 { font-size: clamp(2rem, 6.5vw, 4.25rem); }
.d3 { font-size: clamp(1.5rem, 3.8vw, 2.5rem); }
.d4 { font-size: clamp(1.15rem, 2.2vw, 1.5rem); line-height: 1.05; }

/* red emphasis word inside a headline */
.d1 em, .d2 em, .d3 em { font-style: normal; color: var(--red); }

/* mono kicker with the red lead rule */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 1.6rem;
  height: 2px;
  background: var(--red);
}
.eyebrow--dim { color: var(--mute); }
.eyebrow--dim::before { background: var(--dim); }
.eyebrow--bare { display: block; }
.eyebrow--bare::before { display: none; }

.lede {
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.6;
  color: var(--mute);
  max-width: var(--maxw-text);
  font-weight: 400;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.prose { max-width: var(--maxw-text); color: var(--mute); }
.prose strong { color: var(--paper); font-weight: 600; }
.prose a { color: var(--red); }

.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- 4. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.wrap--narrow { max-width: 62rem; }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.62); }
.section--sunken { background: var(--ink-2); }

.rule { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-bottom: 2.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .section-head { margin-bottom: 4rem; } }

/* ---------- 5. Masthead ---------- */
.masthead {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  border-bottom: 1px solid transparent;
  transition: background 300ms var(--ease), border-color 300ms var(--ease);
}
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.72), transparent);
  transition: opacity 300ms var(--ease);
  pointer-events: none;
}
.masthead.is-stuck {
  background: rgba(14, 14, 16, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.masthead.is-stuck::before { opacity: 0; }
/* the red signature rule, revealed on scroll */
.masthead::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 0;
  background: var(--red);
  transition: width 700ms var(--ease);
}
.masthead.is-stuck::after { width: 100%; }

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 66px;
}
@media (min-width: 900px) { .masthead__inner { min-height: 84px; } }

/* --- the lockup --- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}
.wordmark .bar {
  flex: 0 0 auto;
  width: 0.36rem;
  height: 1.25rem;
  background: var(--red);
  transform: skewX(-16deg);
  transition: height 300ms var(--ease);
}
.wordmark span {
  font-weight: 500;
  font-size: 0.56rem;
  letter-spacing: 0.3em;
  color: var(--mute);
  align-self: flex-end;
  padding-bottom: 0.1rem;
}
@media (min-width: 900px) {
  .wordmark { font-size: 1.5rem; }
  .wordmark .bar { width: 0.44rem; height: 1.55rem; }
  .wordmark span { font-size: 0.62rem; }
}
a.wordmark:hover .bar { height: 1.9rem; }

/* --- desktop nav --- */
.nav { display: none; }
@media (min-width: 1000px) { .nav { display: flex; align-items: center; gap: 2.25rem; } }
.nav a {
  position: relative;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  padding-block: 0.5rem;
  transition: color 200ms var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.1rem;
  height: 2px; width: 0;
  background: var(--red);
  transition: width 300ms var(--ease);
}
.nav a:hover { color: var(--paper); }
.nav a:hover::after { width: 100%; }
.nav a[aria-current="page"] { color: var(--paper); }
.nav a[aria-current="page"]::after { width: 100%; }

/* --- menu button --- */
.menu-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
@media (min-width: 1000px) { .menu-btn { display: none; } }
.menu-btn i {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--paper);
  transition: transform 320ms var(--ease), opacity 180ms var(--ease), background 200ms;
}
.menu-btn i:nth-child(2) { width: 16px; background: var(--red); }
.menu-btn[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- mobile drawer --- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem var(--gut) 2.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.75rem);
  transition: opacity 320ms var(--ease), transform 380ms var(--ease), visibility 320ms;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
@media (min-width: 1000px) { .drawer { display: none; } }

.drawer nav { display: flex; flex-direction: column; }
.drawer nav a {
  font-family: var(--sans);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 10vw, 2.9rem);
  line-height: 1.25;
  padding-block: 0.3em;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.drawer nav a i {
  font-family: var(--mono);
  font-style: normal;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--red);
}
.drawer__foot {
  margin-top: auto;
  padding-top: 2.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--dim);
  letter-spacing: 0.02em;
}
.drawer__foot a { color: var(--mute); display: block; margin-bottom: 0.4rem; }

/* ---------- 6. Buttons ---------- */
.btn {
  --pad: 1rem 2rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: var(--pad);
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  border: 0;
  color: var(--paper);
  cursor: pointer;
  text-align: center;
  transition: color 220ms var(--ease);
}
/* the angled fill lives on a pseudo so focus outlines stay visible */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--red);
  clip-path: var(--cut);
  transition: background 220ms var(--ease), transform 260ms var(--ease);
}
.btn span { position: relative; z-index: 1; }
.btn:hover::before { background: var(--red-deep); }
.btn:active::before { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; }

.btn--ghost { color: var(--paper); }
.btn--ghost::before {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: none;
}
.btn--ghost:hover { color: var(--ink); }
.btn--ghost:hover::before { background: var(--paper); box-shadow: none; }

/* .btn--solid is the default red; keep the class working */
.btn--solid { color: #fff; }

.btn--wide { width: 100%; }
.btn--sm { --pad: 0.75rem 1.4rem; font-size: 0.68rem; }

/* text link with arrow */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
  transition: color 200ms var(--ease), border-color 220ms var(--ease);
}
.tlink svg { transition: transform 300ms var(--ease); }
.tlink:hover { color: var(--red); border-bottom-color: var(--red); }
.tlink:hover svg { transform: translateX(4px); }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink-2);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 56%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1100ms var(--ease), transform 2400ms var(--ease);
}
.hero__media img.is-in { opacity: 1; transform: none; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  /* Weighted so the kicker and headline always sit on dark, whatever the
     photo behind them is doing. */
  background: linear-gradient(to top,
    rgba(14,14,16,0.97) 0%, rgba(14,14,16,0.88) 26%,
    rgba(14,14,16,0.58) 48%, rgba(14,14,16,0.22) 72%,
    rgba(14,14,16,0.55) 100%);
}
.hero__inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-top: 7rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 900px) { .hero__inner { padding-bottom: 5rem; } }

.hero h1 { max-width: 15ch; margin-bottom: 1.5rem; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  max-width: 42rem;
}
.hero__meta i { font-style: normal; color: var(--red); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 480px) { .hero__cta { flex-direction: column; align-items: stretch; } }

.scroll-cue {
  position: absolute;
  left: var(--gut); bottom: 1.5rem;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
@media (min-width: 1000px) { .scroll-cue { display: flex; } }
.scroll-cue::after {
  content: "";
  width: 42px; height: 2px;
  background: var(--red);
  transform-origin: left;
  animation: cue 2.2s var(--ease) infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleX(0.25); opacity: 0.5; }
  50%      { transform: scaleX(1);    opacity: 1; }
}

/* interior page header */
.pagehead {
  padding-top: calc(66px + 3rem);
  padding-bottom: 2.25rem;
}
@media (min-width: 900px) {
  .pagehead { padding-top: calc(84px + 4.5rem); padding-bottom: 3rem; }
}
.pagehead h1 { margin-bottom: 1.25rem; }

/* ---------- 8. Marque ticker ---------- */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--ink-2);
  overflow: hidden;
  padding-block: 0.9rem;
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: roll 38s linear infinite;
}
.ticker__track span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
  padding-inline: 1.5rem;
  white-space: nowrap;
}
.ticker__track span::after { content: "◦"; margin-left: 3rem; color: var(--red); }
@keyframes roll { to { transform: translateX(-50%); } }
.ticker:hover .ticker__track { animation-play-state: paused; }

/* ---------- 9. Vehicle cards ---------- */
.grid {
  display: grid;
  gap: 2rem 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 2.5rem 1.75rem; } }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 800px) { .grid--2 { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; } }

.card {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  background: var(--ink);
  transition: border-color 260ms var(--ease), background 260ms var(--ease);
}
.card:hover { border-color: var(--red); background: var(--ink-2); }

.card__frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line);
}
.card__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease), filter 500ms var(--ease);
}
.card:hover .card__frame img { transform: scale(1.04); }

.card__body { padding: 1.1rem 1.15rem 1.25rem; }
.card__year {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 0.5rem;
}
.card__title {
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  font-size: 1.12rem;
  line-height: 1.1;
  margin: 0 0 0.6rem;
}
.card__title em { font-style: normal; font-weight: 500; color: var(--mute); }
.card__sub {
  font-size: 0.85rem;
  color: var(--mute);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.card__price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.card__price s {
  text-decoration: none;
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.badge {
  position: absolute;
  top: 0; left: 0;
  z-index: 3;
  padding: 0.45rem 1.35rem 0.45rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff;
  clip-path: var(--cut);
}
.badge--sold     { background: var(--paper); color: var(--ink); }
.badge--reserved { background: var(--ink); color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.badge--new      { background: var(--red); color: #fff; }
/* Deliberately not red: a car that can't be bought yet shouldn't shout as
   loudly as one that just landed. */
.badge--soon     { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px rgba(242, 242, 243, 0.35); }

.is-sold .card__frame img { filter: grayscale(1) brightness(0.55); }
.is-sold:hover { border-color: var(--line); }
.is-sold:hover .card__frame img { filter: grayscale(1) brightness(0.65); }

/* placeholder when a photo is missing */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(115deg, var(--ink-3) 0 22px, var(--ink-2) 22px 44px);
  color: rgba(232, 53, 42, 0.55);
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
}
.ph small {
  position: absolute;
  bottom: 1rem;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  padding-inline: 1rem;
  text-align: center;
}

/* Photos stack over the placeholder; a missing file removes its own
   <img> (see app.js) so the placeholder shows through. */
.card__frame img, .v-hero img, .thumb img, .hero__media img, .split__media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ---------- 10. Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.5rem;
  justify-content: space-between;
  padding-block: 1.15rem;
  border-block: 1px solid var(--line);
  margin-bottom: 2.5rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chip {
  padding: 0.5rem 1.05rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  white-space: nowrap;
  transition: color 200ms var(--ease), border-color 200ms var(--ease), background 200ms var(--ease);
}
.chip:hover { color: var(--paper); border-color: var(--mute); }
.chip[aria-pressed="true"] { color: #fff; background: var(--red); border-color: var(--red); }

.selectwrap { position: relative; display: inline-flex; align-items: center; }
.selectwrap::after {
  content: "";
  position: absolute; right: 0.85rem;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--red);
  pointer-events: none;
}
select {
  appearance: none; -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--mute);
  padding: 0.5rem 2.2rem 0.5rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
}
select option { background: var(--ink-2); color: var(--paper); }

.result-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
}

/* On phones the count gets its own line and the two selects split the
   width, instead of wrapping into three ragged rows. */
@media (max-width: 700px) {
  .filters { gap: 0.8rem; }
  .filters > .chips:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }
  .filters > .chips:last-child .result-count { grid-column: 1 / -1; order: -1; }
  .filters .selectwrap, .filters .selectwrap select { width: 100%; }
}

.empty {
  padding: 4.5rem 1rem;
  text-align: center;
  border: 1px solid var(--line);
}
.empty p { color: var(--mute); margin-bottom: 1.75rem; }

/* ---------- 11. Vehicle detail ---------- */
/* Phone photos arrive portrait, documents arrive landscape. `contain` shows
   every one of them whole — cropping a build sheet hides information, and
   cropping a portrait shot decapitates the car. */
/* Full-bleed stage, same idea as the homepage hero: edge to edge and tall
   enough to fill the screen, with the photo cropped to fill it. Paperwork
   (any file named "-doc") opts out and is shown whole — cropping a window
   sticker would cut off the numbers that matter. */
.v-hero {
  position: relative;
  width: 100%;
  height: 58svh;
  background: var(--ink);
  overflow: hidden;
  cursor: zoom-in;
}
@media (min-width: 900px) { .v-hero { height: 86svh; } }

.v-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  z-index: 1;
}

/* documents: whole, never cropped */
.v-hero.is-doc { height: 62svh; background: #08080A; }
@media (min-width: 900px) { .v-hero.is-doc { height: 78svh; } }
.v-hero img.is-doc {
  object-fit: contain;
  object-position: center;
}

.v-count {
  position: absolute;
  right: var(--gut);
  bottom: 1.1rem;
  z-index: 3;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--mute);
  background: rgba(14, 14, 16, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.4rem 0.8rem;
  pointer-events: none;
}
.v-count b { color: var(--paper); font-weight: 500; }

.thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 28vw;
  gap: 0.4rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-top: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
@media (min-width: 700px)  { .thumbs { grid-auto-columns: 14vw; } }
@media (min-width: 1200px) { .thumbs { grid-auto-columns: 10rem; } }
.thumbs::-webkit-scrollbar { height: 2px; }
.thumbs::-webkit-scrollbar-thumb { background: var(--line); }
.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-2);
  border: 0; padding: 0;
  cursor: pointer;
  scroll-snap-align: start;
  opacity: 0.42;
  transition: opacity 260ms var(--ease);
}
.thumb::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 3;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow 220ms var(--ease);
}
.thumb .ph { font-size: 1rem; }
.thumb .ph small { display: none; }
.thumb:hover { opacity: 0.8; }
.thumb[aria-current="true"] { opacity: 1; }
.thumb[aria-current="true"]::after { box-shadow: inset 0 0 0 2px var(--red); }

.v-layout {
  display: grid;
  gap: 3rem;
  grid-template-columns: 1fr;
}
@media (min-width: 1020px) {
  .v-layout { grid-template-columns: minmax(0, 1fr) 22rem; gap: 4rem; align-items: start; }
}

.v-title { margin-bottom: 1rem; }

.aside {
  position: sticky;
  top: calc(84px + 1.25rem);
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 1.5rem;
}
@media (max-width: 1019px) { .aside { position: static; } }
.aside__price {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.03em;
  font-size: 2.4rem;
  line-height: 1;
  margin: 0 0 0.5rem;
}
.aside__note {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.aside__actions { display: grid; gap: 0.6rem; margin-bottom: 1.5rem; }
.aside__contact {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--mute);
  line-height: 1.9;
}
.aside__contact a:hover { color: var(--red); }

/* the spec readout — this is where Circuit earns its keep */
.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--paper);
}
@media (min-width: 780px) { .specs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.specs div {
  padding: 0.95rem 1.25rem 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.specs dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.3rem;
}
.specs dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.35;
}

.highlights { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.highlights li {
  position: relative;
  padding: 0.8rem 0 0.8rem 2.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.95rem;
}
.highlights li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.35rem;
  width: 14px; height: 2px;
  background: var(--red);
}

/* ---------- 12. Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 8, 9, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-btn {
  position: absolute;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--paper);
  width: 46px; height: 46px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.lb-btn:hover { border-color: var(--red); color: var(--red); }
.lb-close { top: 1.25rem; right: 1.25rem; }
.lb-prev  { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--mute);
}

/* ---------- 13. Splits, pillars, quote ---------- */
.split {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, 1fr); gap: 4rem; }
  .split--wide { grid-template-columns: 1.1fr 1fr; }
  .split--flip > *:first-child { order: 2; }
}
.split__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
}

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 2px solid var(--paper);
}
@media (min-width: 820px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 820px) {
  .pillar { padding: 2.25rem 2.25rem 2.5rem 0; border-bottom: 0; border-right: 1px solid var(--line); }
  .pillar:last-child { border-right: 0; padding-right: 0; }
  .pillar + .pillar { padding-left: 2.25rem; }
}
.pillar__n {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 1.1rem;
}
.pillar h3 {
  font-size: 1.4rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}
.pillar p { color: var(--mute); font-size: 0.93rem; margin: 0; }

.quote {
  font-family: var(--sans);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  font-size: clamp(1.5rem, 3.6vw, 2.5rem);
  line-height: 1.02;
  max-width: 20ch;
  color: var(--paper);
  margin: 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--red);
}
.quote--wide { max-width: 26ch; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.25rem; }
@media (min-width: 800px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat b {
  display: block;
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat span {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- 14. Forms ---------- */
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; gap: 1.25rem; }
@media (min-width: 700px) { .form__row { grid-template-columns: repeat(2, 1fr); } }

.field { position: relative; display: block; }
.field > span {
  display: block;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.5rem;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: 0.8rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--paper);
  border-radius: 0;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.field select { text-transform: none; letter-spacing: 0; }
.field textarea { resize: vertical; min-height: 7rem; line-height: 1.6; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--red);
  background: var(--ink-3);
}
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }

.form__note { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); line-height: 1.7; }
.form__status {
  font-size: 0.88rem;
  padding: 0.9rem 1.05rem;
  border-left: 3px solid var(--line);
  background: var(--ink-2);
  display: none;
}
.form__status.is-shown { display: block; }
.form__status.is-ok  { border-left-color: var(--red); color: var(--paper); }
.form__status.is-err { border-left-color: #E8A02A; color: #F0C07A; }

.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ---------- 15. Footer ---------- */
.foot {
  border-top: 2px solid var(--red);
  padding-block: 3.25rem 2rem;
  background: var(--ink-2);
}
.foot__grid {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: 1fr;
  margin-bottom: 3rem;
}
@media (min-width: 760px)  { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; } }
@media (min-width: 1080px) { .foot__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.foot h4 {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1.1rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 0.5rem; }
.foot a, .foot address {
  font-size: 0.88rem;
  color: var(--mute);
  font-style: normal;
  line-height: 1.8;
  transition: color 200ms var(--ease);
}
.foot a:hover { color: var(--red); }
.foot__blurb { font-size: 0.86rem; color: var(--dim); max-width: 32ch; margin-top: 1.1rem; }
.foot__base {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}

/* ---------- 16. Reveal ---------- */
.rv {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 620ms var(--ease), transform 700ms var(--ease);
}
.rv.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hero__media img { opacity: 1; transform: none; transition: none; }
  .ticker__track { animation: none; }
  .scroll-cue::after { animation: none; transform: scaleX(1); }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 17. Utilities ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; top: -100px; left: var(--gut);
  z-index: 200;
  background: var(--red); color: #fff;
  padding: 0.7rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  transition: top 180ms var(--ease);
}
.skip:focus { top: 1rem; }
/* <br class="wide"> balances a headline on desktop but is dropped on
   phones, where the forced break strands single words on their own line. */
@media (max-width: 700px) { br.wide { display: none; } }

.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.center { text-align: center; margin-inline: auto; }
.center .eyebrow { justify-content: center; }
