/**
 * Avyani — homepage-only stylesheet.
 * Loaded exclusively when rendering the Home menu item (see index.php),
 * so inner pages never pay for this CSS. Built with CSS Grid + Flexbox,
 * no layout framework.
 *
 * Table of contents:
 *   1. Inline icon sprite sizing
 *   2. Scroll-reveal (progressive enhancement)
 *   3. Hero
 *   4. Section scaffolding
 *   5. Stats
 *   6. Featured categories
 *   7. Why Avyani (decorative CSS icons)
 *   8. Icon cards (Books / Temples / Pujas)
 *   9. Quote
 *   10. Latest articles heading spacing
 *   11. Testimonials (CSS scroll-snap, no JS)
 *   12. Newsletter
 */

/* -----------------------------------------------------------
   1. Inline icon sprite sizing
------------------------------------------------------------ */
.icon {
  width: 1.5em;
  height: 1.5em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* -----------------------------------------------------------
   2. Scroll-reveal
   Content is fully visible with no JS / reduced-motion; home.js
   opts elements into a subtle fade + rise only when it can.
------------------------------------------------------------ */
.reveal {
  opacity: 1;
  transform: none;
}

.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* -----------------------------------------------------------
   3. Hero
------------------------------------------------------------ */
.hero {
  position: relative;
  min-height: min(46rem, 92vh);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(120% 100% at 15% 0%, #fdf1de 0%, var(--c-bg) 55%),
    linear-gradient(180deg, var(--c-bg-alt), var(--c-bg));
  border-bottom: 1px solid var(--c-border);
}

.hero--photo {
  background-size: cover;
  background-position: center;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43, 38, 34, 0.55), rgba(43, 38, 34, 0.35) 45%, rgba(255, 253, 249, 0.96));
}

.hero--photo .hero__eyebrow,
.hero--photo .hero__subheading {
  color: rgba(255, 255, 255, 0.88);
}

.hero--photo .hero__heading {
  color: #fff;
}

.hero__motif {
  position: absolute;
  inset-inline-end: -12vmax;
  top: 50%;
  transform: translateY(-50%);
  width: 55vmax;
  height: 55vmax;
  color: var(--c-gold);
  opacity: 0.1;
  pointer-events: none;
}

.hero__motif svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: currentColor;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  padding-block: var(--sp-9);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-5);
  color: var(--c-saffron-dark);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__eyebrow .icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
}

.hero__heading {
  font-size: clamp(2.5rem, 2rem + 2.4vw, 4rem);
  margin-bottom: var(--sp-5);
}

.hero__subheading {
  font-size: 1.2rem;
  color: var(--c-ink-soft);
  max-width: 34rem;
  margin-bottom: var(--sp-6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: 1rem;
}

/* -----------------------------------------------------------
   4. Section scaffolding
------------------------------------------------------------ */
.section {
  padding-block: var(--sp-9);
}

.section:nth-of-type(even) {
  background: var(--c-bg-alt);
}

.section-title {
  margin-bottom: var(--sp-2);
}

.section-subtitle {
  color: var(--c-ink-soft);
  font-size: 1.05rem;
  max-width: 38rem;
  margin-bottom: var(--sp-7);
}

.section-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
}

.section-header-row .section-subtitle {
  margin-bottom: 0;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-weight: 600;
  color: var(--c-saffron-dark);
  white-space: nowrap;
  margin-bottom: var(--sp-7);
}

.section-link .icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform var(--transition-fast);
}

.section-link:hover .icon {
  transform: translateX(3px);
}

/* -----------------------------------------------------------
   5. Stats
------------------------------------------------------------ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  text-align: center;
}

@media (min-width: 48em) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item__number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  font-weight: 600;
  color: var(--c-saffron-dark);
  line-height: 1;
}

.stat-item__suffix {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  font-weight: 600;
  color: var(--c-saffron-dark);
}

.stat-item__label {
  display: block;
  margin-top: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
}

/* -----------------------------------------------------------
   6. Featured categories
------------------------------------------------------------ */
.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 48em) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-card {
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-7) var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.category-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--c-gold);
}

.category-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--c-saffron-tint);
  color: var(--c-saffron-dark);
  margin-bottom: var(--sp-5);
}

.category-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--sp-2);
}

.category-card p {
  color: var(--c-ink-soft);
  font-size: var(--fs-small);
  margin: 0;
}

/* -----------------------------------------------------------
   7. Why Avyani — decorative CSS icons
   These are entered as plain HTML (divs/headings/paragraphs) in a
   Custom HTML module, so no inline SVG lives inside the WYSIWYG
   editor content; the icon is drawn entirely by ::before here.
------------------------------------------------------------ */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-7);
}

