:root {
  --ink: oklch(17% 0.018 162);
  --ink-soft: oklch(35% 0.018 162 / 0.78);
  --ink-muted: oklch(48% 0.018 162 / 0.68);
  --paper: oklch(96% 0.02 84);
  --paper-warm: oklch(92% 0.035 82);
  --panel: oklch(98% 0.014 82 / 0.82);
  --pine: oklch(29% 0.075 153);
  --pine-2: oklch(52% 0.12 151);
  --amber: oklch(64% 0.13 58);
  --red: oklch(56% 0.2 28);
  --road: oklch(53% 0.032 245);
  --road-dark: oklch(44% 0.032 245);
  --line: oklch(22% 0.018 162 / 0.14);
  --line-strong: oklch(22% 0.018 162 / 0.24);
  --shadow: 0 30px 90px oklch(17% 0.018 162 / 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Sora", ui-sans-serif, system-ui, sans-serif;
  background:
    linear-gradient(90deg, oklch(22% 0.018 162 / 0.045) 1px, transparent 1px),
    linear-gradient(180deg, oklch(22% 0.018 162 / 0.045) 1px, transparent 1px),
    radial-gradient(circle at 82% 8%, oklch(69% 0.12 50 / 0.28), transparent 30rem),
    linear-gradient(180deg, var(--paper), var(--paper-warm));
  background-size: 42px 42px, 42px 42px, auto, auto;
}

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

.app-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(1120px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: oklch(98% 0.014 82 / 0.88);
  box-shadow: 0 16px 45px oklch(17% 0.018 162 / 0.1);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.app-badges {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), var(--ink) calc(50% - 1px), var(--ink) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(180deg, transparent calc(50% - 1px), var(--ink) calc(50% - 1px), var(--ink) calc(50% + 1px), transparent calc(50% + 1px)),
    var(--paper);
}

.nav-links {
  justify-content: center;
  gap: 6px;
}

.nav-links a,
.nav-action,
.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.nav-links a {
  padding: 12px 14px;
  color: var(--ink-muted);
}

.nav-action,
.primary-action {
  padding: 12px 18px;
  color: oklch(98% 0.014 82);
  background: var(--pine);
}

.secondary-action {
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.mobile-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
  min-height: 100dvh;
  padding: clamp(112px, 15vh, 156px) clamp(20px, 6vw, 92px) 64px;
}

.hero-copy {
  max-width: 700px;
}

.kicker,
.section-label,
.phone-top,
.hud-pill span,
.surface-grid span,
.app-badges span {
  font-family: "Azeret Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker,
.section-label {
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--pine);
  background: var(--panel);
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.07em;
  text-wrap: balance;
}

h1 {
  max-width: 7.8ch;
  font-size: clamp(4.2rem, 7.6vw, 7rem);
  line-height: 0.86;
}

h2 {
  font-size: clamp(2.6rem, 6vw, 6.5rem);
  line-height: 0.9;
}

.hero-text,
.drive-points p,
.surface-grid p,
.safety-copy p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.62;
}

.hero-text {
  max-width: 55ch;
  margin: 24px 0 0;
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.app-badges {
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.app-badges span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-muted);
  background: oklch(98% 0.014 82 / 0.5);
}

.phone-stage {
  position: relative;
  display: grid;
  min-height: 700px;
  place-items: center;
}

.mount-beam {
  position: absolute;
  inset: 12% -4% 4% 10%;
  border: 1px solid var(--line);
  border-radius: 52px;
  transform: rotate(-4deg);
  background:
    linear-gradient(115deg, oklch(100% 0 0 / 0.4), transparent 48%),
    linear-gradient(180deg, oklch(86% 0.03 150 / 0.24), oklch(100% 0 0 / 0.12));
  box-shadow: var(--shadow);
}

.phone-shell {
  position: relative;
  width: min(390px, 78vw);
  aspect-ratio: 390 / 812;
  padding: 24px 20px 16px;
  border: 10px solid oklch(15% 0.018 162);
  border-radius: 48px;
  background:
    radial-gradient(circle at 50% 24%, oklch(100% 0 0 / 0.48), transparent 22%),
    linear-gradient(180deg, oklch(96% 0.018 82), oklch(90% 0.032 82));
  box-shadow: 0 32px 90px oklch(17% 0.018 162 / 0.3);
}

