/* MeasurePlot site. A plain, professional look: white and cool-grey surfaces, slate text, and amber (the app's brand
   colour, mobile/src/theme/index.ts) kept for primary buttons and small highlights. Light and dark follow the system.
   Text uses the platform's system font, so pages load no web fonts.
   Pages link this file as /styles.css?v=N: bump N in every page when it changes, or browsers keep the old copy
   (it is cached for 7 days). */
:root {
  --bg: #ffffff; --surface: #ffffff; --surface-alt: #f6f8fa; --text: #0f172a; --muted: #475569; --faint: #94a3b8;
  --line: #e2e8f0; --line-strong: #cbd5e1;
  --accent: #f5a623; --accent-pressed: #e09412; --accent-soft: #fef3dc; --accent-text: #c2410c; --tint: #fdeee6; --on-accent: #0f172a;
  --link: #1d4ed8; --ink: #0f172a; --on-ink: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --shadow-lg: 0 24px 48px -16px rgba(15,23,42,.22);
  --radius: 14px; --max: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120; --surface: #111827; --surface-alt: #0f172a; --text: #e5e7eb; --muted: #9ca3af; --faint: #64748b;
    --line: #1f2937; --line-strong: #334155; --accent-soft: #3a2a0c; --accent-text: #fdba74; --tint: #3a1d0c; --link: #93b4ff;
    --ink: #e5e7eb; --on-ink: #0b1120;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 24px 48px -16px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100% }
a { color: var(--link) }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; font-weight: 700; text-wrap: balance }
p { margin: 0 }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px }
@media (min-width: 720px) { .wrap { padding: 0 32px } }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px) }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px }
.brand { display: flex; align-items: center; color: var(--text); text-decoration: none; font-weight: 700; font-size: 17px; gap: 10px }
.brand img { height: 28px; width: auto }
.nav { display: flex; align-items: center; gap: 8px; font-size: 15px }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500 }
.nav .nav-links { display: none; gap: 4px; margin-right: 8px }
.nav .nav-links a { padding: 8px 12px; border-radius: 8px }
.nav .nav-links a:hover { color: var(--text); background: var(--surface-alt) }
@media (min-width: 820px) { .nav .nav-links { display: flex } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--on-accent);
  padding: 11px 20px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: background-color .15s ease }
.btn:hover { background: var(--accent-pressed) }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong) }
.nav .btn { padding: 8px 16px; color: var(--on-accent) }

/* Store badges, drawn in CSS until the store listings exist. */
.stores { display: flex; flex-wrap: wrap; gap: 12px }
.store { display: inline-flex; align-items: center; gap: 10px; min-width: 172px; padding: 10px 18px 10px 14px; border-radius: 10px;
  background: #0f172a; color: #fff; text-decoration: none; line-height: 1.15; border: 1px solid #0f172a; transition: background-color .15s ease }
.store:hover { background: #1e293b }
@media (prefers-color-scheme: dark) { .store { border-color: var(--line-strong) } }
.store svg { width: 24px; height: 24px; flex: none }
.store small { display: block; font-size: 11px; opacity: .75 }
.store strong { font-size: 16px; font-weight: 600 }

/* Phone frames around real app screenshots. */
.device { position: relative; width: 100%; aspect-ratio: 1080 / 2400; border-radius: 13% / 5.9%; padding: 3.2%;
  background: #0f172a; box-shadow: 0 0 0 1px rgba(15,23,42,.2), var(--shadow-lg) }
.device img { width: 100%; height: 100%; object-fit: cover; border-radius: 10.5% / 4.8%; background: #1e293b }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: 56px 0 48px; background: linear-gradient(180deg, var(--surface-alt), var(--bg)) }
.hero .wrap { display: grid; gap: 48px; align-items: center }
@media (min-width: 980px) { .hero { padding: 88px 0 72px } .hero .wrap { grid-template-columns: 1.15fr .85fr; gap: 64px } }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent-text); margin-bottom: 16px }
.hero h1 { font-size: clamp(38px, 5.6vw, 62px); letter-spacing: -.03em; line-height: 1.08 }
.hero h1 em { font-style: normal; color: var(--accent-text) }
.hero .lede { margin: 22px 0 32px; font-size: clamp(17px, 1.5vw, 19px); color: var(--muted); max-width: 34em }
.hero .note { margin-top: 16px; font-size: 14px; color: var(--muted) }
.hero-phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 440px }
.hero-phones .device { width: min(270px, 58%) }
.hero-phones .device.back { position: absolute; width: min(236px, 50%); transform: translateX(-48%) scale(.94); opacity: .95 }
.hero-phones .device.front { transform: translateX(26%) }
@media (max-width: 560px) {
  .hero-phones .device.back { display: none }
  .hero-phones .device.front { transform: none }
}

/* Proof stats: numbers read straight off the screenshots. */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr) } }
.stat { padding: 22px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0 }
.stat b { display: block; font-size: clamp(26px, 3vw, 34px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums }
.stat span { display: block; margin-top: 6px; font-size: 14px; color: var(--muted) }

/* ── Sections ───────────────────────────────────────────────────────────── */
section { padding: 72px 0 }
@media (min-width: 980px) { section { padding: 104px 0 } }
.section-head { max-width: 720px; margin-bottom: 48px }
.kicker { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text) }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 10px; letter-spacing: -.025em }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 38em }
.alt { background: var(--surface-alt); border-block: 1px solid var(--line) }

