/*
 * theme.css — The Himalayan Meditation
 * Vedic Calendar 2026 · Modular CSS Variables & Global Tokens
 * ============================================================
 * Include this BEFORE index.html's inline <style> block.
 * All inline styles in index.html reference these variables.
 */

/* ============================================================
   1. DESIGN TOKENS (Root Variables)
   ============================================================ */
:root {
    /* Brand Palette */
    --brand-saffron:        #e27d60;   /* Warm saffron — primary accent */
    --brand-saffron-deep:   #c0562f;   /* Deeper saffron — hover/gradient end */
    --brand-gold:           #eca61c;   /* Sacred gold — headings, icons */
    --brand-gold-light:     #efd194;   /* Light gold — taglines, glows */
    --brand-deep-blue:      #2c3e50;   /* Deep Himalayan blue — body headings */
    --brand-indigo:         #1a1f3c;   /* Cosmic indigo — dark sections */
    --brand-midnight:       #0d1117;   /* Night sky — hero bg, footer */
    --brand-whitish:        #fdfaf6;   /* Near-white — text on dark bg */

    /* Backgrounds */
    --bg-zen:               #fdfaf6;   /* Warm white — primary background */
    --bg-warm:              #f5efe6;   /* Parchment warm — card backgrounds */
    --bg-parchment:         #ede3d0;   /* Deep parchment — philosophy section */

    /* Typography */
    --text-primary:         #1a1611;   /* Near-black warm — primary text */
    --text-secondary:       #4a3f35;   /* Warm brown — body text */
    --text-muted:           #8a7868;   /* Muted warm — supporting text */
    --text-light:           #fdfaf6;   /* Light — on dark backgrounds */

    /* Accents */
    --accent-om:            #b8860b;   /* Dark goldenrod — A5 card CTA */
    --border-subtle:        rgba(212, 168, 83, 0.25);  /* Soft gold border */

    /* Shadows */
    --shadow-warm:          0 20px 60px rgba(226, 125, 96, 0.15);
    --shadow-deep:          0 30px 80px rgba(13, 17, 23, 0.4);
    --shadow-card:          0 4px 24px rgba(44, 62, 80, 0.08);

    /* Layout */
    --radius-card:          16px;
    --radius-sm:            8px;
    --radius-pill:          50px;
    --max-width:            1140px;
    --max-width-narrow:     820px;

    /* Spacing scale */
    --space-xs:             8px;
    --space-sm:             16px;
    --space-md:             24px;
    --space-lg:             40px;
    --space-xl:             60px;
    --space-2xl:            100px;

    /* Typography scale */
    --font-display:         'Cinzel', 'Trajan Pro', serif;
    --font-body:            'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-devanagari:      'Noto Serif Devanagari', serif;

    /* Transitions */
    --transition:           all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast:      all 0.2s ease;
    --transition-slow:      all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Z-index layers */
    --z-base:               1;
    --z-raised:             10;
    --z-modal:              100;
    --z-nav:                999;
    --z-overlay:            9999;
}

/* ============================================================
   2. GLOBAL RESETS & BASE STYLES
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-zen);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-weight: 400; 
    text-rendering: optimizeLegibility;
    text-shadow: 0 0 1px rgba(0,0,0,0.01);
}

b, strong {
    font-weight: 600; /* Makes bold text stand out more for thin serifs */
}

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================================
   3. UTILITY CLASSES
   ============================================================ */

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-narrow {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* Visibility */
.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;
}

/* ============================================================
   4. TYPOGRAPHY SYSTEM
   ============================================================ */

/* Display / Heading — Cinzel */
.font-display { font-family: var(--font-display); }

/* Body — Cormorant Garamond */
.font-body { font-family: var(--font-body); }

/* Devanagari */
.font-devanagari { font-family: var(--font-devanagari); }

