/*
  Bluetooth Locator site. The app's "signal instrument" look (Theme.swift):
  dark only, ink background, hairline borders, one accent for live signal
  (phosphor green), amber for caution. Sans for words, mono for measurements
  and labels; labels are lowercase mono; "·" as the separator. No gradients,
  no shadows.
*/

:root {
  --ink: #0b0e11;
  --surface: #11161b;
  --hairline: #1c232b;
  --line: #26303a;

  --text: #e6edf3;
  --text2: #aeb9c5;
  --text3: #8b96a3;
  --muted: #74808e;
  --faint: #4a5562;

  --accent: #3ddc97;
  --accent-wash: rgba(61, 220, 151, 0.08);
  --accent-edge: rgba(61, 220, 151, 0.45);
  --caution: #f2b84b;
  --danger: #e5484d;

  --radius: 12px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --wide: 1080px;
  --doc: 720px;
  --gutter: 20px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

img, video { display: block; max-width: 100%; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.doc { max-width: var(--doc); }

.mono { font-family: var(--mono); }

/* Lowercase mono label, like FieldLabel. */
.label {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-transform: lowercase;
  margin: 0 0 10px;
}

/* ---------- Top bar ---------- */

.topbar { border-bottom: 1px solid var(--hairline); }
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; gap: 18px; font-family: var(--mono); font-size: 13px; }
.nav a { color: var(--text2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }

/* ---------- Buttons and chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active { opacity: 0.75; transform: scale(0.98); }
.btn-primary { background: var(--text); color: var(--ink); }
.btn-secondary { border: 1px solid var(--line); color: var(--text); }
.btn-secondary:hover { border-color: var(--text3); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text2);
  white-space: nowrap;
}
.chip.live { color: var(--accent); background: var(--accent-wash); border-color: var(--accent-edge); }

/* Live dot of the scan telemetry line. */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

/* ---------- Panels ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px;
}

/* ---------- Hero ---------- */

.hero { padding: 64px 0 72px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: center;
}
.telemetry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 22px;
}
.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0 0 20px;
}
.hero h1 .accent { color: var(--accent); }
.lede { font-size: 1.15rem; color: var(--text2); max-width: 34em; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.facts li + li::before { content: "·"; margin-right: 10px; color: var(--faint); }

/*
  An app screen in a phone, drawn like the App Store screenshots
  (scripts/compose-screenshots.py in the app repo): the full 1320 × 2868
  capture, status bar and Dynamic Island included, a black bezel of 20 on a
  980-wide screen, the display's 140 corner radius, a hairline outline.
  The bezel is in cqw so it scales with the phone, not its column.
*/
.phone {
  container-type: inline-size;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 15.7% / 7.4%;
}
.phone .display {
  margin: calc(1.96cqw - 1px); /* the outline is part of the bezel */
  aspect-ratio: 1320 / 2868;
  border-radius: 14.3% / 6.6%;
  overflow: hidden;
  background: var(--ink);
  transform: translateZ(0); /* Safari: clip the video to the rounded corners */
}
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hero-media { margin: 0; }
.hero-media figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.video-toggle {
  min-width: 64px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text2);
  font: inherit;
  cursor: pointer;
}
.video-toggle:hover { color: var(--text); border-color: var(--text3); }

/* ---------- Sections ---------- */

.section { padding: 72px 0; border-top: 1px solid var(--hairline); }
.section h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.section .intro { color: var(--text2); max-width: 36em; margin: 0 0 40px; }

/* How it works: three steps, each with its screen. */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step .phone { max-width: 280px; margin-bottom: 24px; }
.step h3 { font-size: 1.2rem; margin: 0 0 6px; }
.step p { color: var(--text2); margin: 0; font-size: 16px; }

/* Feature cards. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}
.card h3 { font-size: 1.05rem; margin: 0 0 6px; }
.card p { color: var(--text2); font-size: 15px; margin: 0; }
.card .label { margin-bottom: 12px; }

/* More screens: a scrolling row. */
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 40px;
  margin: 0 0 56px;
  padding: 0 0 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.gallery li { scroll-snap-align: start; }
