/* ==========================================================================
   Hot Spotter — marketing site
   "the instrument, not the brochure": the app's own report surface.
   ========================================================================== */

/* --- Tokens (from ui/app.css) --------------------------------------------- */
:root {
  --bg:      #12151d;
  --strip:   #0d1017;
  --pop:     #1b2030;
  --panel:   rgba(255,255,255,.04);
  --fg:      #e6e7ec;
  --fg2:     #8b90a3;
  --faint:   #9aa2bf;
  --line:    rgba(255,255,255,.08);
  --divider: rgba(255,255,255,.14);
  --acc:     #63c7b2;
  --acc-ink: #08120f;
  --loud:    #f0973c;
  --quiet:   #5b9bd9;
  --ok:      #4db87b;
  --danger:  #d84b40;

  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --wrap: 1140px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 10px;
  --head-h: 4.25rem;

  --ease: cubic-bezier(.22, 1, .36, 1); /* ease-out-quint */
}

/* --- Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("fonts/SpaceMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  color-scheme: dark;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg2);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

h1, h2, h3 {
  color: var(--fg);
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.03; letter-spacing: -.028em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.12; letter-spacing: -.022em; }
h3 { font-size: clamp(1.15rem, 1.55vw, 1.45rem); line-height: 1.25; letter-spacing: -.012em; }
p  { margin: 0; }

a { color: var(--acc); }

::selection { background: var(--acc); color: var(--acc-ink); }

/* --- Typographic primitives ----------------------------------------------- */
.micro {
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.6;
  letter-spacing: .1em;
}

.eyebrow,
.kicker {
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.5;
  letter-spacing: .2em;
  color: var(--faint);
}
.eyebrow::before,
.kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--divider);
  vertical-align: .3em;
  margin-right: .75rem;
}

.lede {
  max-width: 52ch;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.6;
}

.fine { color: var(--faint); }

/* --- Layout --------------------------------------------------------------- */
.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sec { padding-block: clamp(3rem, 6vw, 5rem); }
section[id], #main { scroll-margin-top: calc(var(--head-h) + 1rem); }

/* --- Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 50;
  background: var(--acc);
  color: var(--acc-ink);
  font-family: var(--mono);
  font-size: .8rem;
  padding: .75rem 1rem;
  border-radius: 0 0 6px 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --- Focus ---------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- Buttons & links ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.4rem;
  border: 1px solid var(--acc);
  border-radius: 8px;
  background: var(--acc);
  color: var(--acc-ink);
  font-family: var(--sans);
  font-size: .975rem;
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
}
.btn:hover {
  background: color-mix(in srgb, var(--acc) 84%, #fff);
  border-color: color-mix(in srgb, var(--acc) 84%, #fff);
}
.btn-sm {
  padding: 0 1.05rem;
  font-size: .875rem;
  border-radius: 7px;
}

.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--acc);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  line-height: 1.2;
}
.ghost:hover { border-bottom-color: var(--acc); }

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

/* --- Header --------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--strip);
  border-bottom: 1px solid var(--line);
}
.head-in {
  min-height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  min-height: 44px;
  color: var(--fg);
  text-decoration: none;
}
.wordmark img { display: block; border-radius: 6px; }
.wordmark-name {
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.ver {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--faint);
  padding: .1rem .4rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.head-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.navlink {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .02em;
  color: var(--fg2);
  text-decoration: none;
}
.navlink:hover { color: var(--fg); }

/* --- Window-frame figures -------------------------------------------------- */
.frame { margin: 0; }
.frame .chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding-inline: 12px;
  background: var(--strip);
  border: 1px solid var(--divider);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}
.frame .chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}
.frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--divider);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--strip);
}
.frame .zoom { display: block; cursor: zoom-in; }
.frame figcaption {
  color: var(--faint);
  margin-top: .875rem;
}

/* --- Hero ------------------------------------------------------------------ */
.hero-wrap {
  overflow-x: hidden;
  overflow-x: clip;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2rem, 4.5vw, 3.5rem) clamp(1.75rem, 4vw, 3rem) ;
}
.hero-copy > * + * { margin-top: 1.5rem; }
.hero-copy .eyebrow + h1 { margin-top: 1.25rem; }
.hero-copy .cta-row { margin-top: 2.25rem; }
.hero-copy .fine { margin-top: 1.5rem; }

.hero-shot {
  justify-self: start;
  width: 56vw;
  max-width: 1200px;
}

/* --- Heat ribbon ----------------------------------------------------------- */
.ribbon { padding-bottom: 1rem; }
.ribbon-img {
  display: block;
  width: 100%;
  height: clamp(72px, 6.5vw, 96px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ribbon-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  padding-top: .75rem;
}
.tint-quiet { color: var(--quiet); }
.tint-ok    { color: var(--ok); }
.tint-loud  { color: var(--loud); }

/* --- Section heads --------------------------------------------------------- */
.sec-head { margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); }
.sec-head .eyebrow + h2 { margin-top: 1rem; }
.sec-head.narrow h2 { max-width: 26ch; }