/* Feature rows: text beside a screenshot, alternating sides. */
.showcase { display: grid; gap: 32px; align-items: center }
.showcase + .showcase { margin-top: 72px; padding-top: 72px; border-top: 1px solid var(--line) }
.showcase .shot { display: flex; justify-content: center }
.showcase .shot .device { width: min(260px, 70%) }
.showcase h3 { font-size: clamp(24px, 2.8vw, 32px); margin: 10px 0 12px }
.showcase p { font-size: 17px; color: var(--muted); max-width: 32em }
.showcase ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15px }
.showcase li, .plan li { display: flex; gap: 10px }
.showcase li::before, .plan li::before { content: "\2713"; flex: none; display: grid; place-items: center; width: 18px; height: 18px;
  margin-top: 3px; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; background: var(--tick-soft, var(--tint)); color: var(--tick, var(--accent-text)) }
@media (min-width: 880px) {
  .showcase { grid-template-columns: 1fr 1fr; gap: 72px }
  .showcase.flip .shot { order: 2 }
}
@media (max-width: 879px) { .showcase > div:last-child { order: -1 } }

/* Grid of smaller features */
.bento { display: grid; gap: 16px }
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr) } }
@media (min-width: 980px) { .bento { grid-template-columns: repeat(3, 1fr) } .bento .wide { grid-column: span 2 } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm) }
.card h3 { font-size: 18px; margin: 16px 0 6px; letter-spacing: -.01em }
.card p { color: var(--muted); font-size: 15px }
.icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--icon-soft, var(--tint)); color: var(--icon, var(--accent-text)) }
.icon svg { width: 22px; height: 22px }
.grid { display: grid; gap: 16px }
@media (min-width: 640px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: repeat(2, 1fr) } }
@media (min-width: 640px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr) } }
@media (min-width: 960px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr) } }
@media (min-width: 1040px) { .grid.cols-4 { grid-template-columns: repeat(4, 1fr) } }

/* Gallery: a row of phones that scrolls on small screens */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(220px, 60%); gap: 24px; overflow-x: auto;
  padding: 4px 4px 24px; scroll-snap-type: x mandatory; scrollbar-width: none }
.gallery::-webkit-scrollbar { display: none }
.gallery figure { margin: 0; scroll-snap-align: center }
.gallery figcaption { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center }
@media (min-width: 1040px) { .gallery { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible } }

/* Pricing */
.plans { display: grid; gap: 18px; align-items: stretch }
@media (min-width: 920px) { .plans { grid-template-columns: repeat(3, 1fr) } }
.plan { display: flex; flex-direction: column; position: relative; padding: 28px }
.plan.featured { border: 2px solid var(--accent); padding: 27px; box-shadow: var(--shadow-lg) }
.plan .tag { position: absolute; top: -13px; left: 26px; font-size: 12px; font-weight: 600; color: var(--on-accent); background: var(--accent);
  padding: 4px 10px; border-radius: 999px }
.plan h3 { font-size: 18px; margin: 0 }
.plan .price { margin: 14px 0 2px; font-size: 40px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums }
.plan .price span { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0 }
.plan .alt-price { font-size: 14px; color: var(--muted); min-height: 1.6em; margin-top: 6px }
.plan ul { list-style: none; padding: 20px 0 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 15px; border-top: 1px solid var(--line) }
.fine { margin-top: 24px; font-size: 14px; color: var(--muted) }