.gallery .phone { margin-bottom: 18px; }
.gallery h3 { font-size: 1rem; margin: 0 0 2px; }
.gallery p { color: var(--text2); font-size: 14px; margin: 0; }

/* Key/value grid, like the app's packet panel. */
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 28px;
  margin: 0;
  font-size: 15px;
}
.kv dt { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; color: var(--text); }
.kv dd.none { font-family: var(--mono); color: var(--accent); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.split > div > p { color: var(--text2); }

/* Free and paid. */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan h3 { font-size: 1.15rem; margin: 0 0 4px; }
.plan .sub { color: var(--text2); font-size: 15px; margin: 0 0 16px; }
.plan.full { border-color: var(--accent-edge); }
.ticks { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.ticks li { position: relative; padding: 7px 0 7px 26px; border-top: 1px solid var(--hairline); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--text3);
}
.plan.full .ticks li::before { border-color: var(--accent); background: var(--accent); }
.note { color: var(--muted); font-size: 14px; margin: 18px 0 0; }

/* Good to know: honest limits. */
.limits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.limits .panel { border-color: rgba(242, 184, 75, 0.35); }
.limits .label { color: var(--caution); }
.limits p { margin: 0; color: var(--text2); font-size: 15px; }

.closing { text-align: center; }
.closing h2 { max-width: 18em; margin-left: auto; margin-right: auto; }
.closing .cta { justify-content: center; margin-top: 28px; }

/* ---------- Documents: privacy, terms, support ---------- */

.doc-page { padding-top: 48px; padding-bottom: 24px; }
.doc-page h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.updated { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 32px; }
.doc-page h2 {
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  margin: 44px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.doc-page h2 .num { font-family: var(--mono); font-weight: 400; color: var(--muted); margin-right: 10px; }
.doc-page h3 { font-size: 1.02rem; margin: 22px 0 6px; }
.doc-page p, .doc-page li { color: var(--text2); }
.doc-page strong { color: var(--text); font-weight: 600; }
.doc-page ul { padding-left: 22px; }
.doc-page li { margin: 6px 0; }
.doc-page li::marker { color: var(--faint); }

.callout {
  background: var(--accent-wash);
  border: 1px solid var(--accent-edge);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 8px;
}
.callout p { color: var(--text); margin: 0; }
.callout .label { color: var(--accent); }

/* Stored-data table. */
.table-wrap { overflow-x: auto; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-top: 1px solid var(--hairline); }
th { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--muted); text-transform: lowercase; }
td { color: var(--text2); }
td:first-child { color: var(--text); white-space: nowrap; }

.toc {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* FAQ. */
.faq details { border-top: 1px solid var(--hairline); }
.faq details:last-child { border-bottom: 1px solid var(--hairline); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  position: relative;
  font-weight: 600;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 14px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 18px;
  color: var(--muted);
}
.faq details[open] summary::after { content: "−"; color: var(--accent); }
.faq details > *:not(summary) { margin-top: 0; }
.faq details > :last-child { margin-bottom: 18px; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--hairline); margin-top: 72px; padding: 32px 0 48px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--mono); font-size: 13px; }
.footer .links a { color: var(--text2); }
.footer p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.footer .fine { flex-basis: 100%; font-size: 12px; }
.home .footer { margin-top: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .hero { padding: 44px 0 56px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero-media { width: min(280px, 78vw); margin: 0 auto; }
  .steps { grid-template-columns: 1fr; gap: 44px; }
  .step .phone { width: min(280px, 78vw); }
  .split, .plans, .limits { grid-template-columns: 1fr; gap: 14px; }
  .split { gap: 32px; }
  .section { padding: 56px 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .nav { gap: 14px; }
  .brand span { display: none; }
  .cta .btn { flex: 1 1 100%; }
  .kv { gap: 10px 16px; }
  .gallery { grid-auto-columns: 62vw; }

  /* The stored-data table becomes one block per row. */
  thead { display: none; }
  tr { display: block; padding: 12px 0; border-top: 1px solid var(--hairline); }
  td { display: block; padding: 2px 0; border: 0; }
  td:first-child { font-weight: 600; }
  td[data-label]::before {
    content: attr(data-label) " · ";
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot { animation: none; }
  .btn { transition: none; }
}
