/* ===========================================================
   Matro — The Zen Food Tracker · landing page
   Earthy palette, Newsreader (display) + Hanken Grotesk (UI)
   =========================================================== */

:root {
  --cream:      #F3F0E7;
  --cream-2:    #EDE8DC;
  --paper:      #FDFCF8;
  --ink:        #1C2620;
  --ink-soft:   #3A453C;
  --muted:      #76806F;
  --green:      #4F8868;
  --green-deep: #2B4435;
  --green-soft: #E3EDE1;
  --green-soft-2:#D5E4D3;
  --accent:     #D8824A;   /* tweakable */
  --accent-soft:#F6E4D4;
  --line:       rgba(28, 38, 32, 0.09);
  --line-2:     rgba(28, 38, 32, 0.06);
  --shadow-sm:  0 2px 8px rgba(34, 48, 38, 0.05);
  --shadow-md:  0 18px 40px -18px rgba(34, 48, 38, 0.22);
  --shadow-lg:  0 40px 80px -28px rgba(34, 48, 38, 0.32);
  --radius:     24px;
  --maxw:       1280px;
  --ease:       cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 17.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 44px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow .spark { color: var(--accent); font-size: 14px; }

.serif-em { font-style: italic; }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--cream) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand__logo { height: 54px; width: auto; display: block; }
.brand__mark {
  width: 32px; height: 32px;
  border-radius: 11px;
  background: var(--green-deep);
  color: #fff;
  display: grid; place-items: center;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}
