/* Mealio website — shared styles. Tokens and rules come from DESIGN.md. */

:root {
  --blue: #0D6AE6;
  --blue-deep: #0A55B8;
  --blue-soft: #AECAF6;
  --blue-tint: #E7EFFC;
  --cream: #F9F6EF;
  --card: #FFFFFF;
  --mustard: #ECA83B;
  --mustard-tint: #FBF1DC;
  --coral: #EA683F;
  --coral-tint: #FCE9E1;
  --leaf: #2F9447;
  --leaf-tint: #E6F1EA;
  --ink: #17212D;
  --ink-body: #2A3645;
  --ink-soft: #5E6B7B;
  --rule: #E4DDCF;

  --serif: Georgia, "Times New Roman", serif;
  --script: "Sacramento", "Snell Roundhand", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow: 0 24px 60px -30px rgba(27, 38, 53, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }

@media (min-width: 768px) { .wrap { padding-inline: 40px; } }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--cream); color: var(--blue); padding: 10px 16px; border-radius: 999px; font-weight: 700;
}
.skip:focus { top: 12px; }

/* ───────────── Masthead (blue, launch-screen voice) ───────────── */

.masthead {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--blue);
  color: var(--cream);
}
.masthead :focus-visible, .site-foot :focus-visible, .contact-card :focus-visible { outline-color: var(--cream); }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--cream); text-decoration: none;
  font: 400 42px/0.8 var(--script); letter-spacing: 0;
  transform: translateY(4px);
}
.brand-mark {
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--cream);
  transform: translateY(-4px);
}
.brand-mark img { width: 36px; height: auto; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--cream); text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background-color 0.15s;
}
.nav-links a:hover { background: rgba(249, 246, 239, 0.16); }
.nav-links a[aria-current="page"] { background: var(--cream); color: var(--blue); }

@media (max-width: 520px) {
  .brand-name { display: none; }
  .nav-links a { padding: 7px 11px; font-size: 14px; }
}

.hero { position: relative; padding-block: 44px 96px; }
@media (min-width: 768px) { .hero { padding-block: 64px 120px; } }

.hero-copy { max-width: 640px; }

.eyebrow {
  margin: 0;
  font: 700 13px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
}

.title {
  margin: 14px 0 18px;
  font: 400 clamp(44px, 8vw, 84px)/1.04 var(--serif);
  letter-spacing: -0.01em;
}

.script {
  font-family: var(--script); font-weight: 400;
  font-size: 1.22em; line-height: 0.7;
  position: relative; top: 0.1em; padding-inline: 0.04em;
  color: var(--mustard);
}
.script--blue { color: var(--blue); }

.lead { margin: 0; max-width: 38ch; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; opacity: 0.94; }

.meta-pill {
  display: inline-block; margin-top: 24px; padding: 8px 14px; border-radius: 999px;
  background: rgba(249, 246, 239, 0.16); font-size: 14px; font-weight: 600;
}

/* Doodles — sparse, like the launch screen. Always behind the copy. */
.decor { position: absolute; z-index: -1; pointer-events: none; }
.decor-a { width: clamp(300px, 38vw, 480px); right: -150px; top: 72px; color: var(--blue-soft); }
.decor-b { width: clamp(170px, 22vw, 290px); right: 16%; bottom: -170px; color: var(--mustard); }
.decor-c { width: clamp(130px, 15vw, 200px); right: -56px; bottom: -70px; color: var(--coral); }
.decor-scribble { width: clamp(220px, 28vw, 360px); right: 6%; top: 34%; color: var(--mustard); }
.decor-sparkle { width: 34px; right: 34%; top: 30%; color: var(--mustard); }
.decor-heart { width: 30px; right: 12%; top: 64%; color: var(--coral); }

@media (max-width: 900px) {
  .decor-a, .decor-scribble, .decor-sparkle { display: none; }
  .decor-b { right: 30%; bottom: -200px; }
  .decor-heart { right: 20px; top: auto; bottom: 28px; }
}

/* ───────────── Page body (cream, app voice) ───────────── */

.page { padding-block: 56px 96px; }

.section-head { margin-bottom: 28px; }
.section-head h2 { margin: 10px 0 0; font: 400 clamp(34px, 5vw, 48px)/1.1 var(--serif); }
.section-head .eyebrow { color: var(--blue); }
.section-head p { margin: 10px 0 0; color: var(--ink-soft); max-width: 56ch; }

