/* ============ California Clear Bra: redesign concept ============
   One page. Brand colours sampled from the logo: black, red, steel gray.
   Type: Archivo (variable width). Wide cut for display, normal cut for reading.
   The scroll stage (hero shrinks into the centre tile while the categories arrive)
   is driven by js/app.js and only switches on under html.motion. Without JS, or with
   reduced motion, the same markup is a normal hero followed by a category grid. */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --black: #000;
  --panel: #131313;
  --line: #2a2a2a;
  --red: #bd1926;        /* logo red */
  --red-hot: #e3212f;    /* the light strips */
  --steel: #545352;      /* logo gray */
  --mist: #aeada9;
  --white: #f5f4f1;

  --m: 3vw;              /* page margin */
  --g: 1.3vw;            /* gap between tiles */
  --nav-h: 92px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); color-scheme: dark; scroll-behavior: smooth; }
html.motion { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p, ul, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--m), 1280px); margin-inline: auto; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 99; padding: 10px 14px; background: var(--white); color: #000; }
.skip:focus { top: 12px; }

h2 {
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 700;
  font-stretch: 122%;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 2px;
  font-size: 15.5px; font-weight: 650; font-stretch: 108%;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hot); }
.btn-line { border-color: rgba(255, 255, 255, .45); color: #fff; background: rgba(0, 0, 0, .25); }
.btn-line:hover { border-color: #fff; }
.btn-small { height: 40px; padding: 0 16px; font-size: 14px; background: transparent; border-color: #3d3d3d; color: var(--white); }
.btn-small:hover { border-color: var(--red-hot); }
.text-link { font-weight: 600; text-underline-offset: 5px; text-decoration-color: var(--red-hot); }
.text-link:hover { color: #fff; text-decoration-thickness: 2px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  height: var(--nav-h); padding: 0 var(--m);
  transition: background-color .3s, height .3s;
}
.nav::after {   /* the hairline under the solid bar */
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: var(--line); opacity: 0; transition: opacity .3s;
}
.nav-solid .nav { background: rgba(0, 0, 0, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); height: 74px; }
.nav-solid .nav::after { opacity: 1; }
.nav-logo { flex: none; display: block; }
.nav-logo img { width: clamp(112px, 10.5vw, 158px); height: auto; transition: width .3s; }
.nav-solid .nav-logo img { width: clamp(100px, 8.6vw, 128px); }
.nav-links { display: flex; gap: clamp(16px, 2.1vw, 34px); margin-left: auto; }
.nav-links a, .nav-cart {
  position: relative; padding: 8px 0;
  font-size: 14.5px; font-weight: 550; font-stretch: 108%;
  text-decoration: none; color: var(--white);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px;
  background: var(--red-hot); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cart span {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 4px; padding: 0 6px;
  border-radius: 11px; background: var(--red); font-size: 12.5px; font-weight: 700;
}
.nav-toggle { display: none; height: 42px; padding: 0 16px; background: transparent; border: 1px solid rgba(255, 255, 255, .45); border-radius: 2px; font-weight: 650; font-size: 14.5px; cursor: pointer; }

/* ---------- stage: static layout first (no JS / reduced motion) ---------- */
.stage { position: relative; }
.stage-pin { position: relative; }
.hero-frame { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: #050505; }
.hero-still, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-video { opacity: 0; transition: opacity .9s ease; }
.hero-video.on { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent 22%),
    linear-gradient(to top, rgba(0, 0, 0, .92), rgba(0, 0, 0, .35) 34%, transparent 58%);
}
.hero-copy {
  position: absolute; z-index: 3; left: var(--m); right: var(--m); top: 0;
  height: 100vh; height: 100svh; min-height: 520px;
  display: grid; grid-template-columns: 1fr auto; align-content: end; align-items: end; gap: clamp(14px, 1.8vw, 28px) 40px;
  padding-bottom: clamp(34px, 6.5vh, 68px);
  pointer-events: none;
}
.hero-copy > * { pointer-events: auto; }
.hero-copy h1 {
  grid-column: 1 / -1;
  font-size: clamp(42px, 6.6vw, 108px);
  font-weight: 760; font-stretch: 125%;
  line-height: .94; letter-spacing: -.035em;
  text-wrap: balance;
}
.hero-sub {
  font-size: clamp(20px, 2.5vw, 40px);
  font-weight: 350; font-stretch: 125%;
  line-height: 1.1; letter-spacing: -.01em; color: var(--white);
}
.hero-side { max-width: 400px; }
.hero-side p { font-size: 16px; color: #d9d8d4; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.scroll-hint { display: none; }

.mosaic {
  display: grid;
  grid-template-columns: 26fr 19.6fr 19.6fr 26fr;
  grid-template-rows: 45fr 10fr 5fr 40fr;
  height: min(88vh, 760px);
  margin: calc(var(--g) / 2) calc(var(--m) - var(--g) / 2);
}
.tile {
  position: relative; display: block; overflow: hidden;
  margin: calc(var(--g) / 2);
  background: var(--panel); color: #fff; text-decoration: none;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile::before {   /* caption backdrop */
  content: ""; position: absolute; inset: 40% 0 0 0; z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .9), transparent);
}
.tile::after {    /* the light strip */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px;
  background: var(--red-hot); box-shadow: 0 0 18px 2px rgba(227, 33, 47, .7);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.06); }
.tile:hover::after, .tile:focus-visible::after { transform: scaleX(1); }
.tile:focus-visible { outline-offset: -4px; }
.tile-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: clamp(12px, 1.3vw, 20px); display: grid; gap: 2px; }
.tile-cap strong { font-size: clamp(15px, 1.35vw, 21px); font-weight: 680; font-stretch: 118%; line-height: 1.15; letter-spacing: -.01em; }
.tile-cap em { font-style: normal; font-size: clamp(12.5px, .95vw, 14.5px); line-height: 1.35; color: #cfcecb; }

.tile-a { grid-area: 1 / 1 / 2 / 2; }
.tile-b { grid-area: 2 / 1 / 5 / 2; }
.tile-center { grid-area: 1 / 2 / 4 / 4; }
.tile-e { grid-area: 4 / 2 / 5 / 3; }
.tile-f { grid-area: 4 / 3 / 5 / 4; }
.tile-c { grid-area: 1 / 4 / 3 / 5; }
.tile-d { grid-area: 3 / 4 / 5 / 5; }

/* ---------- stage: scroll-driven (html.motion, set before first paint) ---------- */
.motion .stage { height: 330vh; }
.motion .stage-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; overflow: clip; }
.motion .hero-frame {
  position: absolute; z-index: 1; left: 0; top: 0; width: 100%; height: 100%; min-height: 0;
  will-change: transform, width, height;
}
.motion .hero-copy { height: 100%; min-height: 0; will-change: transform, opacity; }
.motion .mosaic {
  position: absolute; z-index: 2;
  inset: max(var(--nav-h), 11.5svh) calc(var(--m) - var(--g) / 2) max(14px, 2.4svh);
  height: auto; margin: 0;
  pointer-events: none;
}
.motion .tile { pointer-events: auto; }
/* parked off screen by app.js; they stay focusable, and focusing one jumps to the finished grid */
.motion .tile[data-from] { opacity: 0; will-change: transform; }
.motion .tile-center { background: transparent; pointer-events: none; }
.motion .tile-center img { display: none; }          /* the hero frame lands here */
.motion .tile-center .tile-cap, .motion .tile-center::before { opacity: var(--cap, 0); }
.motion .tile-center.landed { pointer-events: auto; }
.motion .scroll-hint {
  display: block; position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%);
  font-size: 12.5px; font-weight: 600; font-stretch: 118%; letter-spacing: .04em; color: #d9d8d4;
}
.motion .scroll-hint::after {
  content: ""; display: block; width: 1px; height: 26px; margin: 6px auto 0; background: var(--red-hot);
  animation: hint 1.8s ease-in-out infinite; transform-origin: top;
}
@keyframes hint { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* one load moment: the headline rises once */
.motion .hero-copy h1, .motion .hero-sub, .motion .hero-side { animation: rise 1s var(--ease) both; }
.motion .hero-sub { animation-delay: .12s; }
.motion .hero-side { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- statement ---------- */
.statement { padding: clamp(90px, 15vw, 210px) 0 clamp(70px, 10vw, 140px); }
.statement p {
  max-width: 21em;
  font-size: clamp(27px, 3.9vw, 58px);
  font-weight: 620; font-stretch: 112%;
  line-height: 1.12; letter-spacing: -.02em;
}
.statement .w { transition: opacity .25s linear; }

/* ---------- self-healing ---------- */
.heal { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 80px); align-items: center; padding-bottom: clamp(80px, 12vw, 170px); }
.heal-panel { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); cursor: crosshair; touch-action: pan-y; }
.heal-panel img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.heal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.heal-tip {
  position: absolute; left: 16px; bottom: 14px; padding: 7px 12px;
  background: rgba(0, 0, 0, .72); border-left: 3px solid var(--red-hot);
  font-size: 13.5px; font-weight: 600; pointer-events: none; transition: opacity .4s;
}
.heal-panel.used .heal-tip { opacity: 0; }
.heal-text p { margin-top: 20px; max-width: 34em; color: #d9d8d4; }
.facts { margin-top: 30px; border-top: 1px solid var(--line); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-stretch: 108%; }

/* ---------- most popular: a price list, not a card grid ---------- */
.popular { padding-bottom: clamp(80px, 12vw, 170px); }
.section-head .text-link { white-space: nowrap; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(22px, 3vw, 40px); }
.price-list { border-top: 1px solid var(--steel); }
.price-list li {
  display: grid; grid-template-columns: 1fr auto 168px; align-items: center; gap: 12px 32px;
  padding: clamp(16px, 1.9vw, 26px) 0;
  border-bottom: 1px solid var(--line);
}
.price-name { font-size: clamp(19px, 2.1vw, 30px); font-weight: 620; font-stretch: 112%; line-height: 1.15; letter-spacing: -.01em; }
.sale {
  display: inline-block; margin-left: 10px; padding: 3px 8px; vertical-align: middle;
  background: var(--red); border-radius: 2px;
  font-size: 12.5px; font-weight: 700; font-stretch: 100%; letter-spacing: 0;
}
.price { font-size: clamp(17px, 1.5vw, 21px); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price s { margin-right: 8px; color: var(--mist); font-weight: 400; }
.price-list .btn { justify-self: end; width: 100%; }

/* ---------- RV ---------- */
.rv { position: relative; display: flex; align-items: center; min-height: min(82vh, 760px); overflow: hidden; }
.rv-img { position: absolute; inset: 0 0 0 auto; width: 72%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.rv::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, #000 30%, rgba(0, 0, 0, .78) 48%, transparent 78%); }
.rv-text { position: relative; z-index: 2; padding-block: 80px; }
.rv-text h2 { max-width: 9em; }
.rv-text p { margin: 20px 0 28px; max-width: 30em; color: #d9d8d4; }

/* ---------- customers ---------- */
.voices { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 6vw, 96px); padding-block: clamp(80px, 12vw, 170px); }
.voices blockquote {
  font-size: clamp(24px, 2.9vw, 42px); font-weight: 600; font-stretch: 112%;
  line-height: 1.15; letter-spacing: -.015em; text-wrap: balance;
}
.voices blockquote::before { content: "\201C"; }
.voices blockquote::after { content: "\201D"; }
.voices figcaption { margin-top: 18px; padding-left: 14px; border-left: 3px solid var(--red-hot); color: var(--mist); font-size: 15px; }

/* ---------- quote ---------- */
.quote { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); padding-block: clamp(60px, 8vw, 110px) clamp(90px, 12vw, 170px); border-top: 1px solid var(--line); }
.quote-text p { margin-top: 20px; max-width: 28em; color: #d9d8d4; }
.quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.quote-form label { display: grid; gap: 7px; font-size: 14px; font-weight: 600; }
.quote-form .full { grid-column: 1 / -1; }
.quote-form input, .quote-form textarea {
  width: 100%; padding: 13px 14px;
  background: #0c0c0c; border: 1px solid #3d3d3d; border-radius: 2px;
  font-size: 16px; font-weight: 400;
}
.quote-form textarea { resize: vertical; }
.quote-form ::placeholder { color: #8a8985; }
.quote-form input:focus-visible, .quote-form textarea:focus-visible { outline: 2px solid var(--red-hot); outline-offset: 0; border-color: transparent; }
.form-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { font-size: 14.5px; color: var(--mist); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; }
.footer-in { display: grid; grid-template-columns: auto 1fr; gap: 24px 64px; align-items: start; }
.footer-in > img { width: 180px; height: auto; }
.footer nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 24px; }
.footer nav a { font-size: 15px; color: #d9d8d4; text-decoration: none; }
.footer nav a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red-hot); text-underline-offset: 5px; }
.footer-note { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--mist); }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: 26px;
  max-width: calc(100% - 32px); padding: 12px 18px;
  background: var(--white); color: #000; border-left: 4px solid var(--red);
  font-size: 14.5px; font-weight: 600;
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform .35s var(--ease), opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  :root { --m: 18px; --g: 10px; --nav-h: 72px; }
  body { font-size: 16px; }
  .nav { gap: 12px; }
  .nav-logo img, .nav-solid .nav-logo img { width: 104px; }
  .nav-actions { margin-left: auto; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; gap: 6px;
    margin: 0; padding: 90px var(--m) 40px;
    background: #000;
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s;
  }
  .nav-links a { font-size: clamp(28px, 8vw, 40px); font-weight: 700; font-stretch: 122%; letter-spacing: -.02em; padding: 6px 0; }
  .menu-open .nav-links { opacity: 1; visibility: visible; transition-delay: 0s; }
  .menu-open { overflow: hidden; }

  .hero-copy { grid-template-columns: 1fr; row-gap: 10px; padding-bottom: 88px; }
  .hero-side { margin-top: 8px; max-width: none; }
  /* a 16:9 clip in a tall frame: aim at the nose of the car, not the door */
  .hero-frame .hero-still, .hero-frame .hero-video { object-position: 32% 50%; }
  .hero-side p { max-width: 30em; }

  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: 30fr 23fr 23fr 23fr; height: 178vw; }
  .tile-center { grid-area: 1 / 1 / 2 / 3; }
  .tile-a { grid-area: 2 / 1 / 3 / 2; }
  .tile-c { grid-area: 2 / 2 / 3 / 3; }
  .tile-b { grid-area: 3 / 1 / 4 / 2; }
  .tile-d { grid-area: 3 / 2 / 4 / 3; }
  .tile-e { grid-area: 4 / 1 / 5 / 2; }
  .tile-f { grid-area: 4 / 2 / 5 / 3; }
  .tile-cap em { display: none; }
  .tile-center .tile-cap em { display: block; }
  .motion .stage { height: 300vh; }
  .motion .mosaic { inset: var(--nav-h) calc(var(--m) - var(--g) / 2) 10px; height: auto; }

  .heal, .quote, .voices { grid-template-columns: 1fr; }
  .price-list li { grid-template-columns: 1fr auto; }
  .price-list .btn { grid-column: 1 / -1; justify-self: start; width: auto; }
  .rv { align-items: flex-end; min-height: 620px; }
  .rv-img { width: 100%; height: 62%; inset: 0 0 auto 0; }
  .rv::before { background: linear-gradient(to top, #000 40%, transparent 72%); }
  .rv-text { padding-block: 40px 56px; }
  .quote-form { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
