/* ===== Yerba Matters v2 — colourful, sticker-rich, iPhone-first ===== */

:root {
  --green: #0B6E35;
  --green-deep: #074521;
  --green-pale: #C8DCC1;
  --cream: #EFDFAC;
  --cream-light: #F7EBC8;
  --cream-deep: #E5CF8B;
  --paper: #FBF5E2;
  --amber: #D09F4B;
  --amber-deep: #A87A2D;
  --burgundy: #83364B;
  --burgundy-deep: #5C1F30;
  --ink: #161410;
  --ink-soft: #4A4439;
  --line: rgba(11, 110, 53, 0.18);
  --shadow: 0 18px 44px -22px rgba(11, 110, 53, 0.45);
  --shadow-card: 0 22px 50px -28px rgba(11, 69, 33, 0.50);
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --container: 1280px;
  --section: clamp(80px, 11vw, 160px);
  --display-font: 'Fraunces', 'Georgia', serif;
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--green); color: var(--cream); }

/* ===== Typography ===== */
.display, .display-2, .display-3 {
  font-family: var(--display-font);
  font-weight: 700;
  font-variation-settings: 'opsz' 120, 'SOFT' 50;
  letter-spacing: -0.022em;
  line-height: 1.02;
  margin: 0;
}
.display   { font-size: clamp(2.6rem, 10vw, 6rem); }
.display-2 { font-size: clamp(2.1rem, 6.5vw, 4rem); line-height: 1.05; }
.display-3 { font-size: clamp(2.8rem, 12vw, 7rem); }
.display em, .display-2 em, .display-3 em { font-style: italic; font-weight: 600; }

.section-title {
  font-family: var(--display-font);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 48px;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--green);
}
.section-title--light { color: var(--cream); }

.kicker {
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 14px;
}
.kicker--center { text-align: center; }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 36ch;
  margin: 0;
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 32px);
  background: rgba(251, 245, 226, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display-font); font-weight: 700; font-size: 1.1rem;
  color: var(--green);
  letter-spacing: -0.01em;
}
.nav__brand img { width: 38px; height: 38px; border-radius: 50%; }
.nav__links {
  display: flex; gap: clamp(14px, 3vw, 28px); justify-self: center;
  font-size: 0.92rem; color: var(--ink-soft); font-weight: 500;
}
.nav__links a { position: relative; padding: 6px 2px; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--green);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s cubic-bezier(.6,.05,.1,1);
}
.nav__links a:hover { color: var(--green); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px;
  background: var(--green); color: var(--cream);
  border-radius: 999px;
  font-size: 0.85rem; font-weight: 600;
  transition: background .2s, transform .25s;
}
.nav__cta:hover { background: var(--green-deep); transform: translateY(-1px); }
@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav { grid-template-columns: auto 1fr auto; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  transition: transform .35s cubic-bezier(.4,.0,.1,1), background .25s, color .25s, border-color .25s;
  cursor: pointer;
}
.btn--primary { background: var(--green); color: var(--cream); border-color: var(--green); }
.btn--primary:hover { background: var(--green-deep); border-color: var(--green-deep); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--green); padding: 10px 18px; font-size: 0.85rem; border-color: var(--green); }
.btn--ghost:hover { background: var(--green); color: var(--cream); }
.btn--ghost-light { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn--ghost-light:hover { background: var(--cream); color: var(--green-deep); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 96vh;
  min-height: 96dvh;
  display: grid; align-items: end;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 56px) clamp(60px, 8vw, 120px);
  overflow: hidden;
  isolation: isolate;
  background: var(--cream);
}
.hero__img { position: absolute; inset: 0; z-index: -2; }
.hero__img img {
  width: 100%; height: 100%; object-fit: cover;
  animation: heroIn 1.4s cubic-bezier(.2,.7,.2,1) both .1s;
}
@keyframes heroIn {
  from { opacity: 0; transform: scale(1.12); filter: blur(8px); }
  to   { opacity: 1; transform: scale(1.04); filter: blur(0); }
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7,69,33,0.10) 0%, rgba(7,69,33,0) 40%, rgba(7,69,33,0.75) 100%);
}
.hero__copy {
  max-width: 720px;
  color: var(--cream);
  animation: copyIn 1s cubic-bezier(.2,.7,.2,1) both .5s;
  position: relative;
  z-index: 1;
}
.hero__copy .kicker { color: var(--cream-light); }
.hero__copy .display { color: var(--cream); }
.hero__copy .display em { color: var(--cream-light); }
.hero__copy .lede { color: rgba(247, 235, 200, 0.94); margin-top: 18px; max-width: 44ch; }
@keyframes copyIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__sticker {
  position: absolute;
  width: clamp(88px, 14vw, 180px);
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
  animation: bob 7s ease-in-out infinite;
}
.hero__sticker--1 { top: 14%; right: 8%; transform: rotate(-15deg); animation-delay: 0s; }
.hero__sticker--2 { top: 36%; right: 20%; transform: rotate(10deg); animation-delay: -2s; width: clamp(72px, 10vw, 130px); }
.hero__sticker--3 { top: 12%; left: 6%; transform: rotate(8deg); animation-delay: -4s; width: clamp(80px, 12vw, 150px); display: none; }
@media (min-width: 820px) { .hero__sticker--3 { display: block; } }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-12px) rotate(var(--rot, 0deg)); }
}
.hero__sticker--1 { --rot: -15deg; }
.hero__sticker--2 { --rot: 10deg; }
.hero__sticker--3 { --rot: 8deg; }

