/* ==========================================================================
   Home page
   ========================================================================== */

/* Hero ------------------------------------------------------------------ */
.hero { position: relative; min-height: calc(100svh - var(--header-h) - 34px); display: grid; align-items: center; padding-block: var(--sp-8) var(--sp-9); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 78% 45%, var(--cream-200) 0%, transparent 70%); pointer-events: none; }
.hero__grid { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: var(--sp-7); align-items: center; }
.hero__title { font-size: clamp(2.9rem, 1.6rem + 5vw, 6rem); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: var(--sp-5); }
:lang(ta) .hero__title { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.3; }
.hero__title em, .hero__title em .w__i { display: inline-block; color: var(--gold-600); background: var(--gold-text-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero__title em { display: inline; }
/* room for italic tails (y, f) so the gradient isn't cut off */
.hero__title em .w__i { padding: 0 0.14em 0.18em 0.02em; margin: 0 -0.14em -0.18em -0.02em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }
.hero__actions--center { justify-content: center; }
.hero__stats { display: flex; flex-wrap: wrap; gap: var(--sp-6); margin: var(--sp-7) 0 0; padding-top: var(--sp-5); border-top: 1px solid var(--line); }
.hero__stats div { min-width: 120px; }
.hero__stats dt { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; color: var(--forest-900); }
.hero__stats dd { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: 0.04em; }

.hero__art { position: relative; aspect-ratio: 1; width: min(100%, 560px); justify-self: center; }
.hero__halo { position: absolute; inset: 10%; border-radius: 50%; background: radial-gradient(circle, #fff 0%, var(--cream-100) 55%, transparent 72%); }
.hero__ring { position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed rgba(14, 59, 44, 0.18); animation: spin 60s linear infinite; }
.hero__ring::after { content: ""; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-500); }
.hero__mark { position: absolute; left: 14%; top: 18%; width: 72%; height: auto; filter: drop-shadow(0 30px 40px rgba(8, 42, 31, 0.18)); }
.hero__steam { position: absolute; left: 41%; top: 10%; width: 16%; color: var(--gold-500); opacity: 0.7; }
.hero__leaf { position: absolute; display: block; filter: drop-shadow(0 10px 14px rgba(8, 42, 31, 0.18)); will-change: transform; }
.hero__leaf--1 { width: 22%; left: -2%; top: 14%; --r: -28deg; }
.hero__leaf--2 { width: 14%; right: 2%; top: 6%; --r: 32deg; }
.hero__leaf--3 { width: 18%; right: -4%; top: 58%; --r: 150deg; }
.hero__leaf--4 { width: 10%; left: 8%; bottom: 8%; --r: 200deg; }
.hero__leaf--5 { width: 9%; left: 44%; bottom: -2%; --r: 80deg; }
.hero__leaf--6 { width: 8%; left: 30%; top: 2%; --r: -60deg; }
.hero__leaf-inner { display: block; }
.hero__leaf svg { transform: rotate(var(--r)); animation: sway 7s var(--ease-in-out) infinite alternate; }
.hero__leaf--2 svg, .hero__leaf--4 svg { animation-duration: 9s; animation-delay: -2s; }
.hero__leaf--3 svg, .hero__leaf--6 svg { animation-duration: 8s; animation-delay: -4s; }

.hero__cue { position: absolute; left: 50%; bottom: var(--sp-5); transform: translateX(-50%); display: grid; justify-items: center; gap: var(--sp-2); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; }
.hero__cue span { width: 1px; height: 44px; background: linear-gradient(var(--forest-900), transparent); animation: cue 2s var(--ease-in-out) infinite; transform-origin: top; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sway { from { transform: rotate(var(--r)) translateY(0); } to { transform: rotate(calc(var(--r) + 10deg)) translateY(-10px); } }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-block: var(--sp-6) var(--sp-9); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .hero__art { order: -1; width: min(78%, 360px); }
  .hero__stats { gap: var(--sp-5); }
}

/* Marquee --------------------------------------------------------------- */
.marquee { overflow: hidden; background: var(--forest-900); color: var(--cream-100); padding-block: var(--sp-5); border-block: 1px solid var(--forest-700); }
.marquee__track { display: flex; align-items: center; gap: var(--sp-6); width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.4rem); white-space: nowrap; }
:lang(ta) .marquee__track span { font-family: var(--font-display-ta); font-style: normal; }
.marquee__leaf { width: 46px; flex: none; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Two ways to buy ------------------------------------------------------- */
.ways__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.way { position: relative; overflow: hidden; padding: clamp(2rem, 1.2rem + 3vw, 4rem); border-radius: var(--radius-lg); transform-style: preserve-3d; transition: box-shadow var(--dur) var(--ease-out); }
.way:hover { box-shadow: var(--shadow-lg); }
.way h3 { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.way p { font-size: var(--fs-md); max-width: 38ch; }
.way__label { display: inline-block; padding: 4px 14px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--sp-6); }
.way__icon { position: absolute; right: clamp(1.5rem, 1rem + 2vw, 3rem); top: clamp(1.5rem, 1rem + 2vw, 3rem); width: 84px; height: 84px; opacity: 0.9; }
.way__icon .icon { width: 100%; height: 100%; stroke-width: 1.1; }
.way--retail { background: var(--white); border: 1px solid var(--line); }
.way--retail .way__label { background: var(--gold-100); color: var(--gold-700); }
.way--retail .way__icon { color: var(--gold-500); }
.way--wholesale { background: var(--forest-900); color: var(--cream-100); }
.way--wholesale h3 { color: var(--cream-50); }
.way--wholesale .way__label { background: rgba(217, 180, 106, 0.16); color: var(--gold-300); }
.way--wholesale .way__icon { color: var(--gold-300); }
.way--wholesale .ticks li::before { border-color: var(--gold-300); }
@media (max-width: 860px) { .ways__grid { grid-template-columns: 1fr; } .way__icon { width: 56px; height: 56px; } }

/* Leaf to powder — 3D scroll story --------------------------------------
   Default (no WebGL / reduced motion / before the script runs): five cards in a grid.
   .story--3d (added by story.js when WebGL starts): pinned full-screen scene with text panels. */
.story { position: relative; background: radial-gradient(120% 90% at 70% 40%, #12402f 0%, var(--forest-950) 60%, #04140e 100%); color: var(--cream-100); overflow: hidden; }
.story__pin { position: relative; padding: clamp(4rem, 3rem + 4vw, 7rem) var(--gutter); max-width: var(--container, 1240px); margin-inline: auto; }
.story__canvas, .story__vignette, .story__rail, .story__scroll { display: none; }
.story__intro { max-width: 640px; margin-bottom: var(--sp-7); }
.story__intro h2 { color: var(--cream-50); font-size: var(--fs-2xl); margin: var(--sp-3) 0; }
.story__intro h2 em { color: var(--gold-300); }
.story__intro p { color: rgba(241, 234, 219, 0.75); font-size: var(--fs-md); max-width: 44ch; margin: 0; }
.story__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-4); }
.story__step { position: relative; padding: var(--sp-6) var(--sp-5); border-radius: var(--radius-lg); background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)); border: 1px solid rgba(241, 234, 219, 0.1); }
.story__num { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(217, 180, 106, 0.6); position: absolute; right: var(--sp-4); top: var(--sp-3); }
.story__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; margin-bottom: var(--sp-4); background: radial-gradient(circle at 35% 30%, var(--forest-500), var(--forest-900) 70%); color: var(--gold-300); }
.story__icon .icon { width: 34px; height: 34px; stroke-width: 1.4; }
.story__step h3 { color: var(--cream-50); font-size: var(--fs-lg); margin: 0 0 var(--sp-2); }
.story__step p { color: rgba(241, 234, 219, 0.72); margin: 0; font-size: var(--fs-sm); }

