/* ============================================================
   Ruchy marketing site — "Masala" design system
   Mirrors mobile/src/theme.ts exactly. One source of truth:
   change tokens here, whole site follows.
   ============================================================ */

:root {
  /* palette — verbatim from the app's theme.ts (light) */
  --bg: #f7f0e3;          /* naan cream canvas */
  --card: #ffffff;
  --card-lite: #fcf8ec;
  --sheet: #fbf5ea;
  --ink: #2b1d16;         /* espresso */
  --pill: #2b1d16;
  --pill-text: #fbf4e6;
  --mute: #766452;        /* AA on cream */
  --faint: #c9bcab;
  --dim: #d8ccba;
  --accent: #e8603c;      /* tomato */
  --accent-ink: #9a3412;  /* orange TEXT that passes AA on cream/white/peach */
  --roast: #c94a28;
  --yellow: #f5d867;      /* butter — cook mode */
  --turmeric: #f2b33d;
  --olive: #7e9c5b;
  --green: #5f7340;
  --green-soft: #e9efd9;  /* pistachio tint */
  --amber: #9a6f15;
  --amber-soft: #faebc8;  /* butter tint */
  --peach-soft: #fbe2cf;
  --plum-soft: #efe0ea;
  --line: rgba(43, 29, 22, 0.10);

  /* type */
  --f-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --f-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --text-hero: clamp(2.7rem, 1.2rem + 6.2vw, 5.6rem);
  --text-h2: clamp(1.9rem, 1.1rem + 2.6vw, 3.1rem);
  --text-h3: clamp(1.25rem, 1.05rem + 0.7vw, 1.6rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.11rem);

  /* rhythm */
  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --pad-x: clamp(1.1rem, 4vw, 2.5rem);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 500ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle warm grain so the cream never reads flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(43, 29, 22, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
}

main, header.site, footer.site { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); letter-spacing: -0.015em; }
p  { margin: 0 0 1em; }

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--roast); }
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad-x); }
.mute { color: var(--mute); }
.kicker {
  font-family: var(--f-body);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 0.9rem;
}

/* ---------- header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms;
}
header.site.scrolled { border-bottom-color: var(--line); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--pad-x);
  max-width: 1120px;
  margin: 0 auto;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark svg { flex: none; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a.plain {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a.plain:hover { color: var(--accent-ink); }
@media (max-width: 560px) { .nav-links a.plain { display: none; } }

/* pill buttons — the app's espresso pill language */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 150ms var(--ease-out), box-shadow 150ms;
}
.btn:active { transform: scale(0.97); }
.btn-pill {
  background: var(--pill);
  color: var(--pill-text);
  box-shadow: 0 4px 14px rgba(43, 29, 22, 0.22);
}
.btn-pill:hover { color: var(--pill-text); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(43, 29, 22, 0.28); }
.btn-tomato {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(201, 74, 40, 0.32);
}
.btn-tomato:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(201, 74, 40, 0.4); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--dim);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 6rem) 0 var(--space-section);
  overflow: visible;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }
.hero .lede {
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.3rem);
  color: var(--mute);
  max-width: 34rem;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.soon-note { font-size: 0.86rem; color: var(--mute); margin-top: 0.9rem; }
.hero .accent-word { color: var(--accent); }

/* floating sticker shapes */
.sticker { position: absolute; pointer-events: none; z-index: 0; }
.sticker svg { display: block; }
@media (max-width: 880px) { .sticker.hide-sm { display: none; } }

/* ---------- the recipe card mock (the app's share card, in HTML) ---------- */
.card-stage { position: relative; display: grid; place-items: center; }
.recipe-card {
  position: relative;
  width: min(360px, 88vw);
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow:
    0 30px 60px -18px rgba(43, 29, 22, 0.35),
    0 8px 20px rgba(43, 29, 22, 0.12);
  padding: 18px;
  transform: rotate(-2deg);
}
.recipe-card .photo {
  height: 168px;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 20% 15%, #f6d9a8 0%, transparent 55%),
    radial-gradient(100% 100% at 85% 90%, #eaa96b 0%, transparent 60%),
    #f1c98f;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.recipe-card .handle {
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  color: var(--accent-ink);
  margin: 14px 2px 4px;
}
.recipe-card .title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 2px;
}
.stat-row { display: flex; gap: 8px; margin-top: 14px; }
.stat {
  flex: 1;
  border-radius: 14px;
  padding: 10px 6px 8px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.stat span {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--mute);
}
.stat.peach { background: var(--peach-soft); }
.stat.butter { background: var(--amber-soft); }
.stat.pista { background: var(--green-soft); }
.ing-card {
  background: var(--card);
  border-radius: 16px;
  padding: 12px 14px 6px;
  margin-top: 12px;
}
.ing-card .label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--mute);
  margin-bottom: 4px;
}
.ing-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}
.ing-row:first-of-type { border-top: none; }
.ing-row .qty { color: var(--mute); font-weight: 700; font-variant-numeric: tabular-nums; }
.ing-row.more { color: var(--accent-ink); font-weight: 700; }
.recipe-card .card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 2px 2px;
}
.recipe-card .card-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1rem;
}
.recipe-card .card-link { font-size: 0.78rem; font-weight: 700; color: var(--accent-ink); }