/* ===== Marquee ===== */
.marquee {
  background: var(--green);
  color: var(--cream);
  padding: 22px 0;
  overflow: hidden;
  border-top: 3px solid var(--green-deep);
  border-bottom: 3px solid var(--green-deep);
}
.marquee__track {
  display: flex; gap: 36px; align-items: center;
  width: max-content;
  animation: scroll 30s linear infinite;
  font-family: var(--display-font);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.marquee__track img { width: clamp(40px, 6vw, 60px); height: auto; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ===== Story ===== */
.story {
  padding: var(--section) clamp(20px, 4vw, 40px);
  background: var(--paper);
}
.story__grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: clamp(32px, 5vw, 80px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 820px) {
  .story__grid { grid-template-columns: 1fr 1.05fr; }
}
.story__art {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: visible;
}
.story__photo {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4/5;
  object-fit: cover;
}
.story__sticker {
  position: absolute;
  width: clamp(90px, 14vw, 160px);
  right: -14px; bottom: -22px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18));
}

/* ===== Trio ===== */
.trio {
  padding: var(--section) clamp(20px, 4vw, 40px);
  background: var(--cream);
}
.trio__grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .trio__grid { grid-template-columns: repeat(3, 1fr); }
}
.card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .35s;
  isolation: isolate;
}
.card:hover { transform: translateY(-8px); box-shadow: 0 28px 60px -22px rgba(11,69,33,.55); }
.card--original   { background: var(--cream-light); }
.card--caramel    { background: var(--amber); color: var(--cream); }
.card--chocolate  { background: var(--burgundy); color: var(--cream); }
.card__chip {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--body-font); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px;
  background: var(--green); color: var(--cream);
  z-index: 2;
}
.card--caramel .card__chip { background: var(--amber-deep); }
.card--chocolate .card__chip { background: var(--burgundy-deep); }
.card__media {
  display: block;
  aspect-ratio: 4/5;
  overflow: hidden;
  position: relative;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__media img { transform: scale(1.06); }
.card__sticker {
  position: absolute;
  width: clamp(64px, 9vw, 100px);
  top: 14px; right: 14px;
  z-index: 2;
  transform: rotate(12deg);
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.25));
}
.card__body { padding: 26px 24px 28px; }
.card__body h3 {
  font-family: var(--display-font); font-weight: 700;
  font-size: 1.6rem; margin: 0 0 8px;
}
.card--original .card__body h3 { color: var(--green); }
.card__body p { margin: 0 0 20px; font-size: 0.95rem; opacity: 0.9; }
.card__foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--display-font); font-weight: 700; font-size: 1.3rem; }
.card--caramel .btn--ghost { color: var(--cream); border-color: var(--cream); }
.card--caramel .btn--ghost:hover { background: var(--cream); color: var(--amber-deep); }
.card--chocolate .btn--ghost { color: var(--cream); border-color: var(--cream); }
.card--chocolate .btn--ghost:hover { background: var(--cream); color: var(--burgundy-deep); }

