:root {
  color-scheme: dark;
  --bg: #0c0f12;
  --ink: #ffffff;
  --muted: #8f969e;
  --subtle: #5c636b;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ease: cubic-bezier(0.22, 0.75, 0.18, 1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans", "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.shell {
  width: min(1060px, 100% - 48px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(12, 15, 18, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.lang-menu {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease);
}

.lang-trigger:hover,
.lang-trigger[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.globe-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.chevron-icon {
  width: 11px;
  height: 11px;
  opacity: 0.72;
  transition: transform 200ms var(--ease);
}

.lang-trigger[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.lang-popover {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 312px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(18, 22, 26, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  z-index: 60;
}

.lang-popover[hidden] {
  display: none;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.lang-option.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  font-weight: 600;
}

.lang-check {
  font-size: 12px;
  color: var(--ink);
  flex-shrink: 0;
}

/* Full-Viewport Hero: Copy Centered Upper, Visual Below */
.hero {
  position: relative;
  min-height: calc(100svh - 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.5vh, 40px);
  padding: clamp(40px, 7vh, 72px) 0 clamp(24px, 4vh, 44px);
  overflow: hidden;
}

.hero-backdrop {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.hero-stage-box {
  position: relative;
  width: min(1140px, 102vw, calc(48svh * 2.4));
  aspect-ratio: 2400 / 1000;
}

.hero-stage-box img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

.ride-stage-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1400 / 1500;
}

.ride-stage-box img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
}

.road-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, #000 18%, #000 76%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(180deg, transparent 0%, #000 18%, #000 76%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
  mask-composite: intersect;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 6.6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 700;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.hero-sub {
  margin: 16px 0 28px;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--muted);
  max-width: 560px;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
}

.apple-mark {
  width: 15px;
  height: 18px;
  flex-shrink: 0;
}

/* Frameless Atmospheric Split Bands */
.showcase-band {
  position: relative;
  padding: clamp(72px, 9vw, 128px) 0;
}

.showcase-band::before,
.closing-band::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1060px, 100% - 48px);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 20%,
    rgba(255, 255, 255, 0.14) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.split-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.split-reverse {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.split-reverse .split-copy {
  order: 2;
}

.split-reverse .ambient-visual {
  order: 1;
}

.split-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.split-copy p {
  margin: 0;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.65;
  color: var(--muted);
  max-width: 400px;
}

/* Borderless Feathered Edge Visual */
.ambient-visual {
  position: relative;
  width: 100%;
  max-width: 480px;
  justify-self: center;
}

.ambient-visual img {
  display: block;
  width: 100%;
  height: auto;
}

/* Floating iOS-matched Telemetry Overlays (no cards/boxes) */
.ride-visual {
  padding-bottom: 0;
}

.ride-readout-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(44px, 7vw, 72px);
  margin-top: -10px;
  position: relative;
  z-index: 4;
  pointer-events: none;
}

.hud-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.hud-readout bdi {
  font-size: clamp(32px, 3.8vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hud-readout span {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* iOS-style lean-side luminous shadow & angle annotation */
.lean-shadow-glow {
  position: absolute;
  left: 14%;
  top: 52%;
  width: 38%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 65% 50%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.04) 50%, transparent 78%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 1;
}

.ride-visual img {
  position: relative;
  z-index: 2;
}

.lean-callout {
  position: absolute;
  left: 23%;
  top: 59%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.lean-glyph {
  width: 12px;
  height: 15px;
  opacity: 0.9;
}

/* iOS-style compact foreshortened ground compass arc */
.ground-compass {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  width: 28%;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 4;
}

.ground-heading {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: -8px;
}

.ground-compass-svg {
  width: 100%;
  height: auto;
  display: block;
  transform: scaleY(0.58);
}

.hud-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hud-value {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.hud-value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.replay-top-meta {
  position: absolute;
  inset: 4% 6% auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 3;
}

.hud-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hud-north {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.replay-hud {
  margin-top: -12px;
  position: relative;
  z-index: 2;
}

.replay-hud-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  text-align: start;
}

/* Centered Content Bands (Garage, Calibration, Specs) */
.band-centered {
  text-align: center;
}

.band-centered h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.band-sub {
  margin: 14px auto 0;
  max-width: 540px;
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--muted);
}

/* 3D Garage Horizontal Infinite Marquee — Moody Showroom Atmosphere */
.garage-marquee {
  margin-top: clamp(44px, 5.5vw, 68px);
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.garage-track {
  display: flex;
  width: max-content;
  animation: garage-scroll 52s linear infinite;
}

@keyframes garage-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.garage-row {
  list-style: none;
  margin: 0;
  padding: 0 20px 0 0;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.garage-item {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: default;
}

.garage-visual {
  width: 100%;
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  position: relative;
}

.garage-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 58% 48% at 50% 60%,
    rgba(255, 255, 255, 0.07) 0%,
    rgba(255, 255, 255, 0.02) 45%,
    transparent 74%
  );
  pointer-events: none;
}

.garage-visual::after {
  content: "";
  position: absolute;
  bottom: 7%;
  left: 20%;
  right: 20%;
  height: 11%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.85) 0%, transparent 72%);
  pointer-events: none;
}

.garage-visual img {
  position: relative;
  z-index: 1;
  width: 86%;
  height: auto;
  display: block;
  opacity: 0.86;
  filter: saturate(0.75) brightness(0.94);
  transition: transform 320ms var(--ease), opacity 320ms var(--ease), filter 320ms var(--ease);
}

.garage-item:hover .garage-visual img {
  transform: translateY(-3px) scale(1.04);
  opacity: 1;
  filter: saturate(1) brightness(1.04);
}

.garage-type {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 240ms var(--ease);
}

.garage-item:hover .garage-type {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .garage-track {
    animation: none;
  }
}

/* 3-Step Calibration Strip */
.cal-grid {
  list-style: none;
  margin: clamp(36px, 5vw, 56px) auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: 920px;
  text-align: center;
}

.cal-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cal-icon {
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 14px;
}

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

.cal-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--subtle);
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}

.cal-step h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.cal-step p {
  margin: 0;
  max-width: 260px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* Built for the Road Spec Strip */
.specs-grid {
  margin: clamp(40px, 5vw, 60px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  max-width: 920px;
  text-align: start;
}

.spec-item {
  padding: 0;
}

.spec-icon {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
}

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

.spec-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.spec-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

/* Closing Band */
.closing-band {
  position: relative;
  padding: clamp(80px, 10vw, 132px) 0;
  text-align: center;
}

.closing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 560px;
}

.closing-band h2 {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 48px);
  letter-spacing: -0.035em;
  font-weight: 700;
}

.closing-band p {
  margin: 14px 0 28px;
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}

.operator {
  font-size: 12px;
  color: var(--subtle);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  transition: color 180ms var(--ease);
}

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

/* Responsive */
@media (max-width: 820px) {
  .shell {
    width: min(1060px, 100% - 32px);
  }

  .hero {
    min-height: calc(100svh - 58px);
    padding: 24px 0 40px;
  }

  .split-row,
  .split-reverse {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
  }

  .split-reverse .split-copy {
    order: 1;
  }

  .split-reverse .ambient-visual {
    order: 2;
  }

  .split-copy p {
    margin-inline: auto;
  }

  .ambient-visual {
    max-width: 380px;
  }

  .garage-item {
    flex-basis: 196px;
  }

  .cal-grid,
  .specs-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
