/* Edgewatch marketing site. Tokens mirror apps/mobile/src/theme/colors.ts (light theme). */
:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface2: #F2F4F6;
  --surface3: #E4E7EB;
  --separator: #E6E9ED;
  --border: #DCE0E5;
  --accent: #0FA454;       /* text, icons, strokes */
  --accent-fill: #31E582;  /* filled surfaces */
  --accent-bg: #DDF7E8;
  --on-accent: #062814;
  --negative: #C8363B;     /* darker than app #E5484D for AA on white text use */
  --negative-fill: #E5484D;
  --negative-bg: #FDE8E9;
  --gold-text: #9A7300;
  --gold-bg: #FCF1C9;
  --text: #0B0F14;
  --text2: #4A5360;
  --muted: #6B7480;
  --tertiary: #8D96A1;
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1080px;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 720; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
.num, td, .tabular { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--text); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 12px; top: 12px; }

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

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(244,245,247,.86); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--separator); }
.nav { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.nav-links a { color: var(--text2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav .btn { margin-left: 8px; }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: #28d475; text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* Store badges (text-based, no trademarked artwork until the official badges are dropped in) */
.badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 12px; background: var(--text); color: #fff; text-decoration: none; }
.store-badge svg { width: 24px; height: 24px; flex: none; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; }
.store-badge small { font-size: 11px; opacity: .8; }
.store-badge strong { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.store-badge:hover { background: #222a33; }

/* Sections */
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lead { font-size: 1.2rem; color: var(--text2); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 28px; }
.hero-note { margin-top: 14px; font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding-top: 32px; } }

/* Phone frame for screenshots */
.phone { position: relative; width: 100%; max-width: 300px; margin: 0 auto; border-radius: 44px; padding: 10px; background: #0B0F14; box-shadow: 0 30px 60px -20px rgba(11,15,20,.35), 0 8px 20px rgba(11,15,20,.12); }
.phone img { width: 100%; aspect-ratio: 1290 / 2796; object-fit: cover; border-radius: 34px; background: var(--surface2); }
.phones { display: flex; gap: 20px; justify-content: center; }
.phones .phone:nth-child(2) { transform: translateY(32px); }
@media (max-width: 860px) { .phones .phone:nth-child(2) { display: none; } }

/* Cards & grids */
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-bg); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature p { color: var(--text2); margin: 0; font-size: 16px; }
.feature .tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent-fill); color: var(--on-accent); vertical-align: 2px; letter-spacing: .02em; }
.feature-shot { margin-top: 18px; border-radius: 12px; overflow: hidden; background: var(--surface2); }
.feature-shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }

/* Proof block */
.proof { background: var(--surface); border-radius: 24px; padding: clamp(24px, 5vw, 48px); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin: 28px 0; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--bg); border-radius: var(--radius-sm); padding: 20px; }
.stat .value { font-size: 2.4rem; font-weight: 750; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .value.good { color: var(--accent); }
.stat .label { margin-top: 8px; font-weight: 600; }
.stat .sub { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); }
caption { text-align: left; font-size: 14px; color: var(--muted); padding: 0 0 10px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--separator); vertical-align: top; }
th { font-size: 13px; font-weight: 650; color: var(--muted); background: var(--surface); }
td.r, th.r { text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.pill-good { background: var(--accent-bg); color: #08743B; }
.pill-bad { background: var(--surface3); color: var(--text2); }
.pill-warn { background: var(--gold-bg); color: var(--gold-text); }
.good { color: var(--accent); }

/* Chart */
.chart { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.chart h3 { margin-bottom: 4px; }
.chart .sub { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.chart svg text { font-family: var(--font); font-size: 12px; fill: var(--muted); }
.chart svg .val { fill: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart svg .lbl { fill: var(--text); font-size: 13px; }
.chart svg .hl { fill: var(--accent); font-weight: 650; }
.chart svg .grid { stroke: var(--separator); stroke-width: 1; }
.chart svg .zero { stroke: var(--tertiary); stroke-width: 1; }
.chart svg .ci { stroke: var(--tertiary); stroke-width: 2; stroke-linecap: round; }
.chart svg .ci.hl-mark { stroke: var(--accent); }
.chart svg .dot { fill: var(--text2); stroke: var(--surface); stroke-width: 2; }
.chart svg .dot.hl-mark { fill: var(--accent); }
.chart svg .bar { fill: var(--tertiary); }
.chart svg .bar.hl-mark { fill: var(--accent); }
.chart svg .hit { fill: transparent; }
.chart svg g.row:hover .dot, .chart svg g.row:focus .dot { r: 7; }
.chart details { margin-top: 12px; font-size: 14px; }
.chart summary { cursor: pointer; color: var(--accent); font-weight: 600; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; max-width: 820px; margin: 32px auto 0; }
@media (max-width: 700px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border-radius: 20px; padding: 28px; border: 2px solid transparent; display: flex; flex-direction: column; }
.plan.pro { border-color: var(--accent-fill); }
.plan h3 { font-size: 1.4rem; display: flex; align-items: center; gap: 8px; }
.plan .price { font-size: 2rem; font-weight: 750; letter-spacing: -0.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.plan li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--accent-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.6L14 7.6' fill='none' stroke='%230FA454' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.plan .fine { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--muted); }

/* FAQ */
.faq { max-width: 760px; margin: 32px auto 0; display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: var(--radius-sm); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 620; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 22px; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 18px; color: var(--text2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* Prose (legal, methodology) */
.prose { background: var(--surface); border-radius: 24px; padding: clamp(22px, 5vw, 48px); }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--text2); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose table { background: transparent; }
.prose th { background: transparent; }
.prose .table-wrap { border: 1px solid var(--separator); margin: 0 0 1.2em; }
.page-head { padding: 48px 0 28px; }
.page-head .lead { margin-bottom: 0; }
.draft-banner { background: var(--gold-bg); color: #5c4500; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 24px; font-size: 15px; }
.callout { background: var(--accent-bg); border-radius: var(--radius-sm); padding: 16px 18px; color: #08502a; margin: 0 0 1.2em; }
.callout.neutral { background: var(--surface2); color: var(--text2); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--text2); font-size: 14px; text-decoration: none; }
.toc a:hover { color: var(--text); }

/* Steps */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; background: var(--bg); border-radius: var(--radius-sm); padding: 14px 16px; color: var(--text); }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); font-weight: 700; display: grid; place-items: center; font-size: 14px; }

/* CTA band */
.cta-band { background: var(--text); color: #fff; border-radius: 28px; padding: clamp(28px, 6vw, 56px); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #C5CCD3; }
.cta-band .badges { justify-content: center; margin-top: 24px; }
.cta-band .store-badge { background: #fff; color: var(--text); }
.cta-band .store-badge:hover { background: #E4E7EB; }

/* Footer */
.site-footer { padding: 48px 0 40px; color: var(--muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.site-footer h4 { color: var(--text); font-size: 14px; margin-bottom: 10px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--text2); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.disclaimer { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--separator); font-size: 13px; line-height: 1.6; }

/* Deep-link landing (/t, /r) */
.landing { min-height: 70vh; display: grid; place-items: center; padding: 48px 0; }
.landing .card { max-width: 440px; width: 100%; text-align: center; padding: 32px 24px; }
.landing .app-icon { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 18px; }
.landing .avatar { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; background: var(--surface3); object-fit: cover; }
.landing .addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--muted); word-break: break-all; }
.landing .code { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; font-weight: 700; letter-spacing: .08em; padding: 10px 18px; border-radius: 12px; background: var(--accent-bg); color: #08502a; margin: 8px 0 16px; }
.landing .badges { justify-content: center; margin-top: 18px; }
.landing .actions { display: grid; gap: 10px; margin-top: 20px; }
.chart svg { width: 100%; max-width: 480px; }
figure.chart { margin: 0; }
@media (max-width: 600px) {
  .phone { max-width: 230px; border-radius: 36px; padding: 8px; }
  .phone img { border-radius: 28px; }
  .proof .chart { padding: 16px 0 0; }
  section { padding: 56px 0; }
}
table.wide { min-width: 640px; }
