/* Audi RS–inspired palette: deep black, pure white, racing red */
:root {
  --black: #0a0a0b;
  --black-elevated: #121214;
  --black-card: #16161a;
  --white: #f5f5f7;
  --white-muted: #a1a1aa;
  --red: #e60012;
  --red-glow: rgba(230, 0, 18, 0.45);
  --red-dark: #9f000d;
  --border: rgba(255, 255, 255, 0.08);
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --header-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --touch: 44px;
  --page-max: 1320px;
}

@media (min-width: 900px) {
  :root {
    --header-h: 72px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 100%;
  /* Do not clip horizontally here — it can chop fixed header controls on some mobile browsers */
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(230, 0, 18, 0.15);
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

#main-content {
  max-width: 100%;
  overflow-x: clip;
}

.skip-link {
  position: fixed;
  top: var(--safe-top);
  left: var(--safe-left);
  z-index: 10080;
  padding: 0.75rem 1.25rem;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius) 0;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.2s ease;
}

.skip-link:focus {
  clip-path: inset(0 0 0 0);
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.logo:focus-visible,
.nav a:focus-visible,
.nav-cta:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.menu-toggle:focus-visible,
.faq-item summary:focus-visible,
.mobile-menu-panel a:focus-visible {
  outline-offset: 4px;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

.accent {
  color: var(--red);
}

.mono {
  font-family: var(--mono);
  font-size: 0.9em;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--header-h);
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-left: max(0.75rem, var(--safe-left));
  padding-right: max(0.75rem, calc(var(--safe-right) + 0.25rem));
  padding-bottom: 0;
  /* Above .noise (z-index 9999) so the bar and menu control are never covered */
  z-index: 10050;
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.95), transparent);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
  box-sizing: border-box;
  isolation: isolate;
}

@media (min-width: 900px) {
  .site-header {
    gap: 0.75rem;
    padding-left: max(1rem, var(--safe-left));
    padding-right: max(1rem, var(--safe-right));
  }
}

.site-header.scrolled {
  background: rgba(10, 10, 11, 0.88);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  min-height: var(--touch);
  padding: 0.35rem 0.25rem 0.35rem 0;
  min-width: 0;
  flex: 1 1 auto;
  flex-shrink: 1;
}

.logo-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .logo {
    flex: 0 0 auto;
    flex-shrink: 0;
    gap: 0.65rem;
    font-size: 1.15rem;
  }

  .logo-text {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

.logo-rings {
  width: 28px;
  height: 28px;
  border: 2px solid var(--white);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.logo-rings::before,
.logo-rings::after {
  content: "";
  position: absolute;
  border: 2px solid var(--white);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo-rings::before {
  width: 18px;
  height: 18px;
}

.logo-rings::after {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-color: var(--red);
}

.nav {
  display: none;
  gap: 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--white-muted);
}

.nav a:hover {
  color: var(--white);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-grow: 0;
  margin-left: auto;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--red);
  color: var(--white);
}

.nav-cta--desktop {
  display: none;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }

  .nav-cta--desktop {
    display: inline-flex;
  }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  min-width: var(--touch);
  padding: 0;
  margin: 0;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  flex: 0 0 var(--touch);
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: rgba(230, 0, 18, 0.25);
}

.menu-toggle:hover {
  border-color: var(--red);
  background: rgba(230, 0, 18, 0.12);
}

.menu-toggle-bars {
  display: block;
  width: 20px;
  height: 2.5px;
  background: var(--white);
  border-radius: 1px;
  position: relative;
  box-shadow: 0 -7px 0 var(--white), 0 7px 0 var(--white);
}

@media (max-width: 899px) {
  /* Generous insets so the 48px control never sits in the clipped overflow zone */
  .site-header {
    justify-content: space-between;
    padding-left: max(1rem, var(--safe-left));
    padding-right: max(1rem, calc(var(--safe-right) + 0.5rem));
  }

  .header-actions {
    margin-left: auto;
    flex-shrink: 0;
    /* Keeps the tap target fully inside the padded header box */
    max-width: 48px;
  }

  /*
   * flex-basis 0% is critical: flex: 1 1 auto uses the logo’s content width as the
   * shrink floor, so the row can exceed 100% and the menu button gets clipped off-screen.
   */
  .logo {
    flex: 1 1 0%;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    max-width: none;
  }

  .menu-toggle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex: 0 0 48px;
    border-color: var(--red);
    background: rgba(230, 0, 18, 0.18);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.12) inset,
      0 2px 16px rgba(0, 0, 0, 0.45);
  }

  .menu-toggle:active {
    background: rgba(230, 0, 18, 0.35);
  }

  .menu-toggle-bars {
    width: 22px;
    height: 3px;
    box-shadow: 0 -8px 0 var(--white), 0 8px 0 var(--white);
  }
}

