/* Flock Camera — site styles
   Palette sampled from the app icon and App Store screenshots so the site and
   the listing read as one product.
     ink   #101418   slate #242B33   amber #FFB11F
     cream #F5EDE0   (screenshot frame background)
   Red is reserved for Flock Safety-branded cameras. Never use it as an accent. */

:root {
  --ink: #101418;
  --ink-2: #171d23;
  --slate: #242b33;
  --slate-2: #323b45;
  --amber: #ffb11f;
  --amber-dim: #c08a2e;
  --amber-soft: rgba(255, 177, 31, 0.12);
  --flock-red: #e5484d;
  --cream: #f5ede0;
  --cream-2: #efe3d2;
  --paper: #ffffff;
  --text: #101418;
  --text-mute: #5a6572;
  --text-invert: #f4f6f8;
  --text-invert-mute: #9aa6b4;
  --line: rgba(16, 20, 24, 0.12);
  --line-invert: rgba(255, 255, 255, 0.12);

  --wrap: 1120px;
  --wrap-narrow: 760px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.06), 0 2px 8px rgba(16, 20, 24, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 20, 24, 0.08), 0 16px 40px rgba(16, 20, 24, 0.08);
  --shadow-lg: 0 20px 60px rgba(16, 20, 24, 0.28);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.34rem + 0.8vw, 2rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.5vw, 2.8rem);
  --step-4: clamp(2.4rem, 1.85rem + 2.7vw, 4rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 800;
}
h1 { font-size: var(--step-4); letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); letter-spacing: -0.03em; }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1.1em; }

a { color: inherit; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--cream { background: var(--cream); }
.section--ink { background: var(--ink); color: var(--text-invert); }
.section--ink h2, .section--ink h3 { color: var(--text-invert); }

.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dim);
  margin-bottom: 0.9rem;
}
.section--ink .eyebrow { color: var(--amber); }

