/* ============================================================
   Pantry Peek — marketing site
   Aesthetic: warm farmers-market editorial. Fraunces display +
   Hanken Grotesk body, terracotta-on-cream, grain + soft blobs.
   Palette mirrors the app's default "Pantry" theme.
   ============================================================ */

:root {
  --terracotta: #c2543c;
  --terracotta-dark: #9c3f2b;
  --honey: #f2b33d;
  --cream: #fdf6e8;
  --cream-deep: #fbeed3;
  --surface: #fffcf4;
  --ink: #3a241c;
  --ink-soft: #6e4a3a;
  --ink-muted: #a07860;
  --line: #efe0c6;

  /* status colors, straight from the app's Pantry palette */
  --in-bg: #eaf0e4;   --in-text: #4a6b3a;   --in-dot: #7c9a6d;
  --buy-bg: #fcf1d8;  --buy-text: #9c6f12;  --buy-dot: #f2b33d;
  --out-bg: #fae3de;  --out-text: #a03a2e;  --out-dot: #d9534b;

  --radius: 22px;
  --shadow-sm: 0 2px 8px rgba(58, 36, 28, 0.06);
  --shadow-md: 0 14px 34px -16px rgba(58, 36, 28, 0.28);
  --shadow-lg: 0 40px 80px -32px rgba(120, 50, 30, 0.42);
  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.62;
  font-size: 18px;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  position: relative;
}

/* subtle film grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.4;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

::selection { background: var(--honey); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

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

.eyebrow {
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--honey);
  border-radius: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 15px 26px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background 0.25s ease, color 0.25s ease;
  will-change: transform;
}
.btn-primary {
  background: var(--terracotta);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); background: var(--terracotta-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--terracotta); color: var(--terracotta); }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--cream) 80%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.scrolled { border-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: "Fraunces", serif; font-weight: 700; font-size: 1.28rem; letter-spacing: -0.02em; }
.brand .mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a:not(.btn) { font-weight: 600; font-size: 0.98rem; color: var(--ink-soft); transition: color 0.2s ease; position: relative; }
.nav-links a.btn-primary { color: #fff; }
.nav-links a:not(.btn):hover { color: var(--terracotta); }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--honey); border-radius: 2px; transition: width 0.3s var(--ease);
}
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-cta { padding: 11px 20px; }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(8px); z-index: 0;
}
.hero::before {
  width: 620px; height: 620px; top: -260px; right: -180px;
  background: radial-gradient(circle at 30% 30%, rgba(242,179,61,0.34), transparent 62%);
}
.hero::after {
  width: 520px; height: 520px; bottom: -280px; left: -160px;
  background: radial-gradient(circle at 50% 50%, rgba(194,84,60,0.22), transparent 64%);
}
/* concentric rings, like the app screenshots */
.hero-rings { position: absolute; right: -120px; top: 40px; width: 560px; height: 560px; z-index: 0; opacity: 0.5; pointer-events: none; }
.hero-rings span { position: absolute; inset: 0; margin: auto; border: 1.5px solid rgba(194,84,60,0.16); border-radius: 50%; }
.hero-rings span:nth-child(1){ width: 100%; height: 100%; }
.hero-rings span:nth-child(2){ width: 74%; height: 74%; }
.hero-rings span:nth-child(3){ width: 48%; height: 48%; border-color: rgba(242,179,61,0.28); }

.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.hero-copy h1 { font-size: clamp(2.7rem, 6vw, 4.5rem); font-weight: 600; margin: 20px 0 0; }
.hero-copy h1 .accent { color: var(--terracotta); font-style: italic; font-variation-settings: "SOFT" 60, "WONK" 1; }
.hero-copy p.lede { font-size: 1.24rem; color: var(--ink-soft); margin: 22px 0 32px; max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin-top: 18px; font-size: 0.92rem; color: var(--ink-muted); display: flex; align-items: center; gap: 8px; }
.hero-note .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--in-dot); box-shadow: 0 0 0 4px rgba(124,154,109,0.18); }