.phone-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  color: oklch(39% 0.018 162 / 0.58);
}

.phone-top strong {
  color: var(--pine);
}

.phone-top span:last-child {
  text-align: right;
}

.phone-headline {
  margin: 34px 0 18px;
  text-align: center;
}

.phone-headline p {
  margin: 0;
  font-size: 2.45rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  word-spacing: 0.08em;
}

.phone-headline span {
  display: block;
  max-width: 24ch;
  margin: 8px auto 0;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.intersection-map {
  position: relative;
  height: 380px;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 52% 45%, oklch(49% 0.09 143 / 0.46), transparent 44%),
    linear-gradient(160deg, oklch(38% 0.075 143), oklch(28% 0.056 143));
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.08), 0 18px 42px oklch(17% 0.018 162 / 0.28);
}

.road {
  position: absolute;
  background: linear-gradient(180deg, var(--road), var(--road-dark));
}

.road.horizontal {
  top: calc(48% - 54px);
  left: -5%;
  width: 110%;
  height: 108px;
}

.road.vertical {
  top: -5%;
  left: calc(50% - 54px);
  width: 108px;
  height: 110%;
}

.lane,
.stopbar {
  position: absolute;
  z-index: 2;
  background: oklch(98% 0.012 82 / 0.72);
}

.lane.north,
.lane.south {
  left: calc(50% - 1px);
  width: 2px;
  background: repeating-linear-gradient(180deg, oklch(98% 0.012 82 / 0.72) 0 14px, transparent 14px 28px);
}

.lane.north {
  top: 0;
  bottom: 52%;
}

.lane.south {
  top: 52%;
  bottom: 0;
}

.lane.west,
.lane.east {
  top: calc(48% - 1px);
  height: 2px;
  background: repeating-linear-gradient(90deg, oklch(98% 0.012 82 / 0.72) 0 14px, transparent 14px 28px);
}

.lane.west {
  left: 0;
  right: 50%;
}

.lane.east {
  left: 50%;
  right: 0;
}

.stopbar {
  border-radius: 2px;
}

.stopbar.north,
.stopbar.south {
  left: calc(50% - 46px);
  width: 92px;
  height: 4px;
}

.stopbar.north {
  top: calc(48% - 58px);
}

.stopbar.south {
  top: calc(48% + 54px);
}

.stopbar.west,
.stopbar.east {
  top: calc(48% - 46px);
  width: 4px;
  height: 92px;
}

.stopbar.west {
  left: calc(50% - 58px);
}

.stopbar.east {
  left: calc(50% + 54px);
}

.stop-sign {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid oklch(98% 0.012 82);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  background: linear-gradient(145deg, var(--red), oklch(41% 0.16 28));
  box-shadow: 0 10px 22px oklch(17% 0.018 162 / 0.36);
}

.stop-sign::after {
  content: "";
  position: absolute;
  top: 38px;
  left: calc(50% - 2px);
  z-index: -1;
  width: 4px;
  height: 44px;
  border-radius: 999px;
  background: oklch(74% 0.012 110);
}

