/* Peach palette tokens, copied from the admin dashboard (backend/worker.js) so the site matches the app. */
@font-face {
  font-family: Pacifico;
  src: url(/assets/Pacifico-Regular.ttf) format("truetype");
  font-display: swap;
}

:root {
  --page: #FFF6EF; --card: #FFFFFF; --sidebar: #FCE5D6; --wash: #FBEADF; --border: #F0D9CA; --edge: #A0745F;
  --fg: #2B160C; --muted: #6A4636; --primary: #FBAE84; --primary-hover: #F7A276; --primary-pressed: #F29468; --primary-fg: #3A1608;
  --ink: #8A2812; --ring: #3A1608; --danger: #B3261E; --sidebar-fg: #3A1608; --nav: #5E3624; --group: #76503E; --hover: rgba(138,40,18,.09);
  --selected: #FFF0E6; --shadow: 0 12px 32px rgba(58,22,8,.22); --good: #0A6B45; --good-bg: #E3F6EC;
  --radius-field: 6px; --radius-button: 10px; --radius-card: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --display: ui-rounded, "SF Pro Rounded", var(--font); --script: Pacifico, "Snell Roundhand", cursive;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1C1A18; --card: #26221F; --sidebar: #2B2521; --wash: #322B26; --border: #3D3530; --edge: #8A7C72;
    --fg: #F2EDE4; --muted: #BDB3AA; --primary: #FF8A6B; --primary-hover: #FF9A7E; --primary-pressed: #F27C5D; --primary-fg: #2B0E05;
    --ink: #FF8A6B; --ring: #F2EDE4; --danger: #FF8F8A; --sidebar-fg: #F2EDE4; --nav: #D6CCC3; --group: #B5A89E; --hover: rgba(255,138,107,.12);
    --selected: #33291F; --shadow: 0 12px 32px rgba(0,0,0,.6); --good: #7AD9A8; --good-bg: #1D3328;
  }
}

/* Base. Mobile first (320px wide); every color below is a token from the blocks above. */
*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font: 1.0625rem/1.6 var(--font);
}

img { max-width: 100%; height: auto; }

a { color: var(--ink); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); color: var(--fg); text-wrap: balance; }
h1 { margin: 0 0 1rem; font-size: clamp(2.25rem, 1.4rem + 4.2vw, 3.75rem); font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
h2 { margin: 0 0 1rem; font-size: clamp(1.75rem, 1.35rem + 2vw, 2.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
h3 { margin: 0 0 .25rem; font-size: 1.1875rem; font-weight: 700; line-height: 1.3; }
p { text-wrap: pretty; }

.script { font-family: var(--script); }

/* Layout: a 60em page; prose-only sections keep the same left edge with a 40em text column. */
.wrap { max-width: 62em; margin-inline: auto; padding-inline: 1rem; }
.narrow > * { max-width: 40em; }
main > section > .wrap { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.band { background: var(--wash); }

/* Rules and Privacy pages: long prose, so smaller section headings than the home page. */
.legal h2 { margin-top: 2rem; font-size: 1.5rem; }
.legal li + li { margin-top: .375rem; }

/* The 404 page: a bare <main> without sections. */
main:not(#main) { max-width: 42em; margin-inline: auto; padding: 3rem 1rem; }

/* Skip link: off screen until it has keyboard focus. */
.skip {
  position: absolute; top: -10rem; left: 1rem; z-index: 1;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
  border-radius: var(--radius-button); background: var(--primary); color: var(--primary-fg);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header: icon and name on the left, links on the right (they wrap below on a narrow phone). */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; padding-block: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .625rem; min-height: 44px; color: var(--ink); font: 1.625rem/1.2 var(--script); text-decoration: none; }
.brand::before { content: ""; flex: none; width: 2.5rem; height: 2.5rem; border-radius: 22%; background: url(/favicon.png) center / cover no-repeat; }
.site-header ul { display: flex; flex-wrap: wrap; margin: 0 -.625rem; padding: 0; list-style: none; }
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .625rem; border-radius: var(--radius-button); color: var(--fg); font-weight: 600; text-decoration: none; }
.site-header nav a:hover { background: var(--hover); }

/* Hero */
.hero .wrap { display: grid; gap: 2.5rem; }
.lede { max-width: 26em; margin: 0 0 1.5rem; color: var(--muted); font-size: 1.25rem; line-height: 1.5; }
.soon { display: inline-block; margin: 0; padding: .5rem 1rem; border-radius: 999px; background: var(--sidebar); color: var(--sidebar-fg); font-weight: 600; }
/* The App Store link that replaces .soon once the app is live. */
.store {
  display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1.25rem;
  border-radius: var(--radius-button); background: var(--primary); color: var(--primary-fg);
  font-weight: 700; text-decoration: none;
}
.store:hover { background: var(--primary-hover); }

/* Screenshots, framed like a phone: a card-colored bezel with a hairline edge. */
.phone { justify-self: center; width: min(100%, 20rem); margin: 0; }
.phone img {
  display: block; width: 100%;
  border-radius: 12.5% / 5.75%;
  box-shadow: 0 0 0 .5rem var(--card), 0 0 0 calc(.5rem + 1px) var(--border), var(--shadow);
}

/* What it does: two rows, each a short list beside a screenshot. */
.feature { display: grid; gap: 2.5rem; align-items: center; margin-top: 2rem; }
.feature + .feature { margin-top: 3.5rem; }
.points { display: grid; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.points p { margin: 0; }

/* A friendly table */
.list { margin: 0; padding-left: 1.25rem; }
.list li + li { margin-top: .5rem; }
.list li::marker { color: var(--ink); }

/* Cozy by design: set like a cafe menu, with dotted leaders. */
.menu { max-width: 32rem; margin: 1.75rem 0 0; padding: .75rem clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--card); }
/* When a line is too narrow for both, the price drops to its own line, right-aligned, and the leader runs to the edge. */
.menu div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; padding-block: .5rem; }
.menu dt { display: flex; flex: 1 0 auto; align-items: baseline; gap: .5rem; font: 700 1.125rem/1.4 var(--display); }
.menu dt::after { content: ""; flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--edge); }
.menu dd { margin: 0 0 0 auto; color: var(--ink); font: 700 1.125rem/1.4 var(--display); }
.menu .note { flex-basis: 100%; margin: .125rem 0 0; color: var(--muted); font: .9375rem/1.5 var(--font); }

/* Support */
.contact { font-size: 1.1875rem; }
.help { display: grid; gap: 1.5rem; margin-top: 2rem; }
.help p { margin: 0; }

/* Footer */
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.5rem; padding-block: 1.5rem 2rem; color: var(--muted); }
.site-footer p { margin: 0; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* Wide screens: a two-column hero and alternating feature rows. */
@media (min-width: 48em) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 20rem; align-items: center; gap: 4rem; }
  .feature { grid-template-columns: minmax(0, 30rem) 20rem; justify-content: space-between; gap: 4rem; }
  .feature.flip { grid-template-columns: 20rem minmax(0, 30rem); }
  .feature.flip .phone { order: -1; }
  .help { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}
