/* ════════════════════════════════════════════════════════════════
   MamaDao Tea · Shared core styles
   Loaded by both index.php and funnel.php
   ════════════════════════════════════════════════════════════════ */

:root {
  --ivory:        #F9F5EE;
  --off-white:    #EDE8DF;
  --gold:         #C9A84C;
  --gold-soft:    #D9BD78;
  --gold-deep:    #A88830;
  --charcoal:     #2E2E2E;
  --charcoal-mid: #4A4A47;
  --charcoal-soft:#6B6863;
  --sage:         #D4DBC8;
  --sage-deep:    #A8B49A;
  --line:         rgba(46, 46, 46, 0.12);

  --serif:    'Cormorant Garamond', 'Noto Serif SC', Georgia, serif;
  --sans:     'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --cjk:      'Noto Serif SC', 'Cormorant Garamond', serif;

  --space-1: 0.5rem; --space-2: 1rem;  --space-3: 1.5rem;
  --space-4: 2rem;   --space-5: 3rem;  --space-6: 4rem;
  --space-7: 6rem;   --space-8: 8rem;  --space-9: 12rem;

  --ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 220ms;
  --t-med:  420ms;
  --t-slow: 700ms;

  --container: 1280px;
  --container-narrow: 960px;
}
[data-lang="zh"] { --serif: 'Noto Serif SC', 'Cormorant Garamond', Georgia, serif; }

/* ── Reset + base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }
::selection { background: var(--gold); color: var(--ivory); }

/* ── Typography ─────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--gold);
}
.eyebrow--centered { justify-content: center; }
.eyebrow--centered::after {
  content: ""; width: 28px; height: 1px; background: var(--gold);
}
.eyebrow--on-dark { color: var(--gold); }
.eyebrow--on-dark::before, .eyebrow--on-dark::after { background: var(--gold); }

.display {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--charcoal);
}
.display--xl { font-size: clamp(2.5rem, 6.5vw, 5rem); }
.display--lg { font-size: clamp(2rem, 5vw, 3.75rem); }
.display--md { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
.display em { font-style: italic; color: var(--gold-deep); font-weight: 400; }
.display--on-dark { color: var(--ivory); }
.display--on-dark em { color: var(--gold); }

.lede {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.75;
  color: var(--charcoal-mid);
  max-width: 56ch;
}
.small-caps {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 400;
}

/* ── Layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-3);
}
.container--narrow { max-width: var(--container-narrow); }
section { position: relative; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: all var(--t-med) var(--ease);
  cursor: pointer;
  position: relative;
}
.btn__arrow { display: inline-block; transition: transform var(--t-med) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(6px); }
.btn--primary {
  background: var(--charcoal); color: var(--ivory); border: 1px solid var(--charcoal);
}
.btn--primary:hover { background: var(--gold-deep); border-color: var(--gold-deep); }
.btn--gold {
  background: var(--gold); color: var(--charcoal); border: 1px solid var(--gold);
}
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.btn--ghost {
  background: transparent; color: var(--charcoal); border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn--large { padding: 1.2rem 2.4rem; font-size: 0.82rem; }
.btn--link {
  padding: 0; background: none; color: var(--charcoal);
  border-bottom: 1px solid var(--line); padding-bottom: 0.4rem;
  letter-spacing: 0.2em;
  transition: border-color var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.btn--link:hover { border-color: var(--gold); color: var(--gold-deep); }

/* ── Brand mark ─────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: 0.05em;
}
.brand__enso { width: 36px; height: 36px; flex-shrink: 0; }
.brand__mark { font-size: 1.05rem; color: var(--charcoal); line-height: 1; }
.brand__mark .cjk { font-family: var(--cjk); font-weight: 500; margin-left: 0.1em; }
.brand--large .brand__enso { width: 64px; height: 64px; }
.brand--large .brand__mark { font-size: 1.5rem; letter-spacing: 0.08em; }
.brand--on-dark .brand__enso path { stroke: var(--ivory); }
.brand--on-dark .brand__mark { color: var(--ivory); }

/* New brand logo (PNG containing both enso + MAMA道 wordmark) */
.brand__logo {
  display: block;
  height: 44px;
  width: auto;
  flex-shrink: 0;
  transition: opacity var(--t-med) var(--ease);
}
.brand--large .brand__logo { height: 88px; }
.brand--on-dark .brand__logo,
.brand__logo--inverted {
  filter: invert(1) brightness(1.05);
}