/* Type scale */
.text-hero    { font-size: clamp(4rem, 8vw, 7.5rem); line-height: 1.1; }
.text-h1      { font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: 1.2; }
.text-h2      { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.3; }
.text-h3      { font-size: clamp(1.4rem, 2.5vw, 2.2rem); }
.text-body    { font-size: 1.15rem; line-height: 1.8; } /* Increased from 1.05 */
.text-sm      { font-size: 0.95rem; } /* Increased from 0.88 */
.text-xs      { font-size: 0.85rem; }
.text-eyebrow {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
}

/* Colors */
.text-gold    { color: var(--brand-gold); }
.text-saffron { color: var(--brand-saffron); }
.text-blue    { color: var(--brand-deep-blue); }
.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }

/* ============================================================
   5. COMPONENT: BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    padding: 18px 42px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-saffron), var(--brand-saffron-deep));
    color: #fff;
    box-shadow: 0 8px 30px rgba(226, 125, 96, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(226, 125, 96, 0.55);
}

.btn-secondary {
    background: transparent;
    color: var(--brand-gold);
    border: 1px solid rgba(212, 168, 83, 0.5);
}
.btn-secondary:hover {
    background: rgba(212, 168, 83, 0.1);
    border-color: var(--brand-gold);
}

.btn-ghost {
    background: #062c14;
    color: var(--brand-deep-blue);
    border: 1px solid rgba(44, 62, 80, 0.25);
}
.btn-ghost:hover {
    background: var(--brand-deep-blue);
    color: var(--text-light);
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(37, 211, 102, 0.45);
}

.btn-gold {
    background: linear-gradient(135deg, var(--brand-gold), var(--accent-om));
    color: var(--brand-midnight);
    font-weight: 600;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(212, 168, 83, 0.4);
}

/* ============================================================
   6. COMPONENT: BADGES & TAGS
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
}

.badge-saffron {
    background: linear-gradient(135deg, var(--brand-saffron), var(--brand-saffron-deep));
    color: #fff;
}

.badge-gold {
    background: rgba(212, 168, 83, 0.15);
    border: 1px solid rgba(212, 168, 83, 0.4);
    color: var(--brand-gold);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

/* ============================================================
   7. COMPONENT: CARDS
   ============================================================ */

.card, .cal-card {
    background: var(--bg-zen);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover, .cal-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-warm);
    border-color: rgba(212, 168, 83, 0.4);
}

.card-featured {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 1px var(--brand-gold), var(--shadow-warm);
}

.cal-card-body {
    padding: var(--space-lg); /* Gives the text room to breathe */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* This is the "magic" that fills the empty space */
    justify-content: space-between; /* Pushes the button to the very bottom */
    background: var(--bg-zen);
}

/* Ensure the description has a consistent height or spacing */
.cal-card-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    flex-grow: 1; /* Pushes the price and button down */
}

/* ============================================================
   8. COMPONENT: DIVIDERS & DECORATIVE
   ============================================================ */

.divider-om {
    text-align: center;
    padding: 20px 0;
    color: var(--brand-saffron);
    font-family: var(--font-devanagari);
    font-size: 1.5rem;
    opacity: 0.5;
    letter-spacing: 1rem;
}

.divider-line {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--brand-gold), transparent);
    opacity: 0.3;
    margin: 40px 0;
}

.gold-rule {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}
.gold-rule::before,
.gold-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--brand-gold));
    opacity: 0.4;
}
.gold-rule::after {
    background: linear-gradient(to left, transparent, var(--brand-gold));
}

/* ============================================================
   9. COMPONENT: SECTION HEADERS
   ============================================================ */

.section-header {
    margin-bottom: var(--space-xl);
}

.section-header.centered {
    text-align: center;
}

.section-eyebrow {
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.35em;
    color: var(--brand-saffron);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: 14px;
    text-transform: uppercase;
}
.section-eyebrow::after {
    content: '';
    display: block;
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: var(--brand-saffron);
    opacity: 0.5;
}
.section-header.centered .section-eyebrow {
    justify-content: center;
}
.section-header.centered .section-eyebrow::before {
    content: '';
    display: block;
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: var(--brand-saffron);
    opacity: 0.5;
}
.section-header.centered .section-eyebrow::after {
    display: block;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--brand-deep-blue);
    margin-bottom: 20px;
}