.lede { font-size: var(--step-1); color: var(--text-mute); max-width: 62ch; }
.section--ink .lede { color: var(--text-invert-mute); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--amber); color: var(--ink);
  padding: 0.75rem 1.25rem; font-weight: 700; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: rgba(16, 20, 24, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-invert);
  color: var(--text-invert);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 62px;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  font-weight: 800; letter-spacing: -0.02em; text-decoration: none;
  font-size: 1.05rem; color: var(--text-invert);
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.site-nav__links { display: contents; }
.site-nav a {
  color: var(--text-invert-mute); text-decoration: none;
  font-size: 0.94rem; font-weight: 600;
}
.site-nav a:hover { color: var(--text-invert); }
.site-nav .btn { color: var(--ink); }
@media (max-width: 720px) {
  .site-nav__links { display: none; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700; font-size: 0.98rem; text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn--sm { padding: 0.5rem 1.05rem; font-size: 0.88rem; }
.btn--primary { background: var(--amber); color: var(--ink); box-shadow: 0 6px 20px rgba(255, 177, 31, 0.28); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255, 177, 31, 0.36); }
.btn--ghost { border-color: var(--line-invert); color: var(--text-invert); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn--outline { border-color: var(--line); color: var(--text); }
.btn--outline:hover { background: rgba(16, 20, 24, 0.04); }

/* App Store badge — drawn, not an image, so it stays crisp and self-hosted */
.appstore {
  display: inline-flex; align-items: center; gap: 0.7rem;
  background: var(--ink); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px; padding: 0.6rem 1.15rem;
  text-decoration: none; line-height: 1.1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.appstore:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.appstore svg { width: 26px; height: 26px; flex: none; fill: #fff; }
.appstore span { display: block; font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.72; }
.appstore strong { display: block; font-size: 1.06rem; font-weight: 600; letter-spacing: -0.01em; }
.section--cream .appstore, .section--light .appstore { border-color: transparent; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

/* ---------------------------------------------------------------- hero */
.hero {
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(255, 177, 31, 0.16), transparent 62%),
    radial-gradient(760px 420px at 88% 6%, rgba(255, 177, 31, 0.08), transparent 60%),
    var(--ink);
  color: var(--text-invert);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero__grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1.05fr 0.95fr; align-items: center;
}
@media (max-width: 880px) { .hero__grid { grid-template-columns: 1fr; } }
.hero h1 { color: #fff; margin-bottom: 0.6rem; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero__sub { font-size: var(--step-1); color: var(--text-invert-mute); max-width: 54ch; margin-bottom: 1.8rem; }
.hero__note { font-size: var(--step--1); color: var(--text-invert-mute); margin-top: 1.1rem; }

.hero__phone { position: relative; justify-self: center; max-width: 330px; width: 100%; }
.hero__phone img {
  width: 100%; border-radius: 34px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line-invert);
  border: 1px solid var(--line-invert); border-radius: var(--radius);
  overflow: hidden; margin-top: 2.4rem;
}
.trust-strip div { background: var(--ink-2); padding: 1.05rem 1.15rem; }
.trust-strip strong {
  display: block; font-size: var(--step-2); font-weight: 800;
  color: var(--amber); letter-spacing: -0.03em; line-height: 1.1;
}
.trust-strip span { font-size: var(--step--1); color: var(--text-invert-mute); }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 1.15rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; color: var(--text-mute); font-size: 0.97rem; }
.card--link { text-decoration: none; display: block; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.card--link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(255, 177, 31, 0.5); }
.card__more { color: var(--amber-dim); font-weight: 700; font-size: 0.92rem; margin-top: 0.9rem; display: inline-block; }

.step { counter-increment: step; position: relative; padding-left: 3.4rem; }
.step::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--amber-soft); color: var(--amber-dim);
  font-weight: 800; font-size: 1.05rem;
  border: 1.5px solid rgba(255, 177, 31, 0.42);
}
.steps { counter-reset: step; }
.section--ink .step::before { background: rgba(255, 177, 31, 0.14); color: var(--amber); }

/* ---------------------------------------------------------------- shots */
.shots {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 240px);
  gap: 1.2rem; overflow-x: auto;
  padding: 0.5rem 0 1.6rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.shots figure { margin: 0; scroll-snap-align: center; }
.shots img {
  width: 100%; border-radius: 20px;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  background: var(--cream-2);
}
.shots figcaption {
  margin-top: 0.85rem; font-size: 0.92rem;
  color: var(--text-mute); text-align: center;
}
.shots figcaption b { display: block; color: var(--text); font-size: 0.98rem; }

/* ---------------------------------------------------------------- faq */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 700; font-size: var(--step-1);
  position: relative; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.4rem; top: 50%;
  width: 11px; height: 11px; margin-top: -7px;
  border-right: 2.5px solid var(--amber-dim);
  border-bottom: 2.5px solid var(--amber-dim);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__body { padding-bottom: 1.4rem; max-width: 68ch; }
.faq__body p { color: var(--text-mute); }
.faq__body a { color: var(--amber-dim); font-weight: 700; }

/* ---------------------------------------------------------------- tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.95rem;
  min-width: 460px;
}
table.data th, table.data td {
  text-align: left; padding: 0.72rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
table.data th {
  font-size: var(--step--1); text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-mute); font-weight: 800;
}
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:hover { background: rgba(255, 177, 31, 0.06); }
table.data a { color: var(--text); font-weight: 600; text-decoration: none; }
table.data a:hover { color: var(--amber-dim); text-decoration: underline; }

.bar { display: block; height: 5px; border-radius: 3px; background: var(--amber); min-width: 3px; }
.bar--flock { background: var(--flock-red); }

/* ---------------------------------------------------------------- stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.1rem; }
.stat {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; background: var(--paper);
}
.stat strong {
  display: block; font-size: var(--step-3); font-weight: 800;
  letter-spacing: -0.035em; line-height: 1.05; color: var(--ink);
}
.stat span { font-size: var(--step--1); color: var(--text-mute); }
.section--cream .stat { background: rgba(255, 255, 255, 0.66); }

/* ---------------------------------------------------------------- map */
#map {
  width: 100%; height: min(72vh, 660px); background: var(--cream-2);
  position: relative; z-index: 0; isolation: isolate;
}

