@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;800&display=swap');

/* SAGE — Homepage Purity Stylesheet: The Geometric Portal v2 */
/* A World-Class Design System for Ancient Wisdom & Modern AI */

:root {
  --sage-green-deep: #0a2e1c;
  --sage-green-regal: #0e301d;
  --sage-green-glow: #1b6b3a;
  --mystic-emerald: #14532d;
  --sacred-saffron: #ea580c;
  --sacred-gold: #d97706;
  --ethereal-white: rgba(255, 255, 255, 0.95);
  --glass-inner-light: rgba(255, 255, 255, 0.08);
  --glass-border-premium: rgba(255, 255, 255, 0.15);
  --altar-shadow: 0 40px 100px rgba(0, 0, 0, 0.65);
  --cinzel: 'Cinzel', serif;
}

/* --- The Geometric Portal: Background Animation --- */
.geometric-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(234, 88, 12, 0.1) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.2;
  animation: pulseGrid 8s infinite ease-in-out;
  z-index: 1;
}

@keyframes pulseGrid {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.05); }
}

/* --- Premium Backgrounds: The Nocturnal Altar --- */
.hero-purity-wrap {
  position: relative;
  width: 100%;
  min-height: 900px;
  padding: 100px 0 100px;
  background: var(--sage-green-deep);
  background-image: linear-gradient(rgba(10, 46, 28, 0.5), rgba(10, 46, 28, 0.9)), url('../../static/mystic_hero.png');
  background-size: cover;
  background-position: center;
  border-radius: 0 0 60px 60px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.45);
  z-index: 10;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- The Inquiry Crystal (Masterpiece Hero Card) --- */
.inquiry-crystal {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  background: rgba(14, 48, 29, 0.6);
  -webkit-backdrop-filter: blur(45px);
  backdrop-filter: blur(45px);
  border: 1px solid var(--glass-border-premium);
  border-radius: 50px;
  padding: 70px 60px;
  box-shadow: var(--altar-shadow);
  position: relative;
  z-index: 15;
  text-align: center;
}

.inquiry-crystal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 50px;
  padding: 1px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.2), transparent);
  -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;
  pointer-events: none;
}

.hero-title-esoteric {
  font-family: var(--cinzel);
  font-size: 3.2rem;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

@media (max-width:320px) {
  .hero-title-esoteric { font-size: 2.2rem; }
}

.crystal-input-wrap {
  position: relative;
  margin: 40px auto;
  max-width: 600px;
}

.crystal-input {
  width: 100%;
  padding: 24px 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: white;
  font-size: 1.15rem;
  font-family: var(--serif);
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.crystal-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--sacred-saffron);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.2), inset 0 2px 10px rgba(0,0,0,0.2);
}

.btn-crystal-cast {
  background: linear-gradient(135deg, var(--sacred-saffron), var(--sacred-gold));
  color: white;
  padding: 20px 50px;
  border: none;
  border-radius: 15px;
  font-weight: 900;
  font-family: var(--cinzel);
  text-transform: uppercase;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 40px rgba(234, 88, 12, 0.4);
  margin-top: 25px;
}

.btn-crystal-cast:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 55px rgba(234, 88, 12, 0.6);
  filter: brightness(1.1);
}

/* --- Content Orthodoxy (Natural Vertical Flow) --- */
.hero-content-ortho {
  display: block;
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 15;
}

/* --- The Cinematic Descent: Hypnotic Layout --- */
body {
  background: var(--sage-green-deep) !important;
  color: var(--ethereal-white) !important;
}

.section-mesmer {
  position: relative;
  padding: 100px 0;
  z-index: 20;
  overflow: hidden;
}

/* --- The Line of Destiny (Vertical Eye Path) --- */
.destiny-path {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(234, 88, 12, 0.4), transparent);
  opacity: 0.3;
  transform: translateX(-50%);
  z-index: 10;
}

.destiny-dot {
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--sacred-gold);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 15px var(--sacred-gold);
  animation: dripDown 8s infinite linear;
}

@keyframes dripDown {
  0% { top: -10%; opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}

/* --- Ancient Resonance & Initiation Typography --- */
.resonance-header {
  font-family: var(--cinzel);
  font-size: 2.8rem;
  color: white !important;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 3px;
}

.resonance-text, .ink-text, .small-muted-text {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85) !important;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.small-muted-text {
  font-size: 0.95rem;
  opacity: 0.7;
}

.lexicon-dot {
  width: 12px;
  height: 12px;
  background: var(--sacred-gold);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--sacred-gold);
  margin: 4px;
}

.figure-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.geomantic-figure-visual {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 20px;
  transition: all 0.4s;
}

.geomantic-figure-visual:hover {
  transform: translateY(-5px);
  border-color: var(--sacred-gold);
  background: rgba(217, 119, 6, 0.05);
}

.narrative-lead {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.95) !important;
  max-width: 850px;
  margin: 0 auto 40px;
  text-align: center;
}

.ramal-accent {
  color: #ea580c !important;
  font-family: var(--cinzel);
  font-weight: 800;
  text-shadow: 0 0 15px rgba(234, 88, 12, 0.4);
}

.western-accent {
  color: #4ade80 !important;
  font-family: var(--cinzel);
  font-weight: 800;
  text-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
}

/* --- Unified Lineage & Journey (Crystal Islands) --- */
.crystal-island {
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  padding: 60px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  transition: all 0.5s ease;
  margin-bottom: 40px;
}