/* 3D mode */
.story--3d .story__pin { height: 100svh; max-width: none; padding: 0; }
.story--3d .story__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.story--3d .story__vignette { display: block; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 20, 14, 0.85) 0%, rgba(4, 20, 14, 0.35) 38%, transparent 60%),
              radial-gradient(130% 100% at 65% 50%, transparent 55%, rgba(2, 12, 8, 0.7) 100%); }
.story--3d .story__intro { position: absolute; left: var(--gutter); top: clamp(5.5rem, 4rem + 4vh, 8rem); width: min(460px, 40vw); margin: 0; z-index: 2; }
.story--3d .story__intro h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem); }
.story--3d .story__intro p { font-size: var(--fs-sm); }
.story--3d .story__steps { display: block; position: absolute; left: var(--gutter); bottom: clamp(6rem, 4rem + 8vh, 10rem); width: min(440px, 38vw); height: 15rem; z-index: 2; }
.story--3d .story__step { position: absolute; inset: auto 0 0 0; padding: 0; background: none; border: 0; opacity: 0; transform: translateY(24px); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); pointer-events: none; }
.story--3d .story__step.is-active { opacity: 1; transform: none; }
.story--3d .story__step.is-past { transform: translateY(-24px); }
.story--3d .story__num { position: static; display: block; font-size: clamp(4rem, 3rem + 4vw, 7rem); margin-bottom: var(--sp-2); }
.story--3d .story__icon { display: none; }
.story--3d .story__step h3 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
.story--3d .story__step p { font-size: var(--fs-md); max-width: 36ch; }

