/* Brunch — marketing site styles.
 *
 * The site is built from the app's own furniture, not from marketing-site
 * parts: the topic row with its rounded checkbox, tracked-uppercase section
 * labels with a count pill, cards with hairline borders on warm paper, and
 * a header that scrolls away with the page. Colors mirror
 * BrunchColors.light in app/lib/theme.dart.
 *
 * One face, like the app: the platform's own sans everywhere. Display lines
 * earn their emphasis from weight (700) and tight tracking (-2.2% of size),
 * which is BrunchType.display's rule; labels are tracked uppercase.
 *
 * What is NOT decorative and must keep working: .visually-hidden and
 * .hidden-field. The first labels the signup input for screen readers, the
 * second hides the Netlify honeypot from humans. Deleting either breaks
 * accessibility or spam filtering, not the design.
 */

/* === Design tokens === */
:root {
  --color-bg: #FBFAF6;            /* paper */
  --color-bg-alt: #F3F1EB;        /* surface2 */
  --color-bg-card: #FFFFFF;       /* surface */
  --color-accent: #2E5D4F;        /* pine */
  --color-accent-bright: #234A3F; /* pine, a step deeper */
  --color-accent-soft: #DDE8E2;   /* pineSoft */
  --color-on-accent: #FBFAF6;     /* onPine */
  --color-brass: #A8791C;
  --color-brass-soft: #F5E9CE;
  --color-text: #1A1C1B;          /* ink */
  --color-text-secondary: #565A57;/* inkSoft */
  --color-text-muted: #6E726D;    /* inkFaint */
  --color-border: #DFDCD3;        /* line */
  --color-focus: #9DB8AF;         /* pineLine */

  --font-body: system-ui, -apple-system, "Helvetica Neue", sans-serif;

  --shadow-card: 0 1px 2px rgba(26, 28, 27, 0.06),
    0 8px 24px rgba(26, 28, 27, 0.06);
  --max-width: 1020px;
  --radius: 14px;
  --radius-cell: 10px;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Display lines: one face, weight and tracking doing the work. */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.022em; line-height: 1.12; }

::selection { background: var(--color-accent-soft); }

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-bright); }

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

/* Tracked uppercase — the app's label register. */
.eyebrow {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }
section + section { border-top: 1px solid var(--color-border); }

.bg-alt { background: var(--color-bg-alt); }

.section-header { max-width: 640px; margin-bottom: 44px; }
.section-header h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 14px; }
.section-header p { color: var(--color-text-secondary); }

/* Long-form pages: privacy, support, the thanks pages. */
.prose {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px;
}
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); margin-bottom: 12px; }
.prose h2 {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 48px 0 14px;
}
.prose p { margin-bottom: 16px; }
.prose .lede { color: var(--color-text-muted); margin-bottom: 36px; }

/* === Nav — scrolls away with the page, like the app's header === */
.nav {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

.nav .container { display: flex; align-items: center; gap: 32px; }

.nav-brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  color: var(--color-text);
}
.nav-brand:hover { color: var(--color-accent); }

.nav-links { display: flex; gap: 26px; list-style: none; margin-left: auto; }
.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--color-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
}

/* === Hero === */
.hero { padding: 72px 0 0; border-top: none; overflow: hidden; }

.hero .eyebrow { margin-bottom: 18px; }

.hero h1 {
  font-size: clamp(2.2rem, 4.3vw, 2.8rem);
  margin-bottom: 22px;
}
.hero h1 .q { color: var(--color-accent); }

.hero .subtitle {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-bottom: 34px;
}

/* The app's two button looks: primary is a pine fill, ghost is surface-2
   under ink-soft with a hairline — the border is how this design says
   "this is an object". */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.cta {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 12px;
  transition: background 150ms ease;
}
.cta:hover { background: var(--color-accent-bright); color: var(--color-on-accent); }

.cta-ghost {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 12px;
  transition: background 150ms ease;
}
.cta-ghost:hover { background: var(--color-bg-card); color: var(--color-text); }

/* === Hero grid: copy beside the product shot === */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 48px;
  align-items: end;
}
.hero-copy { padding-bottom: 72px; }

/* === Features — a single column, read top to bottom === */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.feature p { max-width: 65ch; }

.feature {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

/* Each feature's icon, in the app's tile language: a pine stroke on a
   pine-soft rounded square, like an avatar with initials. */
.f-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--color-accent-soft);
  border-radius: 13px;
  margin-bottom: 14px;
}
.f-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature h3 { font-size: 1.2rem; margin-bottom: 10px; }
.feature p { color: var(--color-text-secondary); font-size: 0.97rem; }

/* === Use cases: a bold "Brunch is for…" lead, then the expansion === */
.usecases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px 48px;
  max-width: 880px;
}
.usecase p { color: var(--color-text-secondary); }
.usecase strong { color: var(--color-text); font-weight: 700; }

/* === Screens: a deep pine band, so the warm paper shots read warm ===
   On a paper page the screenshots' own paper blends in and only their white
   cards register — "washed out". Against pine they glow. */
.screens { background: var(--color-accent); }
.screens h2 { color: var(--color-on-accent); }
.screens .phone-caption { color: var(--color-on-accent); opacity: 0.78; }

/* The device switcher: two hidden radios, labels styled as the app's
   segmented control, and sibling selectors doing the swap. No JavaScript. */
.dev-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.screens-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: none;
}

