/* ==========================================================================
   MIHIRA UNIVERSE - SPIRITUAL SANCTUARY DESIGN SYSTEM
   Palette: Sacred Saffron, Royal Ochre, Temple Sandstone, Deep Forest, Pure Silk
   ========================================================================== */

:root {
  --color-saffron-primary: #D9531E;
  --color-saffron-light: #FF8F50;
  --color-saffron-dark: #9E350E;
  --color-gold: #C99700;
  --color-gold-light: #F6D565;
  --color-gold-glow: rgba(201, 151, 0, 0.25);
  
  --color-bg-ivory: #FAF7F2;
  --color-bg-card: #FFFFFF;
  --color-bg-sand: #F3EBDD;
  --color-bg-dark: #1E1B18;
  --color-bg-dark-surface: #2A2521;
  
  --color-text-main: #2A2421;
  --color-text-muted: #6B625B;
  --color-text-light: #FDFBF7;
  
  --color-sacred-green: #2B593F;
  --color-maroon: #6B1D2F;
  --color-border: #E8DCCB;
  --color-border-focus: #D9531E;

  --font-serif: 'Cinzel Decorative', 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-accent: 'Cormorant Garamond', serif;

  --shadow-sm: 0 2px 8px rgba(42, 36, 33, 0.05);
  --shadow-md: 0 8px 24px rgba(42, 36, 33, 0.08);
  --shadow-lg: 0 16px 40px rgba(42, 36, 33, 0.12);
  --shadow-glow: 0 0 25px rgba(217, 83, 30, 0.2);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basics */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-ivory);
  color: var(--color-text-main);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, .serif-heading {
  font-family: var(--font-serif);
  color: var(--color-text-main);
  letter-spacing: 0.02em;
  font-weight: 600;
  line-height: 1.25;
}

