/* Grocer website. Colours are the app's own (lib/theme/app_colors.dart), so
   the site and the app read as one product. */

:root {
  --ground: #F5F3F0;
  --ground-deep: #EBE8E2;
  --surface: #FFFFFF;
  --ink: #2B2B2B;
  --body: #474541;
  --slate: #64748B;
  --line: #E1DDD6;
  --coral: #E06D47;
  --coral-ink: #B8502D;
  --coral-soft: #F9E4DB;
  --green: #5E9E64;
  --green-soft: #E3F0E3;
  --shadow: 0 1px 2px rgba(43, 43, 43, .05), 0 12px 32px -12px rgba(43, 43, 43, .16);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #171513;
    --ground-deep: #1F1C19;
    --surface: #24211E;
    --ink: #F2EFEA;
    --body: #CFCAC2;
    --slate: #A1A8B3;
    --line: #36322D;
    --coral: #EE8560;
    --coral-ink: #F29B7A;
    --coral-soft: #3A2419;
    --green: #8CC592;
    --green-soft: #1E2B1F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--coral-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: balance;
}

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 21px;
  color: var(--ink); text-decoration: none; letter-spacing: -.02em;
}
.brand img { width: 30px; height: 30px; }
.site-header .brand img { width: 40px; height: 40px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--body); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta {
  color: #fff; background: var(--coral); padding: 8px 16px; border-radius: 999px;
}
.nav .nav-cta:hover { color: #fff; background: var(--coral-ink); }
@media (max-width: 720px) { .nav a:not(.nav-cta) { display: none; } }

/* ---------- buttons & badges ---------- */

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge-slot {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 168px; height: 52px; padding: 0 18px;
  border-radius: 12px; background: var(--ink); color: var(--ground);
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.badge-slot small { display: block; font-size: 11px; font-weight: 500; opacity: .7; line-height: 1.1; }
.badge-slot span { line-height: 1.15; }
.badge-slot:hover { color: var(--ground); opacity: .9; }

/* Placeholders: dashed and tinted so nothing unfinished can ship unnoticed.
   Search the source for data-placeholder to find every one. */
.ph {
  background: var(--coral-soft); color: var(--coral-ink);
  border: 1px dashed var(--coral); border-radius: 4px;
  padding: 0 5px; font-weight: 600; white-space: nowrap;
}

/* ---------- hero ---------- */

.hero { padding: 72px 0 88px; }
.hero .container {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--slate);
}
.eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--green);
}
.hero h1 { font-size: clamp(42px, 6.4vw, 72px); font-weight: 700; margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .lede { font-size: 20px; max-width: 34ch; margin: 0 0 32px; color: var(--body); }
.hero-note { margin: 16px 0 0; font-size: 14px; color: var(--slate); }

.hero-visual { position: relative; display: flex; justify-content: center; }

/* A phone-shaped placeholder at the App Store's 6.9" aspect (1320 x 2868). */
.phone {
  position: relative;
  width: 100%; max-width: 280px; aspect-ratio: 1320 / 2868;
  border-radius: 44px; padding: 10px;
  background: #1C1B19; box-shadow: var(--shadow);
  outline: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 34px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 60%, transparent) 14px 15px),
    var(--ground-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px; text-align: center;
}
.phone-screen strong { font-family: var(--display); color: var(--ink); font-size: 17px; line-height: 1.2; }
.phone-screen span { font-family: var(--mono); font-size: 11.5px; color: var(--slate); }

/* The idea of the product in one object: a total that stays under budget. */
.receipt {
  position: absolute; left: -8px; bottom: 36px; width: 240px;
  background: var(--surface); color: var(--ink);
  border-radius: 14px; padding: 16px 18px 14px; box-shadow: var(--shadow);
  font-family: var(--mono); font-size: 13px;
}
.receipt-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate);
  padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-variant-numeric: tabular-nums; }
.receipt-row.total { font-weight: 600; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.receipt-row.under { color: var(--green); font-weight: 600; }
.receipt-foot { margin-top: 10px; font-size: 10.5px; color: var(--slate); line-height: 1.4; }

@media (max-width: 880px) {
  .hero { padding: 48px 0 64px; }
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .receipt { left: 50%; transform: translateX(-118%); }
}
@media (max-width: 520px) {
  .receipt { position: relative; left: auto; bottom: auto; transform: none; margin: -80px auto 0; }
  .hero-visual { flex-direction: column; align-items: center; }
}

/* ---------- sections ---------- */

.section { padding: 88px 0; }
.section-alt { background: var(--ground-deep); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 46px); font-weight: 700; margin: 12px 0 14px; }
.section-head p { margin: 0; font-size: 18px; }

/* ---------- features ---------- */

