:root {
  --bg: #08110c;
  --bg-deep: #040806;
  --panel: rgba(9, 22, 15, 0.7);
  --panel-strong: rgba(11, 26, 18, 0.88);
  --line: rgba(203, 255, 214, 0.16);
  --line-strong: rgba(203, 255, 214, 0.3);
  --text: #f4fff7;
  --muted: #a7c8af;
  --accent: #8df0a1;
  --accent-strong: #4dd56a;
  --shadow: rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(88, 183, 92, 0.18), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(125, 214, 143, 0.1), transparent 22%),
    linear-gradient(180deg, #0f1d14 0%, var(--bg) 40%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(201, 255, 212, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 255, 212, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 32%, black, transparent 82%);
}

.background-haze {
  position: fixed;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  filter: blur(26px);
  opacity: 0.28;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: drift 16s ease-in-out infinite alternate;
}

.background-haze-left {
  top: -10vw;
  left: -8vw;
  background: radial-gradient(circle, rgba(108, 224, 136, 0.42), transparent 64%);
}

.background-haze-right {
  right: -10vw;
  bottom: -14vw;
  background: radial-gradient(circle, rgba(44, 146, 96, 0.28), transparent 64%);
  animation-duration: 20s;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.hero-card {
  width: min(1160px, 100%);
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    var(--panel);
  box-shadow:
    0 24px 90px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
}

.hero-top,
.hero-grid,
.info-grid,
.action-row,
.pill-cluster,
.button-row,
.map-copy,
.map-meta-grid {
  display: grid;
  gap: 16px;
}

.hero-top {
  align-items: start;
  margin-bottom: 28px;
}

.eyebrow,
.info-label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

h1,
h2,
.digit-layer,
.info-value {
  font-family: "Space Grotesk", sans-serif;
}

h1,
h2,
.lede,
.action-copy,
.info-meta,
.clock-caption {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 10vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  max-width: 7ch;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.pill-cluster {
  grid-auto-flow: row;
  justify-self: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(133, 226, 158, 0.1);
  color: var(--text);
  font-size: 0.88rem;
}

.pill-soft {
  background: rgba(255, 255, 255, 0.03);
}

.hero-grid {
  align-items: center;
}

.hero-copy,
.clock-panel,
.info-card {
  border: 1px solid rgba(203, 255, 214, 0.11);
  background: rgba(8, 17, 12, 0.44);
}

.hero-copy,
.clock-panel {
  border-radius: 28px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.lede {
  max-width: 28ch;
  font-size: clamp(1.08rem, 1.8vw, 1.3rem);
  line-height: 1.6;
  color: #dff7e4;
}

.lede strong {
  color: var(--accent);
  font-weight: 700;
}

.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
}

.info-card {
  min-height: 140px;
  border-radius: 22px;
  padding: 18px;
}

.info-value {
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.info-meta,
.action-copy,
.clock-caption {
  color: var(--muted);
  line-height: 1.55;
}

.action-row {
  align-items: center;
  margin-top: 26px;
}

.button {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(155, 246, 178, 0.38);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(141, 240, 161, 0.34), rgba(77, 213, 106, 0.18)),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(77, 213, 106, 0.14);
  border-color: rgba(155, 246, 178, 0.58);
}

.button-row {
  grid-template-columns: 1fr;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(203, 255, 214, 0.18);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
  box-shadow: none;
}

.clock-panel {
  position: relative;
  overflow: hidden;
}

.clock-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.stage-countdown {
  margin: 0;
  color: rgba(203, 235, 204, 0.82);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.clock-stage {
  position: relative;
  min-height: min(68vw, 640px);
  display: grid;
  place-items: center;
  padding: 10px 0 14px;
}

.clock-stage::before {
  content: "";
  position: absolute;
  width: min(70%, 440px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(141, 240, 161, 0.16), transparent 68%);
  filter: blur(14px);
}

.flow-canvas {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 0;
  opacity: 0.92;
}

.flow-canvas canvas {
  width: min(100%, 640px) !important;
  height: auto !important;
  aspect-ratio: 1;
  display: block;
}

.melting-clock {
  width: min(100%, 640px);
  height: auto;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.digit-layer {
  text-anchor: middle;
  font-size: 172px;
  font-weight: 700;
  letter-spacing: -0.08em;
  dominant-baseline: middle;
}

.digit-main {
  fill: url(#digitGradient);
}

.digit-echo {
  fill: rgba(65, 130, 82, 0.34);
}

.digit-ghost {
  fill: rgba(183, 223, 187, 0.16);
}

.drip-path {
  fill: url(#dripGradient);
  opacity: 0.92;
}

.drip-shadow {
  fill: rgba(34, 86, 47, 0.22);
  filter: blur(8px);
}

.seconds-readout {
  fill: rgba(203, 235, 204, 0.72);
  text-anchor: middle;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.clock-caption {
  max-width: 48ch;
}

.map-panel {
  margin-top: 18px;
  border: 1px solid rgba(203, 255, 214, 0.11);
  border-radius: 28px;
  padding: clamp(20px, 3vw, 28px);
  background: rgba(8, 17, 12, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.map-panel.is-hidden {
  display: none;
}

.map-copy {
  align-items: start;
  margin-bottom: 18px;
}

.map-status {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.map-action-row {
  margin-top: 18px;
}

.map-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(203, 255, 214, 0.09);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 40%, rgba(141, 240, 161, 0.08), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.world-map {
  display: block;
  width: 100%;
  height: auto;
}

.map-base-image {
  opacity: 0.82;
  transition:
    opacity 280ms ease,
    filter 280ms ease;
}

.map-grid path {
  stroke: rgba(203, 255, 214, 0.12);
  stroke-width: 1;
  transition: stroke 220ms ease;
}

.map-stage.is-celebrating .map-base-image {
  opacity: 0.95;
  filter: saturate(1.2) brightness(1.08);
}

.map-stage.is-celebrating .map-grid path {
  stroke: rgba(121, 204, 133, 0.28);
  animation: meshWave 1.8s ease-out;
}

.map-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.map-meta-card {
  min-height: 126px;
}

.map-meta-value {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
}

.map-pin-pulse {
  fill: rgba(116, 226, 139, 0.14);
  animation: pinPulse 2.4s ease-out infinite;
}

.map-pin-core {
  stroke-width: 1.4;
}

.map-pin-core.user {
  fill: #8dd7ff;
  stroke: rgba(228, 246, 255, 0.9);
}

.map-pin-core.next {
  fill: #dcffd3;
  stroke: rgba(255, 255, 255, 0.88);
}

.map-pin-stem.user {
  stroke: rgba(141, 215, 255, 0.78);
}

.map-pin-stem.next {
  stroke: rgba(116, 226, 139, 0.78);
}

.map-pin-stem {
  stroke-width: 2;
  stroke-linecap: round;
}

.map-pin-label {
  fill: rgba(240, 255, 244, 0.88);
  font-family: "Manrope", sans-serif;
  font-size: 5.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: rgba(8, 17, 12, 0.72);
  stroke-width: 0.9;
}

#map-markers {
  overflow: visible;
}

.celebration-ring {
  fill: none;
  stroke: rgba(135, 235, 147, 0.58);
  stroke-width: 2.4;
  animation: mapRing 1.9s ease-out forwards;
  transform-origin: center;
}

.celebration-ring.delay-1 {
  animation-delay: 0.18s;
}

.celebration-ring.delay-2 {
  animation-delay: 0.34s;
}

.celebration-core {
  fill: rgba(189, 255, 196, 0.88);
  animation: mapCore 1.3s ease-out forwards;
  transform-origin: center;
}

.celebration-wave-line {
  stroke: rgba(104, 194, 118, 0.34);
  stroke-width: 1.4;
  stroke-linecap: round;
  animation: mapLine 1.7s ease-out forwards;
}

.celebration-wave-line.delay-1 {
  animation-delay: 0.12s;
}

.celebration-wave-line.delay-2 {
  animation-delay: 0.22s;
}

.celebration-wave-line.delay-3 {
  animation-delay: 0.3s;
}

@media (min-width: 860px) {
  .hero-top {
    grid-template-columns: 1fr auto;
  }

  .pill-cluster {
    justify-self: end;
  }

  .hero-grid {
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.2fr);
  }

  .button-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-copy {
    grid-template-columns: 1fr minmax(260px, 0.7fr);
  }
}

@media (max-width: 859px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .clock-stage {
    min-height: 420px;
  }

  .digit-layer {
    font-size: 128px;
  }

  .seconds-readout {
    font-size: 20px;
  }

  .stage-countdown {
    font-size: 1rem;
    letter-spacing: 0.18em;
  }

  .map-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .app-shell {
    padding: 16px;
  }

  .hero-card,
  .hero-copy,
  .clock-panel {
    border-radius: 24px;
  }

  .digit-layer {
    font-size: 94px;
  }

  .seconds-readout {
    letter-spacing: 0.18em;
    font-size: 16px;
  }

  .stage-countdown {
    font-size: 0.92rem;
    letter-spacing: 0.14em;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(3vw, -2vw, 0) scale(1.08);
  }
}

@keyframes pinPulse {
  0% {
    opacity: 0;
    transform: scale(0.35);
  }

  32% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: scale(1.85);
  }
}

@keyframes mapRing {
  0% {
    opacity: 0.9;
    transform: scale(0.08);
  }

  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes mapCore {
  0% {
    opacity: 0.95;
    transform: scale(0.5);
  }

  100% {
    opacity: 0;
    transform: scale(2.8);
  }
}

@keyframes mapLine {
  0% {
    opacity: 0;
    stroke-dasharray: 0 900;
  }

  25% {
    opacity: 0.85;
  }

  100% {
    opacity: 0;
    stroke-dasharray: 900 0;
  }
}

@keyframes meshWave {
  0% {
    stroke-opacity: 0.16;
  }

  35% {
    stroke-opacity: 0.54;
  }

  100% {
    stroke-opacity: 0.16;
  }
}