/* Legal documents */

.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 980px) {
  .doc-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 64px; align-items: start; }
}

.toc { display: none; }
@media (min-width: 980px) { .toc { display: block; position: sticky; top: 28px; } }
.toc .eyebrow { color: var(--ink-soft); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc a {
  display: flex; gap: 10px; padding: 6px 0 6px 16px; margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-soft); text-decoration: none; font-size: 15px; line-height: 1.35;
}
.toc a span { color: var(--blue); font-family: var(--serif); min-width: 2ch; }
.toc a:hover { color: var(--ink); border-left-color: var(--blue); }

.doc {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 28px;
  padding: clamp(24px, 5vw, 56px);
  box-shadow: var(--shadow);
}

.doc-intro p { margin: 0 0 14px; font-size: 19px; line-height: 1.6; color: var(--ink); }

.doc-section {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px;
  margin-top: 34px; padding-top: 34px; border-top: 1px solid var(--rule);
  scroll-margin-top: 24px;
}
.doc-section .num { font: 400 20px/1.5 var(--serif); color: var(--blue); min-width: 2ch; }
.doc-section h2 { margin: 0 0 12px; font: 400 clamp(23px, 3vw, 29px)/1.25 var(--serif); }
.doc-section p { margin: 0 0 12px; color: var(--ink-body); }
.doc-section p:last-child, .doc-section ul:last-child { margin-bottom: 0; }
.doc-section ul { margin: 0 0 12px; padding-left: 1.2em; color: var(--ink-body); }
.doc-section li { margin-bottom: 6px; }
.doc-section li::marker { color: var(--blue); }
.doc-section strong { color: var(--ink); }

/* Contact card — the one blue surface inside a page */

.contact-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px;
  margin-top: 44px; padding: clamp(24px, 4vw, 36px);
  border-radius: 24px; background: var(--blue); color: var(--cream);
}
.contact-card h2, .contact-card h3 { margin: 0 0 6px; font: 400 clamp(24px, 3vw, 30px)/1.2 var(--serif); }
.contact-card p { margin: 0; opacity: 0.92; }
.contact-card .decor-card { position: absolute; z-index: -1; width: 180px; right: -60px; bottom: -90px; color: var(--mustard); }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.contact-address { font-size: 14px; opacity: 0.85; user-select: all; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font: 700 16px/1 var(--sans); text-decoration: none;
  transition: transform 0.15s, background-color 0.15s;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-1px); }
.btn-cream { background: var(--cream); color: var(--blue); }
.btn-cream:hover { background: #FFFFFF; }
.btn-blue { background: var(--blue); color: var(--cream); }
.btn-blue:hover { background: var(--blue-deep); }

/* Support */

.support-main { margin-top: 0; padding: clamp(28px, 5vw, 48px); }
.support-main h2 { font-size: clamp(30px, 4vw, 40px); }
.support-main p { max-width: 46ch; }

.block { margin-top: 72px; }

.topics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.topic {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; border-radius: 24px;
  background: var(--card); border: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.topic:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow); }
.topic-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; margin-bottom: 8px; }
.topic-icon svg { width: 24px; height: 24px; }
.topic h3 { margin: 0; font: 400 23px/1.25 var(--serif); }
.topic p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.topic .go { margin-top: auto; padding-top: 12px; color: var(--blue); font-weight: 700; font-size: 14px; }

.tint-blue { background: var(--blue-tint); color: var(--blue); }
.tint-mustard { background: var(--mustard-tint); color: #A66A12; }
.tint-leaf { background: var(--leaf-tint); color: var(--leaf); }
.tint-coral { background: var(--coral-tint); color: #C4502B; }

.faq { border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font: 400 clamp(20px, 2.6vw, 26px)/1.3 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--blue); }
.plus { position: relative; flex: none; width: 22px; height: 22px; transition: transform 0.2s; }
.plus::before, .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 18px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%);
}
.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] .plus { transform: rotate(45deg); }
.faq-body { padding: 0 0 24px; max-width: 64ch; color: var(--ink-body); }
.faq-body p { margin: 0 0 10px; }
.faq-body p:last-child { margin-bottom: 0; }