/* floating card cluster (mirrors app cards) */
.hero-art { position: relative; height: 480px; }
.pcard {
  position: absolute;
  width: 156px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 16px 14px;
  box-shadow: var(--shadow-md);
  text-align: center;
  animation: float 6s var(--ease) infinite;
}
.pcard .emoji { font-size: 40px; line-height: 1; display: block; filter: drop-shadow(0 4px 6px rgba(58,36,28,0.12)); }
.pcard .pname { display: block; font-weight: 700; font-size: 0.98rem; margin: 12px 0 9px; color: var(--ink); }
.pcard .star { position: absolute; top: 11px; left: 12px; font-size: 13px; }
.pcard .dot { position: absolute; top: 14px; right: 14px; width: 9px; height: 9px; border-radius: 50%; }
.pill {
  display: inline-block; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 5px 11px; border-radius: 100px;
}
.is-in  { background: var(--in-bg);  color: var(--in-text); }
.is-in  ~ .dot, .pcard.is-in .dot { }
.pill.in  { background: var(--in-bg);  color: var(--in-text); }
.pill.buy { background: var(--buy-bg); color: var(--buy-text); }
.pill.out { background: var(--out-bg); color: var(--out-text); }
.dot.in { background: var(--in-dot); } .dot.buy { background: var(--buy-dot); } .dot.out { background: var(--out-dot); }

.pcard.c1 { top: 6px;   left: 40px;  animation-delay: 0s; }
.pcard.c2 { top: 64px;  right: 8px;  animation-delay: 0.8s; transform: rotate(3deg); }
.pcard.c3 { top: 210px; left: 0;     animation-delay: 1.6s; transform: rotate(-4deg); }
.pcard.c4 { top: 250px; right: 36px; animation-delay: 0.4s; transform: rotate(2deg); }
.pcard.c5 { top: 348px; left: 96px;  animation-delay: 1.2s; }

/* a "synced" badge floating between cards */
.sync-badge {
  position: absolute; top: 168px; left: 150px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--cream);
  font-size: 0.8rem; font-weight: 700; padding: 9px 14px; border-radius: 100px;
  box-shadow: var(--shadow-lg);
  animation: float 5s var(--ease) infinite; animation-delay: 0.6s;
}
.sync-badge .ping { width: 8px; height: 8px; border-radius: 50%; background: var(--honey); position: relative; }
.sync-badge .ping::after { content:""; position:absolute; inset:-4px; border-radius:50%; border:2px solid var(--honey); animation: ping 1.8s ease-out infinite; }

@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

/* ---------- marquee strip ---------- */
.strip { background: var(--terracotta); color: var(--cream-deep); padding: 16px 0; overflow: hidden; border-top: 3px solid var(--terracotta-dark); border-bottom: 3px solid var(--terracotta-dark); }
.marquee { display: flex; gap: 48px; white-space: nowrap; animation: slide 28s linear infinite; width: max-content; }
.marquee span { font-family: "Fraunces", serif; font-style: italic; font-size: 1.3rem; font-weight: 500; display: inline-flex; align-items: center; gap: 48px; }
.marquee span::after { content: "•"; color: var(--honey); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
section { position: relative; }
.section-pad { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 16px 0 14px; }
.section-head p { color: var(--ink-soft); font-size: 1.14rem; }

/* features grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--terracotta) 35%, var(--line)); }
.feature .ficon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  font-size: 26px; background: var(--cream-deep); margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.feature h3 { font-size: 1.32rem; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 1rem; }
.feature.wide { grid-column: span 2; }
.feature.dark { background: linear-gradient(150deg, var(--ink), #2a1812); color: var(--cream); border-color: transparent; }
.feature.dark h3 { color: var(--cream); }
.feature.dark p { color: color-mix(in srgb, var(--cream) 80%, transparent); }
.feature.dark .ficon { background: rgba(255,255,255,0.08); }

/* how it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 18px; }
.step .num {
  font-family: "Fraunces", serif; font-weight: 700; font-size: 3.4rem; color: var(--honey);
  line-height: 1; display: block; margin-bottom: 10px; opacity: 0.9;
}
.step h3 { font-size: 1.3rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 1rem; }

/* legend band */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.legend .pill { font-size: 0.78rem; padding: 9px 16px; }

/* ---------- CTA ---------- */
.cta {
  margin: 0 auto; max-width: calc(var(--maxw) - 0px);
  background: linear-gradient(140deg, var(--terracotta), var(--terracotta-dark));
  border-radius: 34px;
  padding: 72px 48px;
  text-align: center;
  color: #fff;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta::before { content: ""; position: absolute; width: 360px; height: 360px; top: -160px; right: -80px; background: radial-gradient(circle, rgba(242,179,61,0.5), transparent 60%); }
.cta::after { content: ""; position: absolute; width: 300px; height: 300px; bottom: -180px; left: -60px; background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 60%); }
.cta h2 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.2rem); position: relative; }
.cta p { position: relative; color: rgba(255,255,255,0.9); font-size: 1.18rem; margin: 16px auto 30px; max-width: 46ch; }
.cta .hero-actions { justify-content: center; position: relative; }
.cta .btn-primary { background: var(--cream); color: var(--terracotta-dark); }
.cta .btn-primary:hover { background: #fff; }
.cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.5); }
.cta .btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.1); }

