:root {
  color-scheme: light;
  --ink: #17221c;
  --muted: #6f7b74;
  --paper: #f1f3ee;
  --card: #fffefa;
  --line: #dfe5df;
  --green: #2d7f5c;
  --green-soft: #e6f3ec;
  --orange: #e65f35;
  --orange-soft: #fff0e9;
  --yellow: #d49428;
  --yellow-soft: #fff6df;
  --shadow: 0 24px 70px rgba(23, 34, 28, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  background:
    radial-gradient(circle at 8% 10%, rgba(45, 127, 92, 0.1), transparent 24rem),
    radial-gradient(circle at 92% 90%, rgba(230, 95, 53, 0.09), transparent 26rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.home-shell {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 28px 0 44px;
}

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

.site-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
}

.header-note {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero {
  padding: clamp(58px, 9vh, 92px) 0 clamp(32px, 5vh, 52px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.hero > p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.module-card {
  position: relative;
  display: flex;
  min-height: 390px;
  overflow: hidden;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.module-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.typing-module:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
}

.racing-module:hover {
  border-color: color-mix(in srgb, var(--orange) 45%, var(--line));
}

.radar-module:hover {
  border-color: color-mix(in srgb, #3f9fa8 50%, var(--line));
}

.aim-module:hover {
  border-color: color-mix(in srgb, var(--yellow) 55%, var(--line));
}

.module-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.module-number {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.module-status {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.module-status.live {
  background: var(--green-soft);
  color: var(--green);
}

.module-status.racing-live {
  background: var(--orange-soft);
  color: var(--orange);
}

.module-status.radar-live {
  background: #e7f4f4;
  color: #287d84;
}

.module-status.aim-live {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.module-status.live i,
.coming-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.module-status.soon {
  background: var(--orange-soft);
  color: var(--orange);
}

.typing-visual {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  width: min(84%, 360px);
  margin: 36px auto 32px;
  transform: perspective(500px) rotateX(16deg);
}

.typing-visual span {
  display: grid;
  height: 31px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--green) 20%, var(--line));
  border-bottom-width: 3px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--green-soft) 40%, var(--card));
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 700;
}

.typing-visual span.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  transform: translateY(-4px);
}

.racing-visual {
  position: relative;
  height: 136px;
  overflow: hidden;
  margin: 28px 0 30px;
  border-radius: 18px;
  background:
    linear-gradient(118deg, transparent 0 20%, rgba(255, 255, 255, 0.08) 20% 21%, transparent 21% 100%),
    #242923;
}

.racing-visual::before,
.racing-visual::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  background: repeating-linear-gradient(#fff 0 12px, var(--orange) 12px 24px);
  content: "";
  transform: skewX(-14deg);
}

.racing-visual::before { left: 52px; }
.racing-visual::after { right: 52px; }

.road-line {
  position: absolute;
  top: 58px;
  width: 68px;
  height: 5px;
  border-radius: 5px;
  background: #f6e6a8;
  transform: skewX(-24deg);
}

.line-one { left: 112px; }
.line-two { right: 110px; }

.car,
.race-car {
  position: absolute;
  display: block;
  width: 84px;
  height: 38px;
  border-radius: 28px 13px 10px 10px;
  background: var(--orange);
  box-shadow: inset 0 -8px 0 rgba(116, 29, 7, 0.22), 0 10px 18px rgba(0, 0, 0, 0.22);
}

.car {
  top: 48px;
  left: calc(50% - 42px);
}

.car::before,
.race-car::before {
  position: absolute;
  top: -11px;
  left: 23px;
  width: 39px;
  height: 19px;
  border-radius: 15px 14px 0 0;
  background: #ff8b64;
  content: "";
}

.car i,
.car b,
.race-car i,
.race-car b {
  position: absolute;
  bottom: -6px;
  width: 17px;
  height: 17px;
  border: 4px solid #161916;
  border-radius: 50%;
  background: #b7c0b9;
}

.car i,
.race-car i { left: 12px; }
.car b,
.race-car b { right: 12px; }

.radar-visual {
  position: relative;
  height: 136px;
  overflow: hidden;
  margin: 28px 0 30px;
  border-radius: 18px;
  background:
    linear-gradient(rgba(80, 165, 172, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 165, 172, 0.09) 1px, transparent 1px),
    #172329;
  background-size: 22px 22px;
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 34%;
  border: 1px solid rgba(91, 214, 210, 0.34);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.ring-one { width: 102px; height: 102px; }
.ring-two { width: 58px; height: 58px; }
.radar-beam { position: absolute; top: 50%; left: 34%; width: 52px; height: 1px; background: #87dfd9; box-shadow: 0 0 14px #87dfd9; transform-origin: 0 0; transform: rotate(-32deg); }
.radar-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #c1ef69; box-shadow: 0 0 12px #c1ef69; }
.dot-one { top: 34px; left: 78px; }
.dot-two { bottom: 30px; left: 134px; background: #ff7653; box-shadow: 0 0 12px #ff7653; }
.radar-bars { position: absolute; right: 22px; bottom: 24px; display: flex; gap: 7px; align-items: end; height: 72px; }
.radar-bars span { width: 8px; border-radius: 5px 5px 2px 2px; background: linear-gradient(#b8f452, #3d7b68); }
.radar-bars span:nth-child(1) { height: 28%; }
.radar-bars span:nth-child(2) { height: 66%; }
.radar-bars span:nth-child(3) { height: 42%; }
.radar-bars span:nth-child(4) { height: 90%; }
.radar-bars span:nth-child(5) { height: 58%; }

.aim-visual {
  position: relative;
  height: 136px;
  overflow: hidden;
  margin: 28px 0 30px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 48%),
    linear-gradient(180deg, #77a9ce 0 53%, #363d3b 53% 100%);
}

.aim-visual::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 47%;
  background:
    linear-gradient(12deg, transparent 48%, rgba(236, 184, 65, 0.55) 49% 50%, transparent 51%) 0 0 / 86px 34px,
    linear-gradient(-12deg, transparent 48%, rgba(236, 184, 65, 0.3) 49% 50%, transparent 51%) 16px 0 / 86px 34px;
  content: "";
}

.aim-building {
  position: absolute;
  bottom: 47%;
  width: 58px;
  height: 31px;
  border: 2px solid #303b3e;
  background: #e9ece9;
  box-shadow: inset 0 -8px 0 #cad1ce;
}

.aim-building::before {
  position: absolute;
  top: -15px;
  width: 12px;
  height: 15px;
  background: #d6dedb;
  box-shadow: 17px -6px 0 #d6dedb;
  content: "";
}

.building-left { left: 17px; }
.building-right { right: 19px; width: 72px; }
.building-left::before { left: 8px; }
.building-right::before { right: 18px; }

.aim-target {
  position: absolute;
  z-index: 2;
  bottom: 40px;
  width: 11px;
  height: 28px;
  border: 2px solid #f5c64c;
  border-radius: 6px 6px 3px 3px;
  background: #233038;
  box-shadow: 0 0 8px rgba(245, 198, 76, 0.34);
}

.aim-target::before {
  position: absolute;
  top: -8px;
  left: 0;
  width: 7px;
  height: 7px;
  border: 2px solid #f5c64c;
  border-radius: 50%;
  background: #233038;
  content: "";
}

.aim-target i::before,
.aim-target i::after {
  position: absolute;
  bottom: -9px;
  width: 2px;
  height: 10px;
  background: #f5c64c;
  content: "";
}

.aim-target i::before { left: 1px; transform: rotate(8deg); }
.aim-target i::after { right: 1px; transform: rotate(-8deg); }
.target-left { left: 32%; transform: scale(0.82); }
.target-center { left: 49%; bottom: 46px; }
.target-right { right: 31%; transform: scale(0.72); }

.aim-crosshair {
  position: absolute;
  z-index: 4;
  top: 48%;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.aim-crosshair::before,
.aim-crosshair::after {
  position: absolute;
  background: rgba(255, 255, 255, 0.72);
  content: "";
}

.aim-crosshair::before { top: 13px; left: -7px; width: 40px; height: 1px; }
.aim-crosshair::after { top: -7px; left: 13px; width: 1px; height: 40px; }
.aim-crosshair i { position: absolute; top: 10px; left: 10px; width: 6px; height: 6px; border-radius: 50%; background: #e33f32; box-shadow: 0 0 8px rgba(227, 63, 50, 0.65); }

.aim-rifle {
  position: absolute;
  z-index: 5;
  right: 19px;
  bottom: 15px;
  width: 98px;
  height: 15px;
  border-radius: 4px 2px 2px 5px;
  background: #202825;
  box-shadow: inset 34px 0 0 #9a562f, 0 5px 10px rgba(0, 0, 0, 0.28);
  transform: rotate(-12deg);
}

.aim-rifle::before {
  position: absolute;
  top: 5px;
  left: -34px;
  width: 38px;
  height: 5px;
  border-radius: 3px;
  background: #202825;
  content: "";
}

.aim-rifle i {
  position: absolute;
  right: 18px;
  bottom: -19px;
  width: 11px;
  height: 23px;
  border-radius: 2px 2px 6px 6px;
  background: #232b28;
  transform: rotate(16deg);
}

.aim-rifle b {
  position: absolute;
  top: -6px;
  left: 37px;
  width: 33px;
  height: 6px;
  border-radius: 3px;
  background: #303a36;
}

.module-copy {
  display: flex;
  gap: 22px;
  align-items: end;
  justify-content: space-between;
  margin-top: auto;
}

.module-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.module-copy h2 {
  margin: 6px 0 8px;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 34px;
  font-weight: 500;
}

.module-copy p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.enter-button {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.enter-button b {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-left: 7px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: transform 180ms ease;
}

.module-card:hover .enter-button b {
  transform: translateX(4px);
}

.racing-shell {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 28px 0;
}

.back-link {
  display: inline-flex;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.7);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.racing-stage {
  display: grid;
  min-height: calc(100dvh - 112px);
  overflow: hidden;
  grid-template-columns: 0.8fr 1.2fr;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.stage-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 7vw, 84px);
}

.stage-kicker {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.stage-copy h1 {
  margin: 14px 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 500;
}

.stage-copy p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.coming-badge {
  display: inline-flex;
  width: fit-content;
  gap: 9px;
  align-items: center;
  margin-top: 28px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 11px;
  font-weight: 750;
}

.track-scene {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.09), transparent 14rem),
    #20251f;
}

.track-scene::before {
  position: absolute;
  top: -15%;
  bottom: -15%;
  left: 50%;
  width: 58%;
  background: #303530;
  content: "";
  transform: translateX(-50%) perspective(300px) rotateX(3deg);
}

.track-edge {
  position: absolute;
  z-index: 1;
  top: -10%;
  bottom: -10%;
  width: 11px;
  background: repeating-linear-gradient(var(--orange) 0 22px, #fff 22px 44px);
}

.edge-left { left: 20%; }
.edge-right { right: 20%; }

.track-dash {
  position: absolute;
  z-index: 1;
  left: calc(50% - 4px);
  width: 8px;
  height: 82px;
  border-radius: 5px;
  background: #f7e5a4;
}

.dash-one { top: 2%; }
.dash-two { top: 38%; }
.dash-three { top: 74%; }

.race-car {
  z-index: 3;
  right: 28%;
  bottom: 18%;
  width: 108px;
  height: 48px;
  transform: rotate(-4deg);
}

@media (max-width: 760px) {
  .home-shell,
  .racing-shell {
    width: min(100% - 24px, 1120px);
  }

  .header-note {
    display: none;
  }

  .hero {
    padding-top: 52px;
  }

  .module-grid,
  .racing-stage {
    grid-template-columns: 1fr;
  }

  .module-card {
    min-height: 360px;
  }

  .module-copy {
    align-items: start;
    flex-direction: column;
  }

  .racing-stage {
    min-height: calc(100dvh - 100px);
  }

  .stage-copy {
    min-height: 330px;
  }

  .track-scene {
    min-height: 420px;
  }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .module-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