@media (min-width: 40em) {
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .why-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pillar-card {
  padding: var(--sp-6);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.pillar-card::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: var(--sp-4);
  background-repeat: no-repeat;
  background-size: contain;
}

.pillar-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-2);
}

.pillar-card p {
  color: var(--c-ink-soft);
  font-size: var(--fs-small);
  margin: 0;
}

.pillar-card--shield::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b98f3f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5c0 5-3.5 8.5-7 10-3.5-1.5-7-5-7-10V6l7-3Z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.pillar-card--globe::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b98f3f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3c3.5 2.5 3.5 15.5 0 18'/%3E%3Cpath d='M12 3c-3.5 2.5-3.5 15.5 0 18'/%3E%3C/svg%3E");
}

.pillar-card--leaf::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b98f3f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20C4 12 9 4 20 4c0 11-8 16-16 16Z'/%3E%3Cpath d='M4 20c4-6 8-9 12-12'/%3E%3C/svg%3E");
}

.pillar-card--heart::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b98f3f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.5-9.5-9C.8 7.5 2 4 5.5 4c2 0 3.5 1.2 4.5 2.8C11 5.2 12.5 4 14.5 4 18 4 19.2 7.5 21.5 11c-2.5 4.5-9.5 9-9.5 9Z'/%3E%3C/svg%3E");
}

/* -----------------------------------------------------------
   8. Icon cards — Featured Books / Temples / Pujas
   (mod_articles_category, styled via the default_items.php
   override to emit .content-card.content-card--icon)
------------------------------------------------------------ */
.books-section .mod-articlescategory,
.temples-section .mod-articlescategory,
.pujas-section .mod-articlescategory {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 40em) {
  .books-section .mod-articlescategory,
  .temples-section .mod-articlescategory,
  .pujas-section .mod-articlescategory {
    grid-template-columns: repeat(3, 1fr);
  }
}

.content-card--icon {
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
}

.content-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  background: var(--c-gold-tint);
  color: var(--c-gold-dark);
  margin-bottom: var(--sp-4);
}

.content-card--icon .content-card__title {
  font-size: 1.1rem;
}

/* -----------------------------------------------------------
   9. Quote
------------------------------------------------------------ */
.quote-section {
  padding-block: var(--sp-9);
  text-align: center;
  background: linear-gradient(180deg, var(--c-bg-alt), var(--c-bg));
}

.quote-section__mark {
  width: 2.25rem;
  height: 2.25rem;
  fill: var(--c-gold);
  stroke: none;
  margin-bottom: var(--sp-5);
}

.quote-section__text {
  margin: 0 auto;
  max-width: 42rem;
  font-family: var(--font-heading);
  font-size: clamp(1.375rem, 1.15rem + 1vw, 2rem);
  line-height: 1.5;
}

.quote-section__translation {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--c-ink-soft);
  margin-top: var(--sp-3);
}

.quote-section__attribution {
  display: block;
  margin-top: var(--sp-5);
  font-style: normal;
  font-size: var(--fs-small);
  color: var(--c-gold-dark);
  font-weight: 600;
}

/* -----------------------------------------------------------
   10. Latest articles
------------------------------------------------------------ */
.articles-section .content-grid {
  padding-block: 0;
}

/* -----------------------------------------------------------
   11. Testimonials — CSS scroll-snap carousel, no JS required
------------------------------------------------------------ */
.testimonials-track {
  display: flex;
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--sp-4);
  margin-top: var(--sp-7);
  scrollbar-width: thin;
}

.testimonial-card {
  flex: 0 0 min(22rem, 85vw);
  scroll-snap-align: start;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}

.testimonial-card::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: var(--sp-4);
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23b98f3f' d='M8 9c-2.2 0-4 1.8-4 4v5h6v-6H7c0-1.7 1.3-3 3-3V9Z'/%3E%3Cpath fill='%23b98f3f' d='M18 9c-2.2 0-4 1.8-4 4v5h6v-6h-3c0-1.7 1.3-3 3-3V9Z'/%3E%3C/svg%3E");
}

.testimonial-card p {
  color: var(--c-ink);
  margin-bottom: var(--sp-4);
}

.testimonial-card__author {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--c-ink-soft);
}

/* -----------------------------------------------------------
   12. Newsletter
------------------------------------------------------------ */
.newsletter-section {
  padding-block: var(--sp-8);
  background: var(--c-ink);
  color: #fff;
}

.newsletter-section .section-title,
.newsletter-section .section-subtitle {
  color: #fff;
}

.newsletter-section .section-subtitle {
  color: rgba(255, 255, 255, 0.72);
}

.newsletter-section__inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  align-items: flex-start;
}

@media (min-width: 56em) {
  .newsletter-section__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  width: 100%;
  max-width: 28rem;
}

.newsletter-form .form-control {
  flex: 1 1 14rem;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.newsletter-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.newsletter-form .btn {
  flex-shrink: 0;
}