.stop-sign span {
  color: oklch(98% 0.014 82);
  font-size: 0.43rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sign-south {
  right: 64px;
  bottom: 96px;
}

.car {
  position: absolute;
  z-index: 6;
  display: grid;
  place-items: start center;
  border-radius: 12px;
  background: linear-gradient(180deg, oklch(72% 0.105 151), oklch(42% 0.09 151));
  box-shadow: 0 12px 26px oklch(17% 0.018 162 / 0.42);
}

.car span {
  display: grid;
  min-width: 22px;
  height: 22px;
  margin-top: -10px;
  place-items: center;
  border-radius: 999px;
  color: oklch(98% 0.014 82);
  background: var(--pine);
  font-family: "Azeret Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 700;
}

.car.ego {
  bottom: 28px;
  left: calc(50% - 23px);
  width: 46px;
  height: 98px;
  animation: breathe 2.7s ease-in-out infinite;
}

.car.north-car {
  top: 38px;
  left: calc(50% - 22px);
  width: 44px;
  height: 92px;
  transform: rotate(180deg);
  background: linear-gradient(180deg, oklch(78% 0.074 74), oklch(49% 0.105 61));
}

.car.west-car,
.car.east-car {
  width: 82px;
  height: 40px;
  background: linear-gradient(90deg, oklch(76% 0.07 42), oklch(49% 0.12 35));
}

.car.west-car {
  top: calc(48% + 58px);
  left: 36px;
}

.car.east-car {
  top: calc(48% - 96px);
  right: 34px;
}

.route-vector {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.route-vector path {
  fill: none;
  stroke: oklch(75% 0.13 151);
  stroke-width: 1.6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 9px oklch(65% 0.13 151 / 0.55));
}

.hud-pill {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: oklch(98% 0.014 82 / 0.7);
}

.hud-pill span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.58rem;
}

.hud-pill strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.bottom-tabs span {
  padding: 10px 8px;
  border-radius: 999px;
}

.bottom-tabs .active {
  color: oklch(98% 0.014 82);
  background: var(--pine);
}

.app-section {
  padding: clamp(72px, 11vw, 140px) clamp(20px, 6vw, 92px);
}

.drive-section,
.safety-section {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: start;
}

.drive-points {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.drive-points article,
.surface-grid article {
  padding: 22px;
  background: oklch(97% 0.017 82 / 0.82);
}

.drive-points strong,
.surface-grid strong {
  display: block;
  font-size: 1.3rem;
  letter-spacing: -0.04em;
}

.drive-points p,
.surface-grid p {
  margin: 10px 0 0;
}

.surfaces-section {
  background: oklch(19% 0.026 165);
  color: oklch(98% 0.014 82);
}

.surfaces-section .section-label {
  color: oklch(78% 0.13 151);
  border-color: oklch(98% 0.014 82 / 0.18);
  background: oklch(98% 0.014 82 / 0.08);
}

.surface-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 46px;
  border: 1px solid oklch(98% 0.014 82 / 0.16);
  background: oklch(98% 0.014 82 / 0.16);
}

.surface-grid article {
  min-height: 230px;
  background: oklch(98% 0.014 82 / 0.075);
}

.surface-grid span {
  color: oklch(78% 0.13 151);
}

.surface-grid strong {
  margin-top: 34px;
}

.surface-grid p {
  color: oklch(98% 0.014 82 / 0.72);
}

.safety-copy p {
  margin: 0 0 18px;
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 12px 26px oklch(17% 0.018 162 / 0.42), 0 0 0 0 oklch(65% 0.13 151 / 0.22);
  }

  50% {
    box-shadow: 0 12px 26px oklch(17% 0.018 162 / 0.42), 0 0 0 9px oklch(65% 0.13 151 / 0.08);
  }
}

@media (max-width: 1040px) {
  .mobile-hero,
  .drive-section,
  .safety-section {
    grid-template-columns: 1fr;
  }

  .phone-stage {
    min-height: 650px;
  }

  .surface-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-nav {
    grid-template-columns: 1fr auto;
    border-radius: 28px;
  }

  .nav-links {
    display: none;
  }

  .mobile-hero {
    padding: 112px 20px 54px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(3.25rem, 14.4vw, 3.85rem);
    line-height: 0.9;
    letter-spacing: -0.065em;
  }

  h2 {
    font-size: clamp(2.5rem, 13vw, 4.1rem);
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .phone-stage {
    min-height: 580px;
  }

  .phone-shell {
    width: min(342px, calc(100vw - 48px));
    border-width: 8px;
    border-radius: 40px;
  }

  .phone-top {
    font-size: 0.58rem;
  }

  .phone-headline p {
    font-size: 2rem;
  }

  .intersection-map {
    height: 328px;
  }

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

  .surface-grid article {
    min-height: 180px;
  }
}
