/* ==========================================================================
   Option 3 · Warli
   Maharashtra folk art: white figures on terracotta, layered Warli
   borders (SVG tiles in assets/illustrations/warli), chunky outlines.
   Loads after base.css and components.css.
   ========================================================================== */

/* === Theme ================================================================ */
.theme-warli {
  --page-bg: var(--cream);
  --page-fg: var(--text);
  --heading: var(--ink);
  --surface: var(--white);
  --surface-line: var(--charcoal);
  --chip-line: var(--charcoal);
  --chip-off-bg: var(--white);
  --frame-radius: 16px;
  --outline: 2px solid var(--charcoal);
  --hard-shadow: 6px 6px 0 var(--charcoal);
}
/* Borders and figure chains are repeating SVG tiles: swap the file to restyle */
.wl-border       { height: 70px; background: url("../assets/illustrations/warli/border-white.svg") repeat-x left center / auto 100%; }
.wl-border--short { height: 40px; background-image: url("../assets/illustrations/warli/border-white-short.svg"); }
.wl-chain        { height: 64px; background: url("../assets/illustrations/warli/chain-charcoal.svg") repeat-x left bottom / auto 100%; margin-top: 8px; }

/* Header: dark Warli border runs behind the nav */
.theme-warli .site-header { border-bottom: 3px solid var(--orange); }
.theme-warli .site-header::before { content: ""; position: absolute; inset: 0; background: url("../assets/illustrations/warli/border-dark.svg") repeat-x left center / auto 86%; pointer-events: none; }
.theme-warli .site-header__bar { position: relative; }
.theme-warli .site-logo, .theme-warli .site-nav a:not(.btn) { background: var(--charcoal); border-radius: 10px; }
.theme-warli .site-logo { padding: 4px 8px; }
@media (min-width: 1100px) {
  .theme-warli .site-nav { gap: 8px; }
  .theme-warli .site-nav a:not(.btn) { padding: 6px 12px; border-radius: var(--pill); border: 1.5px solid transparent; }
  .theme-warli .site-nav a[aria-current="page"] { border-color: #FFFFFF; }
}
.theme-warli .menu-panel { --header-bg: var(--terracotta); }
.theme-warli .menu-panel__top { background: var(--charcoal); }

/* Buttons: outlined with a hard offset shadow; press pushes into the shadow */
.theme-warli .btn { border: var(--outline); }
.theme-warli .btn--primary { box-shadow: 4px 4px 0 var(--charcoal); }
.theme-warli .btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--charcoal); }
.btn--line { background: transparent; color: var(--ink); }
.btn--dark { background: var(--charcoal); color: #FFFFFF; }
.wl-ctas { display: grid; gap: 10px; }
@media (min-width: 768px) { .wl-ctas { display: flex; flex-wrap: wrap; } }

/* === Hero: illustrated slides ================================================= */
.wl-hero__stage { display: grid; }
.wl-hero__slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 450ms var(--ease-out), visibility 0s linear 450ms; display: grid; }
.wl-hero__slide.is-active { opacity: 1; visibility: visible; transition: opacity 450ms var(--ease-out); }
.wl-hero__scene { background: var(--terracotta) url("../assets/illustrations/warli/border-white-short.svg") repeat-x left top / auto 40px; padding: 56px var(--gutter) 12px; display: flex; align-items: flex-end; min-height: 280px; }
.wl-hero__scene img { width: 100%; max-width: 640px; margin: 0 auto; }
.wl-hero__text { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; padding-bottom: 8px; }
.wl-hero__title { font-size: clamp(34px, 8.6vw, 60px); }
.wl-hero__body { max-width: 52ch; font-size: 18px; }
.wl-hero__controls { display: flex; align-items: center; gap: 10px; padding-top: 18px; padding-bottom: 8px; }
.wl-hero__tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex-grow: 1; max-width: 520px; }
.wl-hero__tab { position: relative; min-height: 54px; padding: 0 8px 8px; border-radius: 16px; border: var(--outline); background: var(--white); color: var(--ink); font-size: 20px; cursor: pointer; }
.wl-hero__tab[aria-selected="true"] { background: var(--charcoal); color: #FFFFFF; }
.wl-hero__track { position: absolute; left: 12px; right: 12px; bottom: 7px; height: 3px; border-radius: 2px; background: rgba(23,23,23,.14); overflow: hidden; }
.wl-hero__tab[aria-selected="true"] .wl-hero__track { background: rgba(255,255,255,.25); }
.wl-hero__fill { display: block; height: 100%; background: var(--orange); transform: scaleX(0); transform-origin: left; }
.wl-hero__pause { min-height: 44px; padding: 0 14px; border-radius: var(--pill); border: var(--outline); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; }
/* Motion: the scene rises gently when its slide becomes active */
@media (prefers-reduced-motion: no-preference) {
  .wl-hero__slide.is-active .wl-hero__scene img { animation: lift 700ms var(--ease-out) both; }
  .wl-hero__slide.is-active .wl-hero__text > * { animation: lift 500ms var(--ease-out) both; }
}
@keyframes lift { from { opacity: 0; transform: translateY(12px); } }
@media (min-width: 1100px) {
  .wl-hero__slide { grid-template-columns: 1.1fr 1fr; }
  .wl-hero__scene { min-height: 520px; padding: 64px 40px 24px; }
  .wl-hero__text { justify-content: center; padding: 40px 48px; }
  /* Desktop: tabs sit under the text, inside the right-hand column (width = 1fr of 2.1fr) */
  .wl-hero__controls { position: relative; z-index: 2; margin: -88px 0 0 auto; width: calc(100% / 2.1); padding-left: 48px; padding-right: 48px; justify-content: flex-start; }
  .wl-hero__tabs { max-width: 440px; }
}

/* === Who we are on terracotta ================================================== */
.wl-who { background: var(--terracotta); color: #F3E3DF; --heading: #FFFFFF; }
.wl-who .wl-border--short { margin: 6px 0; }
.wl-who__grid { display: grid; gap: 32px; }
.wl-who__text { display: grid; gap: 16px; }
.wl-who__text p:last-child { color: var(--peach); font-weight: 600; }
.wl-who__mandala { width: min(100%, 420px); margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .wl-who__mandala.reveal { transform: rotate(-20deg) scale(.96); }
  .wl-who__mandala.reveal.is-in { transform: none; transition: opacity 1s var(--ease-out), transform 1.4s var(--ease-out); }
}
@media (min-width: 1100px) { .wl-who__grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; } }

/* === Initiatives cards ============================================================ */
.wl-inits__grid { display: grid; gap: 24px; }
.wl-card { display: flex; flex-direction: column; background: var(--white); border: var(--outline); border-radius: var(--radius-l); box-shadow: var(--hard-shadow); overflow: hidden; }
.wl-card__scene { background: var(--terracotta); padding: 18px 16px 4px; border-bottom: var(--outline); }
.wl-card__photos { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2px; background: var(--charcoal); border-bottom: var(--outline); }
.wl-card__photos .photo { height: 120px; }
@media (min-width: 768px) { .wl-card__photos .photo { height: 150px; } }
.wl-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px; flex-grow: 1; }
.wl-card__mr { color: var(--orange-ink); font-size: 18px; }
.wl-card__body > p:nth-of-type(2) { flex-grow: 1; }
.wl-card__value { font-weight: 600; color: var(--ink); background: var(--cream); border-radius: 14px; padding: 12px 14px; }
@media (min-width: 768px) { .wl-inits__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* === Join the circle ================================================================ */
.wl-join { background: var(--white); border-top: var(--outline); border-bottom: var(--outline); }
.wl-join__grid { display: grid; gap: 24px; }
.wl-circle { width: 100%; max-width: 440px; margin: 0 auto; color: var(--charcoal); }
.wl-circle .is-you { color: var(--orange); }
@media (prefers-reduced-motion: no-preference) {
  .wl-circle .is-you { animation: join 600ms cubic-bezier(.34, 1.56, .64, 1) both; transform-box: fill-box; transform-origin: center bottom; }
  .wl-circle .ring { transition: transform 600ms var(--ease-out); }
}
@keyframes join { from { opacity: 0; transform: scale(.4); } }
.wl-join__grid p { max-width: 44ch; margin-bottom: 18px; }
.wl-join__action { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.wl-join__count { font-weight: 600; color: var(--ink); }
.wl-join__next { margin-top: 16px; display: grid; gap: 10px; }
.wl-join__next[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .wl-join__next:not([hidden]) { animation: lift 450ms var(--ease-out) both; } }
@media (min-width: 768px) { .wl-join__next { display: flex; flex-wrap: wrap; } }
@media (min-width: 1100px) { .wl-join__grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; } }

/* === Impact ============================================================================ */
.wl-impact__grid { display: grid; gap: 30px; }
.wl-impact .proof__num::after { content: ""; display: block; width: 120px; height: 14px; margin-top: 8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14'%3E%3Cpolyline points='0,12 8,2 16,12 24,2 32,12 40,2 48,12 56,2 64,12 72,2 80,12 88,2 96,12 104,2 112,12 120,2' fill='none' stroke='%23FF941B' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat; }
@media (min-width: 768px) { .wl-impact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .wl-impact__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* === Van finder ======================================================================== */
.theme-warli .van { background: var(--charcoal); color: #E4E4E4; --heading: #FFFFFF; }
.theme-warli .van .chip { background: transparent; color: #FFFFFF; border-color: #FFFFFF; }
.theme-warli .van .chip[aria-pressed="true"] { background: #FFFFFF; color: var(--charcoal); }
.theme-warli .van__kicker { color: var(--orange-soft); }
.theme-warli .van__card { background: var(--terracotta); border: 2px solid #FFFFFF; }
.theme-warli .van__place { color: #FFFFFF; }
.theme-warli .van__link { color: var(--peach); }

/* === Gallery: tilted Warli frames ====================================================== */
.wl-frame { border: 5px solid var(--charcoal); }
.gallery__item:nth-child(4n+1) .wl-frame { transform: rotate(-1.4deg); }
.gallery__item:nth-child(4n+2) .wl-frame { transform: rotate(1.1deg); }
.gallery__item:nth-child(4n+3) .wl-frame { transform: rotate(-0.8deg); }
.gallery__item:nth-child(4n+4) .wl-frame { transform: rotate(1.4deg); }
.theme-warli .gallery__item figcaption { margin-top: 12px; }

/* === Donate ============================================================================= */
.wl-give { background: var(--peach); border-top: var(--outline); }
.wl-give__grid { display: grid; gap: 28px; }
.wl-give__grid .h2 { margin-bottom: 14px; }
.wl-give__chain { height: 64px; margin-top: 20px; background: url("../assets/illustrations/warli/chain-charcoal.svg") repeat-x left bottom / auto 100%; max-width: 240px; }
.theme-warli .donate { background: var(--cream); border: var(--outline); border-radius: var(--radius-l); box-shadow: var(--hard-shadow); padding: 20px; }
.theme-warli .donate__freq { border: var(--outline); }
.theme-warli .donate__amounts button[aria-pressed="true"] { box-shadow: 3px 3px 0 var(--charcoal); border-color: var(--charcoal); }
@media (min-width: 1100px) { .wl-give__grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }

/* === Testimonials ======================================================================== */
.wl-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; }
.wl-rail::-webkit-scrollbar { display: none; }
.wl-rail .voice { scroll-snap-align: start; background: var(--white); border: var(--outline); box-shadow: 5px 5px 0 var(--charcoal); }
@media (min-width: 768px) { .wl-rail { grid-auto-columns: 42%; } }
@media (min-width: 1100px) { .wl-rail { grid-auto-columns: 30%; margin: 0; padding: 4px 0 14px; } }

/* Footer border */
.theme-warli .site-footer .wl-border { margin-top: 0; padding-top: 14px; background-origin: content-box; height: 84px; }
