/* ═══════════════════════════════════════════════
   VANTAGE EASTER EGGS — ambient mountain details
   All visual pieces live here. JS lives in easter-eggs.js.
   ═══════════════════════════════════════════════ */

/* ─── Logo & wordmark base ─────────────────── */
.ve-mountain {
  display: inline-block;
  line-height: 0;
}
.ve-mountain svg {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
/* #1 — Logo hover peak shift */
.wordmark:hover .ve-mountain svg,
.sidebar-logo:hover .ve-mountain svg {
  transform: translateY(-3px) scale(1.05);
}

/* ─── Loader screen mountain (replaces dot pulse) ───
   Used by .loader-screen on landing + dashboard. */
.ve-loader-peak {
  width: 38px;
  height: 30px;
  margin: 0 auto 1.3rem;
  display: block;
  animation: ve-loader-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both,
             ve-loader-pulse 2.2s ease-in-out 0.9s infinite;
  filter: drop-shadow(0 0 14px rgba(96, 165, 250, 0.55));
}
.ve-loader-peak svg { width: 100%; height: 100%; display: block; }
@keyframes ve-loader-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ve-loader-pulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(96, 165, 250, 0.55)); transform: translateY(0); }
  50%      { filter: drop-shadow(0 0 28px rgba(96, 165, 250, 0.95)); transform: translateY(-2px); }
}

/* ─── #2 Mountain loading spinner ─────────── */
.ve-spinner {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  height: 36px;
}
.ve-spinner span {
  display: block;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 14px solid var(--blue-light, #60a5fa);
  animation: ve-rise 1s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.ve-spinner span:nth-child(2) {
  border-left-width: 10px;
  border-right-width: 10px;
  border-bottom-width: 22px;
  animation-delay: 0.15s;
}
.ve-spinner span:nth-child(3) {
  border-left-width: 8px;
  border-right-width: 8px;
  border-bottom-width: 18px;
  animation-delay: 0.3s;
}
@keyframes ve-rise {
  from { transform: translateY(10px); opacity: 0; }
  40%  { opacity: 1; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ─── #3 Empty state peaks ────────────────── */
.ve-empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.ve-empty-peaks {
  opacity: 0.3;
  margin-bottom: 0.8rem;
}
.ve-empty-title {
  font-family: var(--display, Georgia), serif;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
}
.ve-empty-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 0.3rem;
}

/* ─── #9 Stat card watermarks ─────────────── */
.stat-card,
.panel {
  position: relative;
  overflow: hidden;
}
.stat-card::after,
.panel::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: -12px;
  width: 70px;
  height: 54px;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M3 19 L9 9 L14 15 L17 11 L21 19 Z' fill='%2360a5fa'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

/* ─── #11 Topographic contour lines (body background) ───
   Applied once, sitewide. Barely visible. */
body.ve-topo-on::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='200' viewBox='0 0 240 200'><g fill='none' stroke='%2360a5fa' stroke-width='0.5'><path d='M0 100 Q60 60,120 90 T240 80'/><path d='M0 120 Q60 90,120 110 T240 105'/><path d='M0 145 Q60 120,120 135 T240 130'/><path d='M0 170 Q60 150,120 160 T240 158'/></g></svg>");
  background-repeat: repeat;
  animation: ve-topo-drift 180s linear infinite;
}
@keyframes ve-topo-drift {
  from { background-position: 0 0; }
  to   { background-position: 240px 200px; }
}

/* ─── #12 Parallax mountain layers (landing hero) ───
   Positioned behind hero content. JS moves them on scroll. */
.ve-parallax-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.ve-parallax-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  will-change: transform;
}
.ve-parallax-layer--back  { height: 60%; opacity: 0.06; }
.ve-parallax-layer--mid   { height: 45%; opacity: 0.12; }
.ve-parallax-layer--front { height: 30%; opacity: 0.92; }

/* ─── #13 Scroll progress with peak leading edge ─── */
.scroll-progress,
.ve-scroll-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue, #2563eb), var(--blue-light, #60a5fa));
  width: 0;
  z-index: 1001;
  transition: width 0.08s linear;
}
.ve-scroll-bar::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--blue-light, #60a5fa);
  filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.5));
}

