:root {
  --bg: #050505;
  --panel: rgba(20, 20, 20, 0.7);
  --accent: #ff5e00;
  --accent-rgb: 255, 94, 0;
  --blue: #00f2ff;
  --text: #e5e5e5;
  --text-muted: #a1a1aa;
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {

/* Global override: prevent underlines on links in any state. */
a,
a:link,
a:visited,
a:hover,
a:focus,
a:active {
  text-decoration: none !important;
}
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.hero-asset {
  position: fixed;
  right: -5%;
  bottom: 2%;
  width: 58%;
  z-index: 1;
  pointer-events: none;
}

.hero-asset.locked {
  position: absolute;
}

.hero-asset img {
  width: 100%;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-padding {
  padding: 120px 0;
}

/* Header & Nav */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 0;
  z-index: 1000;
  background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.3s ease;
}

nav.scrolled {
  padding: 12px 0;
  background: rgba(0,0,0,0.95);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: black;
  clip-path: polygon(25% 0%, 100% 0%, 75% 100%, 0% 100%);
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  filter: grayscale(1) brightness(0.8);
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 10;
}

/* Align hero copy with navbar brand text on larger screens. */
@media (min-width: 1100px) {
  .hero-content {
    margin-left: 84px;
    transform: none;
  }
}

.hero h2 {
  color: var(--accent);
  font-size: 0.875rem;
  letter-spacing: 0.5em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
  margin-bottom: 32px;
  font-weight: 950;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 48px;
}

.btn {
  display: inline-block;
  padding: 18px 36px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: white;
  color: black;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 94, 0, 0.3);
}

.btn-outline {
  border-color: rgba(255,255,255,0.2);
  color: white;
  margin-left: 20px;
}

.btn-outline:hover {
  border-color: white;
  background: white;
  color: black;
}

/* Scanline Effect */
.scanlines::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 2;
  background-size: 100% 2px, 3px 100%;
  pointer-events: none;
}

/* Product Section */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 80px;
}

.product-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 60px 40px;
  position: relative;
  transition: all 0.4s ease;
  overflow: hidden;
}

.product-card .btn-outline {
  margin-left: 0;
  width: 100%;
  text-align: center;
  border-color: rgba(255,255,255,0.2);
  color: white;
  background: transparent;
}

.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card:hover {
  border-color: rgba(255,94,0,0.3);
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.product-card:hover .btn-outline {
  border-color: var(--accent);
  background: var(--accent);
  color: black;
}

@media (hover: hover) {
  .product-grid:hover .product-card {
    opacity: 0.72;
    transform: translateY(0);
    border-color: rgba(255,255,255,0.08);
    box-shadow: none;
  }

  .product-grid:hover .product-card:hover {
    opacity: 1;
    background: rgba(255,94,0,0.04);
    border-color: rgba(255,94,0,0.45);
    transform: translateY(-14px) scale(1.01);
    box-shadow: 0 24px 48px rgba(0,0,0,0.45);
  }
}

.product-id {
  position: absolute;
  top: 40px;
  right: 40px;
  font-size: 4rem;
  font-weight: 950;
  opacity: 0.05;
  color: white;
}

.product-tier {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 12px;
}

.product-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.product-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  min-height: 80px;
}

.product-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-bar {
  flex: 0 0 100px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  position: relative;
}

.stat-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
}

/* Technology Section */
.tech-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 100px;
  align-items: center;
}

.tech-image {
  position: relative;
}

.tech-image img {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
}

.tech-float-tag {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background: var(--bg);
  padding: 30px;
  border-left: 4px solid var(--accent);
  box-shadow: 20px 20px 60px rgba(0,0,0,0.5);
}

.tech-float-tag span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tech-float-tag h4 {
  font-size: 1.5rem;
  letter-spacing: 0;
}

.tech-info h2 {
  font-size: 4rem;
  margin-bottom: 40px;
}

.tech-features {
  display: grid;
  gap: 40px;
}

.feature-item {
  display: flex;
  gap: 24px;
}

.feature-line {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

.feature-content h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Mechanic Overview */
.mechanic-overview {
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 94, 0, 0.12), transparent 38%),
    linear-gradient(180deg, #070707 0%, #050505 100%);
}

.mechanic-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  margin-top: 36px;
}

.mechanic-group h4 {
  font-size: 0.85rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.mechanic-card-grid {
  display: grid;
  gap: 14px;
}

.mechanic-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 2px solid rgba(255, 94, 0, 0.5);
  padding: 18px 20px;
  transition: all 0.25s ease;
}

.mechanic-card-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.mechanic-card-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mechanic-card:hover {
  border-color: rgba(255, 94, 0, 0.45);
  background: rgba(255, 94, 0, 0.05);
  transform: translateY(-2px);
}

