/* =========================================================
   OLIVEROOT — Glow-glass cards that show one item at a time
   (Mission & vision, the three pillars, "Where we are today")
   ========================================================= */
@property --glow-a{ syntax: '<color>'; inherits: true; initial-value: #7BD3B0; }
@property --glow-b{ syntax: '<color>'; inherits: true; initial-value: #B6316C; }

.glass-stack{
  --glow-a: #7BD3B0; --glow-b: #B6316C;
  position: relative; isolation: isolate;
  max-width: 860px; margin: 0 auto;
  transition: --glow-a .9s ease, --glow-b .9s ease;
}

/* soft coloured halo behind the card — this is what gives the glass something to refract */
.glass-stack__glow{
  position: absolute; inset: -7% -5%; z-index: -1; border-radius: 56px; pointer-events: none;
  background:
    radial-gradient(58% 80% at 16% 22%, var(--glow-a), transparent 72%),
    radial-gradient(52% 72% at 86% 82%, var(--glow-b), transparent 72%);
  opacity: .5;
}

.glass-stack__card{
  position: relative; border-radius: 30px; overflow: hidden;
  background: linear-gradient(140deg, rgba(255,255,255,.88) 0%, rgba(255,255,255,.62) 100%);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 34px 80px -34px var(--glow-b),
    0 14px 40px -22px rgba(15,27,20,.35);
  transition: transform .5s var(--ease-out, cubic-bezier(.2,.7,.3,1)), box-shadow .8s ease;
}
/* gradient hairline border */
.glass-stack__card::before{
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none; z-index: 3;
  background: linear-gradient(135deg, var(--glow-a), rgba(255,255,255,.2) 45%, var(--glow-b));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .85;
}
/* pointer-following sheen (desktop only) */
.glass-stack__card::after{
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 30%) var(--my, 0%), rgba(255,255,255,.7), transparent 60%);
  transition: opacity .4s ease;
}
.glass-stack.is-hover .glass-stack__card::after{ opacity: 1; }
@media (hover: hover) and (pointer: fine){
  .glass-stack__card{ -webkit-backdrop-filter: blur(18px) saturate(1.35); backdrop-filter: blur(18px) saturate(1.35); cursor: pointer; }
  .glass-stack.is-hover .glass-stack__card{ transform: translateY(-3px); }
}

/* ---------- Items: stacked in one grid cell, so the card never changes height ---------- */
.glass-stack__stage{ position: relative; z-index: 1; display: grid; padding: clamp(22px, 4.5vw, 44px); touch-action: pan-y; }
.glass-item{
  grid-area: 1 / 1;
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: clamp(16px, 3.2vw, 30px);
  --out: 28px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(var(--out)) scale(.98);
  filter: blur(4px);
  transition: opacity .5s ease, transform .6s var(--ease-out, cubic-bezier(.2,.7,.3,1)), filter .5s ease, visibility 0s .6s;
}
.glass-item.is-active{
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: none; filter: none;
  transition-delay: 0s;
}
.glass-item__icon{
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; flex-shrink: 0;
  color: var(--ic, #1A5A33); background: var(--ic-bg, rgba(123,211,176,.28));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 14px 28px -16px var(--ic, #1A5A33);
}
.glass-item__icon svg{ width: 34px; height: 34px; }
.glass-item[data-accent="leaf"]{ --ic: #1A5A33; --ic-bg: rgba(123,211,176,.3); }
.glass-item[data-accent="hibiscus"]{ --ic: #B6316C; --ic-bg: rgba(182,49,108,.14); }
.glass-item[data-accent="gold"]{ --ic: #8a6c22; --ic-bg: rgba(201,162,75,.24); }
.glass-item[data-accent="water"]{ --ic: #22775a; --ic-bg: rgba(62,143,115,.2); }

.glass-item__text h3{ font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.2; margin: 0 0 8px; }
.glass-item__text p{ margin: 0; max-width: 58ch; font-size: clamp(.9rem, 1.5vw, .98rem); line-height: 1.65; color: var(--ink-2, #384A3E); }

/* stat variant: the number is the visual */
.glass-item--stat .impact__num{ margin: 0; min-width: clamp(110px, 18vw, 170px); font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1; }
.glass-item--stat .impact__num--text{ font-size: clamp(1.25rem, 3.2vw, 1.9rem); line-height: 1.15; max-width: 12ch; }
.glass-item--stat .impact__num sup{ font-size: .28em; }

/* ---------- Controls ---------- */
.glass-stack__bar{
  position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 clamp(22px, 4.5vw, 44px) clamp(18px, 3vw, 28px);
}
.glass-stack__nav{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.glass-tab{
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  padding: 10px 16px; min-height: 40px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(15,27,20,.14); background: rgba(255,255,255,.6); color: var(--ink-2, #384A3E);
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.glass-tab:hover{ border-color: var(--glow-b); }
.glass-tab[aria-current="true"]{ background: var(--leaf-dark, #1A5A33); border-color: var(--leaf-dark, #1A5A33); color: #fff; box-shadow: 0 10px 24px -12px var(--glow-b); }
.glass-dot{ position: relative; width: 10px; height: 10px; border-radius: 999px; padding: 0; cursor: pointer; border: 0; background: rgba(15,27,20,.2); transition: width .35s var(--ease-out, ease), background .3s; }
.glass-dot::after{ content: ""; position: absolute; inset: -17px -6px; }   /* bigger tap area, same look */
.glass-dot[aria-current="true"]{ width: 30px; background: var(--glow-b); }

.glass-stack__side{ display: flex; align-items: center; gap: 12px; margin-left: auto; }
.glass-count{ font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; color: var(--ink-3, #5b6b60); }
.glass-next{
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px 0 20px; border-radius: 999px; cursor: pointer;
  border: 0; color: #fff; font: 700 .86rem var(--font-body);
  background: linear-gradient(135deg, var(--leaf-dark, #1A5A33), #12492B);
  box-shadow: 0 14px 30px -14px var(--glow-b), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .3s var(--ease-out, ease), box-shadow .3s;
}
.glass-next:hover{ transform: translateY(-2px); }
.glass-next svg{ width: 16px; height: 16px; transition: transform .3s var(--ease-out, ease); }
.glass-next:hover svg{ transform: translateX(4px); }

@media (max-width: 560px){
  .glass-stack{ max-width: 100%; }
  .glass-stack__card{ border-radius: 24px; }
  .glass-item{ grid-template-columns: 1fr; align-items: start; gap: 14px; }
  .glass-item__icon{ width: 56px; height: 56px; border-radius: 18px; }
  .glass-item__icon svg{ width: 26px; height: 26px; }
  .glass-item--stat .impact__num{ min-width: 0; }
  .glass-item--stat .impact__num--text{ max-width: none; }
  .glass-stack__bar{ flex-wrap: wrap; row-gap: 12px; }
  .glass-count{ display: none; }
  .glass-tab{ padding: 9px 13px; font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce){
  .glass-item, .glass-stack, .glass-stack__card{ transition: opacity .2s ease, visibility 0s; }
  .glass-item{ transform: none; filter: none; }
}