/* ===== How to drink ===== */
.how {
  padding: var(--section) clamp(20px, 4vw, 40px);
  background: var(--green);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.how::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.06) 0, transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0, transparent 30%);
  pointer-events: none;
}
.how .kicker { color: var(--cream-light); position: relative; }
.how__grid {
  position: relative;
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: 36px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .how__grid { grid-template-columns: repeat(3, 1fr); }
}
.step { text-align: center; }
.step__sticker {
  width: clamp(110px, 14vw, 150px);
  margin: 0 auto 22px;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.step:hover .step__sticker { transform: rotate(8deg) scale(1.05); }
.step__sticker img { width: 100%; height: auto; filter: drop-shadow(0 12px 22px rgba(0,0,0,0.25)); }
.step h3 {
  font-family: var(--display-font); font-weight: 600;
  font-size: 1.7rem; margin: 0 0 10px;
  color: var(--cream);
}
.step p { color: rgba(247,235,200,0.85); max-width: 28ch; margin: 0 auto; }

/* ===== Inside ===== */
.inside {
  padding: var(--section) clamp(20px, 4vw, 40px);
  background: var(--paper);
}
.inside__grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: clamp(28px, 5vw, 80px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 820px) {
  .inside__grid { grid-template-columns: 1fr 1.05fr; }
}
.inside__media {
  margin: 0;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: visible;
}
.inside__media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.inside__sticker {
  position: absolute !important;
  width: clamp(90px, 14vw, 150px);
  left: -14px; top: -18px;
  transform: rotate(-15deg);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18));
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.bullets {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; gap: 20px;
}
.bullets li {
  display: flex; align-items: flex-start; gap: 16px;
  font-size: 1.02rem;
  color: var(--ink-soft);
}
.bullets li img {
  width: 52px; height: 52px; flex-shrink: 0;
  border-radius: 50%;
  filter: drop-shadow(0 4px 10px rgba(11,69,33,0.18));
}
.bullets strong { color: var(--ink); font-weight: 700; display: block; margin-bottom: 2px; }

/* ===== Strip ===== */
.strip {
  position: relative;
  height: clamp(280px, 40vw, 460px);
  overflow: hidden;
}
.strip img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.strip__overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(11,69,33,0.6);
  padding: 20px;
}
.strip__overlay p {
  margin: 0; text-align: center; color: var(--cream);
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

/* ===== Quote ===== */
.quote {
  position: relative;
  padding: var(--section) clamp(20px, 4vw, 40px);
  background: var(--cream);
  text-align: center;
}
.quote__sticker {
  width: clamp(80px, 10vw, 120px);
  margin: 0 auto 28px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18));
}
.quote blockquote {
  margin: 0 auto;
  max-width: 720px;
  font-family: var(--display-font);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  line-height: 1.3;
  color: var(--green);
  letter-spacing: -0.01em;
}
.quote cite {
  display: block;
  margin-top: 24px;
  font-style: normal;
  font-family: var(--body-font);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ===== Gallery ===== */
.gallery {
  padding: var(--section) clamp(20px, 4vw, 40px);
  background: var(--paper);
}
.gallery__grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 220px;
}
@media (min-width: 720px) {
  .gallery__grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 280px; }
}
.gallery__tile {
  margin: 0; overflow: hidden;
  border-radius: var(--radius-lg);
  position: relative;
}
.gallery__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s ease; }
.gallery__tile:hover img { transform: scale(1.06); }
.gallery__tile--tall { grid-row: span 2; }
.gallery__tile--wide { grid-column: span 2; }

/* ===== Final CTA ===== */
.finalcta {
  position: relative;
  padding: var(--section) clamp(20px, 4vw, 40px);
  background: var(--amber);
  color: var(--cream);
  text-align: center;
  overflow: hidden;
}
.finalcta .display-2 { color: var(--cream); }
.finalcta .display-2 em { color: var(--burgundy-deep); }
.finalcta .lede { color: rgba(255,255,255,0.92); margin: 22px auto 32px; max-width: 38ch; }
.finalcta .btn--primary { background: var(--burgundy-deep); border-color: var(--burgundy-deep); }
.finalcta .btn--primary:hover { background: var(--burgundy); border-color: var(--burgundy); }
.finalcta__sticker {
  position: absolute;
  width: clamp(100px, 18vw, 220px);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.18));
  opacity: 0.92;
}
.finalcta__sticker--1 { top: 8%; left: -4%; transform: rotate(-18deg); }
.finalcta__sticker--2 { bottom: 4%; right: -3%; transform: rotate(20deg); }

/* ===== Footer ===== */
.footer {
  background: var(--green-deep);
  color: var(--cream);
  padding: 64px clamp(20px, 4vw, 40px) 40px;
}
.footer__top {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding-bottom: 36px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__logo { border-radius: 50%; }
.footer__tag {
  font-family: var(--display-font); font-style: italic; font-weight: 500;
  font-size: 1.4rem; margin: 0;
  color: var(--cream);
}
.footer__row {
  max-width: 800px; margin: 36px auto 0;
  display: grid; gap: 32px;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.footer__col h4 {
  font-family: var(--body-font); font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--green-pale);
  margin: 0 0 14px;
}
.footer__col a {
  display: block; margin: 8px 0;
  font-size: 0.95rem;
  color: var(--cream);
  opacity: 0.85;
  transition: opacity .2s;
}
.footer__col a:hover { opacity: 1; }
.footer__fine {
  margin: 36px 0 0;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.55;
}

/* ===== Reveal ===== */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }

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

/* ===== iPhone safe areas ===== */
@supports (padding: max(0px)) {
  .nav  { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .hero { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .footer { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
}