/* ───────────── Footer (blue again) ───────────── */

.site-foot { background: var(--blue); color: var(--cream); overflow: hidden; padding-top: 48px; }
.foot-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; }
.foot-links a, .foot-mail { color: var(--cream); text-decoration: none; font-weight: 600; }
.foot-links a:hover, .foot-mail:hover { text-decoration: underline; }
.foot-rule { height: 1px; margin: 28px 0 20px; background: rgba(249, 246, 239, 0.22); }
.foot-copy { margin: 0; font-size: 15px; opacity: 0.9; }
.wordmark {
  position: relative; z-index: 0; pointer-events: none;
  margin: 28px 0 0.05em; padding-inline: 12px;
  font: 400 clamp(110px, 28vw, 400px)/0.8 var(--script); letter-spacing: -0.01em;
  text-align: center; white-space: nowrap; user-select: none;
}

/* ═════════════ Home page ═════════════ */

.nav-links a.nav-cta { border: 1.5px solid var(--cream); padding-block: 6.5px; }
.nav-links a.nav-cta:hover { background: var(--cream); color: var(--blue); }
@media (max-width: 760px) { .nav-anchor { display: none; } }

.hero--home { text-align: center; padding-block: 48px 64px; }
@media (min-width: 768px) { .hero--home { padding-block: 72px 80px; } }
.hero-center { max-width: 940px; margin-inline: auto; }
.title--home { font-size: clamp(46px, 8.2vw, 96px); margin-top: 0; }
.hero--home .lead { margin-inline: auto; max-width: 44ch; }

.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 34px; }
.hero-note { margin: 0; font-size: 14px; font-weight: 600; opacity: 0.9; }

.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  height: 60px; padding: 0 24px 0 18px; border-radius: 14px;
  background: #000; color: #FFF; text-decoration: none; text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: transform 0.15s;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge svg { width: 30px; height: 30px; }
.store-badge small { display: block; font-size: 11.5px; line-height: 1.1; font-weight: 500; }
.store-badge strong { display: block; font-size: 23px; line-height: 1.05; font-weight: 600; letter-spacing: -0.01em; }

