/* ============================================================
   HEKAVERSE — Shared Design System
   Ancient Egypt meets Deep Space
   ============================================================ */

:root {
  /* Primordial Colors */
  --nun: #020203;
  --void: #050507;
  --abyss: #0a0a0f;
  --depth: #12121a;
  --surface: #1a1a24;

  /* Divine Light */
  --gold: #d4af37;
  --gold-bright: #f4d03f;
  --gold-dim: #8a7020;
  --gold-muted: rgba(212, 175, 55, 0.12);
  --gold-glow: rgba(212, 175, 55, 0.35);

  /* Cosmic Spectrum */
  --maat: #c9b8e8;
  --maat-deep: #7c6fa3;
  --heka-flame: #e86a3c;
  --heka-warm: #f4a261;
  --nile: #2d7d8a;
  --nile-glow: rgba(45, 125, 138, 0.3);
  --papyrus: #e8dcc4;
  --stella: #f0ede8;

  /* Power Colors */
  --sia: #4a90d9;
  --sia-glow: rgba(74, 144, 217, 0.25);
  --hu: #e86a3c;
  --hu-glow: rgba(232, 106, 60, 0.25);
  --heka-power: #d4af37;
  --heka-glow: rgba(212, 175, 55, 0.25);
  --ren: #9b7cb6;
  --ren-glow: rgba(155, 124, 182, 0.25);

  /* Text */
  --text-primary: #f0ede8;
  --text-secondary: #a8a0a0;
  --text-tertiary: #5a5560;
  --text-dim: #3a3540;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-bright: rgba(212, 175, 55, 0.15);

  /* Typography */
  --font-mythology: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --font-display: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-philosophy: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --font-future: 'Space Grotesk', 'Syncopate', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-xxl: 12rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 40px rgba(212, 175, 55, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.4s ease;
  --transition-slow: 0.8s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--nun);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

::selection {
  background: rgba(212, 175, 55, 0.25);
  color: var(--text-primary);
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--nun); }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.4); }

/* ============================================================
   LOADING RITUAL
   ============================================================ */
.loading-ritual {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--nun);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

.loading-ritual.ended {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ritual-void {
  text-align: center;
  position: relative;
}

.ritual-point {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  margin: 0 auto 2rem;
  box-shadow: 0 0 20px var(--gold-glow), 0 0 60px rgba(212, 175, 55, 0.2);
  animation: ritualBreath 3s ease-in-out infinite;
}

@keyframes ritualBreath {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(2.5); opacity: 0.3; }
}

.ritual-glyphs {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  height: 2rem;
}

.ritual-glyphs .glyph {
  font-size: 1.5rem;
  color: var(--gold-dim);
  opacity: 0;
  animation: glyphFade 0.6s ease forwards;
}

.ritual-glyphs .glyph:nth-child(1) { animation-delay: 0.5s; }
.ritual-glyphs .glyph:nth-child(2) { animation-delay: 0.9s; }
.ritual-glyphs .glyph:nth-child(3) { animation-delay: 1.3s; }
.ritual-glyphs .glyph:nth-child(4) { animation-delay: 1.7s; }
.ritual-glyphs .glyph:nth-child(5) { animation-delay: 2.1s; }

@keyframes glyphFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 0.6; transform: translateY(0); }
}

.ritual-text {
  font-family: var(--font-philosophy);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  opacity: 0;
  animation: textReveal 1s ease 2.5s forwards;
}

@keyframes textReveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}

.cursor-core {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--gold-glow);
}

.cursor-trail {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.custom-cursor.hovering .cursor-trail {
  width: 48px;
  height: 48px;
  border-color: rgba(212, 175, 55, 0.6);
}

@media (pointer: coarse) {
  .custom-cursor { display: none; }
  body { cursor: auto; }
}

/* ============================================================
   PARTICLE CANVAS & OVERLAYS
   ============================================================ */
.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  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='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.papyrus-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.015;
  background: linear-gradient(135deg, rgba(232, 220, 196, 0.1) 0%, transparent 50%, rgba(232, 220, 196, 0.05) 100%);
}

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 40%, var(--nun) 100%);
  opacity: 0.8;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(2, 2, 3, 0.9) 0%, transparent 100%);
  backdrop-filter: blur(12px);
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.main-nav.scrolled {
  background: rgba(2, 2, 3, 0.85);
  border-bottom-color: var(--glass-border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.nav-ankh {
  font-size: 1.4rem;
  color: var(--gold);
  line-height: 1;
  filter: drop-shadow(0 0 6px var(--gold-glow));
}

.nav-word {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--stella);
}

.nav-verse {
  font-weight: 300;
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a[aria-current="page"] {
  color: var(--gold);
}

.nav-links a[aria-current="page"]::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s ease;
}

/* ============================================================
   SECTION BASE
   ============================================================ */
section {
  position: relative;
  z-index: 10;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}

.section-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--gold-dim);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--stella);
  margin-bottom: 1.25rem;
}

.section-lead {
  font-family: var(--font-philosophy);
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
  position: relative;
  z-index: 10;
  padding: var(--space-xl) 2rem var(--space-lg);
  text-align: center;
  border-top: 1px solid var(--glass-border);
}

.footer-ankh {
  font-size: 2rem;
  color: var(--gold-dim);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.footer-motto {
  font-family: var(--font-philosophy);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.footer-ventures {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-ventures a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-ventures a:hover {
  color: var(--gold);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

/* ============================================================
   REVEAL ANIMATIONS (base states)
   ============================================================ */
.reveal-hero {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-section {
  opacity: 0;
  transform: translateY(50px);
}

.reveal-manifesto {
  opacity: 0;
  transform: translateY(30px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .main-nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(2, 2, 3, 0.95);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.8rem;
  }
}