.section-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.8;
    max-width: 720px;
}
.section-header.centered .section-desc {
    margin: 0 auto;
}

/* ============================================================
   10. SCROLL REVEAL ANIMATION
   ============================================================ */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================================
   11. PRINT STYLES
   ============================================================ */

@media print {
    .nav,
    .hero-scroll,
    .strip-bar,
    .order-section,
    .footer-social,
    .btn-whatsapp { display: none; }

    body { font-size: 12pt; color: #000; }
    .hero { min-height: auto; page-break-after: always; }
    .pricing-table { page-break-inside: avoid; }
}

/* ============================================================
   12. ACCESSIBILITY
   ============================================================ */

:focus-visible {
    outline: 2px solid var(--brand-gold);
    outline-offset: 3px;
    border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 768px) {

  /* ── A5 Card fix ── */
  .cal-card-special {
    padding-top: 0 !important;
    overflow: hidden;
  }
  .cal-card-image.is-a5-cover {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .cal-card-image.is-a5-cover img {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    border-radius: 0 !important;
    margin: 0;
  }

  /* ── Pricing table ── */
  .pricing-table th,
  .pricing-table td {
    padding: 0.6rem 0.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .pricing-note {
    font-size: 0.8rem;
    padding: 0 var(--space-xs);
  }
  .pricing-tabs {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
  }
  .pricing-tab {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  /* ── Audio section ── */
  .audio-players-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    width: 100%;
    padding: 0 var(--space-sm);
    gap: var(--space-md);
  }
  .audio-card {
    padding: var(--space-md);
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }
  .sacred-audio-player {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* ── Archive section ── */
  .archive-section {
    padding: var(--space-xl) 0;
  }
  .archive-grid {
    grid-template-columns: 1fr;        /* single column — no cramping */
    gap: var(--space-sm);
    padding: 0 var(--space-sm);
    box-sizing: border-box;
    width: 100%;
  }
  .archive-card {
    flex-direction: row;               /* horizontal strip layout */
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .archive-card-icon {
    display: none;                     /* saves space on mobile */
  }
  .archive-card-body {
    flex: 1;
    min-width: 0;                      /* critical — prevents text overflow */
    gap: 3px;
  }
  .archive-card-top {
    margin-bottom: 4px;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .archive-badge {
    font-size: 0.58rem;
    padding: 2px 6px;
    white-space: nowrap;
  }
  .archive-edition-type {
    font-size: 0.58rem;
    white-space: nowrap;
  }
  .archive-card-title {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .archive-card-desc {
    display: block;
    font-size: 0.72rem;
    opacity: 0.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .archive-download-btn {
    flex-shrink: 0;
    width: auto;
    padding: 0.5rem 0.85rem;
    font-size: 0.65rem;
    white-space: nowrap;
    margin-top: 0;
  }
  .archive-tabs {
    gap: var(--space-xs);
    padding: 0 var(--space-sm);
    box-sizing: border-box;
    width: 100%;
  }
  .archive-tab {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
  }
  .archive-tab-year {
    font-size: 0.95rem;
  }
  .archive-tab-count {
    font-size: 0.62rem;
  }
}

@media (max-width: 480px) {

  /* ── Audio ── */
  .audio-card-icon {
    font-size: 2rem;
  }
  .audio-track-title {
    font-size: 0.95rem;
  }

  /* ── Pricing ── */
  .pricing-table th,
  .pricing-table td {
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
  }

  /* ── Archive ── */
  .archive-card {
    padding: 0.65rem var(--space-sm);
  }
  .archive-card-title {
    font-size: 0.78rem;
  }
  .archive-card-desc {
    font-size: 0.68rem;
  }
  .archive-download-btn {
    font-size: 0.6rem;
    padding: 0.45rem 0.65rem;
    letter-spacing: 0.06em;
  }
  .archive-tab-year {
    font-size: 0.88rem;
  }
  .archive-tab-count {
    font-size: 0.58rem;
  }
}

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

/* Adjust the Om symbol size for mobile headers */
.cal-om {
    font-size: 2.5rem !important;
}
    
.cal-year {
    font-size: 1.2rem;
}

/* Ensure buttons are easy to tap with a thumb */
.cal-card-cta {
    padding: 15px;
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   PDF PREVIEW BUTTON — Feature 1
   Extends the existing .btn.btn-ghost variant
   ═══════════════════════════════════════════════════════════════ */

.btn-pdf-preview {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
  justify-content: center;
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-whitish);
  border-color: var(--brand-gold);
  opacity: 0.85;
  transition: opacity var(--transition-base), background-color var(--transition-base), color var(--transition-base);
}

.btn-pdf-preview:hover,
.btn-pdf-preview:focus-visible {
  opacity: 1;
  background-color: var(--brand-gold);
  color: var(--brand-midnight);
  border-color: var(--brand-gold);
}

.pdf-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke: currentColor;
}

/* ═══════════════════════════════════════════════════════════════
   RISHIS AUDIO SECTION — Feature 2
   ═══════════════════════════════════════════════════════════════ */

.rishis-audio-section {
  background-color: var(--bg-parchment);
  padding: var(--space-2xl) 0 var(--space-lg) 0;
  position: relative;
  overflow: hidden;
  overflow-x: hidden; /* belt-and-suspenders for this section specifically */
}

/* Subtle Om watermark behind the section */
.rishis-audio-section::before {
  content: 'ॐ';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-devanagari);
  font-size: clamp(16rem, 30vw, 28rem);
  color: var(--brand-gold);
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.om-divider {
  margin: var(--space-sm) auto 0;  /* ← was likely var(--space-xl) or more */
  text-align: center;
}

/* Two-column grid, collapses to single column on mobile */
.audio-players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  max-width: 860px;
  margin: 0 auto var(--space-xl);
  width: 100%;
  box-sizing: border-box;
}

/* Individual audio card */
.audio-card {
  background-color: var(--brand-midnight);
  border: 1px solid rgba(212, 168, 83, 0.2);
  border-radius: 12px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.audio-card:hover {
  border-color: rgba(236, 166, 28, 0.5);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45), 0 0 20px rgba(236, 166, 28, 0.08);
}

/* Large Om glyph at the top of each card */
.audio-card-icon {
  font-family: var(--font-devanagari);
  font-size: 2.8rem;
  color: var(--brand-gold);
  opacity: 0.75;
  line-height: 1;
  margin-bottom: calc(-1 * var(--space-xs));
}

.audio-card-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* "Transmission I / II" label above title */
.audio-track-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-gold);
  opacity: 0.7;
  margin: 0;
}

/* Track title */
.audio-track-title {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-light);
  margin: 0 0 var(--space-sm);
  line-height: 1.4;
}

/* ── Native <audio> player styling ──────────────────────────── */
/*
   Native audio controls cannot be fully styled cross-browser.
   We apply what we can: width, accent-color, and a subtle
   container treatment. The result is clean without JS overhead.
*/

.sacred-audio-player {
  width: 100%;
  height: 40px;
  accent-color: var(--brand-gold);
  /* Subtle parchment-tinted background for Chrome/Edge */
  background-color: rgba(237, 227, 208, 0.08);
  border-radius: 8px;
  outline: none;
}

/* Firefox-specific tint */
.sacred-audio-player::-moz-focus-inner {
  border: 0;
}

/* Accessible focus ring that respects the brand palette */
.sacred-audio-player:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}

/* ============================================================
   13. FIXES FOR ELEGANT TEXT AND SCROLL
   ============================================================ */

/* Custom Hero Image Styling */
.hero-calendar-preview {
    width: 100%;
    max-width: 650px;           /* Large & bold */
    aspect-ratio: 1 / 1;        /* Keeps it a perfect square */
    object-fit: cover;          /* Prevents stretching */
    display: block;
    margin: 0 auto;
    
    /* Remove the box/card look */
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: var(--radius-card); /* Keeps corners soft but not "boxy" */

    /* The "Divine Glow" - instead of a shadow, it creates a halo effect */
    filter: drop-shadow(0 0 30px rgba(212, 168, 83, 0.2)); 
    
    /* Optional: Subtle fade at the very bottom to mix into the page */
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.hero-eyebrow {
    font-family: var(--font-display); /* Cinzel for that sacred look */
    font-size: 1.1rem;               /* Increased from the standard 0.75rem */
    letter-spacing: 0.5em;           /* Extra wide spacing for a premium feel */
    text-transform: uppercase;       /* Makes it feel like a formal title */
    color: var(--brand-saffron);     /* Using your warm saffron accent */
    margin-bottom: var(--space-sm);  /* Adds a nice gap above the ॐ */
    display: block;
    font-weight: 600;
    opacity: 0.9;                    /* Slightly softer so it doesn't fight the H1 */
}


/* 1. Ensure the Hero section is the 'Anchor' */
.hero {
    position: relative;
    min-height: 100vh;
}

/* 2. Position the Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 40px;      /* Distance from bottom */
    right: 40px;       /* Distance from right */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: var(--z-raised);
}

.hero-scroll span {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--brand-gold);
    opacity: 0.7;
    /* This turns the text sideways */
    writing-mode: vertical-rl; 
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--brand-gold), transparent);
}