.story--3d .story__rail { display: flex; position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); flex-direction: column; gap: var(--sp-5); z-index: 2; padding-right: var(--sp-4); }
.story__dot { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); font-size: var(--fs-xs); letter-spacing: 0.08em; color: rgba(241, 234, 219, 0.4); transition: color 0.4s; }
.story__dot b { font-weight: 700; }
.story__dot em { font-style: normal; opacity: 0; transform: translateX(8px); transition: opacity 0.4s, transform 0.4s; white-space: nowrap; }
.story__dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; border: 1px solid currentColor; transition: background 0.4s, transform 0.4s; }
.story__dot.is-active { color: var(--gold-300); }
.story__dot.is-active::after { background: var(--gold-300); transform: scale(1.35); }
.story__dot.is-current em { opacity: 1; transform: none; }
.story__bar { position: absolute; right: 4px; top: 0; bottom: 0; width: 1px; background: rgba(241, 234, 219, 0.15); }
.story__bar::after { content: ""; position: absolute; inset: 0; background: var(--gold-300); transform: scaleY(var(--p, 0)); transform-origin: top; }

.story--3d .story__scroll { display: flex; align-items: center; gap: var(--sp-3); position: absolute; left: 50%; bottom: var(--sp-6); transform: translateX(-50%); font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase; color: rgba(241, 234, 219, 0.55); z-index: 2; transition: opacity 0.4s; }
.story__scroll span { width: 18px; height: 28px; border: 1px solid currentColor; border-radius: 10px; position: relative; }
.story__scroll span::after { content: ""; position: absolute; left: 50%; top: 6px; width: 2px; height: 6px; margin-left: -1px; border-radius: 2px; background: var(--gold-300); animation: story-wheel 1.6s var(--ease-in-out) infinite; }
@keyframes story-wheel { 60% { transform: translateY(8px); opacity: 0; } }
.story--3d.is-moving .story__scroll { opacity: 0; }

/* Tamil words are longer: smaller headings so the title and the step text never meet */
html[lang="ta"] .story--3d .story__intro { width: min(520px, 42vw); }
html[lang="ta"] .story--3d .story__intro h2 { font-size: clamp(1.3rem, 0.9rem + 1vw, 1.8rem); line-height: 1.35; }
html[lang="ta"] .story--3d .story__step h3 { font-size: clamp(1.3rem, 1rem + 0.9vw, 1.8rem); }
html[lang="ta"] .story--3d .story__step p { font-size: var(--fs-sm); }
html[lang="ta"] .story--3d .story__num { font-size: clamp(3rem, 2.4rem + 2.4vw, 5rem); }
html[lang="ta"] .story__dot em { font-size: 0.7rem; }
@media (max-height: 760px) { .story--3d .story__intro p { display: none; } }