.nav__links { display: flex; align-items: center; gap: 38px; }
.nav__links a {
  font-size: 16px; font-weight: 500; color: var(--ink-soft);
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  padding: 10px 20px;
  background: var(--green-deep);
  color: #fff !important;
  border-radius: 999px;
  font-size: 15.5px; font-weight: 600;
  padding: 13px 26px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.nav__cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
@media (max-width: 760px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ---------------- Buttons / Store badges ---------------- */
.badges { display: flex; gap: 14px; flex-wrap: wrap; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px 13px 19px;
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease);
  box-shadow: var(--shadow-sm);
}
.badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.badge__glyph { font-size: 27px; line-height: 1; }
.badge__txt { display: flex; flex-direction: column; line-height: 1.15; }
.badge__small { font-size: 11.5px; opacity: .72; letter-spacing: .03em; white-space: nowrap; }
.badge__big { font-size: 17.5px; font-weight: 600; font-family: "Hanken Grotesk", sans-serif; white-space: nowrap; }

/* coming-soon treatment */
.soon-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px 8px 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.soon-pill .pulse {
  position: relative; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.soon-pill .pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: .5;
  animation: pulsering 2.2s var(--ease) infinite;
}
@keyframes pulsering {
  0%   { transform: scale(.6); opacity: .6; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .soon-pill .pulse::after { animation: none; } }

/* badges in coming-soon mode: present but clearly not-yet-live */
.badges.is-soon .badge { cursor: default; }
.badges.is-soon .badge:hover { transform: none; box-shadow: var(--shadow-sm); }
.cta__card .badges.is-soon .badge:hover { transform: none; }
.cta__card .soon-pill { margin-bottom: 24px; }

/* ---------------- Section scaffolding ---------------- */
.section { position: relative; padding: 104px 0; }
.section--tint { background: var(--cream-2); }
.section__head { max-width: 680px; margin-bottom: 58px; }
.section__head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section__title { font-size: clamp(34px, 4vw, 54px); margin-top: 16px; }
.section__lead { margin-top: 18px; font-size: 19px; color: var(--ink-soft); }

/* organic blobs */
.blob {
  position: absolute;
  border-radius: 50% 50% 48% 52% / 55% 48% 52% 45%;
  filter: blur(2px);
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}

/* reveal animation — gated on .js so content is ALWAYS visible without JS */
[data-reveal] {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}
.js [data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }
[data-reveal][data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ===================== HERO ===================== */
.hero { position: relative; overflow: hidden; padding-top: 60px; padding-bottom: 108px; }
.hero__bg-blob-1 { width: 560px; height: 560px; background: var(--green-soft); top: -170px; right: -130px; }
.hero__bg-blob-2 { width: 380px; height: 380px; background: var(--accent-soft); bottom: -130px; left: -110px; opacity: .55; }

.hero__inner { position: relative; z-index: 2; }

/* shared hero copy bits */
.hero h1 {
  font-size: clamp(42px, 4.8vw, 74px);
  line-height: 1.04;
}
.hero h1 em { color: var(--green); font-style: italic; }
.hero__lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 32ch;
}
.hero__pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 17px 9px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.hero__pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.hero__note { font-size: 15px; color: var(--muted); display:flex; align-items:center; gap:7px; }

/* ---- Variation A : split ---- */
[data-hero="A"] .hero--B { display: none; }
[data-hero="B"] .hero--A { display: none; }

.hero--A .hero__grid {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.hero--A .hero__copy { display: flex; flex-direction: column; gap: 30px; align-items: flex-start; }
.hero--A .hero__copy h1 { max-width: 14ch; }
.hero--A .hero__art { position: relative; display: grid; place-items: center; min-height: 600px; }

/* ---- Variation B : centered ---- */
.hero--B .hero__copy { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.hero--B .hero__lead { max-width: 46ch; }
.hero--B .badges { justify-content: center; }
.hero--B .hero__art {
  position: relative;
  margin-top: 56px;
  display: grid;
  place-items: center;
  min-height: 560px;
}
.hero--B .phone--side {
  position: absolute;
  top: 60px;
  width: 230px;
  z-index: 1;
  filter: drop-shadow(var(--shadow-md));
}
.hero--B .phone--side.left  { left: 50%; transform: translateX(-150%) rotate(-7deg); }
.hero--B .phone--side.right { left: 50%; transform: translateX(50%) rotate(7deg); }

/* ---------- Phone mockup ---------- */
.phone {
  position: relative;
  width: 312px;
  border-radius: 46px;
  background: #1c1c1c;
  padding: 11px;
  box-shadow: var(--shadow-lg), 0 0 0 1.5px rgba(0,0,0,.08);
  z-index: 3;
}
.phone__screen {
  width: 100%;
  display: block;
  border-radius: 36px;
  background: var(--paper);
}
.phone__notch {
  display: none;
}
.phone--float { animation: float 7s var(--ease) infinite; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) { .phone--float { animation: none; } }
body.no-float .phone--float,
body.no-float .chip-float { animation: none !important; }

/* floating accent chips around hero phone */
.chip-float {
  position: absolute;
  z-index: 5;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 11px;
}
.chip-float .ic {
  width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-size: 16px;
}
.chip-float small { display:block; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.chip-float strong { font-size: 15.5px; white-space: nowrap; }
.chip-a { top: 70px; left: -40px; animation: float 6s var(--ease) infinite; }
.chip-b { bottom: 130px; right: -46px; animation: float 7.5s var(--ease) infinite .4s; }
.chip-c { bottom: 32px; left: -6px; animation: float 6.6s var(--ease) infinite .9s; }
@media (prefers-reduced-motion: reduce) { .chip-float { animation: none !important; } }

@media (max-width: 880px) {
  .hero--A .hero__grid { grid-template-columns: 1fr; gap: 30px; }
  .hero--A .hero__art { min-height: 540px; }
  .hero--B .phone--side { display: none; }
  .chip-a { left: -10px; }
  .chip-b { right: -12px; }
}

/* ===================== WHY ZEN ===================== */
.whyzen__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.compare {
  border-radius: var(--radius);
  padding: 34px 32px;
  position: relative;
  overflow: hidden;
}
.compare--noisy {
  background: var(--paper);
  border: 1px solid var(--line);
}
.compare--zen {
  background: var(--green-deep);
  color: #f3efe4;
  box-shadow: var(--shadow-md);
}
.compare__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; margin-bottom: 22px;
}
.compare--noisy .compare__tag { background: #F3E6E1; color: #B5543E; }
.compare--zen .compare__tag { background: rgba(255,255,255,.14); color: #cfe3cf; }
.compare h3 { font-size: 28px; margin-bottom: 20px; }
.compare ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.compare li { display: flex; gap: 13px; align-items: flex-start; font-size: 16.5px; }
.compare li .mk { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; margin-top: 1px; }
.compare--noisy li .mk { background: #F3E6E1; color: #B5543E; }
.compare--noisy li { color: var(--muted); }
.compare--zen li .mk { background: rgba(255,255,255,.16); color: #bfe0c0; }
@media (max-width: 760px) { .whyzen__grid { grid-template-columns: 1fr; } }

/* ===================== FEATURES ===================== */
.feat { position: relative; }
.feat__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 30px 0;
}
.feat__row + .feat__row { margin-top: 40px; }
.feat__row.flip .feat__media { order: 2; }
.feat__media { position: relative; display: grid; place-items: center; min-height: 460px; }
.feat__media .screen-float {
  position: relative;
  z-index: 1;
  width: 290px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  transition: transform .5s var(--ease);
}
.feat__media:hover .screen-float { transform: translateY(-10px) rotate(-1deg); }
.feat__media .halo {
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50% 50% 47% 53% / 52% 47% 53% 48%;
  z-index: 0;
}
.feat__num {
  font-family: "Newsreader", serif;
  font-size: 16px; font-weight: 600; color: var(--accent);
  letter-spacing: .04em;
}
.feat__copy h3 { font-size: clamp(28px, 3vw, 40px); margin: 14px 0 16px; }
.feat__copy p { font-size: 18.5px; color: var(--ink-soft); }
.feat__tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.feat__tags span {
  padding: 7px 14px; border-radius: 999px;
  background: var(--green-soft); color: var(--green-deep);
  font-size: 13.5px; font-weight: 600;
}
@media (max-width: 820px) {
  .feat__row, .feat__row.flip { grid-template-columns: 1fr; gap: 32px; }
  .feat__row.flip .feat__media { order: 0; }
  .feat__media { min-height: 420px; }
}

/* ===================== HOW IT WORKS ===================== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 30px;
  position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step__n {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-deep);
  display: grid; place-items: center;
  font-family: "Newsreader", serif; font-size: 22px; font-weight: 600;
  margin-bottom: 22px;
}
.step h3 { font-size: 23px; margin-bottom: 10px; }
.step p { font-size: 16.5px; color: var(--ink-soft); }
.step__line {
  position: absolute; top: 53px; right: -20px;
  width: 40px; height: 2px;
  z-index: 2;
  background-image: linear-gradient(to right, var(--accent) 0 6px, transparent 6px);
  background-size: 11px 2px;
  background-repeat: repeat-x;
  opacity: .55;
}
.step__line::after {
  content: "";
  position: absolute; right: -3px; top: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
}
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .step__line { display: none; }
}

/* ===================== CTA ===================== */
.cta { padding: 96px 0; }
.cta__card {
  position: relative;
  overflow: hidden;
  background: var(--green-deep);
  color: #f4efe3;
  border-radius: 34px;
  padding: 72px 56px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta__card h2 { font-size: clamp(34px, 5vw, 58px); color: #fff; }
.cta__card h2 em { font-style: italic; color: #b6dcb7; }
.cta__card p { font-size: 19px; color: #d6ddcf; max-width: 48ch; margin: 18px auto 34px; }
.cta__card .badges { justify-content: center; }
.cta__card .badge { background: #fff; color: var(--ink); }
.cta__blob { background: rgba(255,255,255,.06); width: 420px; height: 420px; filter: blur(0); }
.cta__blob.b1 { top: -160px; left: -100px; }
.cta__blob.b2 { bottom: -200px; right: -120px; background: rgba(216,130,74,.16); }

/* ===================== FOOTER ===================== */
.footer { padding: 54px 0 60px; border-top: 1px solid var(--line); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 11px; }
.footer__logo { height: 40px; width: auto; display: block; }
.footer__made { font-size: 15px; color: var(--muted); }
.footer__made .heart { color: var(--accent); }
.footer__links { display: flex; gap: 26px; font-size: 15px; color: var(--muted); }
.footer__links a:hover { color: var(--ink); }
@media (max-width: 640px) { .footer__inner { flex-direction: column; align-items: flex-start; gap: 18px; } }

/* ===================== MOBILE TUNING ===================== */
@media (max-width: 720px) {
  body { font-size: 16.5px; line-height: 1.58; }
  .wrap { padding: 0 22px; }
  .section { padding: 76px 0; }
  .section__head { margin-bottom: 40px; }
  .section__lead { font-size: 18px; }

  /* nav */
  .nav__inner { padding: 16px 22px; }
  .brand__logo { height: 46px; }
  .nav__cta { font-size: 15px; padding: 11px 20px; }

  /* hero */
  .hero { padding-top: 36px; padding-bottom: 72px; }
  .hero--A .hero__grid { gap: 8px; }
  .hero--A .hero__copy { gap: 26px; }
  .hero--A .hero__copy h1 { max-width: 100%; }
  .hero h1 { font-size: clamp(40px, 12vw, 60px); }
  .hero__lead { font-size: 18px; max-width: 40ch; }
  .hero__bg-blob-1 { width: 360px; height: 360px; top: -120px; right: -100px; }
  .hero__bg-blob-2 { display: none; }
  .badges { gap: 12px; }

  /* hero art — smaller phone, chips pulled inside the frame */
  .hero--A .hero__art { min-height: 520px; margin-top: 8px; }
  .phone { width: 290px; }
  .chip-a { top: 30px; left: 0; }
  .chip-b { bottom: 90px; right: 0; }
  .chip-c { display: none; }
  .chip-float { padding: 11px 15px; font-size: 14px; }
  .chip-float .ic { width: 32px; height: 32px; }

  /* compare cards */
  .compare { padding: 28px 24px; }
  .compare h3 { font-size: 26px; }
  .compare li { font-size: 16.5px; }

  /* features */
  .feat__media { min-height: auto; padding: 20px 0; }
  .feat__media .screen-float { width: 262px; }
  .feat__media .halo { width: 300px; height: 300px; }
  .feat__copy p { font-size: 18px; }

  /* steps */
  .step { padding: 28px 24px; }

  /* cta */
  .cta { padding: 72px 0; }
  .cta__card { padding: 52px 28px; border-radius: 28px; }
  .cta__card p { font-size: 18px; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: clamp(34px, 11vw, 48px); }
  .badges { flex-direction: column; align-items: stretch; }
  .badge { justify-content: center; }
}
