/* ============================================================
   DIWALI PUJA GUIDE 2026 — Design System & Base Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Playfair+Display:wght@700;900&family=Lato:wght@300;400&display=swap');

/* ---- Design Tokens ---- */
:root {
  /* Backgrounds */
  --deep-night: #0a0810;
  --midnight: #120d1e;
  --void: #060409;
  --surface: #1a1228;
  --surface-raised: #211830;

  /* Gold palette */
  --gold-primary: #f5a623;
  --gold-bright: #ffd700;
  --gold-pale: #ffe87c;
  --gold-dim: #b8841a;
  --amber-glow: #ff8c00;
  --deep-orange: #e85d04;
  --ember: #c0390b;

  /* Sacred */
  --crimson-sacred: #c0392b;
  --vermillion: #e8441e;

  /* Text */
  --cream-white: #fff8e7;
  --cream-muted: #e8d5a3;
  --silver: #c0c0c0;
  --text-dim: rgba(255,248,231,0.6);
  --text-dimmer: rgba(255,248,231,0.38);

  /* Rangoli */
  --rangoli-pink: #e91e8c;
  --rangoli-teal: #00bcd4;
  --rangoli-violet: #9c27b0;

  /* Transparent overlays */
  --smoke: rgba(255,248,231,0.06);
  --smoke-light: rgba(255,248,231,0.10);
  --smoke-hover: rgba(255,248,231,0.14);
  --gold-glow-soft: rgba(245,166,35,0.12);
  --gold-glow: rgba(245,166,35,0.28);
  --gold-glow-strong: rgba(245,166,35,0.50);
  --amber-glow-soft: rgba(255,140,0,0.18);

  /* Borders */
  --border-color: rgba(245,166,35,0.22);
  --border-hover: rgba(245,166,35,0.55);

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;

  /* Fluid font scale */
  --text-xs:   clamp(0.70rem, 1.5vw, 0.80rem);
  --text-sm:   clamp(0.85rem, 2.0vw, 0.95rem);
  --text-base: clamp(1.00rem, 2.5vw, 1.10rem);
  --text-md:   clamp(1.10rem, 2.5vw, 1.28rem);
  --text-lg:   clamp(1.25rem, 3.0vw, 1.55rem);
  --text-xl:   clamp(1.55rem, 4.0vw, 2.10rem);
  --text-2xl:  clamp(2.00rem, 5.5vw, 3.10rem);
  --text-3xl:  clamp(2.60rem, 7.0vw, 4.60rem);
  --text-hero: clamp(2.80rem, 8.5vw, 5.80rem);

  /* Spacing */
  --s1:  0.25rem; --s2:  0.50rem; --s3:  0.75rem; --s4:  1.00rem;
  --s5:  1.25rem; --s6:  1.50rem; --s8:  2.00rem; --s10: 2.50rem;
  --s12: 3.00rem; --s16: 4.00rem; --s20: 5.00rem; --s24: 6.00rem;

  /* Border radius */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:    0 2px  8px rgba(0,0,0,0.45);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.55);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.65);
  --shadow-gold:  0 0 22px rgba(245,166,35,0.32), 0 0 60px rgba(245,166,35,0.10);
  --shadow-gold-intense: 0 0 35px rgba(245,166,35,0.55), 0 0 90px rgba(245,166,35,0.22);
  --shadow-amber: 0 0 32px rgba(255,140,0,0.35);

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-base:   0.30s ease;
  --t-slow:   0.60s ease;
  --t-spring: 0.40s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Layout */
  --container-max:    1200px;
  --container-narrow:  860px;
  --container-wide:   1400px;
  --nav-height:  70px;
  --section-pad: clamp(4rem, 10vw, 8rem);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  color: var(--cream-white);
  background-color: var(--deep-night);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

/* ---- Selection ---- */
::selection { background: var(--gold-primary); color: var(--deep-night); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  color: var(--cream-white);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-3xl);  }
h3 { font-size: var(--text-2xl);  }
h4 { font-size: var(--text-xl);   }
h5 { font-size: var(--text-lg);   }
h6 { font-size: var(--text-md);   }

