/* =========================================================
   Mayan Blossom — Landing
   Palette: "Selva Maya"  (jungle green + honey amber + bone)
   Accent lock: amber is the ONLY accent. Green is the dark anchor/neutral.
   Shape lock: buttons = pill, frames/cards = 14px, product = hexagon clip.
   Type: Cormorant Garamond (display) + Hanken Grotesk (body)
   ========================================================= */

:root {
  --green-900: #15291e;
  --green-800: #1e3a2b;
  --green-700: #2a4d39;
  --amber:     #e0a12e;
  --amber-deep:#c77e1a;
  --bone:      #f4efe6;
  --bone-2:    #ece3d3;
  --ink:       #1a1510;
  --ink-soft:  #4a4136;
  --cream:     #f7f2e9;

  --maxw: 1280px;
  --r-card: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --nav-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

/* overflow-x: clip prevents the decorative jungle/hexagons from creating a
   horizontal scrollbar on mobile, WITHOUT breaking position: sticky (unlike hidden) */
html, body { overflow-x: clip; max-width: 100%; }

body {
  background: var(--bone);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

.display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-deep);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: transparent;
  --fg: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  background: var(--bg);
  color: var(--fg);
  border: 1.5px solid var(--ink);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  cursor: pointer;
}
.btn--amazon { --bg: var(--ink); --fg: var(--cream); border-color: var(--ink); }
.btn--solid  { --bg: var(--amber); --fg: var(--green-900); border-color: var(--amber); box-shadow: 0 12px 30px -12px rgba(199,126,26,0.7); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1rem; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(26,21,16,0.5); }
.btn--solid:hover { box-shadow: 0 16px 38px -12px rgba(199,126,26,0.85); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(244,239,230,0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(26,21,16,0.08);
  transition: box-shadow 0.4s var(--ease), background 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(244,239,230,0.9);
  box-shadow: 0 10px 34px -20px rgba(26,21,16,0.5);
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
}
/* Brand wordmark: slab serif to echo the jar logo */
.brand-logo {
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav__brand.brand-logo { font-size: 1.22rem; }
.nav__brand-mark {
  width: 16px; height: 18px; background: var(--amber);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.nav__right { display: flex; align-items: center; gap: clamp(0.6rem, 2vw, 1.2rem); }
/* segmented language switch: active option highlighted in amber so it stands out */
.lang {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(26,21,16,0.06);
  border: 1px solid rgba(26,21,16,0.14);
  border-radius: 999px; padding: 3px; cursor: pointer;
  font-family: inherit;
}
.lang__opt {
  padding: 4px 11px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--ink-soft);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.lang__opt.is-active {
  background: var(--amber); color: var(--green-900);
  box-shadow: 0 2px 8px -3px rgba(199,126,26,0.8);
}
.lang__sep { display: none; }
.nav .btn--amazon { padding: 0.6rem 1.1rem; font-size: 0.85rem; }

/* ---------- Honey pour progress line ---------- */
.pour {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0; width: 3px; z-index: 40;
  background: rgba(26,21,16,0.06);
  pointer-events: none;
}
.pour__fill {
  display: block; width: 100%; height: 100%;
  transform: scaleY(0); transform-origin: top;
  background: linear-gradient(var(--amber), var(--amber-deep));
}

/* ---------- Section rhythm ---------- */
section { position: relative; }
.story, .attrs, .benefits, .gallery, .cta {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5rem, 12vw, 9rem) clamp(1.25rem, 5vw, 3rem);
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2rem) clamp(1.25rem, 5vw, 3rem) 4rem;
}
.hero__copy { max-width: 32rem; }
.hero__title { font-size: clamp(2.6rem, 5vw, 4.2rem); margin-bottom: 1.4rem; }
.hero__sub { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2.2rem; max-width: 32ch; }
.hero__media { position: relative; }
.hero__frame {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 40px 80px -40px rgba(26,21,16,0.55);
  will-change: transform;
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }

/* floating hexagons */
.hex {
  position: absolute; display: block;
  background: var(--amber);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  will-change: transform;
}
.hex--a { width: 64px; height: 72px; top: -28px; left: -28px; opacity: 0.9; }
.hex--b { width: 36px; height: 40px; bottom: 18%; left: -22px; background: var(--green-700); opacity: 0.85; }
.hex--c { width: 90px; height: 100px; bottom: -36px; right: -30px; background: rgba(224,161,46,0.25); }

/* ---------- HOOK band (full-bleed cinematic) ---------- */
.band { position: relative; width: 100%; height: clamp(60vh, 78vh, 760px); overflow: hidden; }
.band__img {
  width: 100%; height: 128%; object-fit: cover; will-change: transform;
  transform: translateZ(0); backface-visibility: hidden;
  filter: saturate(1.06) contrast(1.03);
}
/* vignette adds depth and softens compression at the edges of upscaled photos */
.band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(125% 100% at 50% 45%, transparent 52%, rgba(21,41,30,0.32) 100%);
}

