:root {
  color-scheme: dark;
  --background: #050507;
  --text: #f8f1df;
  --gold: #edc94f;
  --gold-soft: #f3dd8d;
  --violet: #8c6ee6;
  --muted: rgba(248, 241, 223, 0.64);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 50% 24%, rgba(237, 201, 79, 0.055), transparent 23rem),
    radial-gradient(circle at 68% 42%, rgba(111, 78, 189, 0.05), transparent 31rem),
    var(--background);
}

button, a { font: inherit; }

.origin-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

.star-field,
.star-field::before,
.star-field::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.52) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(237, 201, 79, 0.42) 0 1px, transparent 1.6px);
  background-position: 1rem 2rem, 5rem 7rem;
  background-size: 10rem 10rem, 13rem 13rem;
  opacity: 0.08;
}

.star-field::before { transform: rotate(17deg) scale(1.1); opacity: 0.12; }
.star-field::after { transform: rotate(-11deg) scale(1.16); opacity: 0.08; }

.origin-stage {
  position: relative;
  width: min(100%, 74rem);
  min-height: calc(100svh - 5.5rem);
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 6rem) 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.orbit-field {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(96vw, 66rem);
  height: min(38vw, 28rem);
  transform: translate(-50%, -58%);
  pointer-events: none;
}

.orbit,
.satellite {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit { border: 1px solid rgba(238, 217, 158, 0.105); }
.orbit-outer { width: 100%; height: 100%; border-style: dashed; }
.orbit-inner { width: 83%; height: 72%; }

.satellite { width: 100%; height: 100%; animation: orbit-spin 27s linear infinite; }
.satellite::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -0.25rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}
.satellite-gold::before { background: var(--gold); box-shadow: 0 0 16px rgba(237, 201, 79, 0.35); }
.satellite-violet { width: 83%; height: 72%; animation-duration: 19s; animation-direction: reverse; }
.satellite-violet::before { background: var(--violet); box-shadow: 0 0 14px rgba(140, 110, 230, 0.32); }

.origin-orb {
  position: relative;
  z-index: 1;
  width: clamp(4.6rem, 8vw, 6.2rem);
  aspect-ratio: 1;
  margin-bottom: 1.2rem;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 27%, #fff8d4 0 4%, #f5d45e 26%, #e8b92e 74%, #ad7612 100%);
  box-shadow: 0 0 2rem rgba(237, 201, 79, 0.16);
  animation: breathe 4.8s ease-in-out infinite;
}

.origin-copy { position: relative; z-index: 1; }

.origin-echo {
  margin: 0;
  color: rgba(248, 241, 223, 0.075);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.55rem, 3.8vw, 2.65rem);
  font-weight: 600;
  line-height: 1;
}

h1 {
  margin: -0.14em 0 0;
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(237, 201, 79, 0.09);
  text-wrap: balance;
}

.store-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3.4rem;
}

.store-button {
  min-width: 13.6rem;
  min-height: 4.15rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.05rem;
  color: var(--text);
  background: rgba(7, 7, 10, 0.76);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.store-button:hover {
  transform: translateY(-2px);
  border-color: rgba(237, 201, 79, 0.46);
  background: rgba(237, 201, 79, 0.055);
}

.store-icon {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 0.48rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.62rem;
  font-weight: 700;
}

.play-icon { background: linear-gradient(135deg, rgba(93, 199, 134, 0.26), rgba(237, 201, 79, 0.12)); }
.store-copy { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.store-copy small { color: var(--muted); font-size: 0.66rem; line-height: 1.1; }
.store-copy strong { margin-top: 0.18rem; font-size: 1.15rem; line-height: 1; }

.web-entry {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.45rem;
  padding: 0.62rem 0.3rem;
  color: rgba(243, 221, 141, 0.82);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(237, 201, 79, 0.23);
  transition: color 180ms ease, border-color 180ms ease, gap 180ms ease;
}

.web-entry:hover { color: var(--gold-soft); border-color: var(--gold); gap: 0.8rem; }

.referral-card {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.76rem;
}
.referral-card strong { margin-left: 0.4rem; color: var(--gold-soft); letter-spacing: 0.08em; }

.origin-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  padding: 0 1rem max(1.4rem, env(safe-area-inset-bottom));
}
.origin-footer a { color: rgba(248, 241, 223, 0.5); font-size: 0.78rem; text-decoration: none; }
.origin-footer a:hover { color: var(--gold-soft); }

@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes breathe { 50% { filter: brightness(1.08); transform: scale(1.045); box-shadow: 0 0 2.8rem rgba(237, 201, 79, 0.24); } }

@media (max-width: 600px) {
  body { overflow-y: auto; }
  .origin-page { min-height: 100dvh; }
  .origin-stage { min-height: calc(100dvh - 4.6rem); padding: 2rem 1rem 1.5rem; }
  .orbit-field { width: 116vw; height: 58vw; transform: translate(-50%, -66%); }
  .origin-orb { width: 4.7rem; margin-bottom: 1rem; }
  .origin-echo { font-size: clamp(1.35rem, 7.2vw, 1.9rem); }
  h1 { font-size: clamp(2rem, 10.5vw, 2.75rem); }
  .store-actions { width: min(100%, 24rem); margin-top: 2.65rem; gap: 0.55rem; }
  .store-button { min-width: 0; width: 50%; min-height: 3.65rem; gap: 0.48rem; padding: 0.62rem 0.58rem; border-radius: 0.9rem; }
  .store-icon { width: 1.55rem; height: 1.55rem; font-size: 0.48rem; }
  .store-copy small { font-size: 0.52rem; }
  .store-copy strong { font-size: clamp(0.82rem, 3.7vw, 1rem); white-space: nowrap; }
  .web-entry { margin-top: 1.2rem; font-size: 0.7rem; }
  .origin-footer { gap: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
