/* ============================================================================
   Dinner Board — marketing site
   ----------------------------------------------------------------------------
   No framework and no build step. Azure Static Web Apps serves these files as
   they are, which keeps deploys instant and means there is no dependency tree
   to audit — the same choice the iOS app makes.

   Motion is CSS transitions driven by one IntersectionObserver, plus native
   scroll-driven animation where it is supported. Every animation is disabled
   under prefers-reduced-motion; see the block at the end.
   ========================================================================= */

:root {
  /* Palette lifted from the app's own share cards, so the site and the thing
     it is selling look like the same product. */
  --cream: #fbf5ea;
  --cream-deep: #f5ebd9;
  --ink: #221f1b;
  --ink-soft: #55504a;
  --ink-faint: #8b8479;
  --rust: #c2662b;
  --rust-deep: #a4541f;
  --sage: #6b8a63;
  --frost: #4a90b8;
  --surface: #ffffff;
  --hairline: #e8dfcd;
  --shadow-sm: 0 1px 2px rgba(34, 31, 27, .05), 0 4px 12px rgba(34, 31, 27, .04);
  --shadow-md: 0 2px 6px rgba(34, 31, 27, .06), 0 18px 40px rgba(34, 31, 27, .09);
  --shadow-lg: 0 4px 12px rgba(34, 31, 27, .08), 0 40px 80px rgba(34, 31, 27, .14);

  --measure: 66ch;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 12vh, 160px);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --cream: #16150f;
    --cream-deep: #1d1b15;
    --ink: #f4efe4;
    --ink-soft: #b8b1a4;
    --ink-faint: #857e72;
    --rust: #e0913f;
    --rust-deep: #eda75a;
    --surface: #211f19;
    --hairline: #322e25;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);
    --shadow-md: 0 2px 6px rgba(0,0,0,.35), 0 18px 40px rgba(0,0,0,.3);
    --shadow-lg: 0 4px 12px rgba(0,0,0,.4), 0 40px 80px rgba(0,0,0,.45);
  }
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto is not optional here. The screenshots carry width/height
   attributes so the layout reserves the right box before they load; without
   height:auto the attribute height survives max-width clamping the width,
   and every screenshot renders ~14% too tall. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rust); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.wrap { width: min(1180px, 100% - var(--gutter) * 2); margin-inline: auto; }
.narrow { width: min(720px, 100% - var(--gutter) * 2); margin-inline: auto; }

/* ── Type ─────────────────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(42px, 7.5vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.1; }
h3 { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.25; }
p  { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2.2vw, 22px); line-height: 1.55; color: var(--ink-soft); }

.eyebrow {
  font: 600 12px/1 var(--sans);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--rust); margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--hairline); max-width: 80px; }
.eyebrow.center { justify-content: center; }
.eyebrow.center::after, .eyebrow.center::before {
  content: ""; height: 1px; width: 44px; background: var(--hairline); flex: none;
}

/* ── Scroll progress ──────────────────────────────────────────────────────── */

.progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90;
  background: var(--rust); transform-origin: 0 50%; transform: scaleX(0);
}

/* Native scroll-driven animation where the browser supports it — no JS at all.
   The JS fallback below covers everything else. */
@supports (animation-timeline: scroll()) {
  .progress {
    animation: grow linear;
    animation-timeline: scroll(root block);
  }
}
@keyframes grow { to { transform: scaleX(1); } }

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; gap: 16px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: padding .3s var(--ease-out), border-color .3s var(--ease-out);
}
.nav[data-stuck="true"] { padding-block: 11px; border-bottom-color: var(--hairline); }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; margin-right: auto; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.brand b { font: 600 17px/1.15 var(--sans); letter-spacing: -.01em; display: block; }
.brand span { font-size: 11.5px; color: var(--ink-faint); letter-spacing: .01em; }

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--ink-soft); text-decoration: none; font-size: 15px; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
@media (max-width: 800px) { .nav-links { display: none; } }

/* Below this the wordmark, the tagline and the button stop fitting side by
   side, and the button was being pushed off the right edge. */
