/* Palette lifted from the app's design tokens (packages/ui-core/src/tokens.ts)
   so the site and the product feel like one thing. */
:root {
  --background: #f4f2ec;
  --surface: #ffffff;
  --border: #e0dcd2;
  --text: #26241f;
  --muted: #6d675c;
  --accent: #2f7d5c;
  --accent-soft: #e0efe7;
  --board: #184b2a;
  --board-light: #4c7a58;
  --radius: 16px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #191a17;
    --surface: #23241f;
    --border: #3a3b33;
    --text: #eceada;
    --muted: #a5a294;
    --accent: #5cb88c;
    --accent-soft: #27352d;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

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

header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.bar { display: flex; align-items: center; gap: 12px; }
.bar img { width: 36px; height: 36px; border-radius: 9px; }
.bar strong { font-size: 18px; letter-spacing: -0.2px; white-space: nowrap; }
.bar nav { margin-left: auto; display: flex; gap: 20px; font-size: 15px; }
.bar nav a { color: var(--muted); text-decoration: none; }
.bar nav a:hover { color: var(--text); }

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

.hero { padding: 72px 0 40px; display: grid; gap: 48px; grid-template-columns: 1.1fr 0.9fr; align-items: center; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; letter-spacing: -1px; margin: 0 0 16px; }
.hero p.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34ch; }
.hero .shot { justify-self: center; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; text-decoration: none; font-weight: 600;
  background: var(--accent); color: #fff;
}
.badge.secondary { background: var(--accent-soft); color: var(--accent); }
.badge[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }

.note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* ---------- phone frame ---------- */

.phone {
  width: 260px; border-radius: 34px; padding: 10px;
  background: #1b1b1b; box-shadow: 0 24px 60px rgba(0,0,0,0.22);
}
.phone img { width: 100%; display: block; border-radius: 26px; }

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

section { padding: 56px 0; border-top: 1px solid var(--border); }
h2 { font-size: 28px; letter-spacing: -0.4px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 32px; max-width: 60ch; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); text-align: center; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 12px; }
.stat b { display: block; font-size: 30px; color: var(--accent); letter-spacing: -0.5px; }
.stat span { font-size: 14px; color: var(--muted); }

.shots { display: flex; gap: 28px; overflow-x: auto; padding-bottom: 8px; }
.shots figure { margin: 0; flex: 0 0 auto; text-align: center; }
.shots figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

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

.tiers { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tier { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.tier.highlight { border-color: var(--accent); }
.tier h3 { margin: 0 0 4px; font-size: 20px; }
.tier .price { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin: 8px 0 16px; }
.tier ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.tier li { margin-bottom: 6px; }

/* ---------- prose (privacy, support) ---------- */

/* padding-block only — the shorthand would reset .wrap's side padding (same
   specificity, later in the file) and leave the text flush to the screen edge. */
.prose { max-width: 72ch; padding-block: 48px; }
.prose h1 { font-size: 34px; letter-spacing: -0.6px; margin-bottom: 8px; }
.prose h2 { font-size: 21px; margin-top: 36px; }
.prose .updated { color: var(--muted); font-size: 15px; margin-top: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }

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

footer { border-top: 1px solid var(--border); padding: 32px 0 56px; color: var(--muted); font-size: 14px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
footer a { color: var(--muted); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero p.lede { max-width: none; }
}

/* Phones: the header nav no longer fits beside the brand, so it drops to its
   own full-width row that scrolls sideways rather than being clipped. */
@media (max-width: 700px) {
  .wrap { padding: 0 18px; }

  .bar { flex-wrap: wrap; row-gap: 10px; }
  .bar nav {
    margin-left: 0;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .bar nav::-webkit-scrollbar { display: none; }
  .bar nav a { white-space: nowrap; }

  /* The screenshot must scale with the viewport instead of a fixed 260px. */
  .phone { width: min(260px, 72vw); }
  .shots { gap: 20px; margin: 0 -18px; padding: 0 18px 8px; }

  .badges .badge { flex: 1 1 auto; justify-content: center; }
  section { padding: 44px 0; }
  h2 { font-size: 24px; }

  /* Three columns in 375px leaves each cell a few characters wide, so the
     what-is-collected table becomes one card per row with inline labels. */
  .prose { padding-block: 36px; }
  /* tbody must go block too: left as a row-group it sizes to its content and
     pushes the whole page into a horizontal scroll. */
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose tr:first-child { display: none; }
  .prose tr {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); padding: 6px 4px; margin-bottom: 14px;
  }
  .prose td { border-bottom: none; padding: 8px 14px; }
  .prose td:first-child { font-weight: 600; color: var(--text); }
  .prose td:nth-child(2)::before,
  .prose td:nth-child(3)::before { color: var(--muted); font-weight: 600; }
  .prose td:nth-child(2)::before { content: "Why: "; }
  .prose td:nth-child(3)::before { content: "Processed by: "; }
}

/* Very small phones (SE-class) — keep the hero headline from overflowing. */
@media (max-width: 380px) {
  .hero h1 { font-size: 30px; }
  .bar nav { gap: 14px; font-size: 14px; }
}
