@import url("/assets/fonts.css");

/* Tonight's own palette (Tonight/Theme.swift): cream ground, tomato accent, sage support, charcoal ink. */
:root {
  --ground: #f9f2e4;
  --surface: #fffaf1;
  --ink: #211f1b;
  --ink-soft: #5b544b;
  --tomato: #c7291c;
  --tomato-soft: #f6dcd3;
  --sage: #4e6a4f;
  --sage-ink: #f4efe4;
  --line: rgba(33, 31, 27, 0.12);
  --shadow: 0 30px 80px -30px rgba(92, 46, 22, 0.35);
  --radius: 20px;
  --radius-lg: 32px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #171412;
    --surface: #221e1a;
    --ink: #f3ece0;
    --ink-soft: #b8ad9f;
    --tomato: #ec5a47;
    --tomato-soft: #3a211b;
    --sage: #3f5a41;
    --sage-ink: #f3ece0;
    --line: rgba(243, 236, 224, 0.14);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.6 var(--sans); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--tomato); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* Navigation */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 22px/1 var(--serif); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-soft); transition: color 160ms ease; }
.nav-links a:hover { color: var(--ink); }
.nav .store-badge img { height: 40px; width: auto; }

/* Buttons */
.store-badge { display: inline-block; border-radius: 10px; transition: transform 160ms var(--ease-out); }
.store-badge:active { transform: scale(0.97); }
.store-badge img { height: 54px; width: auto; }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--tomato); }
.text-link .ph { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .text-link:hover .ph { transform: translateX(3px); } }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.04; }
h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.06; }
h3 { font-size: 26px; line-height: 1.15; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-soft); max-width: 46ch; margin: 22px 0 0; }
.muted { color: var(--ink-soft); }
em.accent { font-style: italic; color: var(--tomato); }

section { padding: clamp(72px, 10vw, 128px) 0; }

/* Hero */
.hero { padding-top: clamp(40px, 6vw, 88px); overflow: clip; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 40px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 34px; }
.hero-art { position: relative; min-height: 640px; }
.hero-photo { position: absolute; right: 0; top: 40px; width: 64%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-lg); transform: rotate(4deg); box-shadow: var(--shadow); }
.hero-art .phone { position: absolute; left: 4%; top: 0; width: 56%; }

/* A real screenshot in a simple device frame */
.phone { background: #211f1b; padding: 10px; border-radius: 46px; box-shadow: var(--shadow); }
.phone img { width: 100%; border-radius: 37px; aspect-ratio: 1320 / 2868; object-fit: cover; background: var(--surface); }

/* The 5 pm moment */
.moment { padding-bottom: 0; }
.moment h2 { max-width: 20ch; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 56px; }
.strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); }
.strip img:nth-child(even) { margin-top: 48px; }

/* How it works: three staggered steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); margin-top: 64px; align-items: start; }
.step:nth-child(2) { margin-top: 72px; }
.step:nth-child(3) { margin-top: 144px; }
.step .phone { width: min(300px, 100%); }
.step h3 { margin-top: 28px; }
.step p { margin: 10px 0 0; color: var(--ink-soft); max-width: 32ch; }

/* Features bento */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: minmax(220px, auto); gap: 16px; margin-top: 56px; }
.cell { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.cell p { margin: 0; color: var(--ink-soft); max-width: 36ch; }
.cell .ph { font-size: 28px; color: var(--tomato); }
.cell-week { grid-column: span 3; grid-row: span 2; padding-bottom: 0; }
.cell-week .shot { margin-top: auto; align-self: center; width: min(320px, 80%); border-radius: 36px 36px 0 0; overflow: hidden; border: 10px solid #211f1b; border-bottom: 0; translate: 0 10px; }
.cell-week .shot img { aspect-ratio: 1320 / 2100; object-fit: cover; object-position: top; }
.cell-cook { grid-column: span 3; flex-direction: row; align-items: center; gap: 28px; }
.cell-cook .shot { flex: none; width: 150px; border-radius: 24px; overflow: hidden; border: 7px solid #211f1b; }
.cell-share { grid-column: span 3; background: var(--sage); color: var(--sage-ink); border: 0; }
.cell-share p { color: color-mix(in srgb, var(--sage-ink) 80%, transparent); }
.cell-share .ph { color: var(--sage-ink); }
.cell-fresh { grid-column: span 4; color: #fffaf1; border: 0; justify-content: flex-end; min-height: 300px; }
.cell-fresh img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cell-fresh::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(23, 18, 14, 0.82)); z-index: 0; }
.cell-fresh > :not(img) { position: relative; z-index: 1; }
.cell-fresh p { color: rgba(255, 250, 241, 0.86); }
.cell-safe { grid-column: span 2; background: var(--tomato-soft); border: 0; }

/* Plus */
.plans { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; margin-top: 56px; align-items: stretch; }
.plan { border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); }
.plan-free { border: 1px solid var(--line); }
.plan-plus { background: var(--tomato); color: #fffaf1; }
.plan h3 { font-size: 30px; }
.plan ul { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; }
.plan li .ph { font-size: 22px; margin-top: 2px; flex: none; }
.plan-free li .ph { color: var(--sage); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-top: 14px; }
.price strong { font: 600 44px/1 var(--serif); }
.plan-plus .fine { color: rgba(255, 250, 241, 0.82); font-size: 15px; margin: 26px 0 0; }
.plan-plus .store-badge { margin-top: 26px; }

/* FAQ */
.faq details { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 64px; padding: 18px 0; font: 600 20px/1.3 var(--sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ph { flex: none; font-size: 22px; color: var(--tomato); transition: transform 200ms var(--ease-out); }
.faq details[open] summary .ph { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--ink-soft); max-width: 62ch; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; }
.footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: start; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
.footer small { display: block; margin-top: 14px; color: var(--ink-soft); }

/* Legal and support pages */
.doc { padding: clamp(40px, 6vw, 80px) 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(40px, 5vw, 60px); }
.doc h2 { font-size: 28px; margin-top: 2.2em; }
.doc p, .doc li { color: var(--ink-soft); }
.doc strong { color: var(--ink); }
.doc a { color: var(--tomato); }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.doc li { margin: 0.4em 0; }

/* Motion: a one-time hero entrance and scroll reveals, both off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 700ms var(--ease-out) both; }
  .rise-2 { animation-delay: 80ms; }
  .rise-3 { animation-delay: 160ms; }
  .rise-4 { animation-delay: 240ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(32px); } }
  }
}

/* Phones and small tablets: one column, 16px gutters, nothing side by side. */
@media (max-width: 900px) {
  .nav-links li:not(:last-child) { display: none; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-art { min-height: 0; aspect-ratio: 1 / 1.05; }
  .hero-art .phone { width: 52%; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .step:nth-child(n) { margin-top: 0; }
  .step { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; }
  .step h3 { margin-top: 0; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento .cell { grid-column: auto; grid-row: auto; }
  .cell-cook { flex-direction: column; align-items: flex-start; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .step { grid-template-columns: minmax(0, 1fr); }
  .step .phone { width: 70%; }
  .strip img:nth-child(even) { margin-top: 24px; }
}
