@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800;900&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Deep Luxury Obsidian & Velvet Sapphire Base */
  --bg-dark: #070B18;
  
  /* High-Contrast Obsidian Glass Containers */
  --fashion-glass-bg: rgba(10, 13, 24, 0.75);
  --fashion-glass-hover: rgba(18, 24, 42, 0.85);
  --fashion-border: rgba(255, 255, 255, 0.14);
  --fashion-border-gold: rgba(197, 160, 89, 0.35);
  --fashion-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.95), inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
  
  /* Muted Antique Champagne Gold */
  --gold-primary: #C5A059;
  --gold-champagne: #E2D1A6;
  --gold-muted: #9A7B3E;
  
  /* Vibrant Rich Accent Palette */
  --sapphire-blue: #3B82F6;
  --emerald-green: #10B981;
  --crimson-red: #F43F5E;
  --amethyst-purple: #A855F7;
  
  --theme-accent: #3B82F6;

  --font-serif: 'Cinzel', serif;
  --font-editorial: 'Cormorant Garamond', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Warm Purpose-Driven Colorway Backgrounds */
body.theme-sapphire {
  --theme-accent: #3B82F6;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(197, 160, 89, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 80% 25%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(30, 58, 138, 0.35) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(226, 209, 166, 0.05) 0%, transparent 70%);
}

body.theme-crimson {
  --theme-accent: #F43F5E;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(197, 160, 89, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 80% 25%, rgba(190, 18, 60, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(76, 5, 25, 0.6) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(226, 209, 166, 0.05) 0%, transparent 70%);
}

body.theme-purple {
  --theme-accent: #A855F7;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(197, 160, 89, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 80% 25%, rgba(126, 34, 206, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(46, 16, 101, 0.6) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(226, 209, 166, 0.05) 0%, transparent 70%);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #070B18;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(30, 58, 138, 0.45) 0%, transparent 60%),
    radial-gradient(circle at 15% 35%, rgba(153, 27, 27, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 85% 65%, rgba(30, 58, 138, 0.35) 0%, transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(120, 11, 40, 0.4) 0%, transparent 65%);
  background-attachment: fixed;
  color: #F8FAFC;
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(4, 5, 10, 0.95);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #C5A059 0%, rgba(255, 255, 255, 0.25) 100%);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #E2D1A6;
}

/* Canvas Background */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Captivating Scroll Reveal Classes */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 3D Tilt Card Container */
.tilt-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  will-change: transform;
}

/* High-Contrast Obsidian Glass Panels (Black + Deep Sapphire/Platinum Tint) */
.apple-glass {
  background: var(--fashion-glass-bg);
  backdrop-filter: blur(45px) saturate(210%);
  -webkit-backdrop-filter: blur(45px) saturate(210%);
  border: 1px solid var(--fashion-border);
  box-shadow: var(--fashion-shadow);
  border-radius: 1.75rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-glass-gold {
  background: linear-gradient(145deg, rgba(12, 16, 32, 0.88) 0%, rgba(22, 18, 10, 0.88) 100%);
  backdrop-filter: blur(45px) saturate(210%);
  -webkit-backdrop-filter: blur(45px) saturate(210%);
  border: 1px solid var(--fashion-border-gold);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.95), inset 0 1px 0 0 rgba(226, 209, 166, 0.35);
  border-radius: 1.75rem;
}

.apple-glass-interactive:hover {
  background: var(--fashion-glass-hover);
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow: 0 50px 110px -25px rgba(0, 0, 0, 0.98), inset 0 1px 0 0 rgba(255, 255, 255, 0.45);
}

.glass-card-selected {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 40px rgba(197, 160, 89, 0.35), inset 0 1px 0 0 rgba(226, 209, 166, 0.5) !important;
  background: rgba(18, 24, 45, 0.9) !important;
}

/* High Fashion Pill Buttons */
.apple-glass-pill {
  background: rgba(15, 20, 36, 0.75);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  color: #F8FAFC;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.25);
}

.apple-glass-pill:hover {
  background: rgba(26, 35, 62, 0.9);
  border-color: rgba(197, 160, 89, 0.55);
  transform: translateY(-2px);
}

/* Champagne Gold Button (High Contrast Dark Text) */
.apple-gold-btn {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #E2D1A6 0%, #C5A059 50%, #9A7B3E 100%);
  color: #04050A;
  font-family: var(--font-serif);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 0.95rem 2.4rem;
  box-shadow: 0 12px 35px -5px rgba(197, 160, 89, 0.35), inset 0 1px 0 0 rgba(255, 255, 255, 0.75);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-gold-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: rotate(30deg);
  animation: shimmer 4.5s infinite linear;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(30deg); }
  100% { transform: translateX(100%) rotate(30deg); }
}

