/* NuAnalytics public site. Tokens and chrome follow the desktop app
   (apps/overlay/src/renderer/app/app.html). Light is the default theme. */

:root {
  color-scheme: light;
  --bg: #f3f3ec;
  --surface: #ffffff;
  --surface-2: #e7e8df;
  --line: #d8dacf;
  --ink: #121411;
  --ink-muted: #686c62;
  --ink-faint: #8b8f84;
  --brand: #f2c94c;
  --good: #12894f;
  --bad: #c8381f;
  --red: #ec3013;
  --header: #121411;
  --header-muted: #a6ad99;
  --header-line: #3b4033;
  --bar: #121411;
  --bar-ink: #f2c94c;
  --bar-muted: #a6ad99;
  --card: #121411;
  --card-muted: #a6ad99;
  --card-line: #3b4033;
  --grid: #d8dacf;
  --paper: #ffffff;
  --font-display: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --font-heading: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, ui-monospace, monospace;
  --wrap: 68rem;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121411;
  --surface: #1c1e18;
  --surface-2: #2a2d24;
  --line: #3b4033;
  --ink: #f3f3ec;
  --ink-muted: #a6ad99;
  --ink-faint: #7d8274;
  --paper: #1c1e18;
  --grid: #3b4033;
  --good: #4ff3a0;
  --bad: #ff8a7a;
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--brand);
  color: #121411;
  font-weight: 700;
  padding: 0.5rem 0.85rem;
}
.skip-link:focus { top: 0; }

.wrap {
  width: min(var(--wrap), calc(100% - 56px));
  margin-inline: auto;
}

/* ----- Header (app chrome) ----- */
.site-header {
  background: var(--header);
  color: #fff;
  flex: none;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 76px;
  padding: 0 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.mark { position: relative; width: 58px; height: 29px; overflow: hidden; flex: none; }
.mark img { position: absolute; width: 323.28%; height: 222.41%; left: 0; top: -48.28%; max-width: none; }
.brand-rule { width: 1px; height: 36px; background: #5a5a4a; flex: none; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wordmark .word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--brand);
}
.wordmark .tag {
  margin-top: 3px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--header-muted);
}

.nav { display: flex; height: 76px; gap: 28px; }
.nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--brand);
}

.session { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  background: none;
  border: 0;
  color: var(--header-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.theme-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; border-radius: 4px; }
.theme-toggle .track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 100px;
  background: var(--header-line);
  padding: 3px;
}
.theme-toggle .knob {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 150ms ease;
}
.theme-toggle[aria-checked="true"] .knob { transform: translateX(16px); background: var(--brand); }

main { flex: 1 0 auto; padding: 0 0 48px; }

/* ----- Hero / overview ----- */
.overview {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 36px 0 12px;
}
.overview::before {
  content: '';
  position: absolute;
  top: 24px;
  right: 0;
  width: min(420px, 46%);
  height: 72px;
  opacity: 0.4;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 120px 62px;
}
.title-block { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.headline { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-width: 0; }
.headline h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 56px);
  line-height: 0.95;
  letter-spacing: -1px;
  color: var(--ink);
  text-transform: uppercase;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--brand);
  color: #121411;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.4px;
}
.live-badge i { width: 5px; height: 5px; background: #121411; flex: none; }

.lede {
  position: relative;
  max-width: 40rem;
  margin: 8px 0 0;
  color: var(--ink-muted);
}

.readout { position: relative; display: flex; align-items: center; gap: 20px; flex: none; margin-top: 20px; }
.readout .k {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.readout .v {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.3px;
}
.readout-rule { width: 1px; height: 36px; background: var(--line); }
.crosshair { width: 36px; height: 36px; }
:root[data-theme="dark"] .crosshair { filter: invert(1); }

/* ----- Sections / cards ----- */
.section { padding: 28px 0 0; }
.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 16px;
}

.team-card { border: 1px solid var(--line); background: var(--paper); }
.team-card h2,
.card-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  background: var(--bar);
  color: var(--bar-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0;
}
.card-meta {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--bar-muted);
}
.team-card .body { padding: 16px 18px 18px; }
.team-card p { color: var(--ink-muted); margin: 0 0 10px; }
.team-card p:last-child { margin-bottom: 0; }

