/* ==========================================================================
   Rotax E10 Test Day – Landing page in Rookie Racing CI
   Brand: red #de1f26 · dark navy #0c1625 · Open Sans
   ========================================================================== */

:root {
  --red: #de1f26;
  --red-dark: #b8161c;
  --navy: #0c1625;
  --navy-800: #101d31;
  --navy-700: #16263f;
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef1f6;
  --muted: #aab4c4;
  --muted-dark: #5b6675;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  --font: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

.container-narrow { width: min(820px, 92%); }

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 0.8em 1.7em;
  font-size: 1rem;
  line-height: 1.25;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease,
    border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(222, 31, 38, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--red-dark);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-lg { padding: 1em 2.2em; font-size: 1.06rem; }
.btn-block { width: 100%; }

:focus-visible {
  outline: 3px solid rgba(222, 31, 38, 0.65);
  outline-offset: 2px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 22, 37, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}

.brand img { width: clamp(140px, 16vw, 185px); height: auto; }

.btn-header { padding: 0.6em 1.3em; font-size: 0.92rem; white-space: nowrap; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(560px, 88vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../assets/img/hero-e10.jpg') 70% 42% / cover no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(78deg, rgba(12, 22, 37, 0.94) 0%, rgba(12, 22, 37, 0.82) 38%, rgba(12, 22, 37, 0.28) 100%),
    linear-gradient(to top, rgba(12, 22, 37, 0.9) 0%, rgba(12, 22, 37, 0) 40%);
}

.hero-content {
  padding-block: clamp(5rem, 12vh, 8rem);
  max-width: 760px;
  margin-left: max(4%, calc((100% - 1140px) / 2));
  margin-right: auto;
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.3rem;
}

.chip {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.38em 0.95em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(12, 22, 37, 0.55);
}

.chip-red { background: var(--red); border-color: var(--red); }

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  max-width: 15ch;
}

.hero-sub {
  margin-top: 1.3rem;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--text);
  max-width: 54ch;
}

.hero-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.6rem;
}

.price-tag {
  font-size: 1.05rem;
  background: var(--white);
  color: var(--navy);
  border-radius: 8px;
  padding: 0.45em 0.9em;
  font-weight: 600;
}

.price-tag strong { font-size: 1.5em; font-weight: 800; color: var(--red); }

.price-note { font-size: 0.92rem; color: var(--muted); max-width: 34ch; }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.hero-scarcity {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Chequered flag strip */
.checker-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 14px;
  background:
    repeating-conic-gradient(#ffffff 0% 25%, var(--navy) 0% 50%)
    0 0 / 14px 14px;
  opacity: 0.85;
}

/* ---------- Fact bar ---------- */

.facts {
  background: var(--red);
  color: var(--white);
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-block: 1.4rem;
}

.fact { border-left: 3px solid rgba(255, 255, 255, 0.45); padding-left: 0.9rem; }

.fact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

.fact-value { display: block; font-weight: 700; font-size: 0.98rem; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(3.6rem, 8vw, 5.5rem); background: var(--navy-800); }

.section-dark { background: var(--navy); }

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}

.section-lead { color: var(--muted); max-width: 62ch; margin-bottom: 2.4rem; }

/* ---------- Cards ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
}

.card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.55rem; }

.card p { font-size: 0.94rem; color: var(--muted); }

.card-icon {
  width: 44px;
  height: 44px;
  color: var(--red);
  margin-bottom: 1rem;
}

.card-icon svg { width: 100%; height: 100%; }

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--navy-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.5rem 1.6rem;
}

.step-num {
  position: absolute;
  top: -1.15rem;
  left: 1.3rem;
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(222, 31, 38, 0.4);
}

.step h3 { font-size: 1.05rem; margin: 0.4rem 0 0.5rem; }

.step p { font-size: 0.94rem; color: var(--muted); }

/* ---------- Tick lists ---------- */

.tick-list { list-style: none; display: grid; gap: 0.85rem; }

.tick-list li {
  position: relative;
  padding-left: 2rem;
  font-size: 0.97rem;
  color: var(--muted);
}

.tick-list li strong { color: var(--text); }

.tick-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: var(--red);
}

.tick-list li::after {
  content: '';
  position: absolute;
  left: 0.24rem;
  top: 0.55em;
  width: 0.68rem;
  height: 0.38rem;
  border-left: 2.5px solid var(--white);
  border-bottom: 2.5px solid var(--white);
  transform: rotate(-45deg);
}