p {
  font-size: var(--text-base);
  color: var(--cream-muted);
  line-height: 1.80;
  margin-bottom: var(--s4);
}
p:last-child { margin-bottom: 0; }

a { color: var(--gold-primary); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--gold-bright); }

ul, ol { padding-left: var(--s6); }
li { margin-bottom: var(--s2); color: var(--cream-muted); font-size: var(--text-base); }

img, svg { max-width: 100%; display: block; }

strong { font-weight: 600; color: var(--cream-white); }
em     { font-family: var(--font-serif); font-style: italic; color: var(--gold-pale); }

/* ---- Sanskrit / Mantra ---- */
.mantra-text, .sanskrit {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  line-height: 1.65;
  color: var(--gold-pale);
}

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--gold-primary);
  color: var(--deep-night);
  padding: var(--s2) var(--s4);
  font-weight: 700;
  z-index: 9999;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 0; }

/* ---- Screen reader only ---- */
.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;
}

/* ---- Layout containers ---- */
.container        { width: 100%; max-width: var(--container-max);    margin: 0 auto; padding: 0 var(--s6); }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 var(--s6); }
.container-wide   { width: 100%; max-width: var(--container-wide);   margin: 0 auto; padding: 0 var(--s6); }

/* ---- Page padding (below fixed nav) ---- */
.page-content { padding-top: var(--nav-height); }

/* ---- Section ---- */
section { padding: var(--section-pad) 0; }

/* ---- Grids ---- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s6); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s6); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--s5); }

/* ---- Section header ---- */
.section-header { text-align: center; margin-bottom: var(--s12); }
.section-header h2 { color: var(--cream-white); margin-bottom: var(--s4); }
.section-header p  { font-size: var(--text-md); color: var(--text-dim); max-width: 620px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: var(--s4);
  padding: var(--s1) var(--s4);
  border: 1px solid var(--border-color);
  border-radius: var(--r-full);
  background: var(--gold-glow-soft);
}

/* ---- Gold divider ---- */
.divider {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin: var(--s8) 0;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}
.divider-icon { color: var(--gold-primary); font-size: var(--text-md); }

/* ---- Gradient text ---- */
.text-gold {
  background: linear-gradient(135deg, var(--gold-pale), var(--gold-primary), var(--amber-glow));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-warm {
  background: linear-gradient(135deg, var(--cream-white), var(--gold-pale), var(--gold-primary));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Table ---- */
table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-primary);
  padding: var(--s3) var(--s4);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  background: rgba(245,166,35,0.08);
}
td {
  padding: var(--s4);
  border-bottom: 1px solid rgba(245,166,35,0.10);
  color: var(--cream-muted);
  font-size: var(--text-base);
}
tr:hover td { background: var(--smoke); }

/* ---- Highlight box ---- */
.highlight-box {
  background: var(--gold-glow-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: var(--s8);
}

/* ---- Step list ---- */
.step-list { list-style: none; padding: 0; counter-reset: steps; }
.step-list > li {
  counter-increment: steps;
  position: relative;
  padding: var(--s5) var(--s5) var(--s5) calc(var(--s12) + var(--s4));
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
  color: var(--cream-muted);
  transition: background var(--t-base);
}
.step-list > li:last-child { border-bottom: none; }
.step-list > li:hover { background: var(--smoke); }
.step-list > li::before {
  content: counter(steps);
  position: absolute;
  left: var(--s5);
  top: var(--s5);
  width: 2.2rem; height: 2.2rem;
  background: linear-gradient(135deg, var(--gold-primary), var(--amber-glow));
  color: var(--deep-night);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.step-list > li strong { color: var(--cream-white); display: block; margin-bottom: var(--s1); }

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  color: var(--text-dim);
  margin-bottom: var(--s8);
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--gold-primary); }
.breadcrumb-sep { color: var(--text-dimmer); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .sparks-container, #sparkCanvas { display: none !important; }
}
