/* ===== Base ===== */
:root {
  --bg: #0a0a0a;
  --surface: #ffffff;
  --surface-alt: #f2f4f7;       /* cool silver */
  --ink: #0f1115;               /* near black */
  --ink-soft: #4a4f57;
  --muted: #8b8f96;
  --line: #d8dbe0;              /* silver line */
  --accent: #1d4ed8;            /* royal blue */
  --accent-dark: #1e3a8a;       /* deeper royal */
  --gold: #c8ccd2;              /* silver highlight (replaces gold on dark bg) */
  --shadow: 0 10px 30px rgba(10,10,10,0.08);
  --radius: 10px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

h1, h2, h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 0.5em 0;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); margin-bottom: 0.6em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.8em 0;
}

.eyebrow.center, .center { text-align: center; }

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 780px; }

.section { padding: 96px 0; }
.section-sub { color: var(--ink-soft); margin-bottom: 48px; }

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* ===== Nav ===== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}
img.brand-mark {
  object-fit: cover;
  background: #000;
}
.brand-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-text {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brand-slogan {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
@media (max-width: 480px) {
  .brand-slogan { display: none; }
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 8px;
}
.nav-cta:hover { background: var(--accent-dark); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: 0.2s;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(720px, 90vh);
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-gallery {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  transform: scale(1.05);
}
.hero-slide.active {
  opacity: 1;
  animation: kenburns 12s ease-in-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(10,10,10,0.55) 0%,
    rgba(10,10,10,0.35) 40%,
    rgba(10,10,10,0.75) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px 120px 24px;
  width: 100%;
}
.hero-content .eyebrow {
  color: var(--gold);
}
.hero-content h1 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  max-width: 14ch;
}
.hero-content h1 .accent {
  color: #ff9555;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.hero-sub {
  font-size: 1.15rem;
  max-width: 50ch;
  color: rgba(255,255,255,0.92);
  margin: 1em 0 2em 0;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-dots {
  position: absolute;
  bottom: 32px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.hero-dot {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.hero-dot.active { background: #fff; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(29,78,216,0.32);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}

/* ===== Story ===== */
.story {
  background: var(--surface-alt);
}
.story p {
  font-size: 1.08rem;
  color: var(--ink-soft);
}
.story .lead {
  font-size: 1.3rem;
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 1.5em 0;
}
.story .signoff {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  margin: 2em 0 0.5em 0;
}
.story .signature {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-size: 0.9rem;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 32px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 14px 24px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Forms ===== */
.trailer-form, .contact-form {
  max-width: 880px;
  margin: 0 auto;
  background: var(--surface);
  padding: 36px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.contact-form { padding: 28px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
  margin-bottom: 24px;
}
.field { display: flex; flex-direction: column; }
.field.span-2 { grid-column: 1 / -1; }

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.15);
}
textarea { resize: vertical; }

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding: 8px 0;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.checks input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin: 0;
}

/* ===== Race Callout ===== */
.race-callout {
  background: var(--ink);
  color: #fff;
}
.race-callout h2 { color: #fff; }
.race-callout p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 2em;
}
.race-callout .eyebrow { color: var(--gold); }

/* ===== Contact ===== */
.contact { background: var(--surface-alt); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
}
.contact-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.contact-list li strong {
  color: var(--ink);
  display: inline-block;
  min-width: 72px;
}
.contact-form .field { margin-bottom: 16px; }

.form-note {
  margin: 28px auto 0 auto;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  max-width: 60ch;
  text-align: center;
}

.form-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
}
.form-status[data-kind="success"] {
  background: #ecf7ee;
  color: #1d5e2a;
  border: 1px solid #b9e0c0;
}
.form-status[data-kind="error"] {
  background: #fdecea;
  color: #8a2418;
  border: 1px solid #f3c0b8;
}

/* ===== Footer ===== */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: 40px 0;
}
.footer .brand-text { color: #fff; }
.footer .muted { color: rgba(255,255,255,0.55); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-meta a {
  color: var(--gold);
  font-weight: 500;
}
.footer-meta a:hover {
  color: #fff;
}
@media (max-width: 820px) {
  .footer-meta { text-align: left; }
}

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .section { padding: 64px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-cta { text-align: center; margin-top: 8px; }

  .form-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .trailer-form { padding: 24px; }
  .hero-content { padding: 60px 24px 90px; }
  .hero-sub { font-size: 1rem; }
}
