/**
 * MKA Summerset — cosmos-lite (gold stars, soft motion)
 * No white circular beam. Gentle gold dust + parallax via JS.
 */
html.has-cosmos,
body.has-cosmos {
  /* editorial-cinematic quiet luxury — warm charcoal, not pure void */
  --cosmos-bg: #0A0A0B;
}

body.has-cosmos {
  background-color: #0A0A0B !important;
  background-image:
    radial-gradient(ellipse 120% 80% at 12% -10%, rgba(212, 160, 23, 0.08), transparent 52%),
    radial-gradient(ellipse 90% 60% at 100% 18%, rgba(91, 143, 168, 0.05), transparent 48%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(184, 115, 51, 0.045), transparent 55%),
    radial-gradient(ellipse 100% 70% at 50% -10%, rgba(40, 32, 18, 0.35), transparent 55%),
    linear-gradient(180deg, #0A0A0B 0%, #0C0C0E 45%, #0A0A0B 100%) !important;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Canvas — gold stars + mouse parallax */
.cosmos {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.6s ease;
}
.cosmos.on {
  opacity: 0.9;
}

/* Static gold dust — very soft, almost still (no aggressive blink) */
body.has-cosmos::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.1px 1.1px at 7% 12%, rgba(232, 212, 168, 0.55), transparent),
    radial-gradient(1px 1px at 16% 40%, rgba(196, 163, 90, 0.4), transparent),
    radial-gradient(1.2px 1.2px at 30% 18%, rgba(255, 240, 200, 0.45), transparent),
    radial-gradient(1px 1px at 45% 8%, rgba(232, 212, 168, 0.5), transparent),
    radial-gradient(1px 1px at 58% 26%, rgba(196, 163, 90, 0.35), transparent),
    radial-gradient(1.15px 1.15px at 72% 14%, rgba(255, 236, 190, 0.48), transparent),
    radial-gradient(1px 1px at 86% 32%, rgba(232, 212, 168, 0.38), transparent),
    radial-gradient(1.1px 1.1px at 94% 20%, rgba(196, 163, 90, 0.42), transparent),
    radial-gradient(1px 1px at 11% 70%, rgba(232, 212, 168, 0.32), transparent),
    radial-gradient(1.15px 1.15px at 24% 86%, rgba(255, 240, 200, 0.36), transparent),
    radial-gradient(1px 1px at 38% 64%, rgba(196, 163, 90, 0.3), transparent),
    radial-gradient(1px 1px at 52% 78%, rgba(232, 212, 168, 0.34), transparent),
    radial-gradient(1.1px 1.1px at 66% 58%, rgba(255, 236, 190, 0.4), transparent),
    radial-gradient(1px 1px at 80% 88%, rgba(196, 163, 90, 0.28), transparent),
    radial-gradient(1px 1px at 92% 72%, rgba(232, 212, 168, 0.36), transparent),
    radial-gradient(1px 1px at 48% 44%, rgba(196, 163, 90, 0.22), transparent),
    radial-gradient(1px 1px at 20% 52%, rgba(232, 212, 168, 0.2), transparent),
    radial-gradient(1px 1px at 74% 48%, rgba(255, 240, 200, 0.24), transparent);
  opacity: 0.55;
  /* very slow breathe — not blinky */
  animation: cosmos-gold-soft 18s ease-in-out infinite alternate;
  will-change: transform;
  transition: transform 0.15s linear;
}

/* No white circular beam — removed body::after glow circle */

/* Ambient gold haze (ellipse soft, not a white disc) */
.cosmos-haze {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 35% at 50% 0%, rgba(212, 160, 23, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 60%, rgba(91, 143, 168, 0.04), transparent 55%),
    radial-gradient(ellipse 45% 35% at 15% 70%, rgba(184, 115, 51, 0.04), transparent 55%);
  animation: cosmos-haze-soft 20s ease-in-out infinite alternate;
  will-change: transform;
  transition: transform 0.15s linear;
}

@keyframes cosmos-gold-soft {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 0.62;
  }
}

@keyframes cosmos-haze-soft {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 1;
  }
}

/* Stack content above cosmos bg — do NOT force sticky/lb to relative (breaks fixed float) */
body.has-cosmos > header.nav,
body.has-cosmos > .nav,
body.has-cosmos > main,
body.has-cosmos > footer,
body.has-cosmos > .lux-nav {
  position: relative;
  z-index: 1;
}
body.has-cosmos > header.nav,
body.has-cosmos > .nav,
body.has-cosmos > .lux-nav {
  z-index: 100;
}
body.has-cosmos > .sticky {
  position: fixed;
  left: auto;
  right: max(20px, calc(12px + env(safe-area-inset-right, 0px)));
  bottom: max(24px, calc(16px + env(safe-area-inset-bottom, 0px)));
  z-index: 90;
}
body.has-cosmos > .lb {
  position: fixed;
  z-index: 200;
}

@media (prefers-reduced-motion: reduce) {
  body.has-cosmos::before,
  .cosmos-haze {
    animation: none !important;
  }
  .cosmos,
  .cosmos.on {
    display: none !important;
    opacity: 0 !important;
  }
  body.has-cosmos {
    background-attachment: scroll !important;
  }
}

@media (max-width: 700px) {
  body.has-cosmos::before {
    opacity: 0.48;
  }
  .cosmos-haze {
    opacity: 0.85;
  }
}