/* ── Language switch ────────────────────────────────────────────── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--charcoal-soft);
}
.lang-switch button {
  padding: 0.3rem 0.55rem;
  transition: color var(--t-med) var(--ease);
  font-weight: 400;
}
.lang-switch button.is-active { color: var(--gold-deep); font-weight: 500; }
.lang-switch .divider { color: var(--line); margin: 0 0.1rem; }
.lang-switch .cjk { font-family: var(--cjk); }
.lang-switch--on-dark button { color: rgba(255,255,255,0.6); }
.lang-switch--on-dark button.is-active { color: var(--gold); }
.lang-switch--on-dark .divider { color: rgba(255,255,255,0.2); }

/* ── Card banner (shared product card top) ──────────────────────── */
.card-banner {
  position: relative;
  aspect-ratio: 4 / 1;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.14),
    inset 0 -8px 16px -10px rgba(0, 0, 0, 0.32);
}
.card-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg, transparent 0, rgba(255,255,255,0.025) 1px, transparent 2px, transparent 5px);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.card-banner__char {
  font-family: var(--cjk);
  font-weight: 400;
  font-size: clamp(2.25rem, 5.5vw, 3.4rem);
  line-height: 1;
  position: relative;
  z-index: 2;
}
.card-banner__seal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  text-align: right;
  position: relative;
  z-index: 2;
}
.card-banner__mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.18em;
  line-height: 1;
}
.card-banner__mark .cjk { font-family: var(--cjk); margin-left: 0.1em; }
.card-banner__sub {
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.78;
}
.card-banner--ripe { background: linear-gradient(135deg, #B08538 0%, #6F4E1C 55%, #4A341A 100%); }
.card-banner--ripe .card-banner__char,
.card-banner--ripe .card-banner__seal { color: #F5E2B0; }
.card-banner--white { background: linear-gradient(135deg, #F5F1E3 0%, #DCD6C2 55%, #B5AE96 100%); }
.card-banner--white .card-banner__char,
.card-banner--white .card-banner__seal { color: #5A5444; }
.card-banner--raw { background: linear-gradient(135deg, #C8CEA8 0%, #93A172 55%, #5E6E40 100%); }
.card-banner--raw .card-banner__char,
.card-banner--raw .card-banner__seal { color: #F4F0DE; }
.card-banner--mandarin { background: linear-gradient(135deg, #94A856 0%, #5C6F2A 55%, #3D4A18 100%); }
.card-banner--mandarin .card-banner__char,
.card-banner--mandarin .card-banner__seal { color: #F2EBC0; }

/* ── Card image window (1:1) ────────────────────────────────────── */
.card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--off-white);
}
.card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
  z-index: 2;
}
.product-card:hover .card-image img { transform: scale(1.04); }
.card-image__placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sage-deep);
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(168, 180, 154, 0.08) 14px 15px);
}
.card-image__placeholder svg { width: 32%; height: 32%; max-width: 110px; opacity: 0.5; }

/* ── Product card body ──────────────────────────────────────────── */
.product-card {
  background: var(--off-white);
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
  position: relative;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -25px rgba(46, 46, 46, 0.18);
}
.product-card__media { position: relative; background: var(--off-white); }
/* Badge overlay removed by request · info is conveyed by CJK char + MAMA道 + sub-label */
.product-card__badge { display: none !important; }
.product-card__body {
  padding: var(--space-3) var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.product-card__title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.product-card__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--charcoal);
}
.product-card__title-zh {
  font-family: var(--cjk);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}
[data-lang="zh"] .product-card__title-zh { display: none; }
.product-card__price {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--gold-deep);
  white-space: nowrap;
}
.product-card__desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--charcoal-mid);
}
.product-card__cta { margin-top: 0.4rem; align-self: flex-start; font-size: 0.7rem; }

/* ── Animations ─────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scrollCue {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(180%); }
}
@keyframes revealSection {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.4); }
  60%  { transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 100ms; }
.reveal[data-delay="2"] { transition-delay: 220ms; }
.reveal[data-delay="3"] { transition-delay: 340ms; }
.reveal[data-delay="4"] { transition-delay: 460ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

[data-en], [data-zh] { transition: opacity 0.25s ease; }

/* ── Responsive base ────────────────────────────────────────────── */
@media (min-width: 640px) {
  .container { padding: 0 var(--space-4); }
}
@media (min-width: 1024px) {
  .container { padding: 0 var(--space-5); }
}

/* Editorial composition support */
.editorial-page {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.hero__editor-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .38;
  mix-blend-mode: multiply;
}
.step__media,
.pillar__media {
  width: 76px;
  height: 76px;
  margin: 0 auto 1.25rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
}
.step__media img,
.pillar__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.step__media .step__icon,
.pillar__media .pillar__icon {
  width: 64px;
  height: 64px;
}
.testimonial__media,
.featured-voice__media {
  width: 58px;
  height: 58px;
  margin: 0 auto 1.15rem;
  overflow: hidden;
  border-radius: 50%;
}
.testimonial__media:empty,
.featured-voice__media:empty {
  display: none;
}
.testimonial__media img,
.featured-voice__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.choice-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 2px;
}
.choice-card__media:empty { display: none; }
.choice-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bundle-card__media {
  width: calc(100% + 2px);
  aspect-ratio: 16 / 8;
  margin: -1px -1px 1.35rem;
  overflow: hidden;
}
.bundle-card__media:empty { display: none; }
.bundle-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* Editorial quotation styling keeps punctuation outside editable content. */
.origin__quote::before,
.testimonial__quote::before,
.featured-voice__quote::before { content: "“"; }
.origin__quote::after,
.testimonial__quote::after,
.featured-voice__quote::after { content: "”"; }

/* ═══════════════════════════════════════════════════════════════════
   v3 · Product types, galleries, embeds, custom sections
   ═══════════════════════════════════════════════════════════════════ */

/* Bundle retail price, struck through before the sale price */
.product-card__retail {
  margin-right: .5rem;
  color: var(--muted, #8a8577);
  font-size: .82em;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Coming-soon treatment */
.product-card__ribbon {
  position: absolute; top: 12px; left: 12px; z-index: 6;
  padding: .3rem .7rem; border-radius: 999px;
  background: rgba(38, 55, 42, .92); color: #f2efe6;
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
}
.product-card__soon {
  display: inline-block; padding: .55rem 0;
  color: var(--muted, #8a8577);
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
}

/* ── Custom sections shared shell ─────────────────────────────────── */
.custom-section { padding: clamp(3rem, 8vw, 6rem) 0; }
.custom-section.bg-tea    { background: var(--tea-bg, #e9efe6); }
.custom-section.bg-dark   { background: #1f261f; color: #eef1e9; }
.custom-section.bg-ivory  { background: #f7f4ec; }
.custom-section__heading {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem); text-align: center; margin: 0 0 2rem;
}
.custom-section__body { max-width: 62ch; margin: 0 auto; line-height: 1.75; }
.custom-section__body.prose p { margin: 0 0 1rem; }
.custom-section__hint {
  max-width: 62ch; margin: 1rem auto 0; padding: .75rem 1rem;
  border: 1px dashed rgba(38,55,42,.4); border-radius: 8px;
  color: var(--muted, #8a8577); font-size: .85rem; text-align: center;
}

/* ── Image + text ─────────────────────────────────────────────────── */
.image-text {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 820px) {
  .image-text { grid-template-columns: 1fr 1fr; }
  .image-text--right .image-text__media { order: 2; }
}
.image-text__media { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: #e7e3d8; }
.image-text__media img { width: 100%; height: 100%; object-fit: cover; }
.image-text__copy { line-height: 1.75; }
.image-text__copy p { margin: 0 0 1rem; }

/* ── Gallery grid ─────────────────────────────────────────────────── */
.gallery-grid {
  display: grid; gap: 1rem; margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.gallery-grid__item { margin: 0; border-radius: 10px; overflow: hidden; background: #e7e3d8; }
.gallery-grid__item img { width: 100%; height: 220px; object-fit: cover; display: block; }
.gallery-grid__item figcaption {
  padding: .55rem .75rem; font-size: .82rem; color: var(--muted, #6a6d62);
}

/* ── Feature grid ─────────────────────────────────────────────────── */
.feature-grid {
  display: grid; gap: 1.5rem; margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.feature-grid--2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width: 720px; margin-inline: auto; }
.feature-grid__item { text-align: center; padding: 1.25rem; }
.feature-grid__glyph {
  font-size: 2rem; margin-bottom: .75rem;
  font-family: var(--font-display, serif); color: var(--accent, #4f7658);
}
.feature-grid__title { font-size: 1.1rem; margin: 0 0 .4rem; }
.feature-grid__text { font-size: .9rem; color: var(--muted, #6a6d62); line-height: 1.6; margin: 0; }

/* ── Quote ────────────────────────────────────────────────────────── */
.custom-quote { max-width: 46ch; margin: 0 auto; text-align: center; }
.custom-quote__body {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.5; font-style: italic; margin: 0 0 1rem;
}
.custom-quote__cite { font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #8a8577); font-style: normal; }

/* ── Embeds ───────────────────────────────────────────────────────── */
.embed-frame { position: relative; width: 100%; max-width: 820px; margin: 1.5rem auto 0; border-radius: 12px; overflow: hidden; background: #000; }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-card {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  max-width: 420px; margin: 1.5rem auto 0; padding: 1.5rem; border-radius: 12px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d 55%, #fcb045);
  color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .04em;
}
.embed-card__label { font-size: .95rem; }

/* v3b · Bundle strip quantity */
.bundle-strip__qty {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.6rem; height: 1.6rem; margin-right: .5rem; padding: 0 .35rem;
  border-radius: 999px; background: rgba(38,55,42,.1);
  font-size: .8rem; font-weight: 600; color: var(--charcoal, #2b2f27);
}
