/* ————————————————————————————————
   milestone constellation — our story, drawn in the sky
   ———————————————————————————————— */

.constellation {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.constellation.visible { opacity: 1; }

.constellation-lines {
  position: absolute;
  inset: 0;
  display: block;
}

/* ——— stars ——— */

.c-star {
  position: absolute;
  width: 2.2rem;
  height: 2.2rem;
  margin: -1.1rem 0 0 -1.1rem; /* center the hit area on (x, y) */
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.c-star-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-soft, #F2E3B8);
  box-shadow:
    0 0 6px 1px rgba(231, 201, 130, 0.85),
    0 0 14px 4px rgba(231, 201, 130, 0.32),
    0 0 26px 9px rgba(231, 201, 130, 0.10);
  animation: c-twinkle 4.6s ease-in-out infinite;
  transition: transform 0.35s ease;
}

.c-star.bright .c-star-dot {
  width: 10px;
  height: 10px;
  background: var(--moon, #F6F1E4);
  box-shadow:
    0 0 8px 2px rgba(246, 241, 228, 0.95),
    0 0 20px 6px rgba(242, 227, 184, 0.42),
    0 0 38px 13px rgba(231, 201, 130, 0.16);
  animation: c-pulse 5.8s ease-in-out infinite;
}

.c-star:hover .c-star-dot,
.c-star.active .c-star-dot {
  transform: scale(1.3);
  animation-play-state: paused;
  opacity: 1;
}

.c-star:focus-visible {
  outline: 1px solid rgba(242, 227, 184, 0.85);
  outline-offset: 4px;
}

@keyframes c-twinkle {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.18); }
}

@keyframes c-pulse {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.24); }
}

/* ——— the little card ——— */

.c-card {
  position: absolute;
  pointer-events: auto;
  max-width: 15.5rem;
  padding: 0.85rem 1rem 0.95rem;
  background: rgba(7, 13, 34, 0.8);
  border: 1px solid rgba(231, 201, 130, 0.24);
  border-radius: 0.8rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(231, 201, 130, 0.05);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.c-card:not(.open) { pointer-events: none; }

.c-card.open {
  opacity: 1;
  transform: scale(1);
}

.c-card-date {
  font-family: var(--font-utility, "Jost", sans-serif);
  font-size: 0.6rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold, #E7C982);
  margin-bottom: 0.3rem;
}

.c-card-title {
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--moon, #F6F1E4);
}

.c-card-line {
  margin-top: 0.35rem;
  font-family: var(--font-utility, "Jost", sans-serif);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.55;
  color: var(--ink-dim, rgba(246, 241, 228, 0.62));
}

/* ——— discovery prompt ——— */

.c-prompt {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 11rem;
  text-align: center;
  font-family: var(--font-display, "Cormorant Garamond", serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: rgba(231, 201, 130, 0.7);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  animation: c-prompt-glow 4.2s ease-in-out infinite;
}

.c-prompt-nb { white-space: nowrap; }

.c-prompt.visible { opacity: 1; }

.c-prompt.gone {
  opacity: 0 !important;
  transition: opacity 1.1s ease;
}

@keyframes c-prompt-glow {
  0%, 100% { text-shadow: 0 0 10px rgba(231, 201, 130, 0.25); }
  50%      { text-shadow: 0 0 18px rgba(231, 201, 130, 0.55), 0 0 34px rgba(231, 201, 130, 0.2); }
}

/* ——— reduced motion ——— */

.constellation.is-reduced,
.constellation.is-reduced * {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .constellation,
  .constellation * {
    animation: none !important;
    transition: none !important;
  }
}

/* ——— small screens ——— */

@media (max-width: 560px) {
  .c-star-dot { width: 5px; height: 5px; }
  .c-star.bright .c-star-dot { width: 8px; height: 8px; }

  .c-card {
    max-width: 12.5rem;
    padding: 0.7rem 0.85rem 0.8rem;
    border-radius: 0.7rem;
  }
  .c-card-date { font-size: 0.56rem; }
  .c-card-title { font-size: 1rem; }
  .c-card-line { font-size: 0.68rem; }

  .c-prompt {
    max-width: 8.5rem;
    font-size: 0.95rem;
  }
}