.apple-gold-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 45px -5px rgba(197, 160, 89, 0.55), inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
  filter: brightness(1.05);
}

/* Typography Helpers */
.font-serif {
  font-family: var(--font-serif);
  letter-spacing: 0.03em;
}
.font-editorial {
  font-family: var(--font-editorial);
}
.font-heading {
  font-family: var(--font-heading);
}
.font-mono {
  font-family: var(--font-mono);
}

/* Muted Silk Champagne Gradient */
.text-gold-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #E2D1A6 45%, #C5A059 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-apple-theme {
  color: var(--theme-accent);
}

/* Regal Crest Frame */
.crest-apple-frame {
  position: relative;
  border-radius: 2.2rem;
  padding: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(197, 160, 89, 0.7) 50%, rgba(255, 255, 255, 0.35) 100%);
  box-shadow: 0 30px 85px rgba(0, 0, 0, 0.95), 0 0 35px rgba(197, 160, 89, 0.25);
  backdrop-filter: blur(40px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

/* Superhero Landing Load Animation for Main Hero Logo */
.superhero-landing {
  animation: superheroLanding 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes superheroLanding {
  0% {
    opacity: 0;
    transform: translateY(-260px) scale(1.65) rotate(-5deg);
    box-shadow: 0 0 0 rgba(197, 160, 89, 0);
    filter: brightness(2.2) blur(8px);
  }
  60% {
    opacity: 1;
    transform: translateY(14px) scale(0.95) rotate(1deg);
    box-shadow: 0 50px 140px rgba(0, 0, 0, 0.98), 0 0 90px rgba(226, 209, 166, 0.9);
    filter: brightness(1.3) blur(0px);
  }
  80% {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 35px 95px rgba(0, 0, 0, 0.95), 0 0 50px rgba(197, 160, 89, 0.5);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    box-shadow: 0 30px 85px rgba(0, 0, 0, 0.95), 0 0 35px rgba(197, 160, 89, 0.25);
    filter: brightness(1) blur(0px);
  }
}

/* Subtle Lightning Strike Focused Specifically on the EG Cipher */
.eg-lightning-overlay {
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  border-radius: 1.2rem;
  pointer-events: none;
  overflow: hidden;
}

.eg-lightning-overlay::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -120%;
  width: 28px;
  height: 160%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(56, 189, 248, 0.75) 20%,
    rgba(255, 255, 255, 0.98) 50%,
    rgba(245, 158, 11, 0.85) 80%,
    transparent 100%
  );
  transform: rotate(35deg);
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.95)) drop-shadow(0 0 18px rgba(56, 189, 248, 0.85));
  animation: egSubtleLightningStrike 5s infinite ease-in-out 1.25s; /* Delayed until superhero landing completes! */
}

@keyframes egSubtleLightningStrike {
  0% {
    left: -120%;
    opacity: 0;
  }
  3% {
    opacity: 0.9;
  }
  6% {
    left: 42%;
    opacity: 1;
  }
  12% {
    left: 160%;
    opacity: 0;
  }
  100% {
    left: 160%;
    opacity: 0;
  }
}

.crest-apple-frame:hover {
  transform: translateY(-7px) scale(1.03);
  box-shadow: 0 40px 110px rgba(0, 0, 0, 0.98), 0 0 50px rgba(197, 160, 89, 0.4);
}

.crest-img {
  border-radius: 2rem;
  object-fit: cover;
  filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.85));
}

/* Keyframes */
@keyframes fashionFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-9px); }
}

.animate-apple-float {
  animation: fashionFloat 6s ease-in-out infinite;
}

/* Input Customization */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 9999px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E2D1A6 0%, #C5A059 100%);
  cursor: pointer;
  box-shadow: 0 0 15px rgba(197, 160, 89, 0.55);
  transition: all 0.2s ease;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 22px rgba(226, 209, 166, 0.85);
}

/* Drawer styles */
.ai-drawer {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-drawer.open {
  transform: translateX(0);
}

/* Badge tags */
.apple-badge {
  background: rgba(12, 16, 30, 0.8);
  backdrop-filter: blur(25px);
  color: var(--gold-primary);
  border: 1px solid rgba(197, 160, 89, 0.4);
  padding: 0.28rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

/* Radar Chart Canvas wrapper */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}