/* ---------- STORY ---------- */
.story__head { max-width: 34rem; margin-bottom: 2.5rem; }
.story__head h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
.story__body {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 70ch; margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.story__body p { color: var(--ink-soft); }
.story__media {
  border-radius: var(--r-card); overflow: hidden;
  box-shadow: 0 40px 80px -45px rgba(26,21,16,0.5);
}
.story__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ambient jungle decor at the sides of the story; tonal so it blends in */
.story > .story__head,
.story > .story__body,
.story > .story__media { position: relative; z-index: 1; }
.jungle { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.jleaf {
  position: absolute; color: var(--green-800); opacity: 0.14;
  mix-blend-mode: multiply; will-change: transform; line-height: 1;
}
.jleaf--l1 { top: 6%;  left: -2.5vw; font-size: clamp(80px, 12vw, 170px); }
.jleaf--l2 { top: 40%; left: -3.5vw; font-size: clamp(70px, 10vw, 150px); opacity: 0.1; }
.jleaf--l3 { top: 73%; left: 0.5vw;  font-size: clamp(50px, 7vw, 110px); opacity: 0.17; }
.jleaf--r1 { top: 12%; right: -2.5vw; font-size: clamp(70px, 10vw, 150px); opacity: 0.1; }
.jleaf--r2 { top: 44%; right: -3.5vw; font-size: clamp(90px, 13vw, 190px); }
.jleaf--r3 { top: 79%; right: -0.5vw; font-size: clamp(55px, 8vw, 120px); opacity: 0.12; }

/* ---------- BENEFITS (health) ---------- */
.benefits {
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.benefits__head { position: sticky; top: calc(var(--nav-h) + 2.5rem); }
.benefits__head h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin: 0.4rem 0 1rem; }
.benefits__intro { color: var(--ink-soft); max-width: 34ch; }
.benefits__list { list-style: none; }
.benefit {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start;
  padding: 1.75rem 0; border-top: 1px solid rgba(26,21,16,0.12);
}
.benefit:last-child { border-bottom: 1px solid rgba(26,21,16,0.12); }
.benefit i { font-size: 1.8rem; color: var(--amber-deep); margin-top: 0.15rem; }
.benefit h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.5rem; line-height: 1.1; margin-bottom: 0.3rem; }
.benefit p { color: var(--ink-soft); font-size: 0.98rem; max-width: 48ch; }

/* ---------- COMPANY (Alimentos MX) — full-width tonal band ---------- */
.company {
  background: var(--bone-2);
  padding: clamp(4.5rem, 11vw, 8rem) clamp(1.25rem, 5vw, 3rem);
  text-align: center;
}
.company__inner { max-width: 46rem; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.company__logo { width: clamp(150px, 22vw, 210px); height: auto; margin-bottom: 1.8rem; }
.company h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); margin-bottom: 1rem; }
.company p { color: var(--ink-soft); max-width: 52ch; margin: 0 auto 2rem; }

