:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --fg: #f4f1ea;
  --pin: #ea4335;
  --loc: #1a73e8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0.85rem;
  background: var(--bg);
  color: var(--fg);
  font-family: Arial, Helvetica, sans-serif;
}

.map-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bento {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template: 1fr / 1fr;
  padding: 0;
  opacity: 1;
}

.bento-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border-radius: 1.05rem;
  background: #101318;
  box-shadow:
    inset 0 0 0 1px rgba(244, 241, 234, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.35);
}

.mini-map,
.leaflet-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #15181d;
}

.leaflet-container {
  font-family: Arial, Helvetica, sans-serif;
}

.leaflet-pane,
.leaflet-top,
.leaflet-bottom,
.leaflet-control-zoom,
.leaflet-control-attribution {
  pointer-events: none;
}

.leaflet-control-zoom,
.leaflet-control-attribution {
  display: none !important;
}

.leaflet-overlay-pane path.g-route-line {
  animation: route-dash 1.35s linear infinite;
}

.g-loc-icon {
  background: none;
  border: 0;
}

.g-loc-core {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--loc);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.4), 0 0 10px rgba(26, 115, 232, 0.45);
}

.g-loc-ring {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px solid rgba(26, 115, 232, 0.55);
  animation: loc-ring 2.2s ease-out infinite;
}

.g-loc-ring.delay { animation-delay: 1.1s; }

.g-pin-icon {
  background: none;
  border: 0;
}

.g-pin-icon span {
  display: block;
  width: 18px;
  height: 18px;
  background: var(--pin);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.5);
}

.g-car-icon,
.g-loc-icon,
.g-pin-icon {
  transition: opacity 160ms linear;
}

.g-car-icon {
  background: none;
  border: 0;
}

.g-car-dot {
  display: block;
  width: 9px;
  height: 15px;
  margin: 1px auto 0;
  border-radius: 8px;
  background: #f4f1ea;
  box-shadow: 0 0 10px rgba(244, 241, 234, 0.45);
  transform: rotate(var(--h, 0deg));
  transform-origin: 50% 50%;
}

.g-car-icon.amber .g-car-dot {
  background: #fbbc04;
  box-shadow: 0 0 10px rgba(251, 188, 4, 0.55);
}

.map-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 34% 30% at 50% 42%, rgba(10, 10, 10, 0.28) 0%, transparent 68%),
    radial-gradient(ellipse 96% 94% at 50% 50%, transparent 62%, var(--bg) 100%);
}

.map-credit {
  position: absolute;
  right: 1rem;
  bottom: 0.55rem;
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  color: var(--fg);
  opacity: 0.28;
}

main {
  position: relative;
  z-index: 1;
  width: min(24rem, 100%);
  text-align: center;
}

.hero {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.mark {
  display: block;
  width: min(16rem, 72vw);
  height: auto;
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.55));
  animation: rise 900ms ease both;
}

.status {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--fg);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 6vw, 2.1rem);
  font-weight: 700;
  text-shadow:
    0 2px 18px rgba(10, 10, 10, 0.95),
    0 0 28px rgba(10, 10, 10, 0.88);
  animation: rise 900ms ease 140ms both;
}

.status::before {
  content: "";
  position: absolute;
  inset: -0.4em -0.9em;
  z-index: -1;
  background: radial-gradient(ellipse, rgba(10, 10, 10, 0.55) 0%, transparent 72%);
}

.lede {
  margin: 1.15rem auto 0;
  max-width: 22rem;
  line-height: 1.45;
  font-size: clamp(0.95rem, 2.6vw, 1.05rem);
  letter-spacing: 0.02em;
  text-shadow:
    0 2px 18px rgba(10, 10, 10, 0.95),
    0 0 28px rgba(10, 10, 10, 0.88);
  animation: rise 900ms ease 220ms both;
}

.contact {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0.72;
  animation: rise 900ms ease 300ms both;
}

.contact a {
  color: inherit;
  text-underline-offset: 0.18em;
}

.contact a:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

noscript .lede {
  animation: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loc-ring {
  0% { transform: scale(0.4); opacity: 0.75; }
  100% { transform: scale(1.7); opacity: 0; }
}

@keyframes route-dash {
  to { stroke-dashoffset: -32; }
}

@media (max-width: 700px) {
  body {
    padding: 0.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mark,
  .status,
  .lede,
  .contact {
    animation: none;
  }

  .leaflet-overlay-pane path.g-route-line,
  .g-loc-ring {
    animation: none;
  }

  .g-car-icon,
  .g-loc-icon,
  .g-pin-icon {
    transition: none;
  }
}

.error-page {
  overflow: auto;
}

.error-page .status {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
}

.error-code {
  margin: 0 0 0.35rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  opacity: 0.55;
}

.error-copy {
  margin: 1.1rem 0 1.4rem;
  line-height: 1.45;
  color: var(--fg);
}

.home-link {
  color: var(--fg);
  text-underline-offset: 0.18em;
}

.home-link:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}