/* Phones & tablets in 3D mode: scene on top, text at the bottom over a dark fade */
@media (max-width: 860px) {
  .story--3d .story__vignette { background: linear-gradient(180deg, rgba(4, 20, 14, 0.75) 0%, transparent 28%, transparent 48%, rgba(4, 20, 14, 0.95) 78%); }
  .story--3d .story__intro { top: 4.5rem; width: auto; right: var(--gutter); }
  .story--3d .story__intro p { display: none; }
  .story--3d .story__intro h2 { font-size: 1.5rem; }
  html[lang="ta"] .story--3d .story__intro h2 { font-size: 1.15rem; }
  html[lang="ta"] .story--3d .story__step h3 { font-size: 1.2rem; }
  .story--3d .story__steps { width: auto; right: var(--gutter); bottom: 4.5rem; height: 12rem; }
  .story--3d .story__num { font-size: 3rem; }
  .story--3d .story__step h3 { font-size: 1.5rem; }
  .story--3d .story__step p { font-size: var(--fs-sm); }
  .story--3d .story__rail { top: auto; bottom: 1.6rem; right: auto; left: var(--gutter); transform: none; flex-direction: row; gap: var(--sp-3); padding: 0; }
  .story__dot em, .story__dot b { display: none; }
  .story__bar { display: none; }
  .story--3d .story__scroll { left: auto; right: var(--gutter); transform: none; bottom: 1.3rem; }
}

/* Colours of the cup ---------------------------------------------------- */
.cups__hint { display: block; margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--gold-700); }
.cups__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-7) var(--sp-5); }
.cup { display: grid; justify-items: center; gap: var(--sp-3); text-decoration: none; text-align: center; }
.cup__saucer { position: relative; display: grid; place-items: center; width: min(100%, 190px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, var(--cream-200) 70%); box-shadow: 0 24px 40px -24px rgba(8, 42, 31, 0.4), inset 0 -4px 10px rgba(8, 42, 31, 0.06); transition: transform var(--dur-slow) var(--ease-out); }
.cup__body { position: relative; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #efe7d6 75%); box-shadow: 0 6px 14px rgba(8, 42, 31, 0.15); display: grid; place-items: center; }
.cup__tea { width: 82%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 38% 32%, var(--tea-rim), var(--tea) 60%); box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.35); position: relative; overflow: hidden; transition: background 1.2s var(--ease-out); }
.cup__tea::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse 35% 20% at 35% 28%, rgba(255, 255, 255, 0.55), transparent 70%); }
.cup__tea::before { content: ""; position: absolute; inset: 20%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.22); transform: scale(0.4); opacity: 0; }
.cup__handle { position: absolute; right: 2%; top: 50%; width: 18%; height: 9%; border-radius: 0 40px 40px 0; background: linear-gradient(#fff, #e9dfcb); transform: translateY(-50%); box-shadow: 0 4px 8px rgba(8, 42, 31, 0.12); }
.cup__name { font-family: var(--font-display); font-size: var(--fs-md); color: var(--forest-900); font-weight: 600; }
:lang(ta) .cup__name { font-family: var(--font-body-ta); }
.cup__note { font-size: var(--fs-xs); color: var(--text-muted); margin-top: calc(var(--sp-2) * -1); }
.cup:hover .cup__saucer { transform: translateY(-8px) rotate(-12deg); }
.cup:hover .cup__tea::before { animation: ripple 1.4s var(--ease-out) infinite; }
.cup[data-color-change]:hover .cup__tea { background: radial-gradient(circle at 38% 32%, #b06bd0, var(--tea-alt) 60%); }
@keyframes ripple { from { transform: scale(0.3); opacity: 0.9; } to { transform: scale(1.4); opacity: 0; } }
@media (max-width: 860px) { .cups__grid { grid-template-columns: repeat(2, 1fr); } }

/* Brewing teaser -------------------------------------------------------- */
.brew-teaser { background: var(--cream-100); }
.brew-teaser__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-8); align-items: center; }
.brew-teaser h2 { font-size: var(--fs-2xl); }
.brew-card { background: var(--forest-900); color: var(--cream-100); border-radius: var(--radius-lg); padding: var(--sp-6); box-shadow: var(--shadow-lg); transform: rotate(2deg); }
.brew-card__head { display: flex; align-items: center; gap: var(--sp-3); padding-bottom: var(--sp-4); border-bottom: 1px solid rgba(241, 234, 219, 0.15); color: var(--gold-300); font-size: var(--fs-sm); }
.brew-card__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); margin: var(--sp-5) 0 0; }
.brew-card dt { font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(241, 234, 219, 0.6); }
.brew-card dd { margin: 0; font-family: var(--font-display); font-size: var(--fs-xl); color: var(--cream-50); }
@media (max-width: 860px) { .brew-teaser__grid { grid-template-columns: 1fr; } .brew-card { transform: none; } }

