/* ============================================================
   Nummy — shared styles
   Warm food-zine: cream paper, chunky rounded type, tomato ink.
   ============================================================ */

:root {
  /* palette — pulled from the app (Theme.swift) */
  --paper:      #f7f5ed;
  --paper-2:    #fffcf5;
  --card:       #fffdf7;
  --ink:        #1a1c1a;
  --muted:      #6b7064;
  --tomato:     #db382b;
  --tomato-deep:#b0241a;
  --basil:      #2e734f;
  --saffron:    #f0a333;
  --line:       rgba(26, 28, 26, 0.09);
  --line-strong:rgba(26, 28, 26, 0.14);

  --shadow-sm: 0 2px 10px rgba(70, 40, 20, 0.06);
  --shadow-md: 0 14px 34px rgba(80, 45, 20, 0.10);
  --shadow-lg: 0 30px 60px rgba(80, 45, 20, 0.14);

  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
  --radius: 26px;
  --radius-lg: 34px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: clamp(16px, 1rem + 0.2vw, 18px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.accent-tomato { color: var(--tomato); }
.accent-basil  { color: var(--basil); }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--tomato);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--btn-fg);
  background: var(--btn-bg);
  padding: 0.85em 1.5em;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(219, 56, 43, 0.28);
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.5, 1), box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(219, 56, 43, 0.34); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: none;
}
.btn--ghost:hover { box-shadow: none; background: rgba(26,28,26,0.03); }

.btn--soon {
  position: relative;
  cursor: default;
}
.btn--soon:hover { transform: none; }
.btn--soon .soon-tag {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.62em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.22);
  padding: 0.3em 0.6em;
  border-radius: 100px;
}

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--tomato);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.wordmark .dot {
  width: 0.44em; height: 0.44em; border-radius: 50%;
  background: var(--saffron);
  display: inline-block;
  margin-bottom: -0.05em;
}
.brand-icon {
  width: 1.5em; height: 1.5em;
  border-radius: 28%;
  box-shadow: 0 3px 8px rgba(80, 45, 20, 0.16);
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-color: var(--line); }
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.nav__links a { transition: color 0.15s ease; }
.nav__links a:hover { color: var(--ink); }

/* below the hero's 2-col breakpoint the text links crowd the CTA — drop them */
@media (max-width: 900px) {
  .nav__links { display: none; }
}
@media (max-width: 760px) {
  .nav__inner { height: 64px; }
  .nav .btn { font-size: 0.92rem; padding: 0.72em 1.2em; }
}

/* ---------- section rhythm ---------- */
section { position: relative; }
.section-pad { padding-block: clamp(64px, 10vw, 120px); }

.eyebrow {
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tomato);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px; border-radius: 2px;
  background: var(--tomato);
}

.section-title {
  font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem);
  max-width: 16ch;
  margin-top: 18px;
}
.section-lead {
  color: var(--muted);
  font-size: clamp(1.02rem, 1rem + 0.4vw, 1.22rem);
  max-width: 46ch;
  margin-top: 16px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-top: clamp(40px, 6vw, 70px); padding-bottom: clamp(50px, 8vw, 96px); }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(44px, 6vw, 64px);
  align-items: center;
}
@media (min-width: 920px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.5em 0.95em 0.5em 0.6em;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.hero__pill .badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em; border-radius: 50%;
  background: var(--tomato); color: #fff; font-size: 0.85em;
}

.hero__title {
  font-size: clamp(2.6rem, 1.4rem + 6vw, 5rem);
  margin-top: 22px;
  letter-spacing: -0.02em;
}
.hero__title .ink-line { display: block; }
.hero__title em {
  font-style: normal;
  color: var(--tomato);
  position: relative;
}
.hero__title em::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: 0.06em;
  height: 0.16em;
  background: var(--saffron);
  border-radius: 100px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 0.7s 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.hero__lead {
  color: var(--muted);
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem);
  max-width: 42ch;
  margin-top: 24px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}
