/* ===================================================
   SRI SIVAYOGINI MATAJI — GLOBAL DESIGN SYSTEM
   style.css — Master styles for all pages
   =================================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=Noto+Sans+Tamil:wght@300;400;500;600;700&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Backgrounds */
  --bg-primary: #0A0700;
  --bg-secondary: #110900;
  --bg-card: #1A0F00;
  --bg-card-hover: #221400;

  /* Gold System */
  --gold-primary: #D4A017;
  --gold-light: #F5C842;
  --gold-pale: #FFF3C4;
  --gold-dark: #8B6914;

  /* Text */
  --text-primary: #F5E6C8;
  --text-secondary: #C4A96A;
  --text-muted: #7A6040;
  --text-white: #FFFFFF;

  /* Borders */
  --border-gold: rgba(212, 160, 23, 0.3);
  --border-gold-bright: rgba(212, 160, 23, 0.7);

  /* Spiritual Accent Colors */
  --maroon: #8B0000;
  --deep-red: #6B0000;
  --saffron: #FF7800;
  --sacred-purple: #3D1A5C;

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-tamil: 'Noto Sans Tamil', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Tamil font for all Tamil text */
[lang="ta"],
.tamil {
  font-family: var(--font-tamil);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

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

ul, ol {
  list-style: none;
}

/* ===== SELECTION HIGHLIGHT ===== */
::selection {
  background: rgba(212, 160, 23, 0.3);
  color: var(--text-white);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* ===== TYPOGRAPHY ===== */
.heading-xl {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
}

.heading-md {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
}

.heading-sm {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
}

.text-gradient-gold {
  background: linear-gradient(135deg, var(--text-primary), var(--gold-primary), var(--text-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.text-gold-light {
  color: var(--gold-light);
}

.text-muted {
  color: var(--text-muted);
}

.text-tamil {
  font-family: var(--font-tamil);
}

.uppercase-tracking {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.container-narrow {
  max-width: 900px;
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: var(--space-xl) 0;
}

.section-lg {
  padding: var(--space-2xl) 0;
}

/* ===== GLASSMORPHISM CARD ===== */
.glass-card {
  background: rgba(26, 15, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(212, 160, 23, 0.03);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: var(--border-gold-bright);
  box-shadow:
    0 30px 60px -15px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(212, 160, 23, 0.08),
    inset 0 0 30px rgba(212, 160, 23, 0.05);
  transform: translateY(-4px);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

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

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

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

.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
  color: var(--bg-primary);
  box-shadow: 0 0 20px rgba(212, 160, 23, 0.3);
}

.btn-gold:hover {
  box-shadow: 0 0 35px rgba(212, 160, 23, 0.5);
}

.btn-outline {
  background: rgba(10, 7, 0, 0.8);
  color: var(--gold-primary);
  border: 1px solid var(--border-gold);
  box-shadow: 0 0 15px rgba(212, 160, 23, 0.1);
}

.btn-outline:hover {
  background: var(--gold-primary);
  color: var(--bg-primary);
  box-shadow: 0 0 25px rgba(212, 160, 23, 0.3);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.5);
}

/* ===== DIVIDERS ===== */
.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
  margin: var(--space-lg) auto;
  max-width: 400px;
  box-shadow: 0 0 15px rgba(212, 160, 23, 0.3);
}

.divider-ornate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--gold-primary);
  margin: var(--space-md) 0;
}

.divider-ornate::before,
.divider-ornate::after {
  content: '';
  height: 1px;
  width: 2rem;
  background: rgba(212, 160, 23, 0.5);
}

/* ===== BACKGROUND EFFECTS ===== */
.bg-cosmic {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-cosmic::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(139, 0, 0, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(212, 160, 23, 0.08) 0%, transparent 40%),
              radial-gradient(ellipse at 50% 80%, rgba(61, 26, 92, 0.1) 0%, transparent 50%);
  animation: cosmicShift 20s ease-in-out infinite alternate;
}

@keyframes cosmicShift {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ===== RESPONSIVE GRID ===== */
.grid-auto {
  display: grid;
  gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

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

@media (max-width: 768px) {
  .grid-3,
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  
  .container {
    padding: 0 var(--space-sm);
  }
}

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

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-header .subtitle {
  font-family: var(--font-tamil);
  color: var(--text-secondary);
  font-size: 1.125rem;
  font-weight: 300;
  margin-top: var(--space-xs);
}

/* ===== IMAGE CONTAINERS ===== */
.image-arch {
  border-radius: 200px 200px 10px 10px;
  box-shadow: 0 0 30px rgba(212, 160, 23, 0.15);
  border: 2px solid var(--border-gold);
  overflow: hidden;
}

.image-rounded {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ===== UTILITY CLASSES ===== */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.relative { position: relative; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Glass Panel Utility */
.glass-panel {
    background: rgba(15, 5, 8, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

/* ===== PROFESSIONAL ORB BACKGROUND ===== */
.orb { 
    position: fixed; 
    border-radius: 50%; 
    filter: blur(80px); 
    z-index: 0; 
    opacity: 0.5; 
    pointer-events: none; 
    will-change: transform;
    transform: translateZ(0);
}
.orb-1 { width: 400px; height: 400px; background: #4A1D24; top: -100px; left: -100px; animation: float 10s ease-in-out infinite; }
.orb-2 { width: 300px; height: 300px; background: #D4AF37; bottom: -50px; right: -50px; animation: float 12s ease-in-out infinite reverse; opacity: 0.2; }
.orb-3 { width: 350px; height: 350px; background: #1a0b16; top: 40%; left: 40%; animation: float 15s ease-in-out infinite; }

.bg-texture {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    mix-blend-mode: overlay;
    will-change: transform;
    transform: translateZ(0);
}

.animate-gradient-xy {
    animation: gradient-xy 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradient-xy {
    0%, 100% { background-position: left center; }
    50% { background-position: right center; }
}

/* ===== PREMIUM GLASSMORPHISM & EFFECTS ===== */
.glass-premium {
    background: rgba(15, 8, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 160, 23, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

.glass-card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(212, 160, 23, 0.6);
    box-shadow: 0 15px 45px rgba(212, 160, 23, 0.15), 0 0 20px rgba(212, 160, 23, 0.1) inset;
    background: rgba(20, 10, 0, 0.85);
}

.glow-radial-gold {
    position: relative;
}

.glow-radial-gold::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.15) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -150%; }
    50% { left: 200%; }
    100% { left: 200%; }
}