.mechanic-tag {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.mechanic-card h5 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.mechanic-card p:last-child {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.mechanic-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.mechanic-modal.is-open {
  display: flex;
}

.mechanic-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.mechanic-modal__panel {
  position: relative;
  width: min(640px, calc(100vw - 40px));
  background: #0b0b0b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid var(--accent);
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.mechanic-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--text);
  padding: 6px 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  cursor: pointer;
}

.mechanic-modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mechanic-modal__summary {
  margin-top: 12px;
  margin-bottom: 20px;
  color: var(--text-muted);
  line-height: 1.7;
}

.mechanic-modal__meta {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.mechanic-modal__meta strong {
  color: var(--text);
}

/* Footer */
footer {
  background: #000;
  padding: 100px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 80px;
  margin-bottom: 80px;
}

.footer-logo {
  margin-bottom: 32px;
}

.footer-about p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 300px;
}

.footer-links h5 {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.4);
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 16px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.2em;
}

/* Motorsport Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 80px;
}

.team-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.team-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
  transform: translateY(-5px);
}

.team-motto {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.team-name {
  font-size: 1.25rem;
  margin-bottom: 20px;
  font-weight: 800;
}

.team-lore {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.ability-badge {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.6rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.driver-list {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.driver-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

.driver-name {
  font-weight: 700;
  color: var(--text);
}

.driver-stats {
  color: var(--accent);
  font-weight: 900;
}

.team-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.team-card-link:hover,
.team-card-link:focus,
.team-card-link:active,
.team-card-link:visited {
  text-decoration: none;
  color: inherit;
}

.team-card-link * {
  text-decoration: none;
}

/* Hard override: prevent any browser/default underline inside team cards. */
#motorsport .team-card-link,
#motorsport .team-card-link:link,
#motorsport .team-card-link:visited,
#motorsport .team-card-link:hover,
#motorsport .team-card-link:focus,
#motorsport .team-card-link:active,
#motorsport .team-card-link *,
#motorsport .team-card,
#motorsport .team-card * {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .product-grid, .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Hamburger toggle (CSS-only) ── */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 36px;
  height: 24px;
  position: relative;
  z-index: 1100;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: var(--text);
  height: 2px;
  width: 100%;
  border-radius: 2px;
  position: absolute;
  transition: all 0.3s ease;
}
.nav-toggle-label span       { top: 50%; transform: translateY(-50%); }
.nav-toggle-label span::before { content: ''; top: -8px; }
.nav-toggle-label span::after  { content: ''; top: 8px; }

.nav-toggle:checked + .nav-toggle-label span       { background: transparent; }
.nav-toggle:checked + .nav-toggle-label span::before { top: 0; transform: rotate(45deg); }
.nav-toggle:checked + .nav-toggle-label span::after  { top: 0; transform: rotate(-45deg); }

@media (max-width: 768px) {
  /* Typography */
  h1 { font-size: 2.4rem !important; }
  h2 { font-size: 1.6rem !important; }
  h3 { font-size: 1.2rem !important; }

  /* Layout & Spacing */
  .section-padding { padding: 50px 0; }
  .container { padding: 0 16px; }

  /* ── Hamburger Nav ── */
  .nav-toggle-label { display: block; }

  .nav-content {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px 16px;
  }

  .logo-text {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  .nav-links li a {
    display: block;
    padding: 12px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .nav-content .btn {
    width: 100%;
    text-align: center;
    margin-top: 12px;
    display: none;
  }
  .nav-toggle:checked ~ .btn {
    display: block;
  }

  /* ── Hero ── */
  .hero {
    height: auto;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    padding-top: 140px;
    padding-bottom: 40px;
  }
  .hero-content {
    margin-left: 0 !important;
    text-align: left;
  }
  .hero p { font-size: 1rem; }
  .hero .btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-bottom: 12px;
  }

  .hero-asset {
    position: relative !important;
    width: 70%;
    max-width: 300px;
    margin: 30px auto 0 auto;
    display: block;
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
  }
  .hero-asset.locked {
    position: relative !important;
  }

  /* ── Grids ── */
  .product-grid,
  .team-grid,
  .tech-split,
  .mechanic-columns {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tech-split { gap: 30px; }

  .tech-image { margin-bottom: 16px; }

  .tech-float-tag {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 12px;
  }

  .tech-info h2 { font-size: 2rem !important; }

  /* ── Product Cards ── */
  .product-card { padding: 30px 20px; }
  .product-id { font-size: 2.5rem; }

  /* ── Video Section ── */
  .section-padding h2[style] {
    font-size: 1.6rem !important;
  }

  /* ── Footer ── */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  footer { padding: 50px 0 30px; }

  /* ── Modals ── */
  .mechanic-modal__panel {
    width: calc(100vw - 24px);
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
  }
}

/* Extra small phones */
@media (max-width: 400px) {
  h1 { font-size: 2rem !important; }
  .hero { padding-top: 80px; }
  .product-card { padding: 24px 16px; }
  .team-card { padding: 24px; }
}
