/* Kiss Motorsports — site styles
   Tokens: true black film stage, one red for actions, Archivo width axis for voice. */
:root {
  --black: #000000;
  --ink: #F3F3F1;
  --smoke: #8E8E8E;
  --red: #E60000;
  --red-hover: #FF1A1A;
  --ember: #2A0505;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;

  /* Type scale (perfect fourth) */
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: 1.375rem;
  --t-lg: 1.875rem;
  --t-xl: clamp(2.25rem, 4.5vw, 3.5rem);
  --t-display: clamp(2.75rem, 7.2vw, 6.25rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.6;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red); color: #fff; }

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

.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: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 16px; }

/* ---------- Type ---------- */
.display {
  font-size: var(--t-display);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: var(--t-xl);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: var(--t-md);
  font-weight: 700;
  font-variation-settings: 'wdth' 112;
  line-height: 1.2;
  margin: 0;
}
.lede { font-size: var(--t-md); line-height: 1.45; color: var(--ink); max-width: 34ch; margin: 0; }
.muted { color: var(--smoke); }
p { margin: 0; }
.prose p + p { margin-top: 1em; }
.prose { max-width: 62ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font-size: var(--t-sm); font-weight: 700; font-variation-settings: 'wdth' 110;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }
.btn-ghost { background: rgba(0, 0, 0, 0.35); border-color: var(--line-strong); color: var(--ink); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  transition: background-color 240ms ease, backdrop-filter 240ms ease;
}
.nav.is-solid { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav-brand img { height: 44px; width: auto; }
.nav-brand span { font-weight: 800; font-variation-settings: 'wdth' 125; font-size: 0.95rem; letter-spacing: 0.02em; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 10px 14px; border-radius: 999px;
  text-decoration: none; font-size: var(--t-sm); font-weight: 500; color: rgba(243, 243, 241, 0.78);
  transition: color 150ms ease, background-color 150ms ease;
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.nav-links a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { min-height: 44px; padding: 0 20px; }
.nav-login {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--ink);
}
.nav-login:hover { border-color: var(--ink); }
.nav-login svg, .nav-menu svg { width: 18px; height: 18px; }
.nav-menu { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; cursor: pointer; place-items: center; }

.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.96);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 40px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s; }
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer li a {
  display: block; padding: 10px 0; text-decoration: none;
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 800; font-variation-settings: 'wdth' 125; line-height: 1.1;
}
.drawer li a[aria-current="page"] { color: var(--red); }
.drawer-close { position: absolute; top: 16px; right: var(--gutter); }
.drawer-contact { display: grid; gap: 6px; color: var(--smoke); }
.drawer-contact a { text-decoration: none; color: var(--ink); font-size: var(--t-md); }

@media (max-width: 900px) {
  .nav-links, .nav-actions .btn, .nav-brand span { display: none; }
  .nav-menu { display: grid; }
}

/* ---------- Film (scroll-scrubbed video) ---------- */
.film { position: relative; }
.film-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: var(--black);
}
.film-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-canvas.is-ready + .film-poster { opacity: 0; transition: opacity 300ms ease; }
/* Scrims keep copy legible without dimming the vehicle at centre */
.film-stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.35) 30%, transparent 55%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 18%);
}

.chapter {
  position: absolute; z-index: 2;
  left: var(--gutter); right: var(--gutter); bottom: clamp(32px, 8vh, 88px);
  max-width: 44rem;
  display: grid; gap: 20px;
  opacity: 0; transform: translateY(14px);
  visibility: hidden;
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out), visibility 0s linear 420ms;
  pointer-events: none;
}
.chapter.is-active {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity 520ms var(--ease-out) 80ms, transform 520ms var(--ease-out) 80ms, visibility 0s;
}
.chapter .lede { text-shadow: 0 1px 18px rgba(0, 0, 0, 0.6); }
/* Only the opening line is poster-sized; later chapters step back so the vehicle stays the subject */
.chapter .display:not(h1) { font-size: clamp(2.25rem, 4.6vw, 4.25rem); max-width: 15ch; }
.chapter .display { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45); }
.chapter-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px;
  max-width: 38rem;
}
.chapter-list strong { display: block; font-weight: 700; font-variation-settings: 'wdth' 112; }
.chapter-list span { color: rgba(243, 243, 241, 0.72); font-size: var(--t-sm); }
.chapter-cta { justify-self: start; }

.chapter-center { left: 0; right: 0; margin: 0 auto; text-align: center; justify-items: center; }

