/* ═══════════════════════════════════════════════════════════════
   Wrath / Lich King — cinematic atmosphere & motion
   Heavy, cold, ancient — not SaaS-bouncy
   ═══════════════════════════════════════════════════════════════ */

:root {
  --duration-frost: 0.55s;
  --duration-lich: 0.85s;
  --duration-ambient: 4s;
  --ease-frost: cubic-bezier(0.16, 0.84, 0.32, 1);
  --ease-lich: cubic-bezier(0.22, 0.61, 0.36, 1);
  --glow-frost-deep: 0 0 40px rgba(56, 189, 248, 0.12), 0 12px 48px rgba(0, 0, 0, 0.5);
  --glow-rune: 0 0 24px rgba(125, 211, 252, 0.15);
  --ice-rim: rgba(125, 211, 252, 0.45);
  --frost-mist: rgba(76, 201, 240, 0.06);
}

/* ─── Global cold veil ─── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 132, 180, 0.08), transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 50%, rgba(76, 201, 240, 0.04), transparent),
    radial-gradient(ellipse 35% 25% at 100% 80%, rgba(30, 58, 95, 0.12), transparent);
  opacity: 1;
}

.internal-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.ambient-glow--tl {
  opacity: 0.42;
  animation: frostBreath var(--duration-ambient) ease-in-out infinite alternate;
}

.ambient-glow--br {
  opacity: 0.28;
  background: radial-gradient(circle, rgba(30, 64, 95, 0.35), transparent 70%);
  animation: frostBreath var(--duration-ambient) ease-in-out infinite alternate-reverse;
}

@keyframes frostBreath {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.48; transform: scale(1.04); }
}

.frost-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 12, 22, 0.35) 0%, transparent 30%, transparent 70%, rgba(4, 8, 16, 0.5) 100%),
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(76, 201, 240, 0.07), transparent);
}

.frost-streak {
  position: absolute;
  width: 1px;
  height: 120px;
  background: linear-gradient(180deg, transparent, rgba(186, 230, 253, 0.25), transparent);
  opacity: 0;
  animation: frostStreak 8s ease-in-out infinite;
  pointer-events: none;
}

.frost-streak--1 { left: 12%; top: 20%; animation-delay: 0s; }
.frost-streak--2 { right: 18%; top: 35%; animation-delay: 2.5s; height: 80px; }
.frost-streak--3 { left: 45%; top: 10%; animation-delay: 5s; height: 60px; opacity: 0.5; }

@keyframes frostStreak {
  0%, 100% { opacity: 0; transform: translateY(0); }
  15%, 85% { opacity: 0.35; }
  50% { opacity: 0.15; transform: translateY(12px); }
}

/* ─── Glass / panels — slow cold glow ─── */
.glass-card {
  transition:
    border-color var(--duration-frost) var(--ease-frost),
    box-shadow var(--duration-frost) var(--ease-frost),
    transform var(--duration-frost) var(--ease-frost);
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    125deg,
    transparent 30%,
    rgba(186, 230, 253, 0.04) 50%,
    transparent 70%
  );
  transition: opacity var(--duration-lich) var(--ease-frost);
}

.glass-card:hover::after {
  opacity: 1;
}

/* ─── Cards — heavier hover ─── */
.interactive-card,
.glass-card.interactive-card {
  transition:
    transform var(--duration-frost) var(--ease-lich),
    box-shadow var(--duration-frost) var(--ease-frost),
    border-color var(--duration-frost) var(--ease-frost);
}

.interactive-card:hover,
.news-card:hover,
.quick-card:hover,
.stat-card:hover,
.realm-card:hover,
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-frost-deep), inset 0 1px 0 rgba(186, 230, 253, 0.08);
}

/* ─── Buttons — cinematic frost ─── */
.btn {
  transition:
    transform var(--duration-frost) var(--ease-lich),
    box-shadow var(--duration-frost) var(--ease-frost),
    background var(--duration-frost) var(--ease-frost),
    border-color var(--duration-frost) var(--ease-frost),
    color var(--duration-frost) ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(186, 230, 253, 0) 0%,
    rgba(186, 230, 253, 0.35) 50%,
    rgba(186, 230, 253, 0) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-frost) var(--ease-frost);
  pointer-events: none;
}

.btn:hover::before {
  opacity: 0.6;
}

.btn--play,
.btn--cta {
  animation: none;
}

.btn--play:hover,
.btn--cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 36px rgba(200, 169, 107, 0.35),
    0 0 32px rgba(200, 169, 107, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn--ice:hover {
  box-shadow: var(--glow-rune), 0 8px 28px rgba(0, 0, 0, 0.4);
}

.btn--outline:hover {
  box-shadow: 0 0 20px rgba(200, 169, 107, 0.12), inset 0 0 24px rgba(76, 201, 240, 0.06);
}

.btn--ghost:hover {
  box-shadow: inset 0 0 28px rgba(76, 201, 240, 0.08);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
  transition-duration: 0.12s;
}

/* ─── Reveal — slower rise ─── */
.reveal {
  transition:
    opacity var(--duration-lich) var(--ease-frost),
    transform var(--duration-lich) var(--ease-frost);
  transform: translateY(20px);
}

/* ─── Section ornaments ─── */
.section__header::after {
  animation: frostLinePulse 5s ease-in-out infinite;
}

@keyframes frostLinePulse {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 8px rgba(76, 201, 240, 0.2); }
  50% { opacity: 0.75; box-shadow: 0 0 14px rgba(76, 201, 240, 0.35); }
}

/* ─── Rune accent utility ─── */
.rune-accent {
  position: relative;
}

.rune-accent::before {
  content: "ᚠ";
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.65rem;
  color: rgba(125, 211, 252, 0.2);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .ambient-glow--tl,
  .ambient-glow--br,
  .frost-streak,
  .section__header::after {
    animation: none !important;
  }

  .btn::before {
    display: none;
  }

  .interactive-card:hover,
  .glass-card:hover {
    transform: none;
  }
}