@media (min-width: 900px) {
  .menu-toggle {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  /* Above .site-header so the drawer and backdrop sit on top when open */
  z-index: 10060;
  pointer-events: none;
}

.mobile-menu:not([hidden]) {
  pointer-events: auto;
}

.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-menu:not([hidden]) .mobile-menu-backdrop {
  opacity: 1;
}

.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100%, 20rem);
  height: 100%;
  height: 100dvh;
  padding: calc(var(--header-h) + var(--safe-top) + 1rem) 1.25rem 1.5rem;
  padding-bottom: max(1.5rem, var(--safe-bottom));
  padding-left: max(1.25rem, var(--safe-left));
  background: var(--black-elevated);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.5);
}

.mobile-menu:not([hidden]) .mobile-menu-panel {
  transform: translateX(0);
}

.mobile-menu-panel a {
  display: flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0 0.75rem;
  margin: 0 -0.75rem;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--white);
}

.mobile-menu-panel a:active {
  background: rgba(255, 255, 255, 0.06);
}

.mobile-menu-cta {
  margin-top: 0.75rem !important;
  justify-content: center !important;
  background: var(--red) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
}

.mobile-menu-cta:active {
  filter: brightness(1.05);
}

/* Hero — full-bleed background; .hero-content constrains copy + visuals */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(var(--header-h) + var(--safe-top) + 1.25rem);
  padding-bottom: max(2rem, var(--safe-bottom));
  padding-inline: 0;
}

@media (min-width: 480px) {
  .hero {
    padding-top: calc(var(--header-h) + var(--safe-top) + 2rem);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding-inline: max(1rem, var(--safe-left)) max(1rem, var(--safe-right));
}

@media (min-width: 640px) {
  .hero-content {
    padding-inline: max(clamp(1.25rem, 4vw, 3rem), var(--safe-left)) max(clamp(1.25rem, 4vw, 3rem), var(--safe-right));
  }
}

@media (min-width: 480px) {
  .hero-content {
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 380px;
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 20%, transparent 70%);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60%;
  max-width: 600px;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 65%);
  filter: blur(80px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 1rem;
}

.hero-title {
  font-size: clamp(2.25rem, 10vw, 5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  word-break: break-word;
}

@media (min-width: 480px) {
  .hero-title {
    margin-bottom: 1.5rem;
  }
}

.hero-title .outline {
  -webkit-text-stroke: 1.5px var(--white);
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-lead {
  max-width: 36rem;
  color: var(--white-muted);
  font-size: 1rem;
  margin: 0 0 1.75rem;
}

@media (min-width: 480px) {
  .hero-lead {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 380px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 520px) {
  .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }
}

.stat-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--white-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--touch);
  padding: 0.85rem 1.5rem;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 0 0 var(--red-glow);
}

@media (min-width: 480px) {
  .btn-primary {
    width: auto;
    padding: 1rem 1.75rem;
  }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--red-glow);
}

.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.cylinder-stack {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 160px;
}

@media (min-width: 480px) {
  .cylinder-stack {
    gap: 10px;
    height: 200px;
  }
}

.cylinder-stack span {
  width: clamp(24px, 7vw, 36px);
  background: linear-gradient(180deg, var(--white) 0%, var(--white-muted) 100%);
  border-radius: 6px 6px 2px 2px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
  animation: pulse-h 2.4s ease-in-out infinite;
}

.cylinder-stack span:nth-child(1) { height: 45%; animation-delay: 0s; }
.cylinder-stack span:nth-child(2) { height: 62%; animation-delay: 0.15s; }
.cylinder-stack span:nth-child(3) { height: 100%; animation-delay: 0.3s; background: linear-gradient(180deg, var(--red) 0%, var(--red-dark) 100%); box-shadow: 0 0 40px var(--red-glow); }
.cylinder-stack span:nth-child(4) { height: 70%; animation-delay: 0.45s; }
.cylinder-stack span:nth-child(5) { height: 55%; animation-delay: 0.6s; }

@keyframes pulse-h {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.92); opacity: 0.85; }
}

.visual-caption {
  font-size: 0.8rem;
  color: var(--white-muted);
  text-align: center;
  max-width: 280px;
  margin: 0;
  line-height: 1.5;
}

