/* Case Tracker site. Colors are the app's palette (mobile/src/theme/tokens.ts). */
:root {
  --bg: #f4f4f1; --bg-alt: #ebebe7; --surface: #ffffff; --text: #16181a; --muted: #5b6067;
  --accent: #1d5c66; --on-accent: #ffffff; --accent-soft: #e2edee; --border: #e2e3df; --border-strong: #c9cac6;
  --ok: #2d6a3e; --ok-soft: #e3efe5; --info: #2f5d86; --info-soft: #e3ebf3;
  --phone: #16181a; --shadow: 0 1px 2px rgba(22, 24, 26, .06), 0 12px 32px rgba(22, 24, 26, .08);
  --radius: 16px; --measure: 68ch;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d0e; --bg-alt: #121315; --surface: #18191b; --text: #ecedee; --muted: #a0a5ab;
    --accent: #7dbbc4; --on-accent: #0b1e21; --accent-soft: #15282b; --border: #2a2c2f; --border-strong: #3a3d41;
    --ok: #7cc08d; --ok-soft: #15251a; --info: #8db4da; --info-soft: #15212e;
    --phone: #2a2c2f; --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
p { margin: 0 0 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.site-header nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 10px; border-radius: 8px; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }

/* Buttons and labels */
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px;
}
.button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  background: var(--text); color: var(--bg);
}
.button svg { width: 20px; height: 20px; }
.button[aria-disabled="true"] { cursor: default; }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }

/* Hero */
.hero { padding: 72px 0 80px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); letter-spacing: -0.03em; margin: 20px 0 20px; }
.hero h1 span { color: var(--accent); }
.hero .lede { font-size: 20px; color: var(--muted); max-width: 34ch; margin-bottom: 32px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .fine { margin-top: 24px; font-size: 14px; color: var(--muted); }

/* Phone frame around the app screenshot (web/images, taken in the Simulator with sample data). */
.device { justify-self: center; margin: 0; }
.phone {
  width: 300px; border-radius: 52px; padding: 10px; background: var(--phone);
  box-shadow: 0 0 0 1px var(--border-strong), var(--shadow);
}
.phone picture { display: block; }
.screen { display: block; width: 100%; height: auto; border-radius: 42px; background: var(--bg); }
.caption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }

/* Sections */
section.band { padding: 88px 0; }
section.band.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { font-size: 14px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 12px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 40px); margin-bottom: 14px; }
.section-head p { font-size: 18px; color: var(--muted); margin: 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 18px;
}
.steps h3, .features h3 { font-size: 20px; margin-bottom: 8px; }
.steps p, .features p { color: var(--muted); margin: 0; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.feature .icon svg { width: 24px; height: 24px; }

.promises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.promise { border-top: 2px solid var(--accent); padding-top: 18px; }
.promise h3 { font-size: 18px; margin-bottom: 6px; }
.promise p { color: var(--muted); margin: 0; font-size: 16px; }

.pricing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 820px; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.plan.pro { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan h3 { font-size: 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan .price { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan ul { padding: 0; margin: 20px 0 0; list-style: none; }
.plan li { padding: 8px 0 8px 28px; position: relative; border-top: 1px solid var(--border); font-size: 16px; }
.plan li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 26px; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 8px; }

.contact { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; background: var(--accent-soft); border-radius: 24px; padding: 40px; }
.contact h2 { font-size: 28px; margin-bottom: 8px; }
.contact p { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 40px; font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h3 { font-size: 14px; color: var(--text); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer .brand { margin-bottom: 12px; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 24px; font-size: 14px; }

/* Legal documents */
.doc-head { padding: 64px 0 40px; border-bottom: 1px solid var(--border); background: var(--surface); }
.doc-head h1 { font-size: clamp(34px, 4.4vw, 48px); letter-spacing: -0.025em; margin: 12px 0 12px; }
.doc-head p { color: var(--muted); max-width: var(--measure); margin: 0; font-size: 18px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding-top: 48px; padding-bottom: 88px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 15px; }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }
.prose { max-width: var(--measure); }
.prose h2 { font-size: 24px; margin: 48px 0 12px; padding-top: 8px; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.table-wrap { overflow-x: auto; margin: 8px 0 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-size: 14px; color: var(--muted); font-weight: 600; background: var(--bg-alt); }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { width: 62%; }
.prose td:last-child { font-variant-numeric: tabular-nums; }
.callout { background: var(--accent-soft); border-radius: 12px; padding: 16px 20px; margin: 0 0 16px; }

/* 404 */
.notfound { padding: 120px 0; text-align: center; }
.notfound h1 { font-size: 44px; margin: 16px 0 12px; }
.notfound p { color: var(--muted); }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero { padding-top: 48px; }
  .promises { grid-template-columns: repeat(2, 1fr); }
  .doc { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .steps, .features, .pricing, .promises { grid-template-columns: 1fr; }
  section.band { padding: 64px 0; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .site-footer .about { grid-column: 1 / -1; }
  .contact { padding: 28px; }
  .site-header .wrap { min-height: 56px; }
  .site-header nav .hide-sm { display: none; }
}
@media (max-width: 380px) {
  .phone { width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq summary::after { transition: none; }
}
.pricing-note { margin-top: 20px; font-size: 15px; }