/* FAQ */
.faq { max-width: 800px; border-top: 1px solid var(--line) }
.faq details { border-bottom: 1px solid var(--line) }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 17px; position: relative }
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); rotate: 45deg; transition: rotate .2s ease, margin .2s ease }
.faq details[open] summary::after { rotate: 225deg; margin-top: -2px }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 44em }

/* Closing call to action */
.cta { padding-top: 0 }
.cta .panel { text-align: center; padding: 64px 24px; border-radius: 20px; background: #0f172a; color: #f8fafc }
@media (prefers-color-scheme: dark) { .cta .panel { background: var(--surface); border: 1px solid var(--line) } }
.cta h2 { font-size: clamp(28px, 4vw, 42px); max-width: 18em; margin: 0 auto }
.cta p { margin: 14px auto 30px; font-size: 18px; max-width: 32em; color: #cbd5e1 }
.cta .stores { justify-content: center }
.cta .store { background: #fff; color: #0f172a; border-color: #fff }
.cta .store:hover { background: #e2e8f0 }

/* Footer */
.site-footer { padding: 36px 0 48px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line) }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px }
.site-footer a { color: var(--muted); text-decoration: none }
.site-footer a:hover { color: var(--text) }

/* Legal and help pages */
.doc { max-width: 760px; padding: 56px 0 72px }
.doc h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -.025em }
.doc .meta { margin: 10px 0 32px; color: var(--muted); font-size: 15px }
.doc h2 { font-size: 22px; margin: 40px 0 10px }
.doc h3 { font-size: 17px; margin: 24px 0 6px; letter-spacing: -.01em }
.doc p, .doc li { color: var(--text) }
.doc p + p { margin-top: 12px }
.doc ul, .doc ol { padding-left: 22px; margin: 10px 0 }
.doc li + li { margin-top: 6px }
.doc .summary { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 24px; margin-bottom: 8px }
.doc .summary ul { margin-bottom: 0 }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; display: block; overflow-x: auto }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line) }
.doc th { font-size: 13px; color: var(--muted); font-weight: 600 }
.doc .toc { columns: 2 220px; font-size: 15px; padding-left: 20px }

/* Placeholders that must be filled before publishing. `grep -rn 'class="todo"' site/` lists them. */
mark.todo { background: var(--accent-soft); color: var(--text); padding: 0 4px; border-radius: 4px }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  * { transition: none !important }
}

/* ── Colour mix ─────────────────────────────────────────────────────────────
   Four colours (burnt orange, magenta, violet, cyan) that section labels, cards, feature rows and stats take in turn.
   --accent-text (the hero line and highlighted word) is the first of them. Buttons stay amber. */
:root { --m1: #c2410c; --m2: #be185d; --m3: #7c3aed; --m4: #0e7490 }
@media (prefers-color-scheme: dark) { :root { --m1: #fdba74; --m2: #f9a8d4; --m3: #c4b5fd; --m4: #67e8f9 } }
main > section:nth-of-type(4n+1) { --k: var(--m1) } main > section:nth-of-type(4n+2) { --k: var(--m2) }
main > section:nth-of-type(4n+3) { --k: var(--m3) } main > section:nth-of-type(4n)   { --k: var(--m4) }
.kicker { color: var(--k, var(--accent-text)) }
.card:nth-child(4n+1) { --c: var(--m1) } .card:nth-child(4n+2) { --c: var(--m2) }
.card:nth-child(4n+3) { --c: var(--m3) } .card:nth-child(4n)   { --c: var(--m4) }
.card { --icon: var(--c); --icon-soft: color-mix(in srgb, var(--c) 13%, var(--surface)); --tick: var(--c);
  --tick-soft: color-mix(in srgb, var(--c) 13%, var(--surface)) }
.showcase:nth-child(4n+2) { --s: var(--m1) } .showcase:nth-child(4n+3) { --s: var(--m2) }
.showcase:nth-child(4n)   { --s: var(--m3) } .showcase:nth-child(4n+1) { --s: var(--m4) }
.showcase { --k: var(--s); --tick: var(--s); --tick-soft: color-mix(in srgb, var(--s) 13%, var(--surface)) }
.stat:nth-child(1) b { color: var(--m1) } .stat:nth-child(2) b { color: var(--m2) }
.stat:nth-child(3) b { color: var(--m3) } .stat:nth-child(4) b { color: var(--m4) }