.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 10px;
}
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--coral-soft); color: var(--coral-ink);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 21px; font-weight: 600; margin-top: 6px; }
.feature p { margin: 0; font-size: 16px; }
.feature.lead { grid-column: span 2; background: var(--ink); border-color: var(--ink); }
.feature.lead h3 { color: var(--ground); font-size: 26px; }
.feature.lead p { color: color-mix(in srgb, var(--ground) 78%, transparent); font-size: 17px; max-width: 52ch; }
.feature.lead .feature-icon { background: var(--coral); color: #fff; }
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features { grid-template-columns: 1fr; }
  .feature.lead { grid-column: auto; }
}

/* ---------- photo band ---------- */

.photo-band {
  position: relative; border-radius: 24px; overflow: hidden;
  aspect-ratio: 16 / 7; background: var(--ground-deep);
}
.photo-band img { width: 100%; height: 100%; object-fit: cover; }
.photo-band figcaption {
  position: absolute; left: 24px; bottom: 24px; right: 24px;
  max-width: 460px; padding: 18px 20px; border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
  font-family: var(--display); font-size: 21px; line-height: 1.25; font-weight: 600;
}
@media (max-width: 640px) {
  .photo-band { aspect-ratio: 4 / 3; }
  .photo-band figcaption { font-size: 17px; left: 12px; right: 12px; bottom: 12px; }
}

/* ---------- screenshots ---------- */

.shots {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.shot { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.shot .phone { max-width: 230px; border-radius: 36px; padding: 8px; }
.shot .phone-screen { border-radius: 28px; }
.shot h3 { font-size: 18px; font-weight: 600; }
.shot p { margin: 0; font-size: 15px; color: var(--slate); max-width: 26ch; }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }
@media (max-width: 480px) { .shots { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 880px; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px 28px; display: flex; flex-direction: column; gap: 14px;
}
.plan.pro { border: 2px solid var(--coral); }
.plan-name { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); }
.plan-price { font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--ink); line-height: 1; }
.plan-price small { font-family: var(--text); font-size: 16px; font-weight: 500; color: var(--slate); }
.plan ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 16px; }
.plan li::before {
  content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: var(--green-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E9E64' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.fine { font-size: 14px; color: var(--slate); margin: 22px 0 0; max-width: 70ch; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */

.faq { max-width: 760px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-size: 26px; font-weight: 400; color: var(--coral);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; max-width: 64ch; }

/* ---------- download band ---------- */

.cta {
  background: var(--coral); color: #fff; border-radius: 28px;
  padding: 56px 48px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.cta h2 { color: #fff; font-size: clamp(30px, 4vw, 42px); }
.cta p { margin: 10px 0 0; color: rgba(255, 255, 255, .88); font-size: 18px; }
.cta .badge-slot { background: #fff; color: var(--coral-ink); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; padding: 40px 28px; } }

/* ---------- footer ---------- */

.site-footer { padding: 48px 0 56px; border-top: 1px solid var(--line); margin-top: 88px; }
.site-footer .container {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: flex-start;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--body); text-decoration: none; font-size: 15px; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-meta { font-size: 14px; color: var(--slate); margin: 8px 0 0; }

/* ---------- legal & support pages ---------- */

.doc { padding: 56px 0 24px; }
.doc .container { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-toc { position: sticky; top: 88px; font-size: 14.5px; }
.doc-toc p { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin: 0 0 10px; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc-toc a { color: var(--body); text-decoration: none; }
.doc-toc a:hover { color: var(--coral-ink); }
.doc-body { max-width: 68ch; }
.doc-body h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 700; margin-bottom: 12px; }
.doc-meta { font-family: var(--mono); font-size: 13px; color: var(--slate); margin: 0 0 28px; }
.doc-summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 24px; margin: 0 0 40px;
}
.doc-summary h2 { font-size: 18px; margin: 0 0 8px; }
.doc-summary ul { margin: 0; padding-left: 20px; }
.doc-summary li { margin: 4px 0; }
.doc-body h2 { font-size: 26px; font-weight: 600; margin: 44px 0 12px; scroll-margin-top: 88px; }
.doc-body h3 { font-size: 19px; font-weight: 600; margin: 26px 0 8px; }
.doc-body p, .doc-body li { font-size: 16.5px; }
.doc-body ul { padding-left: 22px; }
.doc-body li { margin: 6px 0; }
.doc-body strong { color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
.doc-body table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.doc-body th { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); background: var(--ground-deep); font-weight: 500; }
.doc-body tr:last-child td { border-bottom: 0; }
.callout {
  border-left: 3px solid var(--coral); background: var(--coral-soft);
  padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0;
}
.callout p { margin: 0; }
@media (max-width: 860px) {
  .doc .container { grid-template-columns: 1fr; gap: 24px; }
  .doc-toc { position: static; }
}

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 12px; margin: 12px 0; }
.steps li::before {
  content: counter(step); width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: var(--ground);
  display: grid; place-items: center; font-size: 13px; font-weight: 600; margin-top: 1px;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