/* This ensures the 'primary' button in your cards is always colored */
.cal-card-cta.primary {
    background: linear-gradient(135deg, var(--brand-saffron), var(--brand-saffron-deep));
    color: #fff;
    display: inline-flex;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 20px;
}

/* This fixes the Gold Button in the 3rd card */
.cal-card-cta[style*="background"] {
    color: var(--brand-midnight) !important; /* Makes text dark on gold background */
    font-weight: 600;
}

.philosophy-grid {
  align-items: start;  /* ← prevents the left box from stretching full height */
}

/* ═══════════════════════════════════════════════
   GLOBAL OVERFLOW FIX — prevents horizontal scroll
   ═══════════════════════════════════════════════ */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

* {
  box-sizing: border-box;
  min-width: 0; /* ← critical: allows flex/grid children to shrink below content size */
}

/* ═══════════════════════════════════════════════
   PRICING TABLE — MOBILE OVERFLOW FIX
   ═══════════════════════════════════════════════ */

.pricing-table-wrap {
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;          /* ← table scrolls horizontally inside its box */
  -webkit-overflow-scrolling: touch; /* ← smooth scroll on iOS */
}

.pricing-table {
  width: 100%;
  min-width: 480px;          /* ← table won't collapse below readable width */
  box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   THE ARCHIVE SECTION
   ═══════════════════════════════════════════════════════════════ */

.archive-section {
  background-color: var(--brand-indigo);
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

/* Faint Om watermark */
.archive-section::before {
  content: 'ॐ';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-devanagari);
  font-size: clamp(14rem, 28vw, 26rem);
  color: var(--brand-gold);
  opacity: 0.03;
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

/* Override section-title color for dark background */
.archive-section .section-title,
.archive-section .section-description,
.archive-section .eyebrow-label {
  color: var(--text-light);
}

.archive-section .eyebrow-label {
  color: var(--brand-gold);
  opacity: 0.85;
}

.archive-section .section-description {
  opacity: 0.7;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Year Tabs ───────────────────────────────────────────────── */

.archive-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.archive-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.75rem 1.75rem;
  background: transparent;
  border: 1px solid rgba(212, 168, 83, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  min-width: 110px;
}

.archive-tab-year {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--text-light);
  opacity: 0.6;
  transition: opacity var(--transition-base), color var(--transition-base);
}

.archive-tab-count {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--brand-gold);
  opacity: 0.5;
  transition: opacity var(--transition-base);
}

.archive-tab:hover {
  border-color: rgba(212, 168, 83, 0.5);
  background: rgba(212, 168, 83, 0.05);
}

.archive-tab:hover .archive-tab-year {
  opacity: 0.9;
}

.archive-tab:hover .archive-tab-count {
  opacity: 0.8;
}

.archive-tab.active {
  background: rgba(212, 168, 83, 0.12);
  border-color: var(--brand-gold);
}

.archive-tab.active .archive-tab-year {
  color: var(--brand-gold);
  opacity: 1;
}

.archive-tab.active .archive-tab-count {
  opacity: 1;
}

/* ── Archive Panels ──────────────────────────────────────────── */

.archive-panel {
  display: none;
}

.archive-panel.active {
  display: block;
}

/* ── Archive Grid ────────────────────────────────────────────── */

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  width: 100%;
  box-sizing: border-box;
}

