:root {
  --red: #ff2b4e;
  --red-soft: #ff6b85;
  --bg: #08070a;
  --ink: #f5f2f4;
  --muted: #8a8590;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 43, 78, 0.12), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 24px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  min-height: 100vh;
}

/* ---------- Headings ---------- */
.copy {
  text-align: center;
  max-width: 760px;
}

h1 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: 0.5px;
}

h2 {
  margin-top: 14px;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  color: var(--red-soft);
  letter-spacing: 0.4px;
}

/* ---------- Heart stage ---------- */
.stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#heart {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.bpm {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 8px;
  pointer-events: none;
  user-select: none;
}

#bpmValue {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  color: var(--red);
  text-shadow: 0 0 24px rgba(255, 43, 78, 0.55);
  font-variant-numeric: tabular-nums;
}

.bpm-label {
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: var(--muted);
}

/* Quiet line below the heart — meant to blend into the design. */
.subtle-note {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 2px;
  color: rgba(138, 133, 144, 0.45);
  font-weight: 400;
}

/* ---------- Progress bar (market cap) ---------- */
.progress-wrap {
  width: 100%;
  max-width: 720px;
}

.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.progress-label {
  font-size: 0.78rem;
  letter-spacing: 4px;
  color: var(--muted);
}

.mcap-value {
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 700;
  color: var(--red-soft);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(255, 43, 78, 0.45);
}

.progress-track {
  position: relative;
  height: 26px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #ff6b85, #ff2b4e 60%, #c30f2f);
  box-shadow: 0 0 22px rgba(255, 43, 78, 0.7);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.7s ease, box-shadow 0.7s ease;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  transform: translateX(-100%);
  animation: shimmer 2.4s infinite;
}

/* Milestone tick marks inside the track */
.ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-50%);
}

.tick.final {
  width: 3px;
  background: rgba(255, 209, 122, 0.85);
  box-shadow: 0 0 12px rgba(255, 200, 110, 0.9);
}

/* Labels below the track */
.milestone-labels {
  position: relative;
  height: 34px;
  margin-top: 10px;
}

.mlabel {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.74rem;
  letter-spacing: 1px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.4s ease, opacity 0.4s ease;
}

.mlabel .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.mlabel.reached {
  color: var(--red-soft);
}

.mlabel.reached .dot {
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 43, 78, 0.9);
}

.mlabel.final {
  font-weight: 700;
  letter-spacing: 2px;
}

.mlabel.final .label-text {
  color: #ffd17a;
}

.mlabel.final.reached .dot {
  background: #ffd17a;
  box-shadow: 0 0 14px rgba(255, 200, 110, 1);
}

/* ---------- Heart sensors (live stats) ---------- */
.sensors {
  margin-top: 26px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 16px 8px;
  box-shadow: inset 0 0 30px rgba(255, 43, 78, 0.05);
}

.sensor {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
}

.sensor-label {
  font-size: 0.64rem;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
}

.sensor-value {
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  font-weight: 700;
  color: var(--red-soft);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255, 43, 78, 0.35);
}

.sensor-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.08);
  margin: 2px 0;
}

.sensor.status {
  flex-direction: row;
  gap: 8px;
}

.status-text {
  font-size: 0.66rem;
  letter-spacing: 2px;
  color: var(--muted);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 43, 78, 0.6);
  animation: pulse 1.4s infinite;
}

.pulse-dot.off {
  background: var(--muted);
  animation: none;
}

.pulse-dot.warn {
  background: #e0a72e;
  animation: pulse-warn 1.4s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 43, 78, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 43, 78, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 43, 78, 0);
  }
}

@keyframes pulse-warn {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 167, 46, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(224, 167, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(224, 167, 46, 0);
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.ca {
  max-width: 100%;
  font-size: 0.82rem;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  user-select: all;
}

.ca #caText {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--red-soft);
  letter-spacing: 0;
  word-break: break-all;
}

.ca[hidden] {
  display: none;
}

.mystic {
  font-size: 1.25rem;
  letter-spacing: 6px;
  filter: drop-shadow(0 0 10px rgba(255, 43, 78, 0.4));
  opacity: 0.9;
}

.legal {
  font-size: 0.74rem;
  letter-spacing: 1.5px;
  color: rgba(138, 133, 144, 0.7);
}

.made {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--red-soft);
  opacity: 0.85;
}