/* Facts strip */
.facts-strip {
  padding: 2rem max(1rem, var(--safe-left)) 2rem max(1rem, var(--safe-right));
  background: var(--black);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 640px) {
  .facts-strip {
    padding: 2.5rem max(clamp(1.25rem, 4vw, 3rem), var(--safe-left)) 2.5rem max(clamp(1.25rem, 4vw, 3rem), var(--safe-right));
  }
}

.facts-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.fact-chip {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  flex: 1 1 100%;
  max-width: none;
  transition: border-color 0.2s;
}

@media (min-width: 480px) {
  .fact-chip {
    flex: 1 1 140px;
    max-width: 220px;
    min-width: 160px;
  }
}

.fact-chip:hover {
  border-color: rgba(230, 0, 18, 0.3);
}

.fact-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
}

.fact-key {
  font-size: 0.72rem;
  color: var(--white-muted);
  line-height: 1.35;
}

/* Sections */
.section {
  padding: clamp(3rem, 8vw, 7rem) max(1rem, var(--safe-left)) clamp(3rem, 8vw, 7rem) max(1rem, var(--safe-right));
  position: relative;
}

.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.section-head p {
  margin: 0;
  color: var(--white-muted);
  font-size: 0.95rem;
}

@media (min-width: 480px) {
  .section-head p {
    font-size: 1.05rem;
  }
}

/* Heritage */
.heritage {
  background: var(--black-elevated);
  border-top: 1px solid var(--border);
}

.timeline {
  display: grid;
  gap: 0;
  border-left: 2px solid var(--red);
  margin-left: 0.25rem;
  padding-left: 1.25rem;
}

@media (min-width: 480px) {
  .timeline {
    margin-left: 0.5rem;
    padding-left: 2rem;
  }
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 6px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  background: var(--black-elevated);
  border: 2px solid var(--red);
  border-radius: 50%;
}

@media (min-width: 480px) {
  .timeline-item::before {
    left: calc(-2rem - 6px);
  }
}

.timeline-item time {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 600;
}

.timeline-item h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.2rem;
}

.timeline-item p {
  margin: 0;
  color: var(--white-muted);
  max-width: 52rem;
}

/* Physics */
.physics-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .physics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-wide {
    grid-column: span 2;
  }
}

.card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(230, 0, 18, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--white-muted);
  font-size: 0.95rem;
}

.card p:last-child {
  margin-bottom: 0;
}

.data-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--white-muted);
}

.data-list li {
  margin-bottom: 0.5rem;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}

.metrics dt {
  color: var(--white-muted);
  font-weight: 500;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.metrics dt:first-of-type {
  padding-top: 0;
  border-top: none;
}

.metrics dd {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  text-align: left;
}

@media (min-width: 480px) {
  .metrics {
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1.5rem;
  }

  .metrics dt {
    padding-top: 0;
    border-top: none;
  }

  .metrics dd {
    margin: 0;
    text-align: right;
  }
}

/* Generations */
.generations {
  background: linear-gradient(180deg, var(--black) 0%, var(--black-elevated) 100%);
}

.engine-cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .engine-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.engine-card {
  background: var(--black-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.engine-card header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.engine-card h3 {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  line-height: 1.35;
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-muted);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.badge.accent {
  color: var(--red);
  border-color: rgba(230, 0, 18, 0.4);
}

.engine-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--white-muted);
  flex: 1;
}

.engine-card li {
  margin-bottom: 0.65rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

.engine-card li strong {
  color: var(--white);
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.15rem;
  border-left: none;
  padding-left: 0;
}

.engine-card.featured {
  border-color: rgba(230, 0, 18, 0.35);
  background: linear-gradient(145deg, var(--black-card) 0%, rgba(230, 0, 18, 0.06) 100%);
}

/* Table */
.compare {
  border-top: 1px solid var(--border);
}

.table-scroll-hint {
  display: none;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--white-muted);
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .table-scroll-hint {
    display: block;
  }
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 720px;
}

.spec-table th,
.spec-table td {
  padding: 1rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.spec-table th {
  background: var(--black-card);
  font-weight: 600;
  color: var(--white-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}

.spec-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.highlight-row {
  background: rgba(230, 0, 18, 0.08);
}

.highlight-row td:first-child {
  font-weight: 600;
  color: var(--white);
}

@media (max-width: 767px) {
  .table-scroll-hint {
    display: none;
  }

  .table-wrap {
    overflow-x: visible;
    border: none;
    background: transparent;
    padding: 0;
  }

  .spec-table {
    min-width: 0;
  }

  .spec-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .spec-table tbody {
    display: block;
  }

  .spec-table tr {
    display: block;
    margin-bottom: 1rem;
    background: var(--black-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }

  .spec-table tr:last-child {
    margin-bottom: 0;
  }

  .spec-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
  }

  .spec-table td:last-child {
    border-bottom: none;
  }

  .spec-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white-muted);
    max-width: 42%;
  }

  .spec-table td:first-child {
    background: rgba(230, 0, 18, 0.08);
    font-weight: 600;
    color: var(--white);
  }

  .spec-table td:first-child::before {
    content: "Engine";
  }

  .spec-table tbody tr:hover {
    background: transparent;
  }

  .highlight-row {
    border-color: rgba(230, 0, 18, 0.35);
  }
}

/* FAQ */
.faq {
  border-top: 1px solid var(--border);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 42rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--black-card);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  padding-right: 2.5rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  position: relative;
  min-height: var(--touch);
  display: flex;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  transform: translateY(-25%) rotate(225deg);
}

