/* StayGrubby website. Brand: logo red #F10607 (SGTheme.Brand.red), cream #FAF3EC, charcoal #1F1F1F.
   Text/controls use the app's accessible accent #CB1015 (SGTheme.ColorToken.accent/buttonAccent).
   Mobile-first; system fonts only; motion is CSS scroll-driven, opt-in and off under Reduce Motion. */
:root {
  color-scheme: light;
  --red: #f10607; --accent: #cb1015; --cream: #faf3ec; --ink: #1f1f1f; --muted: #5e554e;
  --surface: #fbf7f2; --raised: #f4ede5; --line: #e6dcd1; --white: #ffffff;
  --gutter: 20px; --max: 1120px; --radius: 22px;
  --shadow: 0 1px 2px rgb(31 31 31 / .06), 0 14px 34px -14px rgb(31 31 31 / .22);
}
* { box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--white); line-height: 1.55; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); }
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible, .pill-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; border-radius: 999px; }
.skip { position: absolute; top: -100px; left: 20px; background: var(--ink); color: var(--white); padding: 12px 20px; z-index: 10; border-radius: 10px; }
.skip:focus { top: 10px; }
h1, h2, h3 { line-height: 1.04; letter-spacing: -.035em; margin: 0; font-weight: 800; }
p { margin: 0; }

/* Shared shell (also styles the Worker's beta and shared-link fallbacks) */
.site-header, main, .site-footer { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: block; flex-shrink: 0; line-height: 0; margin-block: -14px; }
.brand img { display: block; width: 112px; height: auto; }
.home-header .brand img { width: 128px; }
nav { display: flex; gap: 24px; font-size: .94rem; font-weight: 600; }
nav a { display: inline-block; padding-block: 12px; text-decoration: none; }
.button, .pill-button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 14px 28px; border-radius: 999px;
  background: var(--accent); color: var(--white); font-weight: 750; font-size: 1.17rem; letter-spacing: -.01em; text-decoration: none;
  transition: transform .2s ease, background-color .2s ease; }