.device-tabs {
  display: flex;
  background: var(--color-accent-bright);
  border-radius: 12px;
  padding: 3px;
}
.device-tabs label {
  padding: 7px 22px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-on-accent);
  opacity: 0.72;
  cursor: pointer;
  transition: background 150ms ease, opacity 150ms ease;
}
#dev-iphone:checked ~ .screens-head label[for="dev-iphone"],
#dev-ipad:checked ~ .screens-head label[for="dev-ipad"],
#dev-mac:checked ~ .screens-head label[for="dev-mac"] {
  background: var(--color-bg);
  color: var(--color-accent);
  opacity: 1;
}
#dev-iphone:focus-visible ~ .screens-head label[for="dev-iphone"],
#dev-ipad:focus-visible ~ .screens-head label[for="dev-ipad"],
#dev-mac:focus-visible ~ .screens-head label[for="dev-mac"] {
  outline: 2px solid var(--color-on-accent);
  outline-offset: 1px;
}

.screens-row { display: none; }
#dev-iphone:checked ~ .set-iphone,
#dev-ipad:checked ~ .set-ipad {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  align-items: start;
}
#dev-mac:checked ~ .set-mac { display: grid; grid-template-columns: 1fr; }

/* One Mac, wide, in the same ink frame language. */
.mac-full {
  width: min(880px, 100%);
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 18px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(26, 28, 27, 0.2),
    0 16px 40px rgba(26, 28, 27, 0.25);
}
.mac-full img { border-radius: 10px; }

/* A whole iPad, same frame language as the phones. */
.pad-full {
  width: min(340px, 100%);
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 26px;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(26, 28, 27, 0.2),
    0 16px 40px rgba(26, 28, 27, 0.25);
}
.pad-full img { border-radius: 16px; }

/* The product shot in a phone-like frame: ink rails, like the hardware.
   Against a dark frame the app's warm paper reads as a lit warm screen;
   against a pale one it read washed out. Used in the hero, cut off by the
   section's bottom edge. */
.phone {
  width: min(320px, 100%);
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 48px 48px 0 0;
  padding: 11px 11px 0;
  box-shadow: 0 2px 4px rgba(26, 28, 27, 0.18),
    0 16px 40px rgba(26, 28, 27, 0.18);
}
.phone img { border-radius: 37px 37px 0 0; }

/* A whole phone, all four corners, for the screens row. */
.phone-full {
  width: min(300px, 100%);
  margin: 0 auto;
  background: var(--color-text);
  border-radius: 50px;
  padding: 11px;
  box-shadow: 0 2px 4px rgba(26, 28, 27, 0.2),
    0 16px 40px rgba(26, 28, 27, 0.25);
}
.phone-full img { border-radius: 39px; }

.phone-caption {
  margin-top: 14px;
  text-align: center;
}

/* Apple's guidelines size the badge by height only, so the lockup keeps its
   proportions and its required clear space. Don't set a width. */
.app-store-badge { display: inline-block; margin-bottom: 20px; }
.app-store-badge img { height: 54px; width: auto; }

/* === Signup — the now bar's register, grown to a section === */
#updates { background: var(--color-accent); border-top: none; padding: 72px 0; }

.signup { max-width: 620px; margin: 0 auto; }
.signup .eyebrow { color: var(--color-on-accent); opacity: 0.78; margin-bottom: 14px; }
.signup h2 { color: var(--color-on-accent); font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin-bottom: 10px; }
.signup p { color: var(--color-on-accent); opacity: 0.78; }

.signup-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.signup-form input[type="email"] { flex: 1 1 240px; border-color: transparent; }
.signup-form .signup-submit {
  background: var(--color-bg);
  color: var(--color-accent);
  border-color: var(--color-bg);
}
.signup-form .signup-submit:hover { background: #FFFFFF; border-color: #FFFFFF; color: var(--color-accent-bright); }


.dot {
  flex: none;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-on-accent);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* === Forms === */
.support-form { display: flex; flex-direction: column; gap: 8px; margin: 24px 0 32px; }
.support-form label {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 12px;
}

input, select, textarea, button {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-cell);
  background: var(--color-bg-card);
  color: var(--color-text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 0;
}

button {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-color: var(--color-accent);
  cursor: pointer;
  font-weight: 600;
  transition: background 150ms ease;
}
button:hover { background: var(--color-accent-bright); border-color: var(--color-accent-bright); }

/* The Netlify honeypot. Hidden from humans, still in the DOM for the bots that
   fill every field they find. `display: none` is fine here — the point is that
   nobody real can reach it. */
.hidden-field { display: none; }

/* An input's label kept for screen readers when the design uses a placeholder
   instead. Not `display: none`, which would hide it from them too. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === FAQ === */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding: 16px 32px 16px 4px;
  transition: background 150ms ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--color-bg-alt); }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-accent);
  font-size: 1.25rem;
  font-weight: 400;
  transition: transform 150ms ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { margin: 2px 4px 18px; color: var(--color-text-secondary); }

/* === Footer === */
.footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding: 44px 0;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  list-style: none;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--color-text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer-links a:hover { color: var(--color-accent); }
.footer-tagline { color: var(--color-text-secondary); }
.footer-copyright { color: var(--color-text-muted); font-size: 0.85rem; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* === Mobile === */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 12px; }
  .hero-copy { padding-bottom: 8px; }
  .phone { width: min(320px, 92%); }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 8px 24px 16px;
    z-index: 50;
  }
  .nav { position: relative; }
  .nav-links { top: 100%; }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; }
  section { padding: 56px 0; }
  .hero { padding: 52px 0 56px; }
}