/* ─── #14 Section reveal staggered like a ridgeline ───
   Enhances existing .reveal-stagger class with a zig-zag cadence. */
.reveal-stagger.ve-ridge > *:nth-child(1) { transition-delay: 0s !important; }
.reveal-stagger.ve-ridge > *:nth-child(2) { transition-delay: 0.12s !important; }
.reveal-stagger.ve-ridge > *:nth-child(3) { transition-delay: 0.05s !important; }
.reveal-stagger.ve-ridge > *:nth-child(4) { transition-delay: 0.2s !important; }
.reveal-stagger.ve-ridge > *:nth-child(5) { transition-delay: 0.08s !important; }
.reveal-stagger.ve-ridge > *:nth-child(6) { transition-delay: 0.16s !important; }

/* ─── #15 Drifting clouds on landing hero ───── */
.ve-clouds {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100px;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}
.ve-cloud {
  position: absolute;
  top: 20%;
  left: -120px;
  opacity: 0;
  will-change: transform, opacity;
}

/* ─── #16 Corner peak watermark on admin pages ── */
body.admin-body::after {
  content: "";
  position: fixed;
  bottom: -40px;
  right: -40px;
  width: 260px;
  height: 200px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 160'><path d='M10 150 L80 40 L130 100 L170 50 L190 150 Z' fill='%2360a5fa'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}

/* ─── #17 Cursor trail peak sparks (landing only) ── */
.ve-spark {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 0; height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 5px solid var(--blue-light, #60a5fa);
  opacity: 0;
  animation: ve-spark 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes ve-spark {
  0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(0.4); }
  40%  { opacity: 0.5; transform: translate(-50%, -80%) scale(1); }
  100% { opacity: 0;   transform: translate(-50%, -120%) scale(0.6); }
}

/* ─── #18 Midnight mode stars (between 11pm–5am) ─── */
body.ve-midnight::after {
  /* Layered on top of the admin corner peak pattern — stars */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(1px 1px at 12% 15%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.2px 1.2px at 28% 42%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 47% 22%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 65% 35%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 78% 18%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.2px 1.2px at 89% 45%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 18% 78%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 56% 88%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 82% 72%, rgba(255,255,255,0.6), transparent);
  animation: ve-twinkle 6s ease-in-out infinite alternate;
}
@keyframes ve-twinkle {
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

/* ─── #19 Section divider ridgelines ───────── */
.ve-ridge-divider {
  display: block;
  width: 100%;
  height: 30px;
  margin: 2rem 0;
}
.ve-ridge-divider path {
  stroke: rgba(96, 165, 250, 0.22);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
}
.ve-ridge-divider.in path {
  transition: stroke-dashoffset 2s cubic-bezier(0.22, 1, 0.36, 1);
  stroke-dashoffset: 0;
}

/* ─── #20 V-V peak pulse (triggered by JS) ──── */
body.ve-peak-flash .ve-mountain svg *,
body.ve-peak-flash .stat-card::after,
body.ve-peak-flash .panel::after,
body.ve-peak-flash .ve-parallax-layer {
  animation: ve-peak-flash 1.8s ease-out;
}
@keyframes ve-peak-flash {
  0%   { filter: drop-shadow(0 0 0 rgba(96, 165, 250, 0)); opacity: inherit; }
  30%  { filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.9)); }
  100% { filter: drop-shadow(0 0 0 rgba(96, 165, 250, 0)); }
}
body.ve-peak-flash .stat-card::after,
body.ve-peak-flash .panel::after {
  opacity: 0.4 !important;
  transition: opacity 0.3s;
}

/* ─── Footer mountain silhouette (landing page) ── */
.ve-footer-range {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 140px;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.ve-footer-range svg { position: absolute; bottom: 0; left: 0; width: 100%; }
.ve-footer-range .r1 { height: 75%; opacity: 0.08; }
.ve-footer-range .r2 { height: 55%; opacity: 0.15; }
.ve-footer-range .r3 { height: 35%; }