@media (max-width: 460px) {
  .nav { padding-inline: 18px; gap: 10px; }
  .brand img { width: 32px; height: 32px; }
  .brand b { font-size: 15.5px; }
  .brand span span { display: none; }
  .nav .btn.small { padding: 9px 15px; font-size: 13.5px; white-space: nowrap; }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  --bg: var(--rust);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px; border: 0;
  background: var(--bg); color: #fff;
  font: 600 15.5px/1 var(--sans); text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--rust-deep); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--hairline); box-shadow: none;
}
.btn.ghost:hover { background: var(--surface); border-color: var(--ink-faint); }
.btn.small { padding: 10px 19px; font-size: 14px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ── Reveal on scroll ─────────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="scale"] { transform: translateY(30px) scale(.97); }
[data-reveal="left"]  { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero { position: relative; padding: clamp(48px, 9vh, 104px) 0 clamp(60px, 10vh, 120px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; z-index: 0;
  width: 900px; height: 900px; top: -420px; right: -240px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rust) 15%, transparent), transparent 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr .95fr; } }

.hero h1 em { font-style: normal; color: var(--rust); }
.hero .lead { max-width: 30ch; margin-top: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--ink-faint); }

/* Phone frame — drawn, not an image, so it stays crisp at any size. */
.phone {
  position: relative; width: min(340px, 78vw); margin-inline: auto;
  border-radius: 44px; padding: 10px;
  background: linear-gradient(160deg, #3a3630, #191713);
  box-shadow: var(--shadow-lg);
}
/* No drawn notch. The captures include the device's own Dynamic Island, so a
   pseudo-element island sits on top of the real one and reads as two. */
.phone img { border-radius: 35px; display: block; }
.phone-stack { position: relative; }
.phone-stack .phone { transition: transform .9s var(--ease-out); }

.float-card {
  position: absolute; z-index: 3;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 15px; padding: 12px 15px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 11px;
  font-size: 13.5px; line-height: 1.35; white-space: nowrap;
  animation: bob 5.5s var(--ease-out) infinite;
}
.float-card b { display: block; font-size: 14px; }
.float-card small { color: var(--ink-faint); }
.float-card .dot {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 15px;
  background: color-mix(in srgb, var(--frost) 16%, transparent);
}
.float-card.one { top: 16%; left: -8%; animation-delay: -1s; }
.float-card.two { bottom: 17%; right: -10%; animation-delay: -3s; }
@media (max-width: 620px) {
  .float-card.one { left: -2%; scale: .88; }
  .float-card.two { right: -2%; scale: .88; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ── Sections ─────────────────────────────────────────────────────────────── */

section { padding-block: var(--section-y); position: relative; }
.section-head { max-width: var(--measure); margin-bottom: clamp(36px, 6vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.tinted { background: var(--cream-deep); }

/* ── Pull quote ───────────────────────────────────────────────────────────── */

.quote { text-align: center; }
.quote p {
  font-family: var(--serif); font-size: clamp(26px, 4.4vw, 46px);
  line-height: 1.22; letter-spacing: -.02em; margin: 0 auto; max-width: 18ch;
}
.quote .who {
  margin-top: 26px; max-width: none;
  font-size: 15.5px; color: var(--ink-faint); font-family: var(--sans);
}

/* ── Sticky feature showcase ──────────────────────────────────────────────── */

.showcase { display: grid; gap: 40px; }
@media (min-width: 900px) { .showcase { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }

.showcase-sticky { position: sticky; top: 118px; }
@media (max-width: 899px) { .showcase-sticky { position: static; } }

.step { padding: 34px 0; border-top: 1px solid var(--hairline); }
.step:first-child { border-top: 0; }
.step .n {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--rust); color: #fff;
  font: 600 13px/1 var(--sans); margin-bottom: 15px;
}
.step h3 { margin-bottom: 9px; }
.step p { color: var(--ink-soft); margin: 0; }

/* ── Feature grid ─────────────────────────────────────────────────────────── */

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 18px; padding: 26px;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 20px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--rust) 12%, transparent);
}
.card .ico.frost { background: color-mix(in srgb, var(--frost) 15%, transparent); }
.card .ico.sage  { background: color-mix(in srgb, var(--sage) 15%, transparent); }
.card h3 { font-size: 19px; margin-bottom: 7px; }
.card p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }

/* ── Screenshot rail ──────────────────────────────────────────────────────── */

.rail {
  display: flex; gap: 26px; overflow-x: auto; padding: 8px var(--gutter) 30px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure { margin: 0; flex: none; width: 258px; scroll-snap-align: center; }
.rail figcaption { margin-top: 16px; font-size: 14.5px; color: var(--ink-soft); text-align: center; }
.rail figcaption b { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 3px; }
.rail .phone { width: 100%; border-radius: 34px; padding: 7px; }
.rail .phone img { border-radius: 27px; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */

.tiers { display: grid; gap: 20px; align-items: start; }
@media (min-width: 780px) { .tiers { grid-template-columns: 1fr 1fr; } }

.tier {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 22px; padding: 32px;
}
.tier.pro { border-color: var(--rust); position: relative; box-shadow: var(--shadow-md); }
.tier .flag {
  position: absolute; top: -13px; left: 32px;
  background: var(--rust); color: #fff; border-radius: 999px;
  font: 600 11.5px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase;
  padding: 7px 13px;
}
.tier h3 { font-size: 22px; }
.price { display: flex; align-items: baseline; gap: 9px; margin: 14px 0 6px; }
.price .amount { font-family: var(--serif); font-size: 42px; letter-spacing: -.03em; }
.price .unit { color: var(--ink-faint); font-size: 14.5px; }
.tier > p { color: var(--ink-soft); font-size: 15px; }
.tier ul { list-style: none; padding: 0; margin: 22px 0 0; }
.tier li { display: flex; gap: 11px; padding: 7px 0; font-size: 15.5px; align-items: flex-start; }
.tier li::before {
  content: "✓"; color: var(--sage); font-weight: 700; flex: none;
  font-size: 14px; line-height: 1.55;
}
.tier.pro li::before { color: var(--rust); }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */

.faq { border-top: 1px solid var(--hairline); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font: 600 17.5px/1.4 var(--sans);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 400; color: var(--rust); transition: transform .3s var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-soft); margin: 0 0 22px; max-width: var(--measure); }

/* ── Forms ────────────────────────────────────────────────────────────────── */

.field { margin-bottom: 17px; }
.field label { display: block; font: 600 14px/1 var(--sans); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; font: 400 16px/1.45 var(--sans);
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--hairline); border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--rust);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rust) 18%, transparent);
}
.field .hint { font-size: 13px; color: var(--ink-faint); margin-top: 6px; }
.field.bad input, .field.bad textarea { border-color: #c0392b; }
.field .err { font-size: 13px; color: #c0392b; margin-top: 6px; display: none; }
.field.bad .err { display: block; }

.form-note {
  padding: 15px 17px; border-radius: 12px; margin-top: 18px; font-size: 15px;
  display: none;
}
.form-note.ok  { display: block; background: color-mix(in srgb, var(--sage) 14%, transparent); }
.form-note.bad { display: block; background: color-mix(in srgb, #c0392b 11%, transparent); }

/* ── Callout ──────────────────────────────────────────────────────────────── */

.callout {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 20px; padding: clamp(28px, 5vw, 48px);
}
.callout.center { text-align: center; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--hairline); padding: 52px 0 40px;
  font-size: 14.5px; color: var(--ink-soft);
}
.foot-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal { width: 100%; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hairline); color: var(--ink-faint); font-size: 13.5px; }

/* ── Article pages (privacy / support copy) ───────────────────────────────── */

.doc h2 { font-size: clamp(21px, 2.6vw, 26px); margin: 44px 0 12px; }
.doc h2:first-of-type { margin-top: 0; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 20px; margin: 0 0 1em; }
.doc li { margin-bottom: 7px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .updated { color: var(--ink-faint); font-size: 14px; }

/* Page titles on the inner pages need air before the standfirst. */
h1 + .lead, h1 + .updated { margin-top: 16px; }

/* ── Motion off ───────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .float-card { animation: none; }
}