/* ── Archive Card ────────────────────────────────────────────── */

.archive-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 168, 83, 0.15);
  border-radius: 10px;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  transition: border-color var(--transition-base), background var(--transition-base), transform var(--transition-base);
  box-sizing: border-box;
  min-width: 0;
}

.archive-card:hover {
  border-color: rgba(212, 168, 83, 0.4);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.archive-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.archive-badge {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge-english {
  background: rgba(226, 125, 96, 0.2);
  color: var(--brand-saffron);
  border: 1px solid rgba(226, 125, 96, 0.3);
}

.badge-hindi {
  background: rgba(212, 168, 83, 0.15);
  color: var(--brand-gold);
  border: 1px solid rgba(212, 168, 83, 0.3);
}

.badge-special {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0.8;
}

.archive-edition-type {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  opacity: 0.35;
  white-space: nowrap;
}

.archive-card-icon {
  font-size: 1.6rem;
  line-height: 1;
  margin: var(--space-xs) 0 0;
}

.archive-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-card-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin: 0;
  line-height: 1.3;
}

.archive-card-desc {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-light);
  opacity: 0.5;
  margin: 0;
  line-height: 1.5;
}

.archive-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-xs);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-gold);
  border-color: rgba(212, 168, 83, 0.3);
  padding: 0.45rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
}