/* Leaflet sets z-index up to 1000 on its own panes and controls, which would
   otherwise paint over the sticky header. `isolation: isolate` traps all of
   that inside a stacking context of its own, so the map can never escape its
   own box no matter what Leaflet does internally. Escalating the header's
   z-index alone would not survive the next Leaflet upgrade. */
.map-shell {
  position: relative;
  z-index: 0;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.leaflet-container { font: inherit; }
.map-legend {
  display: flex; flex-wrap: wrap; gap: 1.2rem;
  padding: 0.85rem 1.1rem; background: var(--paper);
  border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--text-mute);
}
.map-legend b { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; color: var(--text); }
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--flock { background: var(--flock-red); }
.dot--other { background: var(--amber); }
.map-status { padding: 0.85rem 1.1rem; font-size: 0.9rem; color: var(--text-mute); border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- prose */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.4rem; font-size: var(--step-2); }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--amber-dim); font-weight: 600; }
.prose blockquote {
  margin: 1.6rem 0; padding: 1rem 1.3rem;
  border-left: 3px solid var(--amber);
  background: var(--amber-soft); border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .answer {
  font-size: var(--step-1); font-weight: 600; color: var(--text);
  border-left: 3px solid var(--amber); padding: 0.2rem 0 0.2rem 1.2rem;
  margin-bottom: 1.8rem;
}

.inline-cta {
  margin: 2.4rem 0; padding: 1.6rem;
  background: var(--cream); border-radius: var(--radius-lg);
  border: 1px solid rgba(192, 138, 46, 0.28);
}
.inline-cta h3 { margin-bottom: 0.35rem; }
.inline-cta p { color: var(--text-mute); margin-bottom: 1.1rem; }

.breadcrumbs { font-size: 0.9rem; color: var(--text-mute); margin-bottom: 1.4rem; }
.breadcrumbs a { color: var(--text-mute); text-decoration: none; }
.breadcrumbs a:hover { color: var(--amber-dim); text-decoration: underline; }
.breadcrumbs span { opacity: 0.5; margin: 0 0.4rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0; }
.pill {
  display: inline-block; padding: 0.35rem 0.85rem;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.88rem; text-decoration: none; color: var(--text-mute);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pill:hover { border-color: var(--amber); color: var(--text); }

.note {
  font-size: var(--step--1); color: var(--text-mute);
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--ink); color: var(--text-invert-mute);
  padding: clamp(3rem, 5vw, 4.5rem) 0 2rem; font-size: 0.94rem;
}
.site-footer h4 {
  color: #fff; font-size: var(--step--1); text-transform: uppercase;
  letter-spacing: 0.1em; margin-bottom: 0.9rem;
}
.site-footer a { color: var(--text-invert-mute); text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer__grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
.footer__legal {
  margin-top: 2.5rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line-invert);
  font-size: 0.86rem; line-height: 1.7;
}
.footer__legal p { margin-bottom: 0.6rem; }

/* sticky mobile download bar */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
  background: rgba(16, 20, 24, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-invert);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 0.9rem;
}
.sticky-cta img { width: 34px; height: 34px; border-radius: 8px; }
.sticky-cta div { flex: 1; min-width: 0; color: var(--text-invert); line-height: 1.25; }
.sticky-cta b { display: block; font-size: 0.94rem; }
.sticky-cta small { color: var(--text-invert-mute); font-size: 0.8rem; }
@media (max-width: 720px) {
  .sticky-cta { display: flex; }
  body { padding-bottom: 74px; }
}