.list { margin: 0; padding-left: 1.15rem; color: var(--ink); }
.list li { margin: 0.4rem 0; }
.list li::marker { color: var(--ink-muted); }

.coverage {
  background: var(--card);
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cov-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cov-head span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--brand);
}
.coverage h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}
.coverage .list { color: var(--card-muted); }
.coverage .list li { color: #fff; }
.coverage .list li::marker { color: var(--brand); }

.data-line {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ----- Screenshot placeholders ----- */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 16px;
}
.shot { margin: 0; }
.ad-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 12px;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ad-frame {
  position: relative;
  box-sizing: content-box;
  border: 1px solid var(--line);
  background: var(--paper);
}
.ad-frame .tick { position: absolute; width: 24px; height: 3px; background: var(--ink); }
.ad-frame .tick.tl { top: -1px; left: -1px; }
.ad-frame .tick.br { right: -1px; bottom: -1px; }
.shot-frame {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  background: var(--bg);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.shot-frame img { width: 28px; height: 28px; opacity: 0.8; }
:root[data-theme="dark"] .shot-frame img { filter: invert(1); }
.shot-badge {
  display: inline-block;
  background: var(--brand);
  color: #121411;
  font-weight: 600;
  padding: 4px 8px;
  letter-spacing: 0.6px;
}
.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ----- Contact / buttons ----- */
.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.callout .card-bar { width: 100%; }
.callout .body { padding: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; flex: 1; }
.callout p { margin: 0; color: var(--ink-muted); max-width: 36rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: 0;
}
.btn-primary { background: var(--brand); color: #141414; }
.btn-primary:hover { color: #141414; filter: brightness(1.03); }
.btn-secondary { background: none; color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { color: var(--ink); border-color: var(--ink-faint); }

/* ----- Footer ----- */
.site-footer {
  background: var(--header);
  color: var(--header-muted);
  padding: 28px 0 32px;
  margin-top: auto;
}
.boilerplate { font-size: 13px; line-height: 1.55; max-width: 56rem; margin: 0 0 16px; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
}
.footer-meta { font-size: 13px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; }
.footer-nav a:hover { color: var(--brand); }

/* ----- Legal ----- */
.legal-header { padding: 36px 0 8px; }
.legal-header h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 0.95;
  letter-spacing: -1px;
  text-transform: uppercase;
}
.legal { max-width: 46rem; padding: 8px 0 40px; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin: 1.8rem 0 0.6rem;
}
.legal h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  margin: 1.2rem 0 0.4rem;
}
.legal p, .legal li { color: var(--ink); }
.legal p { margin: 0 0 0.85rem; }
.legal a { color: var(--ink); }
.legal a:hover { color: #a77b00; }
:root[data-theme="dark"] .legal a:hover { color: var(--brand); }

/* ----- 404 ----- */
.error { padding: 64px 0; }
.error .empty-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  margin-bottom: 6px;
}
.error p { color: var(--ink-muted); max-width: 32rem; margin-bottom: 20px; }
.error .actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 800px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { gap: 20px; padding: 0 20px; flex-wrap: wrap; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
  .nav { height: 40px; gap: 16px; }
  .wordmark .tag { display: none; }
  .overview::before { display: none; }
  .session { gap: 12px; }
}

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

@media print {
  .site-header, .theme-toggle, .skip-link, .callout .btn { display: none; }
  body, .site-footer { background: #fff; color: #111; }
  a { color: #000; }
}


/* User flow + footer affiliation */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 12px;
}
.flow li {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 14px 16px;
  counter-increment: step;
}
.flow li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.flow strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.flow span { color: var(--ink-muted); font-size: 14px; }

.footer-notes {
  font-size: 13px;
  line-height: 1.55;
  max-width: 56rem;
  margin: 0 0 16px;
}