/* ---------- Gallery ---------- */

.gallery { background: var(--navy); }

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.gallery-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ---------- Register / form ---------- */

.section-register {
  background:
    linear-gradient(160deg, rgba(222, 31, 38, 0.16), rgba(12, 22, 37, 0) 45%),
    var(--navy-800);
  scroll-margin-top: 80px;
}

.register-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.register-copy > p { color: var(--muted); margin-bottom: 1.4rem; max-width: 48ch; }

.register-help { font-size: 0.9rem; margin-top: 1.4rem; }

.lead-form,
.form-success {
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.3rem);
  box-shadow: var(--shadow);
}

.form-row { margin-bottom: 1.15rem; }

.form-row-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lead-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.req { color: var(--red); }

.optional { color: var(--muted-dark); font-weight: 400; font-size: 0.82em; }

.lead-form input[type='text'],
.lead-form input[type='email'],
.lead-form input[type='tel'],
.lead-form select,
.lead-form textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--navy);
  background: #f6f7f9;
  border: 1.5px solid #d7dbe2;
  border-radius: 7px;
  padding: 0.72em 0.9em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lead-form select { appearance: auto; }

.lead-form textarea { resize: vertical; min-height: 84px; }

.lead-form input:focus,
.lead-form select:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(222, 31, 38, 0.15);
}

.lead-form input.is-invalid,
.lead-form select.is-invalid {
  border-color: var(--red);
  background: #fdf0f0;
}

.field-hint { font-size: 0.78rem; color: var(--muted-dark); margin-top: 0.35rem; }

.form-consent { margin-top: 1.3rem; }

.checkbox {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400 !important;
  font-size: 0.85rem !important;
  color: #3d4654;
  cursor: pointer;
}

.checkbox input {
  margin-top: 0.25em;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--red);
  flex-shrink: 0;
}

.form-error {
  background: #fdeaea;
  border: 1px solid rgba(222, 31, 38, 0.4);
  color: var(--red-dark);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 7px;
  padding: 0.7em 1em;
  margin-bottom: 1rem;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted-dark);
  text-align: center;
  margin-top: 0.9rem;
}

.form-success { text-align: center; padding-block: 3rem; }

.form-success h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }

.form-success p { color: #3d4654; margin-bottom: 1.5rem; }

/* ---------- FAQ ---------- */

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy-800);
  margin-bottom: 0.8rem;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  padding: 1.05rem 3rem 1.05rem 1.3rem;
  position: relative;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '';
  position: absolute;
  right: 1.3rem;
  top: 50%;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2.5px solid var(--red);
  border-bottom: 2.5px solid var(--red);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }

.faq-item p { padding: 0 1.3rem 1.2rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- Final CTA ---------- */

.final-cta {
  position: relative;
  background:
    radial-gradient(90% 120% at 85% 10%, rgba(222, 31, 38, 0.28), rgba(222, 31, 38, 0) 55%),
    linear-gradient(160deg, var(--navy-700), var(--navy) 70%);
  text-align: center;
  padding: clamp(3.5rem, 9vw, 6rem) 0 calc(clamp(3.5rem, 9vw, 6rem) + 14px);
}

.final-cta h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 1.6rem;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #080f1a;
  padding-block: 2.8rem;
  text-align: center;
}

.footer-inner { display: grid; gap: 1.1rem; justify-items: center; }

.site-footer p { font-size: 0.9rem; color: var(--muted); }

.site-footer a { color: var(--white); font-weight: 600; }

.footer-small { font-size: 0.78rem !important; color: var(--muted-dark) !important; max-width: 62ch; }

/* ---------- Reveal animation ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }

  .register-grid { grid-template-columns: 1fr; }

  .register-copy { max-width: 560px; }
}

@media (max-width: 640px) {
  .hero-content { margin-left: 4%; padding-block: 4.5rem; }

  .br-desktop { display: none; }

  .facts-grid { grid-template-columns: 1fr; gap: 0.9rem; }

  .form-row-split { grid-template-columns: 1fr; }

  .gallery-strip { grid-template-columns: 1fr; }

  .gallery-strip img { aspect-ratio: 4 / 3; }

  .btn-header { padding: 0.55em 1em; font-size: 0.85rem; }
}