/* --- How it works ---------------------------------------------------------- */
.sec-how { padding-block: clamp(3.5rem, 6.5vw, 5.5rem) clamp(2rem, 4vw, 3.25rem); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(1.5rem, 3vw, 2.75rem);
}
.steps li + li {
  border-left: 1px solid var(--line);
  padding-left: clamp(1.5rem, 3vw, 2.75rem);
}
.steps .num {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1;
  letter-spacing: .04em;
  color: var(--faint);
}
.steps h3 { margin: 1.125rem 0 .5rem; }
.steps p { max-width: 34ch; }

/* --- Feature tour ---------------------------------------------------------- */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1.5rem, 3.5vw, 3.25rem);
  align-items: center;
}
.row + .row { margin-top: clamp(4rem, 8vw, 7rem); }
/* both children share one grid row — otherwise a media-right row auto-places
   the text onto a second row. */
.row > .media,
.row > .row-text { grid-row: 1; }

.row-ml.row-wide > .media    { grid-column: 1 / 8; }
.row-ml.row-wide > .row-text { grid-column: 9 / 13; }
.row-ml > .media    { grid-column: 1 / 7; }
.row-ml > .row-text { grid-column: 8 / 13; }
.row-mr > .media    { grid-column: 7 / 13; }
.row-mr > .row-text { grid-column: 1 / 6; }

.row-text .kicker + h3 { margin-top: .875rem; }
.row-text h3 + p { margin-top: .875rem; }

/* --- Palettes (Make it yours) ---------------------------------------------- */
.sec-palettes {
  border-top: 1px solid var(--line);
  background: var(--bg);
  transition: background .35s var(--ease), color .35s var(--ease);
}
/* Light: the whole section flips, using the app's own light tokens. */
.sec-palettes[data-theme="light"] {
  --bg: #eef0f4;  --strip: #e3e6ec;
  --fg: #1c1e26;  --fg2: #575c6c;  --faint: #5d6274;
  --line: rgba(28,30,38,.15);  --divider: rgba(28,30,38,.22);
  --acc: #1e7b4b;
  color: var(--fg);
}
.sec-palettes[data-theme="light"] .pal-chip.on { background: rgba(30,123,75,.08); }
.pal-stage {
  background: var(--strip);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .35s var(--ease);
}
.pal-strip {
  display: block;
  width: 100%;
  height: clamp(72px, 6.5vw, 96px);
}
.pal-strip rect {
  fill: #2a3348;
  transform-box: fill-box;
  transform-origin: center;
  transform: scaleY(0);
  transition: fill .2s linear, transform .3s var(--ease);
  transition-delay: calc(var(--i) * 3ms);
}
.sec-palettes[data-theme="light"] .pal-strip rect { fill: #c9cdd6; }
.pal-strip.drawn rect { transform: none; }

.pal-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 1.5rem;
  margin-top: 1.25rem;
}
.pal-chips, .pal-theme { display: flex; flex-wrap: wrap; gap: .5rem; }
.pal-chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 36px;
  padding: 0 .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg2);
  font-family: var(--sans);
  font-size: .875rem;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.pal-chip:hover { color: var(--fg); border-color: var(--divider); }
.pal-chip.on { color: var(--fg); border-color: var(--acc); background: rgba(99,199,178,.08); }
.pal-chip:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.pal-sw {
  width: 34px;
  height: 8px;
  border-radius: 2px;
  background: var(--line);
}
.pal-note { margin-top: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
  .pal-strip rect { transform: none; transition: none; }
  .pal-stage { transition: none; }
}

/* --- Philosophy ------------------------------------------------------------ */
.sec-philosophy { border-top: 1px solid var(--line); }
.philo-shot {
  float: right;
  width: min(40%, 26rem);
  margin: 0 0 1.5rem clamp(1.5rem, 4vw, 3rem);
}
.sec-philosophy .trust { clear: both; }
.creed {
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.35vw, 1.15rem);
  line-height: 1.7;
}
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
}