/* Wholesale band -------------------------------------------------------- */
.trade { background: linear-gradient(120deg, var(--forest-900), var(--forest-700)); color: var(--cream-100); padding-block: var(--sp-9); position: relative; overflow: hidden; }
.trade::after { content: ""; position: absolute; right: -10%; top: -40%; width: 50%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(201, 155, 64, 0.28), transparent 65%); pointer-events: none; }
.trade__inner { position: relative; display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--sp-7); align-items: end; }
.trade h2 { color: var(--cream-50); font-size: var(--fs-2xl); }
.trade h2 em { color: var(--gold-300); }
.trade p { color: rgba(241, 234, 219, 0.8); font-size: var(--fs-md); max-width: 52ch; margin: 0; }
.trade__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: flex-end; }
@media (max-width: 860px) { .trade__inner { grid-template-columns: 1fr; } .trade__actions { justify-content: flex-start; } }

/* Certificates strip */
.cert-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-6); margin-top: var(--sp-7); padding-top: var(--sp-6); border-top: 1px solid var(--line); }
.cert-strip__label { font-size: var(--fs-xs); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.cert-strip img { height: 56px; width: auto; filter: grayscale(1); opacity: 0.75; transition: filter var(--dur), opacity var(--dur); }
.cert-strip a:hover img { filter: none; opacity: 1; }

/* Reviews --------------------------------------------------------------- */
.reviews__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sp-5); }
.review { margin: 0; padding: var(--sp-6); border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); }
.review__stars { color: var(--gold-500); letter-spacing: 0.15em; margin-bottom: var(--sp-4); }
.review blockquote { margin: 0 0 var(--sp-5); font-family: var(--font-display); font-size: var(--fs-md); line-height: 1.5; color: var(--forest-900); }
:lang(ta) .review blockquote { font-family: var(--font-body-ta); }
.review figcaption { font-size: var(--fs-sm); color: var(--text-muted); }

/* FAQ preview */
.faq-preview__grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: var(--sp-8); align-items: start; }
.faq-preview h2 { margin-bottom: var(--sp-5); }
@media (max-width: 860px) { .faq-preview__grid { grid-template-columns: 1fr; gap: var(--sp-5); } }

/* Final CTA ------------------------------------------------------------- */
.final-cta { position: relative; overflow: hidden; padding-block: var(--sp-10); text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 100%, var(--cream-200), var(--cream-50) 70%); }
.final-cta__inner { position: relative; z-index: 1; }
.final-cta h2 { font-size: var(--fs-3xl); max-width: 14ch; margin-inline: auto; }
:lang(ta) .final-cta h2 { font-size: var(--fs-2xl); max-width: 20ch; }
.final-cta p { font-size: var(--fs-md); color: var(--text-muted); }
.final-cta__leaf { position: absolute; width: 220px; pointer-events: none; }
.final-cta__leaf--a { left: -40px; top: 20%; transform: rotate(-30deg); }
.final-cta__leaf--b { right: -30px; bottom: 10%; transform: rotate(150deg); width: 180px; }
@media (max-width: 700px) { .final-cta__leaf { width: 120px; opacity: 0.5; } }

@media (hover: none) { .cups__hint { display: none; } }