/* Launch-screen corners */
.home-ring { width: 96px; left: 5%; top: 104px; color: #FFF; }
.home-blob-tr { width: clamp(260px, 30vw, 430px); right: -150px; top: 96px; color: var(--blue-soft); }
.home-leaf { width: clamp(120px, 12vw, 180px); right: 4%; top: 150px; }
.home-sparkle { width: 38px; left: 13%; top: 58%; color: var(--mustard); }
.home-heart { width: 30px; right: 15%; bottom: 60px; color: var(--coral); }
@media (max-width: 1240px) {
  .home-blob-tr { right: -230px; }
  .home-leaf { right: -10px; top: 120px; width: 110px; }
  .home-ring { top: 88px; left: -30px; }
}
@media (max-width: 760px) {
  .home-blob-tr, .home-leaf, .home-sparkle { display: none; }
  .home-ring { width: 64px; top: auto; bottom: 18px; left: 14px; }
  .home-heart { right: 22px; bottom: 24px; width: 24px; }
}

/* The phone rising out of the blue into the cream */
.hero-stage {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(to bottom, var(--blue) 0 46%, var(--cream) 46% 100%);
  padding-inline: 20px; padding-bottom: 24px;
}
.phone-wrap { position: relative; width: clamp(250px, 26vw, 340px); margin-inline: auto; }
.phone { position: relative; z-index: 1; width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(27, 38, 53, 0.24)); }
.burst { position: absolute; width: 56px; color: var(--blue); }
.burst-l { left: -76px; top: 60%; }
.burst-r { right: -76px; top: 54%; }
.stage-blob-l { width: clamp(220px, 26vw, 380px); left: -110px; top: 14%; color: var(--mustard); }
.stage-spatula { width: clamp(56px, 6vw, 80px); left: 4%; top: 22%; color: #FFF; }
.stage-blob-r { width: clamp(200px, 24vw, 350px); right: -100px; top: 30%; color: var(--coral); }
.stage-swirl { width: clamp(80px, 8vw, 120px); right: 5%; top: 44%; color: #FFF; }
@media (max-width: 760px) {
  .stage-blob-l { width: 150px; left: -80px; top: 26%; }
  .stage-blob-r { width: 140px; right: -76px; top: 36%; }
  .stage-spatula, .stage-swirl { display: none; }
  .burst { width: 40px; }
  .burst-l { left: -48px; }
  .burst-r { right: -48px; }
}

/* Features */
.features { padding-block: 40px 24px; }
.feature { display: grid; gap: 28px; align-items: center; padding-block: 48px; }
.feature-copy { order: -1; }
@media (min-width: 880px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; padding-block: 72px; }
  .feature-copy { order: 0; }
  .feature--flip .feature-media { order: 2; }
}
.feature-media { position: relative; display: grid; place-items: center; padding-block: 12px; }
.feature-media .phone { width: clamp(230px, 24vw, 310px); }
.feature-blob {
  position: absolute; z-index: 0; left: 50%; top: 50%;
  width: min(120%, 560px); aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
}
.sticker {
  position: absolute; z-index: 2;
  padding: 9px 14px; border-radius: 10px;
  font: 700 14px/1.15 var(--sans); white-space: nowrap;
  box-shadow: 0 12px 24px -12px rgba(27, 38, 53, 0.45);
  transform: rotate(var(--r, 0deg));
}
.sticker--a { top: 16%; left: max(0px, calc(50% - 230px)); }
.sticker--b { bottom: 18%; right: max(0px, calc(50% - 240px)); }
.s-mustard { background: #F7D48B; color: #5A3B00; }
.s-blue { background: var(--blue); color: var(--cream); }
.s-leaf { background: #BFE3C9; color: #1D5B2E; }
.s-coral { background: #F6B9A3; color: #6B2410; }
.s-cream { background: #FFF; color: var(--ink); }

.feature-copy .eyebrow { color: var(--blue); }
.feature-copy h2 { margin: 12px 0 18px; font: 400 clamp(40px, 5.4vw, 66px)/1.06 var(--serif); letter-spacing: -0.01em; }
.feature-lead { margin: 0; max-width: 34ch; font-size: clamp(17px, 1.9vw, 21px); line-height: 1.55; color: var(--ink-body); }
.copy-doodle { width: 44px; height: auto; margin-bottom: 18px; }
.copy-doodle--leaf { width: 72px; }

/* How it works + FAQ */
.home-block { padding-block: 80px; }
.home-block--tight { padding-top: 24px; }
.section-head--center { text-align: center; margin-bottom: 40px; }
.section-head--center p:not(.eyebrow) { margin-inline: auto; }
#faq .faq { max-width: 900px; margin-inline: auto; }

.steps { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.step { padding: 30px 28px; border-radius: 24px; background: var(--card); border: 1px solid var(--rule); }
.step-num { display: block; margin-bottom: 18px; font: 400 46px/1 var(--serif); color: var(--blue); }
.step h3 { margin: 0 0 8px; font: 400 25px/1.2 var(--serif); }
.step p { margin: 0; color: var(--ink-soft); }

/* Final band — the footer continues its blue */
.final {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--blue); color: var(--cream); text-align: center;
  padding-block: 96px 40px;
}
.final-mark { width: 72px; margin: 0 auto 22px; padding: 14px; border-radius: 22px; background: var(--cream); box-sizing: content-box; }
.title--final { max-width: 900px; margin: 0 auto; font-size: clamp(40px, 6.4vw, 76px); }
.final-blob-l { width: clamp(180px, 22vw, 320px); left: -90px; top: -80px; color: var(--mustard); }
.final-blob-r { width: clamp(180px, 22vw, 320px); right: -90px; bottom: -60px; color: var(--coral); }
.final-sparkle { width: 34px; right: 16%; top: 22%; color: var(--mustard); }
@media (max-width: 760px) {
  .final-blob-l { width: 140px; left: -70px; top: -60px; }
  .final-blob-r { width: 140px; right: -70px; bottom: -40px; }
}
.final :focus-visible { outline-color: var(--cream); }
.site-foot--home { padding-top: 16px; }

/* Scroll reveals (only armed when JS + motion allowed) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .store-badge { transition: none; }
  .btn, .topic, .plus, .nav-links a { transition: none; }
  .btn:hover, .topic:hover { transform: none; }
}
