:root {
  --bg-deep: #06070f;
  --bg-mid: #131033;
  --gold: #e8c374;
  --gold-soft: rgba(232, 195, 116, 0.35);
  --lavender: #a79bd6;
  --ink: #f4f1ff;
  --ink-dim: #b9b3d6;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(ellipse at 50% -10%, #1a1740 0%, #0b0c18 62%);
  color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stars-field {
  position: absolute;
  inset: 0;
  opacity: 0.78;
}

.stars-field:not(.is-live) {
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff 100%, transparent 0),
    radial-gradient(1px 1px at 80% 10%, #fff 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 25% 65%, #fff 100%, transparent 0),
    radial-gradient(1px 1px at 60% 80%, #fff 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 90% 55%, #fff 100%, transparent 0),
    radial-gradient(1px 1px at 45% 30%, #fff 100%, transparent 0),
    radial-gradient(1px 1px at 15% 85%, #fff 100%, transparent 0),
    radial-gradient(1.5px 1.5px at 70% 25%, #fff 100%, transparent 0),
    radial-gradient(1px 1px at 35% 5%, #fff 100%, transparent 0),
    radial-gradient(1px 1px at 95% 90%, #fff 100%, transparent 0);
  background-repeat: repeat;
  background-size: 600px 600px;
  animation: twinkle 7s ease-in-out infinite alternate;
}

.sky-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.35);
  opacity: 0.75;
  transform: translate3d(0, 0, 0);
  animation: sky-star-twinkle 5.5s ease-in-out infinite alternate;
  animation-delay: var(--twinkle-delay, 0s);
  transition: transform 0.85s ease-out, opacity 0.85s ease-out;
}

.sky-star.is-parted {
  animation: none;
  opacity: 0;
}

.sky-star:nth-child(3n) {
  background: #f4f1ff;
}

.sky-star:nth-child(5n) {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  border-radius: 0;
  box-shadow: none;
  opacity: 0.85;
}

.sky-star.is-parted:nth-child(5n) {
  opacity: 0;
}

@keyframes sky-star-twinkle {
  from { opacity: 0.45; }
  to { opacity: 0.9; }
}

.constellations {
  position: absolute;
  inset: 0;
}

.constellation-wrap {
  position: absolute;
  width: min(200px, 28vw);
  aspect-ratio: 1;
  opacity: 0;
  animation: constellation-fade 96s linear infinite;
  animation-delay: calc(var(--i, 0) * 8s);
  z-index: 0;
}

.constellation {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 4px rgba(244, 241, 255, 0.16));
}

.constellation-lines {
  fill: none;
  stroke: rgba(220, 215, 245, 0.42);
  stroke-width: 0.34;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.constellation-stars {
  fill: rgba(244, 241, 255, 0.88);
  stroke: rgba(244, 241, 255, 0.28);
  stroke-width: 0.2;
}

@keyframes constellation-fade {
  0% { opacity: 0; }
  1.2% { opacity: 0.62; }
  6.5% { opacity: 0.62; }
  8.3% { opacity: 0; }
  100% { opacity: 0; }
}

.shooting-star {
  position: absolute;
  top: 8%;
  left: -12%;
  width: 90px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), rgba(232, 195, 116, 0.7), transparent);
  box-shadow: 0 0 8px rgba(232, 195, 116, 0.35);
  opacity: 0;
  --shoot-rot: -32deg;
  --shoot-x: 92vw;
  --shoot-y: 38vh;
  transform: rotate(var(--shoot-rot));
  animation: shooting-star 18s linear infinite;
}

.shooting-star.delay {
  top: auto;
  bottom: 18%;
  left: auto;
  right: -12%;
  width: 70px;
  --shoot-rot: 155deg;
  --shoot-x: 90vw;
  --shoot-y: 34vh;
  animation-delay: 8s;
  animation-duration: 24s;
}

.shooting-star.slow {
  top: 42%;
  left: -10%;
  width: 64px;
  --shoot-rot: 22deg;
  --shoot-x: 95vw;
  --shoot-y: -30vh;
  animation-delay: 15s;
  animation-duration: 30s;
}

@keyframes twinkle {
  from { opacity: 0.55; }
  to   { opacity: 0.82; }
}

@keyframes shooting-star {
  0%,
  94% {
    opacity: 0;
    transform: rotate(var(--shoot-rot)) translate3d(0, 0, 0);
  }
  95% {
    opacity: 1;
  }
  99% {
    opacity: 0.15;
    transform: rotate(var(--shoot-rot)) translate3d(var(--shoot-x), var(--shoot-y), 0);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--shoot-rot)) translate3d(var(--shoot-x), var(--shoot-y), 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stars-field,
  .sky-star,
  .constellation-wrap,
  .shooting-star {
    animation: none !important;
  }
  .shooting-star {
    display: none;
  }
  .stars-field {
    opacity: 0.68;
  }
  .sky-star {
    opacity: 0.7;
  }
  .constellation-wrap {
    opacity: 0;
  }
  .constellation-wrap:first-child {
    opacity: 0.62;
  }
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 24px auto;
  padding: 48px 24px 40px;
  text-align: center;
  background: rgba(6, 7, 15, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.badge {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 28px;
}

.wordmark {
  font-size: 15px;
  letter-spacing: 0.35em;
  color: var(--lavender);
  margin-bottom: 18px;
}

h1 {
  font-family: Georgia, "Cambria", "Times New Roman", serif;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.25;
  margin: 0 0 20px;
  background: linear-gradient(180deg, #fff, var(--ink-dim));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 32px;
}

.cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
}

.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), #c99b45);
  color: #1a1206;
  border: none;
  border-radius: 999px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  opacity: 0.95;
  box-shadow: 0 8px 30px var(--gold-soft);
}

.cta:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cta-hint {
  font-size: 12px;
  color: var(--ink-dim);
  opacity: 0.7;
}

.chart-wrap {
  margin: 0 auto 48px;
  width: min(280px, 70vw);
}

.chart-wrap.is-live {
  width: min(300px, 78vw);
}

.chart {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 24px var(--gold-soft));
}

.ring-outer {
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 1.2;
}

.ring-inner {
  fill: none;
  stroke: var(--lavender);
  stroke-opacity: 0.3;
  stroke-width: 1;
}

.spoke {
  stroke: var(--lavender);
  stroke-opacity: 0.22;
  stroke-width: 1;
}

.cusp {
  fill: var(--gold);
}

.core {
  fill: var(--gold);
}

.chart-legend {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  color: var(--ink-dim);
  font-size: 13px;
}

.legend-mark {
  display: inline-flex;
  width: 1.4em;
  justify-content: center;
  color: var(--gold);
}

.legend-moon { color: var(--lavender); }
.legend-ascendant { color: #f0e2b0; }

.planet {
  opacity: 0;
  animation: planet-in 0.7s ease forwards;
  animation-delay: calc(0.15s * var(--i, 0));
}

.planet.is-on {
  opacity: 1;
}

.chart-wrap[data-dynamic-chart] .ring-outer {
  animation: ring-breathe-outer 7s ease-in-out infinite;
}

.chart-wrap[data-dynamic-chart] .ring-inner {
  animation: ring-breathe-inner 7s ease-in-out infinite reverse;
}

.chart-wrap[data-dynamic-chart] .core {
  animation: core-glow 3.2s ease-in-out infinite;
}

.planet-ray {
  stroke: var(--gold-soft);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.planet-halo {
  fill: rgba(232, 195, 116, 0.12);
  stroke: rgba(232, 195, 116, 0.45);
  stroke-width: 1;
  animation: halo-pulse 4.5s ease-in-out infinite;
}

.planet-dot {
  fill: rgba(6, 7, 15, 0.85);
  stroke: var(--gold);
  stroke-width: 1.2;
}

.planet-symbol {
  fill: var(--gold);
  font-size: 11px;
  font-weight: 600;
  pointer-events: none;
}

.planet-moon .planet-dot { stroke: var(--lavender); }
.planet-moon .planet-halo { stroke: rgba(167, 155, 214, 0.5); fill: rgba(167, 155, 214, 0.1); }
.planet-moon .planet-symbol { fill: #d8d0f5; }
.planet-moon .planet-ray { stroke: rgba(167, 155, 214, 0.35); }

.planet-ascendant .planet-dot { stroke: #f0e2b0; }
.planet-ascendant .planet-symbol { fill: #f5ebc8; font-size: 8px; }

@keyframes planet-in {
  from {
    opacity: 0;
    transform: scale(0.6);
    transform-origin: 150px 150px;
  }
  to {
    opacity: 1;
    transform: scale(1);
    transform-origin: 150px 150px;
  }
}

@keyframes halo-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@keyframes ring-breathe-outer {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@keyframes ring-breathe-inner {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.9; }
}

@keyframes core-glow {
  0%, 100% { opacity: 0.75; transform: scale(1); transform-origin: 150px 150px; }
  50% { opacity: 1; transform: scale(1.35); transform-origin: 150px 150px; }
}

@media (prefers-reduced-motion: reduce) {
  .planet {
    opacity: 1;
    animation: none;
  }
  .planet-halo,
  .chart-wrap[data-dynamic-chart] .ring-outer,
  .chart-wrap[data-dynamic-chart] .ring-inner,
  .chart-wrap[data-dynamic-chart] .core {
    animation: none;
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  text-align: left;
}

.feature {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px 18px;
}

.feature-icon {
  color: var(--gold);
  font-size: 20px;
  margin-bottom: 10px;
}

.feature h3 {
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--ink);
}

.feature p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-dim);
  margin: 0;
}

.trust {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-dim);
  opacity: 0.75;
  max-width: 480px;
  margin: 0 auto 32px;
}

footer {
  font-size: 12px;
  color: var(--ink-dim);
  opacity: 0.6;
}

footer a {
  color: var(--lavender);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.dot {
  margin: 0 8px;
}

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