/* --- FAQ ------------------------------------------------------------------- */
.sec-faq { border-top: 1px solid var(--line); }
.faq-grid {
  display: grid;
  grid-template-columns: 4fr 8fr;
  column-gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.faq-head { margin-bottom: 0; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 44px;
  padding: 1.05rem .75rem;
  margin-inline: -.75rem;
  border-radius: 6px;
  color: var(--fg);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { background: var(--pop); }
.faq-list summary::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1;
  color: var(--acc);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p {
  max-width: 68ch;
  padding-bottom: 1.5rem;
}

/* --- Download -------------------------------------------------------------- */
.sec-download {
  background: var(--strip);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
}
.sec-download .eyebrow + h2 { margin-top: 1rem; }
.dl-line {
  max-width: 54ch;
  margin-top: 1.25rem;
  font-size: clamp(1rem, 1.2vw, 1.0625rem);
}
.sec-download .cta-row { margin-top: 2.25rem; }
.sec-download .fine { margin-top: 2rem; max-width: 72ch; }

/* --- Footer ---------------------------------------------------------------- */
.site-foot { padding-block: clamp(2rem, 4vw, 3rem); }
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.foot-mark {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--fg2);
  font-size: .9375rem;
}
.foot-mark img { display: block; border-radius: 5px; }
.foot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  color: var(--faint);
}
.foot-meta a {
  color: var(--faint);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.foot-meta a:hover { color: var(--acc); border-bottom-color: var(--acc); }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: clamp(2.25rem, 6vw, 3rem);
  }
  .hero-shot { width: 100%; }
  .hero .lede { max-width: none; }

  .steps { grid-template-columns: 1fr; row-gap: 2.25rem; }
  .steps li + li {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 2.25rem;
  }
  .steps p { max-width: 52ch; }

  .row { grid-template-columns: 1fr; }
  .row > .media,
  .row > .row-text { grid-row: auto; }
  .row > .media,
  .row-ml.row-wide > .media,
  .row-ml.row-wide > .row-text,
  .row-ml > .media,
  .row-ml > .row-text,
  .row-mr > .media,
  .row-mr > .row-text { grid-column: 1 / -1; }
  .row > .row-text { margin-top: 1.75rem; }

  .philo-shot {
    float: none;
    width: 100%;
    max-width: 30rem;
    margin: 0 0 2rem;
  }
  .row + .row { margin-top: clamp(3.5rem, 9vw, 5rem); }

  .faq-grid { grid-template-columns: 1fr; }
  .faq-head { margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
}

@media (max-width: 640px) {
  /* keep section nav on phones; the header Download goes (the hero button is right below) */
  .head-nav { gap: 1rem; }
  .head-nav .btn-sm { display: none; }
  .navlink { font-size: .75rem; white-space: nowrap; }
  .wordmark .ver { display: none; }
  .trust > span[aria-hidden] { display: none; }
  .ribbon-legend {
    grid-template-columns: 1fr;
    gap: .1rem;
  }
  .foot-in { justify-content: flex-start; }
}

/* --- Motion: one orchestrated load moment ---------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .rise {
    opacity: 0;
    transform: translateY(14px);
    animation: rise .25s var(--ease) both;
  }
  .rise-1    { animation-delay: .02s; }
  .rise-2    { animation-delay: .08s; }
  .rise-3    { animation-delay: .14s; }
  .rise-4    { animation-delay: .2s; }
  .rise-5    { animation-delay: .24s; }
  .rise-shot { animation-delay: .12s; }

  .ribbon-img {
    clip-path: inset(0 100% 0 0);
    animation: wipe .6s var(--ease) .3s both;
  }
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}
@keyframes wipe {
  to { clip-path: inset(0 0 0 0); }
}

/* --- Consent banner (analytics.js; only exists once GA_ID is set) --------- */
#consent {
  position: fixed;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 30;
  max-width: 34rem;
  margin-inline-start: auto; /* dock bottom-right: overlaps the hero shot, not the CTAs */
  padding: 1rem 1.25rem;
  background: var(--strip);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  color: var(--fg2);
  font-size: .9375rem;
  line-height: 1.5;
}
#consent p { margin: 0; }
#consent a { color: var(--fg); }
#consent .consent-btns {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: .875rem;
}
#consent .ghost { background: none; border: 0; padding: 0; cursor: pointer; }

/* --- Legal pages (privacy.html) -------------------------------------------- */
.legal .wrap { max-width: 44rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; letter-spacing: -.022em; margin-top: 1rem; }
.legal .legal-date { color: var(--faint); margin-top: 1rem; }
.legal .lede { margin-top: 1.75rem; max-width: none; }
.legal h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-top: 3rem; }
.legal h2 + p, .legal p + p, .legal ul + p, .legal p + ul { margin-top: 1rem; }
.legal p, .legal li { line-height: 1.65; }
.legal strong { color: var(--fg); font-weight: 500; }
.legal ul { margin: 0; padding-left: 1.25rem; }
.legal li + li { margin-top: .75rem; }

/* --- Download page --------------------------------------------------------- */
.sec-dl { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6.5rem); }
.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.dl-tile { position: sticky; top: calc(var(--head-h) + 2rem); }
.dl-copy .eyebrow + h1 { margin-top: 1rem; }
.dl-copy h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; }
.dl-ver { margin-top: .75rem; color: var(--faint); }
.dl-list {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
.dl-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.dl-os { width: 24px; height: 24px; margin-top: .2rem; color: var(--fg); }
.dl-link {
  color: var(--fg);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--acc);
}
.dl-link:hover { color: var(--acc); }
.dl-size { margin-left: .4rem; color: var(--faint); }
.dl-sub { margin-top: .35rem; color: var(--fg2); font-size: .9375rem; }
.dl-fine { margin-top: 2rem; max-width: 52ch; }
.dl-fine + .dl-fine { margin-top: .75rem; }
.dl-copy .cta-row { margin-top: 1.5rem; }
@media (max-width: 820px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-tile { position: static; order: 2; }
}