/* ---------- ATTRIBUTES (honeycomb bento) ---------- */
.attrs__title { font-size: clamp(2rem, 4vw, 3.2rem); text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.comb {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.comb__cell {
  background: var(--bone-2);
  border-radius: var(--r-card);
  padding: 2rem 1.5rem 2.2rem;
  text-align: left;
  border: 1px solid rgba(26,21,16,0.06);
}
.comb__cell:nth-child(2) { background: var(--green-800); color: var(--cream); }
.comb__cell:nth-child(3) { background: var(--amber); color: var(--green-900); }
.comb__cell i { font-size: 2rem; color: var(--amber-deep); margin-bottom: 1rem; display: block; }
.comb__cell:nth-child(2) i { color: var(--amber); }
.comb__cell:nth-child(3) i { color: var(--green-900); }
.comb__cell h3 { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.55rem; margin-bottom: 0.4rem; line-height: 1.1; }
.comb__cell p { font-size: 0.95rem; opacity: 0.85; }

/* ---------- TASTE (immersive, dark) ---------- */
.taste { position: relative; min-height: 100dvh; overflow: hidden; display: grid; place-items: center; }
.taste__bg { position: absolute; inset: 0; }
.taste__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,41,30,0.5) 0%, rgba(21,41,30,0.82) 100%);
}
.taste__bg img {
  width: 100%; height: 100%; object-fit: cover; will-change: transform;
  transform: translateZ(0); backface-visibility: hidden;
  filter: saturate(1.06) contrast(1.04);
}
.taste__inner {
  position: relative; z-index: 2; text-align: center; color: var(--cream);
  max-width: 56rem; padding: 2rem 1.5rem;
}
.taste__inner h2 { font-size: clamp(2.6rem, 6vw, 5rem); margin-bottom: 1.4rem; }
.taste__inner p { font-size: 1.2rem; color: rgba(247,242,233,0.85); max-width: 38ch; margin: 0 auto; }

/* ---------- GALLERY (masonry) ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px; gap: 1rem;
}
.gallery__item { overflow: hidden; border-radius: var(--r-card); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }

/* ---------- FINAL CTA ---------- */
.cta__inner {
  background: var(--green-800);
  border-radius: 28px;
  overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}
.cta__copy { padding: clamp(2.5rem, 6vw, 4.5rem); color: var(--cream); }
.cta__copy h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); margin-bottom: 1rem; }
.cta__copy p { color: rgba(247,242,233,0.8); margin-bottom: 2rem; max-width: 34ch; }
.cta__jar { align-self: stretch; position: relative; min-height: 320px; background: radial-gradient(circle at 50% 40%, var(--green-700), var(--green-900)); }
.cta__jar img {
  position: absolute; inset: 0; margin: auto;
  width: 82%; max-width: 300px; height: auto;
  clip-path: polygon(50% 2%, 95% 26%, 95% 74%, 50% 98%, 5% 74%, 5% 26%);
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.45));
}

/* ---------- FOOTER ---------- */
.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem) 3.5rem;
  display: flex; flex-direction: column; gap: 1.4rem;
  border-top: 1px solid rgba(26,21,16,0.1);
}
.footer__row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem; width: 100%;
}
.footer__brand { font-size: 1.3rem; }
.footer__meta { font-size: 0.85rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.footer__credit { font-size: 0.82rem; letter-spacing: 0.03em; color: var(--ink-soft); }
.footer__credit a {
  color: var(--amber-deep); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px;
  transition: color 0.2s var(--ease);
}
.footer__credit a:hover { color: var(--ink); }

/* =========================================================
   Film grain overlay (elegant texture + masks photo compression)
   ========================================================= */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* =========================================================
   Reveal states (driven by JS / ScrollTrigger)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); }
.is-in .reveal, .reveal.is-in { opacity: 1; transform: none; }

/* word-mask reveal (hero + section headings) */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.w-in { display: inline-block; will-change: transform; }

/* clip reveal for framed images */
.clip-reveal { overflow: hidden; }
.clip-reveal img { will-change: transform; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(var(--nav-h) + 2.5rem); gap: 3rem; }
  .hero__copy { max-width: 100%; }
  .hero__media { max-width: 460px; }
  .comb { grid-template-columns: repeat(2, 1fr); }
  .cta__inner { grid-template-columns: 1fr; }
  .cta__jar { min-height: 360px; }
}

@media (max-width: 680px) {
  body { font-size: 1rem; }
  .nav__brand { font-size: 1.2rem; }
  .nav .btn--amazon { display: none; } /* keep nav on one line; CTA lives in hero + footer */
  .story__body { grid-template-columns: 1fr; }
  /* single clean column on mobile: no empty cells, each photo well proportioned */
  .gallery { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 0.85rem; }
  .gallery__item { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
  .gallery__item--tall { aspect-ratio: 3 / 4; }
  .footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .comb { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .benefits { grid-template-columns: 1fr; gap: 2.5rem; }
  .benefits__head { position: static; }
}
@media (max-width: 768px) {
  /* lighten the jungle and drop a few leaves so mobile text stays clean */
  .jleaf { opacity: 0.08; }
  .jleaf--l2, .jleaf--r1, .jleaf--l3 { display: none; }
}

/* =========================================================
   Reduced motion: collapse everything to static
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
  * { scroll-behavior: auto !important; }
}
