/* =========================================================
   Flower Mawar Digital Radar — styles.css
   Engineered & designed by Elsa Abigail
   ========================================================= */

/* ---------- Modern reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #050507;
}

body {
  position: relative;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #D4AF37;
  cursor: crosshair;
  /* subtle radial vignette deepens the obsidian void */
  background:
    radial-gradient(circle at 50% 50%, #0a0a0f 0%, #050507 55%, #020203 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================================================
   Screen-reader-only SEO block
   (hidden visually, fully available to crawlers / AT)
   ========================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Stage
   ========================================================= */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

/* =========================================================
   Center golden rose emblem
   ========================================================= */
.emblem {
  position: relative;
  z-index: 5;
  width: clamp(90px, 16vmin, 170px);
  height: clamp(90px, 16vmin, 170px);
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: emblem-breathe 6s ease-in-out infinite;
}

.emblem__svg {
  width: 100%;
  height: 100%;
  /* layered gold + magenta halo */
  filter:
    drop-shadow(0 0 6px rgba(212, 175, 55, 0.65))
    drop-shadow(0 0 18px rgba(212, 175, 55, 0.35))
    drop-shadow(0 0 30px rgba(255, 0, 170, 0.18));
}

@keyframes emblem-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.92;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* =========================================================
   Continuous sonar pulse rings (auto-emitting from center)
   ========================================================= */
.radar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  pointer-events: none;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(90px, 16vmin, 170px);
  height: clamp(90px, 16vmin, 170px);
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.55);
  /* dual glow: gold body with a neon-magenta whisper */
  box-shadow:
    0 0 12px rgba(212, 175, 55, 0.45),
    0 0 26px rgba(255, 0, 170, 0.12),
    inset 0 0 10px rgba(212, 175, 55, 0.2);
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  animation: sonar-emit 7s cubic-bezier(0.2, 0.6, 0.2, 1) infinite;
  will-change: transform, opacity;
}

/* stagger the five rings so a pulse is always traveling outward */
.pulse-ring:nth-child(1) { animation-delay: 0s; }
.pulse-ring:nth-child(2) { animation-delay: 1.4s; }
.pulse-ring:nth-child(3) { animation-delay: 2.8s; }
.pulse-ring:nth-child(4) { animation-delay: 4.2s; }
.pulse-ring:nth-child(5) { animation-delay: 5.6s; }

@keyframes sonar-emit {
  0% {
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
    border-color: rgba(255, 0, 170, 0.55);
  }
  12% {
    opacity: 0.9;
  }
  60% {
    border-color: rgba(212, 175, 55, 0.5);
  }
  100% {
    /* expand far enough to clear any viewport, then fade to void */
    transform: translate(-50%, -50%) scale(16);
    opacity: 0;
    border-color: rgba(212, 175, 55, 0);
  }
}

/* =========================================================
   Interactive click ripples (spawned by script.js)
   ========================================================= */
.ripple {
  position: fixed;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px; /* center the ripple on the cursor point */
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.9);
  box-shadow:
    0 0 14px rgba(212, 175, 55, 0.6),
    0 0 30px rgba(255, 0, 170, 0.18);
  pointer-events: none;
  z-index: 8;
  transform: scale(0.3);
  opacity: 0.95;
  animation: ripple-expand 1.6s cubic-bezier(0.15, 0.6, 0.25, 1) forwards;
  will-change: transform, opacity;
}

@keyframes ripple-expand {
  0% {
    transform: scale(0.3);
    opacity: 0.95;
  }
  100% {
    transform: scale(34);
    opacity: 0;
  }
}

/* =========================================================
   Signature watermark
   ========================================================= */
.watermark {
  position: fixed;
  right: clamp(14px, 2.5vw, 32px);
  bottom: clamp(12px, 2.5vh, 28px);
  z-index: 9;
  font-size: clamp(9px, 1.1vw, 12px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.55);
  user-select: none;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

/* =========================================================
   Accessibility: respect reduced-motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .pulse-ring,
  .emblem,
  .ripple {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .pulse-ring { opacity: 0.25; }
}