.hero__note {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

/* staggered load */
.reveal { opacity: 0; transform: translateY(16px); animation: reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.reveal-1 { animation-delay: 0.05s; }
.reveal-2 { animation-delay: 0.15s; }
.reveal-3 { animation-delay: 0.25s; }
.reveal-4 { animation-delay: 0.35s; }
.reveal-5 { animation-delay: 0.45s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- hero visual: recipe card ---------- */
.hero__visual { position: relative; display: flex; justify-content: center; }

.recipe-card {
  position: relative;
  width: min(100%, 380px);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  z-index: 2;
  animation: floatCard 6s ease-in-out infinite;
}
@keyframes floatCard { 0%,100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-12px) rotate(-1.2deg); } }

.recipe-card__media {
  height: 190px;
  background:
    radial-gradient(120% 120% at 20% 0%, #ffd9a0 0%, transparent 55%),
    linear-gradient(135deg, var(--tomato) 0%, #e8632f 55%, var(--saffron) 130%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.recipe-card__src {
  display: inline-flex; align-items: center; gap: 0.5em;
  background: rgba(255,255,255,0.94);
  border-radius: 100px;
  padding: 0.4em 0.8em 0.4em 0.5em;
  font-weight: 700; font-size: 0.8rem;
}
.recipe-card__src .av {
  width: 1.6em; height: 1.6em; border-radius: 50%;
  background: linear-gradient(160deg, var(--saffron), var(--tomato));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.72em; font-weight: 800;
}
.recipe-card__body { padding: 20px 22px 24px; }
.recipe-card__title { font-size: 1.5rem; }
.recipe-card__meta { display: flex; gap: 14px; margin-top: 10px; color: var(--muted); font-weight: 700; font-size: 0.82rem; }
.recipe-card__meta span { display: inline-flex; align-items: center; gap: 0.4em; }
.recipe-card__hr { height: 1px; background: var(--line); margin: 18px 0; }
.ing-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; font-weight: 600; }
.ing-row .tick {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--basil);
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
}
.ing-row .tick.on { background: var(--basil); border-color: var(--basil); }
.ing-row .tick.on::after { content: "✓"; color: #fff; font-size: 0.7rem; font-weight: 900; }
.ing-row.off { color: var(--muted); }
.ing-row .amt { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.cook-pill {
  margin-top: 18px;
  width: 100%;
  background: var(--ink);
  color: var(--card);
  border-radius: 16px;
  padding: 13px;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
}

/* floating produce */
.floaty { position: absolute; font-size: clamp(1.8rem, 4vw, 2.6rem); z-index: 1; filter: drop-shadow(0 8px 14px rgba(80,45,20,0.16)); }
.floaty.f1 { top: -8px; left: 2%; animation: bob 5s ease-in-out infinite; }
.floaty.f2 { bottom: 6%; left: -4%; animation: bob 6.5s ease-in-out infinite 0.4s; }
.floaty.f3 { top: 14%; right: -2%; animation: bob 5.5s ease-in-out infinite 0.8s; }
.floaty.f4 { bottom: -10px; right: 12%; animation: bob 6s ease-in-out infinite 0.2s; }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-14px) rotate(4deg); } }

/* ============================================================
   PROBLEM (saved vs cooked)
   ============================================================ */
.problem { background: var(--ink); color: var(--paper-2); border-radius: clamp(28px, 4vw, 48px); }
.problem .wrap { padding-block: clamp(56px, 8vw, 100px); }
.problem__grid { display: grid; grid-template-columns: 1fr; gap: clamp(40px, 6vw, 70px); align-items: center; }
@media (min-width: 860px) { .problem__grid { grid-template-columns: 1fr 0.9fr; } }
.problem .eyebrow { color: var(--saffron); }
.problem .eyebrow::before { background: var(--saffron); }
.problem__title { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.4rem); margin-top: 16px; }
.problem__lead { color: rgba(255,252,245,0.72); margin-top: 18px; max-width: 44ch; font-size: 1.1rem; }

.bars { display: flex; align-items: flex-end; gap: clamp(24px, 5vw, 52px); height: 300px; padding: 20px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; height: 100%; justify-content: flex-end; }
.bar__val { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.4rem); }
.bar__col { width: 100%; max-width: 120px; border-radius: 18px 18px 8px 8px; transform-origin: bottom; animation: grow 0.9s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
.bar__col.saved { background: linear-gradient(180deg, var(--tomato), var(--saffron)); }
.bar__col.cooked { background: rgba(255,252,245,0.16); }
@keyframes grow { from { transform: scaleY(0); } }
.bar__label { font-weight: 700; color: rgba(255,252,245,0.72); font-size: 0.92rem; }

/* ============================================================
   HOW IT WORKS — share flow (real phone mockups)
   ============================================================ */
.how__head { max-width: 640px; }
.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  margin-top: clamp(42px, 6vw, 64px);
}
@media (min-width: 860px) {
  .flow { grid-template-columns: 1fr auto 1fr auto 1fr; gap: clamp(10px, 1.5vw, 22px); }
}

.flow__step {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.flow__phone {
  position: relative;
  width: min(100%, 250px);
  transition: transform 0.25s ease;
}
.flow__step:hover .flow__phone { transform: translateY(-6px); }
.flow__phone img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 34px rgba(80, 45, 20, 0.18));
}
.flow__num {
  position: absolute;
  top: -12px; left: -6px;
  z-index: 2;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--tomato);
  color: #fff;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(219, 56, 43, 0.34);
  border: 3px solid var(--paper);
}
.flow__step:nth-child(3) .flow__num { background: var(--saffron); }
.flow__step:nth-child(5) .flow__num { background: var(--basil); }

