/* GoodWiFi website. Colors come from the app's theme (mobile/src/ui/theme.ts) and heat-map
   renderer (mobile/src/report/svg.ts). No build step: edit and ship. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f5f7fa;
  --surface: #ffffff;
  --surface-alt: #e8edf3;
  --ink: #0f1a2a;
  --muted: #4f5d71;
  --line: #dde3eb;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #e7effe;
  --on-accent: #ffffff;
  /* Grades, as the app's heat map paints them */
  --great: #2fbf71;
  --ok: #f2c14e;
  --poor: #e5533d;
  --great-ink: #137a43;
  --ok-ink: #8a5a00;
  --poor-ink: #b42a17;
  --great-soft: #e3f6ec;
  --ok-soft: #fdf1dc;
  --poor-soft: #fde7e3;
  --grid-minor: #e3e8ef;
  --grid-major: #c5cfdb;
  --pin: #2a78d6;
  --shadow: 0 1px 2px rgba(15, 26, 42, .06), 0 12px 32px -12px rgba(15, 26, 42, .18);

  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1220;
    --surface: #141e33;
    --surface-alt: #1d2a45;
    --ink: #e7eefb;
    --muted: #a3b1c6;
    --line: #24324f;
    --accent: #2563eb;
    --accent-ink: #8db2ff;
    --accent-soft: #16264a;
    --great-ink: #5fd896;
    --ok-ink: #f5cf72;
    --poor-ink: #ff8a76;
    --great-soft: #123d2c;
    --ok-soft: #3d2f12;
    --poor-soft: #3d1712;
    --grid-minor: #18233a;
    --grid-major: #2a3a5a;
    --pin: #5b9cf0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  --paper: #0b1220;
  --surface: #141e33;
  --surface-alt: #1d2a45;
  --ink: #e7eefb;
  --muted: #a3b1c6;
  --line: #24324f;
  --accent: #2563eb;
  --accent-ink: #8db2ff;
  --accent-soft: #16264a;
  --great-ink: #5fd896;
  --ok-ink: #f5cf72;
  --poor-ink: #ff8a76;
  --great-soft: #123d2c;
  --ok-soft: #3d2f12;
  --poor-soft: #3d1712;
  --grid-minor: #18233a;
  --grid-major: #2a3a5a;
  --pin: #5b9cf0;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px -16px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-stretch: 108%; line-height: 1.08; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 1.4rem + 4.6vw, 4.4rem); font-weight: 780; line-height: 1.0; letter-spacing: -.025em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 740; }
h3 { font-size: 1.2rem; font-weight: 680; line-height: 1.25; letter-spacing: -.005em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 36em; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

/* Header */
.site-head { padding: 18px 0; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 760; font-size: 1.2rem; font-stretch: 108%; letter-spacing: -.01em; }
.brand svg, .brand img { width: 32px; height: 32px; }
.site-nav { display: flex; gap: 6px 18px; font-size: .95rem; }
/* Padding gives each link a 44px-tall tap target without changing the look. */
.site-nav a { color: var(--muted); text-decoration: none; display: inline-block; padding: 11px 2px; }
.site-nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .site-nav .opt { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 12px; font: 600 1.02rem/1 var(--body); text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-primary svg { width: 22px; height: 22px; }
.btn-primary small { display: block; font-size: .72rem; font-weight: 500; opacity: .8; margin-bottom: 3px; }
.btn-primary span { text-align: left; line-height: 1.05; }
.btn-quiet { color: var(--ink); border-color: var(--line); background: var(--surface); }
.btn-quiet:hover { border-color: var(--muted); }
/* "Coming soon to the App Store": status text, not a button. Dashed edge so it doesn't read as clickable. */
.soon { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; margin: 0; padding: 0 18px; border-radius: 12px; border: 1.5px dashed var(--muted); color: var(--ink); font-weight: 600; font-size: 1rem; line-height: 1.05; }
.soon svg { width: 24px; height: 24px; flex: none; }
.soon small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); margin-bottom: 3px; }