/* ---------- sections ---------- */
section.band { padding: var(--space-section) 0; }
section.band.tight { padding-top: 0; }

/* bento — deliberately uneven */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.bento .cell {
  border-radius: var(--radius-md);
  padding: clamp(1.3rem, 2.5vw, 2rem);
  position: relative;
  overflow: hidden;
}
.bento .cell h3 { margin-bottom: 0.35em; }
.bento .cell p { margin: 0; color: var(--mute); font-size: 0.98rem; max-width: 30rem; }
.bento .c-link   { grid-column: span 4; background: var(--peach-soft); }
.bento .c-photo  { grid-column: span 2; background: var(--card); border: 1px solid var(--line); }
.bento .c-shot   { grid-column: span 2; background: var(--card); border: 1px solid var(--line); }
.bento .c-write  { grid-column: span 4; background: var(--green-soft); }
@media (max-width: 760px) {
  .bento .c-link, .bento .c-photo, .bento .c-shot, .bento .c-write { grid-column: span 6; }
}
.cell .glyph {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: rgba(43, 29, 22, 0.06);
}

/* cook mode band — butter yellow, like the app */
.cook-band {
  background: var(--yellow);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4.5vw, 4rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 820px) { .cook-band { grid-template-columns: 1fr; } }
.cook-band p { color: #57430f; }
.cook-band .kicker { color: #7a5c0e; }
.step-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 18px 40px -14px rgba(87, 67, 15, 0.4);
  transform: rotate(1.5deg);
  max-width: 380px;
  justify-self: center;
}
.step-card .stepno {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent-ink);
  letter-spacing: 0.06em;
}
.step-card .steptext {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 0.3rem;
}
.step-card .timer {
  display: inline-block;
  margin-top: 0.9rem;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

/* everyday trio */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; } }
.trio .cell {
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}
.trio .cell p { color: var(--mute); font-size: 0.96rem; margin: 0; }

/* share section */
.share-band {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 820px) { .share-band { grid-template-columns: 1fr; } }

/* get-the-app / footer CTA */
.get {
  background: var(--pill);
  color: var(--pill-text);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.get h2 { color: var(--pill-text); }
.get p { color: rgba(251, 244, 230, 0.72); max-width: 32rem; margin: 0 auto 1.6rem; }
.store-badges { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1.5px solid rgba(251, 244, 230, 0.4);
  color: var(--pill-text);
  border-radius: 14px;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.store-badge small { display: block; font-size: 0.68rem; opacity: 0.7; font-weight: 500; text-align: left; }
.store-badge span { line-height: 1.15; text-align: left; }

footer.site {
  padding: 3rem 0 3.5rem;
  border-top: 1px solid var(--line);
  margin-top: var(--space-section);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.foot-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.foot-links a { color: var(--mute); text-decoration: none; font-size: 0.94rem; }
.foot-links a:hover { color: var(--accent-ink); }
.foot-fine { margin-top: 1.6rem; color: var(--mute); font-size: 0.85rem; }

/* ---------- inner pages (privacy / terms / support / r) ---------- */
.page {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad-x) 0;
}
.page-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 4vw, 3rem);
}
.page-card h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); }
.page-card h2 { font-size: 1.35rem; margin-top: 2.2em; }
.page-card h3 { font-size: 1.05rem; margin-top: 1.6em; }
.eff { color: var(--mute); font-size: 0.9rem; margin-bottom: 1.8rem; }
.note {
  background: var(--amber-soft);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  font-size: 0.93rem;
  margin: 1.1rem 0;
}
.fill {
  background: var(--peach-soft);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-weight: 600;
}
.page-card table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.8rem 0;
  font-size: 0.9rem;
}
.page-card th, .page-card td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.page-card th { background: var(--card-lite); }
.page-card ul { padding-left: 1.4rem; }
.page-card li { margin-bottom: 0.35rem; }

/* support page */
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1rem 1.2rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent-ink);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 1.2rem 1.1rem; color: var(--mute); font-size: 0.97rem; }
.contact-card {
  background: var(--green-soft);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  margin-top: 2rem;
}

/* /r/ share landing */
.r-stage {
  min-height: 62vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 5rem) var(--pad-x);
}
.r-stage .mini-card { margin: 0 auto 2rem; transform: rotate(-2deg); }
.r-code {
  font-variant-numeric: tabular-nums;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--mute);
}

/* ---------- motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 80ms; }
.reveal.d2 { transition-delay: 160ms; }
.reveal.d3 { transition-delay: 240ms; }

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
}
.floaty { animation: floaty 7s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .floaty { animation: none; }
  .btn, .faq summary::after { transition: none; }
}