/* store badges */
.badges { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.28);
  padding: 11px 20px; border-radius: 14px; color: #fff;
}
.badge .glyph { font-size: 22px; }
.badge small { display: block; font-size: 0.66rem; opacity: 0.8; letter-spacing: 0.04em; }
.badge strong { display: block; font-size: 1.02rem; font-weight: 700; margin-top: -2px; }

/* ---------- footer ---------- */
.site-footer { padding: 64px 0 40px; border-top: 1px solid var(--line); margin-top: 96px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--ink-soft); font-size: 0.98rem; margin-top: 14px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 { font-family: "Hanken Grotesk", sans-serif; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--ink-soft); font-weight: 600; padding: 6px 0; transition: color 0.2s ease, transform 0.2s ease; }
.footer-col a:hover { color: var(--terracotta); transform: translateX(3px); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-muted); font-size: 0.9rem; }

/* ---------- reveal on load / scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.40s; }

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

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  /* Drop the absolute cluster — lay cards out as a centered grid instead */
  .hero-art {
    position: static; height: auto; max-width: 380px; margin: 18px auto 0;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start;
  }
  .hero-art .pcard {
    position: relative; top: auto; left: auto; right: auto; bottom: auto;
    width: 100%; transform: none !important; animation: none;
  }
  .hero-art .pcard.c5 { grid-column: 1 / -1; justify-self: center; width: 168px; }
  .hero-art .sync-badge {
    position: static; grid-column: 1 / -1; justify-self: center;
    margin-top: 2px; animation: none;
  }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature.wide { grid-column: span 2; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 24px 28px; box-shadow: var(--shadow-md);
  }
  .nav-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 20px; cursor: pointer; }
  .section-pad { padding: 68px 0; }
  .features { grid-template-columns: 1fr; }
  .feature.wide { grid-column: span 1; }
  .cta { padding: 52px 26px; border-radius: 26px; }
  .footer-cols { gap: 36px; }
}

/* ============================================================
   Privacy / legal document page
   ============================================================ */
.doc-hero { padding: 64px 0 28px; }
.doc-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 16px 0 10px; }
.doc-hero .updated { color: var(--ink-muted); font-weight: 600; font-size: 0.96rem; }
.doc {
  max-width: 760px; margin: 0 auto; padding: 8px 28px 40px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.doc-inner { padding: 36px 40px 44px; }
.doc-inner h2 { font-size: 1.5rem; margin: 36px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc-inner h2:first-of-type { border-top: none; padding-top: 0; margin-top: 8px; }
.doc-inner h3 { font-size: 1.12rem; margin: 22px 0 6px; color: var(--terracotta-dark); }
.doc-inner p, .doc-inner li { color: var(--ink-soft); font-size: 1.02rem; }
.doc-inner p { margin: 12px 0; }
.doc-inner ul { margin: 12px 0 12px 22px; }
.doc-inner li { margin: 7px 0; }
.doc-inner strong { color: var(--ink); }
.doc-inner a { color: var(--terracotta); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.back-home { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--terracotta); margin-bottom: 4px; }
.back-home:hover { gap: 12px; transition: gap 0.2s var(--ease); }