/* Hero */
.hero { padding: clamp(20px, 4vw, 48px) 0 clamp(40px, 5vw, 64px); }
.hero .wrap { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); } }
.hero h1 { max-width: 11ch; }
.hero .lede { margin-top: 22px; }
.eyebrow { margin: 0 0 14px; font-size: .9rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; align-items: center; }
.hero-meta { margin-top: 18px; font-size: .92rem; color: var(--muted); }

.map-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: clamp(10px, 1.6vw, 18px); }
.map-card figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 6px 4px; font-size: .86rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0; padding: 0; color: var(--ink); }
.legend li { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend .k-great { background: var(--great); }
.legend .k-ok { background: var(--ok); }
.legend .k-poor { background: var(--poor); }

/* The plan drawing */
.plan { width: 100%; height: auto; }
.plan .floor { fill: var(--surface); }
.plan .grid-minor { stroke: var(--grid-minor); stroke-width: 1; }
.plan .grid-major { stroke: var(--grid-major); stroke-width: 1; }
.plan .heat path { fill-opacity: .45; }
.plan .h-good { fill: var(--great); }
.plan .h-fair { fill: var(--ok); }
.plan .h-poor { fill: var(--poor); }
.plan .dots circle { stroke: var(--surface); stroke-width: 1; }
.plan .d-good { fill: var(--great); }
.plan .d-fair { fill: var(--ok); }
.plan .d-poor { fill: var(--poor); }
.plan .walls path { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: square; stroke-linejoin: miter; }
.plan .windows path { fill: none; stroke: var(--surface); stroke-width: 2.5; }
.plan .doors path { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .7; }
.plan .opening { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 8 7; opacity: .55; }
.plan .router circle:first-child { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.plan .router path { stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.plan .router .router-dot { fill: #fff; }
.plan .pin { fill: var(--pin); stroke: var(--surface); stroke-width: 1.5; }
.plan .drop { fill: none; stroke: var(--poor); stroke-width: 3; }
.plan .walk { fill: none; stroke: var(--pin); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.plan .phone circle { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.plan .phone .phone-halo { fill: var(--accent); fill-opacity: .18; stroke: none; }
.plan .labels text { font-family: var(--display); font-stretch: 82%; font-weight: 640; font-size: 19px; text-anchor: middle; fill: var(--ink); letter-spacing: .01em; }
.plan .labels .halo { stroke: var(--surface); stroke-width: 5; stroke-linejoin: round; fill: var(--surface); }

/* Sections */
.section { padding: clamp(56px, 9vw, 112px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 1.1rem; }

/* How it works: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.step { counter-increment: step; display: grid; grid-template-rows: auto auto 1fr; gap: 14px; }
.step h3::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: .95rem; font-stretch: 100%; vertical-align: 2px; }
.step p { color: var(--muted); }
.step-art { height: 196px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }

/* step 1: blurred camera */
.cam { position: absolute; inset: 0; }
.cam svg { width: 100%; height: 100%; filter: blur(5px); transform: scale(1.08); }
.step-art .badge { position: absolute; left: 12px; top: 12px; }
.step-art .mini { position: absolute; right: 12px; bottom: 12px; width: 78px; height: 78px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .8rem; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--great); }

/* step 2: name this room */
.name-art { display: grid; place-content: center; gap: 12px; justify-items: center; padding: 16px; }
.bubble { font-family: var(--display); font-stretch: 90%; font-weight: 650; font-size: 1.05rem; background: var(--accent-soft); color: var(--ink); padding: 8px 14px; border-radius: 14px 14px 14px 4px; }
.fake-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; font-size: .95rem; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.suggest span { font-size: .78rem; padding: 4px 9px; border-radius: 999px; background: var(--surface-alt); color: var(--ink); }

/* step 3 + findings */
.finding { display: grid; grid-template-columns: 10px 1fr; gap: 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.finding::before { content: ""; grid-row: 1 / span 3; width: 4px; border-radius: 4px; background: var(--g, var(--great)); }
.finding.poor { --g: var(--poor); }
.finding.fair { --g: var(--ok); }
.finding.good { --g: var(--great); }
.finding strong { font-weight: 650; line-height: 1.3; }
.finding .detail { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.finding .fix { font-size: .92rem; margin-top: 4px; }
.step-art .finding { position: absolute; left: 14px; right: 14px; top: 50%; transform: translateY(-50%); box-shadow: var(--shadow); }

/* Floor-plan spotlight */
.spotlight { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 960px) { .spotlight { grid-template-columns: minmax(0, 10fr) minmax(0, 13fr); } }
.spot-lede { margin: 14px 0 24px; }
.spot-list { gap: 14px; }
.spot-list strong { font-weight: 650; }

/* Features */
.features { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); padding: 26px 24px 28px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 1rem; }
.feature .tag { display: inline-block; margin-top: 12px; font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

/* Sample results */
.results { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .results { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px; } }
.findings { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.note { font-size: .88rem; color: var(--muted); margin-top: 16px; }
.mesh-callout { margin-top: 28px; padding: 22px 24px; border-radius: 16px; background: var(--accent-soft); }
.mesh-callout h3 { margin-bottom: 8px; }

/* Privacy */
.privacy-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .privacy-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; } }
.privacy-frame { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4 / 3; background: #2b3444; box-shadow: var(--shadow); }
.privacy-frame svg { width: 100%; height: 100%; filter: blur(7px) brightness(.8); transform: scale(1.1); }
.privacy-frame .caption { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(15, 26, 42, .72); color: #fff; font-size: .92rem; line-height: 1.4; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.facts li { padding-left: 34px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--great-soft); box-shadow: inset 0 0 0 2px var(--great-ink); }
.facts li::after { content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px; border-left: 2px solid var(--great-ink); border-bottom: 2px solid var(--great-ink); transform: rotate(-45deg); }
.facts strong { display: block; font-weight: 650; }
.facts span { color: var(--muted); }

/* Pricing */
.plans { display: grid; gap: 20px; }
@media (min-width: 980px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px 26px; }
.plan-card.featured { border: 2px solid var(--accent); }
.plan-for { margin: -8px 0 18px; font-size: .95rem; color: var(--muted); }
.plans-note { margin-top: 20px; }
.plan-card h3 { font-size: 1.5rem; }
.price { margin: 8px 0 18px; color: var(--muted); }
.price b { font-family: var(--display); font-size: 2rem; color: var(--ink); font-weight: 760; margin-right: 6px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 6px; border-left: 2px solid var(--great-ink); border-bottom: 2px solid var(--great-ink); transform: rotate(-45deg); }

/* FAQ */
.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--display); font-weight: 650; font-size: 1.12rem; font-stretch: 104%; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
.faq details > div { padding: 0 0 22px; color: var(--muted); display: grid; gap: 10px; }

/* Closing CTA + footer */
.closing { text-align: left; }
.closing .wrap { display: grid; gap: 20px; }
.site-foot { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { color: var(--muted); display: inline-block; padding: 10px 0; }
.site-foot p { padding: 10px 0; }

/* Document pages (privacy, support) */
.doc { padding: clamp(24px, 5vw, 56px) 0 80px; }
.doc .wrap { max-width: calc(44rem + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.doc h2 { font-size: 1.45rem; margin: 40px 0 12px; }
.doc h3 { font-size: 1.1rem; margin: 24px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--muted); margin-top: 10px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 650; }
.table-scroll { overflow-x: auto; }

/* Helpers (no inline styles: the site runs under a strict CSP) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }
.map-card { margin: 0; }
.mini-wall { stroke: var(--ink); }
.aside-text { margin-top: 8px; color: var(--muted); }
.mesh-callout .note { margin-top: 10px; }
.privacy-lede { margin: 14px 0 28px; }
.more-link { margin-top: 24px; }
.closing .cta-row { margin-top: 4px; }
.closing-text { color: var(--muted); font-size: 1.1rem; max-width: 40rem; }
.doc h1 + .lede, .not-found .lede { margin: 14px 0 24px; }

.soon { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); border: 1px dashed var(--line); vertical-align: 1px; white-space: nowrap; }