.archive-download-btn:hover,
.archive-download-btn:focus-visible {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: var(--brand-midnight);
}


/* ═══════════════════════════════════════════════════════════════
   ARCHIVE MOBILE — HARD OVERRIDE 
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  .archive-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .archive-card {
    display: flex !important;
    flex-direction: column !important;  /* stack vertically inside card */
    width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding: 14px !important;
    overflow: hidden !important;
  }

  .archive-card-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin-bottom: 6px !important;
  }

  .archive-badge {
    font-size: 0.6rem !important;
    padding: 2px 7px !important;
    white-space: nowrap !important;
  }

  .archive-edition-type {
    font-size: 0.6rem !important;
    white-space: nowrap !important;
  }

  .archive-card-icon {
    display: none !important;
  }

  .archive-card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    min-width: 0 !important;
    width: 100% !important;
    margin-bottom: 10px !important;
  }

  .archive-card-title {
    font-size: 0.88rem !important;
    white-space: normal !important;     /* allow wrapping — no ellipsis */
    overflow: visible !important;
    color: var(--text-light) !important;
    line-height: 1.3 !important;
  }

  .archive-card-desc {
    display: block !important;
    font-size: 0.74rem !important;
    white-space: normal !important;
    overflow: visible !important;
    opacity: 0.5 !important;
    line-height: 1.4 !important;
  }

  .archive-download-btn {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0.55rem 1rem !important;
    font-size: 0.7rem !important;
    margin-top: 0 !important;
    white-space: nowrap !important;
  }

  .archive-tabs {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 12px !important;
    gap: 8px !important;
    margin-bottom: 20px !important;
  }

  .archive-tab {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 10px 6px !important;
    box-sizing: border-box !important;
  }

  .archive-tab-year {
    font-size: 0.95rem !important;
  }

  .archive-tab-count {
    font-size: 0.62rem !important;
  }
}

@media (max-width: 480px) {
  .archive-card {
    padding: 12px !important;
  }

  .archive-card-title {
    font-size: 0.82rem !important;
  }

  .archive-card-desc {
    font-size: 0.7rem !important;
  }

  .archive-download-btn {
    font-size: 0.65rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  .archive-tab-year {
    font-size: 0.85rem !important;
  }
}

