/* Street Car Drag Racing Simulator — homepage shell v=2 */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #090d16;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  font-family: system-ui, "Segoe UI", "Helvetica Neue", sans-serif;
  color: #fff;
}

/* Full-bleed shell. No safe-area padding around the stage: on a Pixel 8
   landscape (~20:9) the punch-hole sits in the side gutters of a centered
   16:9 frame, and fullscreen + navigationUI:hide already drops the bars. */
#app {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #090d16;
  container-type: size;
}

/* Soft scene bleed in the 20:9 side gutters so the letterbox is not a hard
   black bar. The 16:9 stage stays sharp and uncropped on top. */
#bleed {
  position: absolute;
  inset: 0;
  background: #090d16 url("./assets/home-bg.jpg?v=2") center center / cover no-repeat;
  filter: blur(28px) brightness(0.42) saturate(1.05);
  transform: scale(1.12);
  pointer-events: none;
}

/* Exact centered 16:9 stage: keeps the starter, both staged cars, the bridge
   cop, and the bottom buttons fully framed on a wide Pixel 8 landscape. */
#stage {
  position: relative;
  z-index: 1;
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  overflow: hidden;
  background: #090d16;
  container-type: size;
}

#stage .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Placement matched to the approved two-button concept (bottom asphalt strip,
   between the starter's boots on the left and the roadside post on the right). */
.hud-btn {
  --cut: 11%;
  --clip: polygon(
    var(--cut) 0,
    calc(100% - var(--cut)) 0,
    100% 50%,
    calc(100% - var(--cut)) 100%,
    var(--cut) 100%,
    0 50%
  );
  position: absolute;
  top: 88.2%;
  height: 8.45%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  container-type: size;
  filter:
    drop-shadow(0 0 0.45cqh var(--glow))
    drop-shadow(0 0 1.3cqh var(--glow-soft));
}

#btnSignup  { left: 21.1%; width: 26.4%; }
#btnContinue { left: 53.7%; width: 26.4%; }

.hud-btn.gold {
  --edge: linear-gradient(180deg, #ffe9a8 0%, #ffc14a 42%, #e09212 72%, #b56a08 100%);
  --glow: rgba(255, 184, 48, 0.95);
  --glow-soft: rgba(255, 150, 20, 0.42);
}
.hud-btn.silver {
  --edge: linear-gradient(180deg, #f6f9ff 0%, #d4e0f2 42%, #a8bdd8 72%, #7e96b5 100%);
  --glow: rgba(210, 226, 255, 0.92);
  --glow-soft: rgba(150, 186, 230, 0.38);
}

.hud-btn .edge,
.hud-btn .fill {
  position: absolute;
  inset: 0;
  clip-path: var(--clip);
  pointer-events: none;
}

.hud-btn .edge { background: var(--edge); }

/* Scale the smoked-glass fill inward so the edge shows as a thin even beveled border. */
.hud-btn .fill {
  transform: scale(0.985, 0.92);
  transform-origin: center;
  background: linear-gradient(180deg,
    rgba(62, 70, 82, 0.72) 0%,
    rgba(18, 22, 30, 0.86) 44%,
    rgba(6, 8, 12, 0.92) 100%);
}

.hud-btn.silver .fill {
  background: linear-gradient(180deg,
    rgba(78, 88, 104, 0.62) 0%,
    rgba(20, 24, 32, 0.86) 46%,
    rgba(6, 8, 12, 0.93) 100%);
}

.hud-btn .label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 16%;
  box-sizing: border-box;
  color: #fff;
  font-weight: 800;
  font-size: 34cqh;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

/* Subtle tactile press: slightly smaller, brighter glow. */
.hud-btn.pressed {
  transform: scale(0.97);
  filter:
    drop-shadow(0 0 0.7cqh var(--glow))
    drop-shadow(0 0 1.8cqh var(--glow-soft))
    brightness(1.22);
}

.hud-btn:focus-visible {
  outline: 2px solid #ffe08a;
  outline-offset: 3px;
}

/* Landscape-lock UX (same pattern as the working Android Chrome PWA shell). */
#rotate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #000;
  color: #fff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 24px;
}
#rotate p {
  font-size: 26px;
  font-weight: 900;
  margin: 0;
}
#rotate .phone {
  width: 70px;
  height: 120px;
  border: 6px solid #ffe600;
  border-radius: 14px;
  animation: turn 1.6s ease-in-out infinite;
}
@keyframes turn {
  0%, 20% { transform: rotate(0); }
  60%, 100% { transform: rotate(-90deg); }
}
@media (orientation: portrait) {
  #rotate { display: flex; }
}