p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-saffron { color: var(--color-saffron-primary); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Sacred Header & Navigation (Luxury Dark Glass Sanctuary) */
.sanctuary-topbar {
  background: linear-gradient(90deg, #120e0a 0%, #1a140f 50%, #120e0a 100%);
  color: #c7bcae;
  font-size: 0.825rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(201, 151, 0, 0.22);
  letter-spacing: 0.02em;
}

.sanctuary-topbar a {
  color: #c7bcae;
  transition: color 0.2s ease;
}

.sanctuary-topbar a:hover {
  color: var(--color-gold-light);
}

.sanctuary-navbar {
  background: rgba(18, 14, 11, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(201, 151, 0, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: var(--transition-smooth);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1.5rem;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-symbol {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 16px rgba(217, 83, 30, 0.4);
}

.brand-symbol img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand-text-sub {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  font-weight: 600;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.15rem;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: #e5ded4;
  padding: 0.4rem 0.25rem;
  position: relative;
  white-space: nowrap;
  display: inline-block;
  letter-spacing: 0.01em;
  transition: all 0.25s ease;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-saffron-primary) 0%, var(--color-gold) 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(217, 83, 30, 0.6);
  transition: width 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-link:hover {
  color: #FFFFFF;
}

.nav-link.active {
  color: var(--color-gold-light);
  font-weight: 600;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Navigation Dropdown */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item-dropdown .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: rgba(18, 14, 11, 0.96);
  border: 1px solid rgba(201, 151, 0, 0.28);
  border-radius: 10px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1100;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.nav-dropdown-menu li {
  width: 100%;
}

.nav-dropdown-link {
  display: flex;
  align-items: center;
  padding: 0.65rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: #dfd7cc;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-link:hover {
  background: rgba(201, 151, 0, 0.12);
  color: var(--color-gold-light);
  padding-left: 1.35rem;
}

.nav-dropdown-link.active {
  color: var(--color-gold-light);
  font-weight: 600;
  background: rgba(201, 151, 0, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-shrink: 0;
}

/* Sacred Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #D9531E 0%, #C94210 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(217, 83, 30, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FF6A33 0%, #D9531E 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(217, 83, 30, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-main);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-saffron-primary);
  color: var(--color-saffron-primary);
  background: rgba(217, 83, 30, 0.04);
}

.btn-gold {
  background: linear-gradient(135deg, #E6B800 0%, #C99700 100%);
  color: #1A1408;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(201, 151, 0, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #FCD034 0%, #E6B800 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 151, 0, 0.45);
}

.btn-sm {
  padding: 0.45rem 1.1rem;
  font-size: 0.825rem;
}

/* Badge & Tag */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-pill);
  background: rgba(217, 83, 30, 0.1);
  color: var(--color-saffron-primary);
}

.badge-gold {
  background: rgba(201, 151, 0, 0.15);
  color: #8C6800;
}

.badge-green {
  background: rgba(43, 89, 63, 0.12);
  color: var(--color-sacred-green);
}

/* Section Header Component */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-header .section-tag {
  color: var(--color-saffron-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.6rem;
  display: inline-block;
}

.section-header h2 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
}

.decorative-lotus-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto 1.5rem;
}

.lotus-line {
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.lotus-icon {
  color: var(--color-gold);
  font-size: 1.1rem;
}

/* Card Foundations */
.sacred-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  overflow: hidden;
  position: relative;
}

.sacred-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(217, 83, 30, 0.3);
}

/* Flash Messages */
.alert-banner {
  padding: 1.25rem 1.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.alert-success {
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  color: #1B5E20;
}

/* Footer */
.sanctuary-footer {
  background: #181512;
  color: #CEC3B6;
  padding-top: 5rem;
  padding-bottom: 2rem;
  border-top: 3px solid var(--color-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-heading {
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 1.4rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--color-gold);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--color-gold-light);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #9E9285;
}

/* Responsive Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Responsive adjustments */
@media (max-width: 1180px) {
  .nav-menu { display: none; }
  .mobile-menu-btn { display: block !important; }
}

@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-header h2 { font-size: 1.85rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #FFFFFF;
  cursor: pointer;
  transition: color 0.2s ease;
}

/* ==========================================================================
   SPIRITUAL SANCTUARY ANIMATIONS SUITE
   Subtle, Sacred, and Responsive Motion
   ========================================================================== */

/* Keyframe Animations */
@keyframes sacredFadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sacredFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sacredPulseGlow {
  0%, 100% {
    box-shadow: 0 0 16px rgba(217, 83, 30, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 26px rgba(246, 213, 101, 0.65), 0 0 40px rgba(217, 83, 30, 0.35);
    transform: scale(1.02);
  }
}

@keyframes sacredRaysFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(1.5deg);
  }
}

@keyframes goldShine {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* Base Reveal Animation Classes (Activated via JS IntersectionObserver) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Stagger Delays for Grid items */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Subtle Ambient Animation on Brand Emblem */
.brand-symbol {
  animation: sacredPulseGlow 6s ease-in-out infinite;
}

/* Hero Section Entrance Animations */
.hero-mihira .hero-welcome {
  animation: sacredFadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-mihira .hero-title {
  animation: sacredFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-mihira .hero-lead {
  animation: sacredFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.hero-mihira .hero-sublead {
  animation: sacredFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
}

.hero-mihira .flex {
  animation: sacredFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

.hero-portrait-wrapper {
  animation: sacredFadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

/* Card Micro-Interactions */
.content-box,
.master-profile-card,
.sevenfold-card,
.explore-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}

.content-box:hover,
.master-profile-card:hover,
.sevenfold-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(42, 36, 33, 0.12);
  border-color: rgba(201, 151, 0, 0.4);
}

/* Button Subtle Hover Sheen */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.btn:hover::after {
  left: 150%;
}

/* Sticky Navbar subtle blur animation on scroll */
.sanctuary-navbar.is-scrolled {
  background: rgba(14, 11, 8, 0.97);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(201, 151, 0, 0.4);
}

/* Respect Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}