.flow__step figcaption { margin-top: 22px; max-width: 30ch; }
.flow__step figcaption h3 { font-size: 1.3rem; }
.flow__step figcaption p { color: var(--muted); margin-top: 8px; font-size: 0.98rem; }

.flow__arrow {
  align-self: center;
  color: var(--tomato);
  font-size: 1.8rem;
  font-weight: 700;
  opacity: 0.5;
  padding-top: 90px;
}
@media (max-width: 859px) {
  .flow__arrow { transform: rotate(90deg); padding: 0; opacity: 0.4; justify-self: center; }
}

.how__note {
  margin-top: clamp(34px, 5vw, 48px);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.75em 1.3em;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.how__note-icon { font-size: 1.1em; }

/* ============================================================
   FEATURES
   ============================================================ */
.features__grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: clamp(40px, 5vw, 60px); }
@media (min-width: 680px) { .features__grid { grid-template-columns: repeat(2, 1fr); } }
.feature {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.feature__icon {
  flex: none;
  width: 54px; height: 54px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: color-mix(in srgb, var(--tomato) 12%, transparent);
}
.feature:nth-child(2) .feature__icon { background: color-mix(in srgb, var(--basil) 14%, transparent); }
.feature:nth-child(3) .feature__icon { background: color-mix(in srgb, var(--saffron) 20%, transparent); }
.feature:nth-child(4) .feature__icon { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.feature__title { font-size: 1.3rem; }
.feature__text { color: var(--muted); margin-top: 8px; font-size: 0.98rem; }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band { text-align: center; }
.cta-band__inner {
  background:
    radial-gradient(130% 120% at 50% -10%, #ffdca6 0%, transparent 50%),
    linear-gradient(150deg, var(--tomato), #e0552b 60%, var(--saffron));
  color: #fff;
  border-radius: clamp(28px, 4vw, 48px);
  padding: clamp(48px, 8vw, 96px) clamp(24px, 5vw, 60px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-band__icon {
  width: clamp(74px, 10vw, 96px);
  height: auto;
  border-radius: 26%;
  margin: 0 auto 22px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
  animation: floatCard 5s ease-in-out infinite;
}
.cta-band__title { font-size: clamp(2rem, 1.4rem + 3.4vw, 3.6rem); max-width: 18ch; margin-inline: auto; }
.cta-band__lead { margin: 18px auto 0; max-width: 40ch; color: rgba(255,255,255,0.9); font-size: 1.12rem; }
.cta-band .btn {
  margin-top: 32px;
  --btn-bg: #fff; --btn-fg: var(--tomato);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}
.cta-band .btn:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.24); }
.cta-band .hero__note { color: rgba(255,255,255,0.82); margin-top: 16px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding-block: clamp(48px, 6vw, 72px); border-top: 1px solid var(--line); margin-top: clamp(60px, 8vw, 100px); }
.footer__grid {
  display: flex; flex-wrap: wrap; gap: 30px 60px;
  justify-content: space-between; align-items: flex-start;
}
.footer__tag { color: var(--muted); max-width: 30ch; margin-top: 14px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 14px 34px; font-weight: 600; }
.footer__links a { color: var(--muted); transition: color 0.15s ease; }
.footer__links a:hover { color: var(--tomato); }
.footer__legal { width: 100%; margin-top: 30px; color: var(--muted); font-size: 0.86rem; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

/* ============================================================
   LEGAL / DOC PAGES
   ============================================================ */
.doc { padding-top: clamp(40px, 6vw, 70px); }
.doc__head { max-width: 720px; }
.doc__kicker { margin-bottom: 14px; }
.doc__title { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.2rem); }
.doc__meta { color: var(--muted); margin-top: 14px; font-weight: 600; }
.doc__body { max-width: 720px; margin-top: clamp(36px, 5vw, 56px); }
.doc__body h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem);
  margin-top: 44px;
  padding-top: 8px;
}
.doc__body h2:first-child { margin-top: 0; }
.doc__body h3 { font-size: 1.15rem; margin-top: 26px; font-family: var(--body); font-weight: 800; }
.doc__body p, .doc__body li { color: #33362f; }
.doc__body p { margin-top: 14px; }
.doc__body ul { margin-top: 14px; padding-left: 22px; }
.doc__body li { margin-top: 8px; }
.doc__body strong { color: var(--ink); font-weight: 800; }
.doc__body a { color: var(--tomato); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.callout {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--saffron);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 22px;
}
.callout p { margin-top: 0; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 6px; }

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