.faq-answer {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
}

.faq-answer p {
  margin: 0;
  color: var(--white-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.faq-answer p + p {
  margin-top: 0.75rem;
}

/* Motorsport */
.motorsport {
  background: var(--black-elevated);
}

.ms-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .ms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ms-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--black);
}

.ms-card h3 {
  margin: 0 0 0.75rem;
  color: var(--red);
  font-size: 1rem;
}

.ms-card p {
  margin: 0;
  color: var(--white-muted);
  font-size: 0.95rem;
}

/* Sound */
.sound-content {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .sound-content {
    grid-template-columns: 1fr 1.2fr;
  }
}

.sound-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 120px;
  padding: 2rem;
  background: var(--black-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.sound-wave span {
  width: 8px;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  border-radius: 4px;
  animation: wave 1.2s ease-in-out infinite;
}

.sound-wave span:nth-child(1) { height: 30%; animation-delay: 0s; }
.sound-wave span:nth-child(2) { height: 55%; animation-delay: 0.1s; }
.sound-wave span:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.sound-wave span:nth-child(4) { height: 85%; animation-delay: 0.05s; }
.sound-wave span:nth-child(5) { height: 50%; animation-delay: 0.15s; }
.sound-wave span:nth-child(6) { height: 95%; animation-delay: 0.25s; }
.sound-wave span:nth-child(7) { height: 45%; animation-delay: 0.12s; }
.sound-wave span:nth-child(8) { height: 70%; animation-delay: 0.08s; }
.sound-wave span:nth-child(9) { height: 35%; animation-delay: 0.18s; }
.sound-wave span:nth-child(10) { height: 60%; animation-delay: 0.22s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}

.sound-facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sound-facts li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--white-muted);
  font-size: 0.95rem;
}

.sound-facts li:last-child {
  border-bottom: none;
}

.sound-facts strong {
  color: var(--white);
}

/* Closing */
.closing {
  text-align: center;
  padding: 4rem max(1rem, var(--safe-left)) 5rem max(1rem, var(--safe-right));
  padding-bottom: max(5rem, calc(3rem + var(--safe-bottom)));
  background: radial-gradient(ellipse at 50% 0%, rgba(230, 0, 18, 0.12), transparent 55%), var(--black);
}

@media (min-width: 640px) {
  .closing {
    padding: 6rem max(1.5rem, var(--safe-left)) 6rem max(1.5rem, var(--safe-right));
    padding-bottom: max(6rem, calc(4rem + var(--safe-bottom)));
  }
}

.closing-inner h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0 0 1rem;
}

.closing-inner p {
  color: var(--white-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}

.btn-ghost:hover {
  border-color: var(--white-muted);
  color: var(--red);
}

.site-footer {
  padding: 2rem max(1rem, var(--safe-left)) max(2rem, var(--safe-bottom)) max(1rem, var(--safe-right));
  text-align: center;
  font-size: 0.8rem;
  color: var(--white-muted);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer a:hover {
  color: var(--white);
}

@media (min-width: 1180px) {
  #main-content,
  .site-footer {
    max-width: var(--page-max);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }

  /* Let full-bleed hero extend past the content column */
  #main-content {
    overflow-x: visible;
  }

  .hero {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
  }

  .hero-content {
    max-width: var(--page-max);
  }

  .site-header {
    padding-left: max(1rem, calc((100vw - var(--page-max)) / 2 + var(--safe-left)));
    padding-right: max(1rem, calc((100vw - var(--page-max)) / 2 + var(--safe-right)));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .cylinder-stack span,
  .sound-wave span {
    animation: none;
  }
  .btn-primary:hover {
    transform: none;
  }

  .mobile-menu-panel,
  .mobile-menu-backdrop {
    transition: none;
  }

  .faq-item summary::after {
    transition: none;
  }
}