/* Timecode rail: a real timeline of the film */
.rail {
  position: absolute; z-index: 3;
  right: var(--gutter); top: 50%; transform: translateY(-50%);
  height: min(56vh, 460px);
  display: grid; grid-template-columns: auto 2px; gap: 14px;
  font-variant-numeric: tabular-nums;
}
.rail-track { position: relative; background: var(--line); border-radius: 2px; grid-column: 2; grid-row: 1; }
.rail-fill { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--p, 0) * 100%); background: var(--red); border-radius: 2px; }
.rail-marks { grid-column: 1; grid-row: 1; position: relative; list-style: none; margin: 0; padding: 0; width: 9.5rem; }
.rail-marks li {
  position: absolute; right: 0; transform: translateY(-50%);
  font-size: var(--t-xs); color: rgba(243, 243, 241, 0.55);
  white-space: nowrap; transition: color 200ms ease;
  text-shadow: 0 0 6px #000, 0 0 14px rgba(0, 0, 0, 0.9);
}
.rail-marks li.is-on { color: var(--ink); }
.rail-marks li::after {
  content: ''; position: absolute; right: -19px; top: 50%; width: 8px; height: 2px;
  background: currentColor; transform: translateY(-50%);
}
.rail-time {
  position: absolute; right: -6px; bottom: -40px;
  font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.04em; color: var(--ink);
}
.film-hint {
  position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: var(--t-xs); color: rgba(243, 243, 241, 0.6);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: opacity 300ms ease;
}
.film-hint::after {
  content: ''; width: 1px; height: 28px; background: linear-gradient(var(--ink), transparent);
  animation: hint 1.8s var(--ease-out) infinite;
}
.film.is-scrolled .film-hint { opacity: 0; }
@keyframes hint { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.film-loader {
  position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 2px;
  background: var(--red); transform-origin: left; transform: scaleX(var(--load, 0));
  transition: transform 200ms linear, opacity 400ms ease;
}
.film-loader.is-done { opacity: 0; }

@media (max-width: 900px) {
  .rail, .film-hint { display: none; }
  .chapter-list { grid-template-columns: 1fr; gap: 10px; }
  .chapter-list span { display: none; }
}

/* ---------- Page sections ---------- */
.section { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.wrap { max-width: var(--max); margin: 0 auto; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 48rem; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split > .section-head { margin-bottom: 0; }
  .split .rates { margin-bottom: 0; }
}

/* Rates strip */
.rates {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px;
  padding: 28px 0; margin-bottom: 48px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.rates-price { font-size: var(--t-xl); font-weight: 800; font-variation-settings: 'wdth' 125; line-height: 1; }
.rates-price small { font-size: var(--t-sm); color: var(--smoke); font-weight: 500; font-variation-settings: 'wdth' 100; }

/* Forms */
.form { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: var(--t-sm); font-weight: 600; color: rgba(243, 243, 241, 0.86); }
.field .hint { font-size: var(--t-xs); color: var(--smoke); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 54px; padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-size: var(--t-base);
  transition: border-color 150ms ease, background-color 150ms ease;
}
.input::placeholder, .textarea::placeholder { color: rgba(243, 243, 241, 0.35); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--red); background: rgba(255, 255, 255, 0.06); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23F3F3F1' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.select option { background: #111; }
.input[type="datetime-local"] { color-scheme: dark; }
.textarea { min-height: 120px; resize: vertical; }
.file {
  position: relative; display: grid; place-items: center; gap: 6px; text-align: center;
  min-height: 110px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px;
  color: var(--smoke); font-size: var(--t-sm); cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease;
}
.file:hover, .file:focus-within { border-color: var(--red); color: var(--ink); }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-name { color: var(--ink); font-weight: 600; }
.form-status { font-size: var(--t-sm); min-height: 1.5em; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: #ff6b6b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Inline disclosure forms (corporate account, fleet partnership) */
.disclose { width: 100%; }
.disclose > summary { list-style: none; width: fit-content; }
.disclose > summary::-webkit-details-marker { display: none; }
.disclose[open] > summary { margin-bottom: 24px; border-color: var(--red); }
.disclose .form { animation: disclose-in 260ms var(--ease-out); }
@keyframes disclose-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.form-status.is-ok { color: #4ade80; }
.form-status.is-err { color: #ff6b6b; }

.choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .choice-row { grid-template-columns: 1fr; } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice-body {
  display: grid; gap: 2px; padding: 18px 20px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  transition: border-color 150ms ease, background-color 150ms ease;
}
.choice-body strong { font-weight: 700; }
.choice-body span { color: var(--smoke); font-size: var(--t-sm); }
.choice input:checked + .choice-body { border-color: var(--red); background: var(--ember); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--red); outline-offset: 3px; }

/* Policies (home) */
.policies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(32px, 6vw, 96px); }
.policy { display: grid; gap: 12px; align-content: start; }
.policy p { color: rgba(243, 243, 241, 0.74); max-width: 52ch; }
.policy-figure { margin-top: 8px; border-radius: 14px; overflow: hidden; max-width: 420px; }
@media (max-width: 760px) { .policies { grid-template-columns: 1fr; } }

/* Fleet */
.day-rate {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
  padding: clamp(28px, 4vw, 48px); border-radius: 20px;
  background: radial-gradient(120% 140% at 0% 0%, #3a0606 0%, var(--ember) 45%, #0a0000 100%);
  border: 1px solid rgba(230, 0, 0, 0.35);
  margin-bottom: clamp(64px, 8vw, 112px);
}
.day-rate-price { text-align: right; }
.day-rate-price .h2 { white-space: nowrap; }
@media (max-width: 760px) { .day-rate { grid-template-columns: 1fr; } .day-rate-price { text-align: left; } }

.vehicles { display: grid; gap: clamp(64px, 9vw, 120px); }
.vehicle { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.vehicle:nth-child(even) .vehicle-media { order: 2; }
.vehicle-media { border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; background: #0c0c0c; }
.vehicle-media img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-body { display: grid; gap: 18px; }
.vehicle-cap { color: var(--smoke); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--t-xs); color: rgba(243, 243, 241, 0.82); }
.price { display: flex; align-items: baseline; gap: 6px; }
.price strong { font-size: var(--t-xl); font-weight: 800; font-variation-settings: 'wdth' 125; line-height: 1; }
.price span { color: var(--smoke); }
@media (max-width: 860px) { .vehicle { grid-template-columns: 1fr; } .vehicle:nth-child(even) .vehicle-media { order: 0; } }

/* Locations */
.cities { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.city { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; isolation: isolate; }
.city img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 700ms var(--ease-out); }
.city::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.1) 60%); }
.city-body { position: absolute; left: 0; right: 0; bottom: 0; padding: clamp(20px, 3vw, 36px); display: grid; gap: 8px; }
.city-body p { color: rgba(243, 243, 241, 0.8); max-width: 36ch; }
@media (hover: hover) { .city:hover img { transform: scale(1.04); } }
@media (max-width: 760px) { .cities { grid-template-columns: 1fr; } }

/* Welcome */
.pillars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; }
.pillars li { display: grid; gap: 4px; padding-top: 18px; border-top: 2px solid var(--red); }
.pillars strong { font-weight: 700; font-variation-settings: 'wdth' 112; font-size: var(--t-md); }
.reel { border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 9; background: #0c0c0c; }
.reel iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } }

/* Partner */
.tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: clamp(64px, 8vw, 112px); }
.tier { display: grid; gap: 18px; align-content: start; padding: clamp(28px, 4vw, 44px); border-radius: 20px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.tier-premium { border-color: rgba(230, 0, 0, 0.5); background: radial-gradient(120% 120% at 100% 0%, #3a0606 0%, var(--ember) 50%, #070000 100%); }
.tier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tier li { display: flex; gap: 12px; align-items: center; }
.tier li svg { width: 18px; height: 18px; color: var(--red); flex: none; }
.tier-premium li svg { color: #fff; }
.tier .btn { justify-self: start; margin-top: 8px; }
.apply { padding: clamp(28px, 5vw, 64px); border-radius: 24px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.corporate {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid; gap: 24px;
  padding: clamp(24px, 4vw, 40px); border-radius: 20px; border: 1px solid var(--line);
}
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { padding: clamp(64px, 9vw, 112px) var(--gutter) 40px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.footer-brand img { height: 72px; width: auto; margin-bottom: 20px; }
.footer-brand p { color: var(--smoke); max-width: 40ch; }
.footer h2 { font-size: var(--t-sm); font-weight: 700; margin: 0 0 16px; color: var(--smoke); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--red); }
.footer-base {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
  color: var(--smoke); font-size: var(--t-xs);
}
.footer-base nav { display: flex; gap: 20px; }
.powered { display: inline-flex; align-items: center; gap: 10px; opacity: 0.7; transition: opacity 150ms ease; }
.powered:hover { opacity: 1; }
.powered img { height: 26px; width: auto; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .chapter { transform: none; }
}