.crystal-island:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-10px);
}

.step-circle-mystic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sacred-saffron);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--cinzel);
  font-size: 1.8rem;
  color: var(--sacred-saffron);
  box-shadow: 0 0 20px rgba(234, 88, 12, 0.2);
}

/* --- Nocturnal PWA Altar Banner --- */
.pwa-nocturnal-altar {
  background: linear-gradient(135deg, var(--sage-green-deep), #000);
  border: 1px solid rgba(234, 88, 12, 0.3);
  border-radius: 35px;
  padding: 50px;
  margin: 80px auto;
  max-width: 1000px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.pwa-nocturnal-altar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at center, rgba(234, 88, 12, 0.1), transparent 70%);
  pointer-events: none;
}

/* --- Nocturnal Footer --- */
.site-footer-nocturnal {
  background: #051a10 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  padding: 100px 0 50px !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

.site-footer-nocturnal h4 {
  color: var(--sacred-gold) !important;
  font-family: var(--cinzel);
  letter-spacing: 2px;
  font-size: 1.1rem;
}

.site-footer-nocturnal a {
  color: rgba(255, 255, 255, 0.5) !important;
  transition: all 0.3s;
  text-decoration: none;
}

.site-footer-nocturnal a:hover {
  color: var(--sacred-gold) !important;
  text-decoration: underline;
}

.footer-separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(234, 88, 12, 0.2), transparent);
  margin: 40px 0;
}

/* Final CTA Altar */
.final-altar-portal {
  background: radial-gradient(circle at center, rgba(234, 88, 12, 0.1) 0%, transparent 70%);
  padding: 120px 20px;
  text-align: center;
}

.btn-portal-plunge {
  background: linear-gradient(135deg, var(--sacred-saffron), var(--sacred-gold));
  color: white !important;
  padding: 22px 60px;
  border-radius: 50px;
  font-family: var(--cinzel);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 4px;
  box-shadow: 0 20px 50px rgba(234, 88, 12, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
  text-decoration: none;
}

.btn-portal-plunge:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 30px 70px rgba(234, 88, 12, 0.6);
}

.btn-initiation-ghost {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--sacred-saffron);
  color: var(--sacred-saffron) !important;
  border-radius: 12px;
  font-family: var(--cinzel);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.btn-initiation-ghost:hover {
  background: rgba(234, 88, 12, 0.1);
  transform: translateY(-3px);
}

/* --- Floating Energy Beacon (Premium Restoration) --- */
.floating-token-badge {
  position: fixed;
  bottom: 50px;
  right: 50px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 30px;
  background: linear-gradient(135deg, var(--sacred-saffron), var(--sacred-gold));
  color: white !important;
  border-radius: 60px;
  box-shadow: 0 15px 45px rgba(234, 88, 12, 0.4);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none !important;
  font-family: var(--cinzel);
  font-weight: 800;
  letter-spacing: 1px;
  animation: floatMystic 6s infinite ease-in-out, auraPulse 3s infinite ease-in-out;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.floating-token-badge:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 25px 60px rgba(234, 88, 12, 0.6);
  filter: brightness(1.1);
}

.badge-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 5px white);
}

.badge-text {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

@keyframes floatMystic {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes auraPulse {
  0%, 100% { box-shadow: 0 15px 45px rgba(234, 88, 12, 0.4); }
  50% { box-shadow: 0 15px 65px rgba(234, 88, 12, 0.7); }
}

/* Responsive Overrides for Descent */
@media (max-width: 768px) {
  .resonance-header { font-size: 2rem; }
  .resonance-text { font-size: 1.1rem; }
  .crystal-island { padding: 40px 20px; }
  .floating-token-badge {
    bottom: 30px;
    right: 20px;
    padding: 14px 22px;
    font-size: 0.8rem;
  }
}

/* --- Social & Trust Connectors --- */
.footer-social-block {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6) !important;
  transition: all 0.3s;
}
.footer-social-link:hover {
  color: var(--sacred-gold) !important;
  transform: translateX(5px);
}
.social-icon-gold {
  fill: var(--sacred-gold);
  filter: drop-shadow(0 0 5px rgba(217, 119, 6, 0.3));
}
/* --- PWA Instruction Modal (The Ritual) --- */
.pwa-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.pwa-modal-content {
  background: linear-gradient(135deg, var(--sage-green-deep), #000);
  border: 1px solid var(--sacred-saffron);
  border-radius: 40px;
  max-width: 500px;
  width: 100%;
  padding: 50px 40px;
  position: relative;
  text-align: center;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-modal-close {
  position: absolute;
  top: 25px;
  right: 30px;
  background: none;
  border: none;
  color: var(--sacred-saffron);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.pwa-modal-close:hover { opacity: 1; }

.pwa-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.pwa-step-item {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  background: rgba(255,255,255,0.03);
  padding: 15px 25px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.05);
}

.step-icon {
  font-size: 1.8rem;
  color: var(--sacred-gold);
  min-width: 40px;
  text-align: center;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* --- PWA Standalone Mode Adjustments --- */
@media (display-mode: standalone) {
  #pwa-section, 
  .site-footer-nocturnal a[href="#pwa-section"] {
    display: none !important;
  }
  
  /* Optional: Adjust spacing if needed when section is removed */
  .final-altar-portal {
    padding-top: 60px;
  }
}