.button:hover, .pill-button:hover { background: #b10d12; }
.button:active, .pill-button:active { transform: scale(.97); }
.pill-button { min-height: 44px; padding: 10px 18px; font-size: 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 750; color: var(--accent); }
.intro { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); }
.reading { max-width: 740px; }
.policy { padding: 40px 0 64px; }
.policy h1 { font-size: clamp(2.4rem, 6vw, 3.5rem); margin: 16px 0 24px; }
.policy h2 { font-size: 1.55rem; letter-spacing: -.025em; line-height: 1.25; margin-top: 40px; }
.policy p { overflow-wrap: anywhere; margin: 20px 0; line-height: 1.65; }
.site-footer { display: flex; flex-wrap: wrap; gap: 0 24px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.site-footer span { flex-basis: 100%; font-weight: 650; color: var(--ink); padding-bottom: 4px; }
.site-footer a { padding-block: 12px; }

/* Home */
.home { width: 100%; max-width: none; }
.home > section { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section-title { font-size: clamp(2rem, 7vw, 3.4rem); margin-bottom: 28px; max-width: 16ch; }

.hero { display: grid; gap: 40px; padding: 28px 0 64px; }
.hero h1 { font-size: clamp(3.3rem, 15vw, 6.6rem); letter-spacing: -.055em; line-height: .95; }
.hero h1 em { font-style: normal; color: var(--red); display: block; }
.lede { font-size: clamp(1.15rem, 4.2vw, 1.4rem); color: var(--muted); max-width: 30ch; margin: 22px 0 30px; line-height: 1.45; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.cta-note { color: var(--muted); font-size: .92rem; }
.hero-visual { position: relative; display: grid; place-items: center; padding: 40px 18px; border-radius: 32px; background: var(--red); overflow: hidden; }

/* Real screenshots (when supplied) sit in a plain device outline; nothing inside it is drawn by the website. */
.phone { margin: 0; width: min(280px, 72vw); padding: 10px; border-radius: 46px; background: var(--ink); box-shadow: var(--shadow); }
.phone img { display: block; width: 100%; border-radius: 37px; }

/* Tutorial example cards: owner-approved illustrative examples, never presented as screenshots. */
.card { position: relative; background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); color: var(--ink); text-align: left; width: min(340px, 100%); }
.preview { margin: 0; display: grid; justify-items: center; gap: 14px; width: min(340px, 100%); }
.preview figcaption { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.hero-visual .preview figcaption { color: var(--white); }
.card-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; margin-bottom: 12px; }
.card-head .pill { margin-left: auto; }
.card-title { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.2; margin: 4px 0; }
.card-title.small { font-size: 1.02rem; }
.card .muted, .card .note { color: var(--muted); font-size: .9rem; }
.glyph { width: 22px; height: 22px; flex: none; color: var(--accent); }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-weight: 650; }
.rank-no { font-weight: 850; font-size: 1.15rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.rank-name small { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 750; }
.score, .pill { font-weight: 800; font-variant-numeric: tabular-nums; background: var(--raised); border-radius: 999px; padding: 3px 10px; font-size: .95rem; }
.cook-list { list-style: none; margin: 12px 0; padding: 0; }
.cook-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-weight: 600; }
.cook-list time { color: var(--muted); font-weight: 500; white-space: nowrap; }
.recipe-chip { background: var(--surface); border-radius: 14px; padding: 12px 14px; }
.hands { margin-top: 14px; font-weight: 750; }
.versus .picks { display: grid; gap: 8px; margin-top: 12px; }
.pick { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-radius: 16px; background: var(--surface); border: 2px solid transparent; font-weight: 700; }
.pick.chosen { border-color: var(--accent); }
.check { color: var(--white); background: var(--accent); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; font-size: .85rem; }
.or { text-align: center; color: var(--muted); font-size: .85rem; font-weight: 650; }
.stack { display: grid; gap: 16px; justify-items: center; width: 100%; }
.stack .card { rotate: -1.5deg; }

.how { padding: 40px 0 56px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.step { position: relative; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: baseline; padding: 22px; border-radius: var(--radius); background: var(--surface); }
.step-no { grid-row: span 2; font-size: 2.6rem; font-weight: 850; line-height: 1; color: var(--red); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1.6rem; }
.step p { color: var(--muted); margin-top: 6px; }
.step.has-photo { grid-template-columns: 1fr; padding: 0 0 22px; overflow: hidden; }
.step-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 16px; }
.step.has-photo > :not(img) { padding-inline: 22px; }

.features { padding: 40px 0 24px; }
.feature { display: grid; gap: 28px; align-items: center; padding: 28px 0 52px; }
.feature-visual { display: grid; place-items: center; padding: 40px 18px; border-radius: 32px; background: var(--cream); }
.feature-name { display: flex; align-items: center; gap: 8px; font-weight: 750; color: var(--accent); margin-bottom: 10px; }
.feature h3 { font-size: clamp(2rem, 8vw, 3rem); }
.feature-copy > p:last-child { font-size: 1.15rem; color: var(--muted); margin-top: 14px; max-width: 32ch; }

.download { margin-block: 24px 56px; }
.download-inner { background: var(--red); color: var(--white); border-radius: 32px; padding: 56px 24px; text-align: center; display: grid; justify-items: center; gap: 28px; }
.download h2 { font-size: clamp(2.5rem, 11vw, 4.8rem); letter-spacing: -.05em; }
.download .cta { justify-content: center; flex-direction: column; }
.download .button { background: var(--white); color: var(--accent); }
.download .button:hover { background: var(--cream); }
.download .button:focus-visible { outline-color: var(--white); }
.download .cta-note { color: var(--white); font-weight: 600; }

@media (min-width: 641px) {
  :root { --gutter: 32px; }
  .brand img { width: 136px; }
  .home-header .brand img { width: 168px; }
  .site-footer span { flex-basis: auto; margin-right: auto; padding: 12px 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { grid-template-columns: 1fr; padding: 28px; }
  .step-no { grid-row: auto; font-size: 3.4rem; margin-bottom: 18px; }
  .step.has-photo { padding: 0 0 28px; }
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; padding: 40px 0 96px; }
  .hero-visual { padding: 64px 40px; min-height: 600px; }
  .hero-visual .preview, .feature-visual .preview, .hero-visual .card, .feature-visual .card { width: 390px; }
  .hero-visual .card, .feature-visual .card { padding: 24px; font-size: 1.06rem; }
  .stack .card { rotate: -2.5deg; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .feature { grid-template-columns: 1fr 1fr; gap: 72px; padding: 40px 0 72px; }
  .feature:nth-of-type(even) .feature-visual { order: 2; }
  .feature-visual { padding: 64px 40px; min-height: 480px; }
  .download-inner { padding: 96px 40px; }
}

/* Motion: opt-in only. Content is fully visible without support or with Reduce Motion. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  /* The headline and CTA never wait on an animation (LCP and paused/background tabs); only the visual rises in. */
  .hero-visual .card, .hero-visual .phone { animation: rise .8s cubic-bezier(.2, .7, .2, 1) .1s backwards; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
