/* Focal marketing site — built directly on the extension's own tokens
   (theme.css) so the site and the product never feel like two different
   things wearing the same logo. */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--paper-100);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--ink-950) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) 0;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  color: var(--paper-100);
}

.wordmark__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--tally-500);
  box-shadow: 0 0 0 4px var(--tally-tint);
  flex-shrink: 0;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--sp-6);
  font-size: 14px;
  color: var(--paper-400);
}

.nav__links a { text-decoration: none; }
.nav__links a:hover { color: var(--paper-100); }

.nav__cta {
  display: none;
}

@media (min-width: 640px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, transform 0.05s ease, border-color 0.12s ease;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--tally-500);
  color: var(--ink-950);
}
.btn--primary:hover { background: var(--tally-600); }

.btn--ghost {
  background: transparent;
  color: var(--paper-100);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--paper-600); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--sp-12) 0 var(--sp-8);
}

.hero__grid {
  display: grid;
  gap: var(--sp-12);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--focus-500);
  background: var(--focus-tint);
  border: 1px solid color-mix(in srgb, var(--focus-500) 35%, transparent);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: var(--sp-4);
}

.hero h1 {
  margin: 0 0 var(--sp-4);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.hero p.lede {
  margin: 0 0 var(--sp-6);
  font-size: 17px;
  color: var(--paper-400);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.hero__note {
  font-size: 12.5px;
  color: var(--paper-600);
}

/* ---------- Hero visual: a live "recording" mockup built from the
   extension's own viewfinder + record-tally language, not a screenshot. ---------- */
.demo {
  position: relative;
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.demo__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--ink-800);
}

.demo__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-600); opacity: 0.5; }
.demo__url {
  flex: 1;
  margin-left: 6px;
  height: 20px;
  border-radius: 999px;
  background: var(--ink-900);
  border: 1px solid var(--line);
}
.demo__rec {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--paper-100);
}
.demo__rec-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tally-500);
  animation: dr-pulse 1.2s ease-in-out infinite;
}

.demo__stage {
  position: relative;
  aspect-ratio: 16/10.4;
  padding: var(--sp-6);
  background:
    radial-gradient(circle at 25% 15%, color-mix(in srgb, var(--focus-500) 10%, transparent), transparent 40%),
    var(--ink-950);
}

.demo__row { height: 12px; border-radius: 4px; background: var(--line); opacity: 0.7; }
.demo__row + .demo__row { margin-top: 10px; }

.demo__card {
  margin-top: var(--sp-4);
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: var(--sp-4);
}

.demo__frame {
  position: absolute;
  border: 2px solid var(--focus-500);
  border-radius: 8px;
  pointer-events: none;
}

.demo__frame::before, .demo__frame::after,
.demo__frame > .c2, .demo__frame > .c3 { content: ""; }

.demo__bracket {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--focus-500);
}
.demo__bracket--tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.demo__bracket--tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.demo__bracket--bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.demo__bracket--br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.demo__cursor {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tally-500);
  border: 2px solid var(--paper-100);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.demo__ripple {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--tally-500);
  animation: demo-ripple 1.8s ease-out infinite;
}

@keyframes demo-ripple {
  0% { width: 14px; height: 14px; opacity: 0.9; }
  70% { opacity: 0; }
  100% { width: 70px; height: 70px; margin-left: -28px; margin-top: -28px; opacity: 0; }
}

.demo__key {
  position: absolute;
  display: flex;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(20, 18, 16, 0.9);
  border: 1px solid rgba(255,255,255,0.08);
  font-family: var(--sans);
}
.demo__key span {
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.07);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--paper-100);
}

@media (prefers-reduced-motion: reduce) {
  .demo__rec-dot, .demo__ripple { animation: none !important; }
}

/* ---------- Sections ---------- */
section { padding: var(--sp-12) 0; }

.section__head {
  max-width: 640px;
  margin: 0 0 var(--sp-8);
}

.section__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-600);
  margin: 0 0 var(--sp-2);
}

.section__head h2 {
  margin: 0 0 var(--sp-2);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section__head p {
  margin: 0;
  color: var(--paper-400);
  font-size: 15.5px;
}

/* Feature grid */
.features {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .features { grid-template-columns: repeat(4, 1fr); }
}

.feature {
  background: var(--ink-900);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
}

.feature__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-3);
}

.feature__icon svg { width: 18px; height: 18px; }

.feature--tally .feature__icon { background: var(--tally-tint); color: var(--tally-500); }
.feature--focus .feature__icon { background: var(--focus-tint); color: var(--focus-500); }
.feature--segment .feature__icon { background: var(--segment-700); color: var(--segment-500); }

.feature h3 {
  margin: 0 0 var(--sp-1);
  font-size: 15px;
  font-weight: 700;
}
.feature p {
  margin: 0;
  font-size: 13.5px;
  color: var(--paper-400);
  line-height: 1.55;
}

/* Steps (a real sequence, so numbers are earned here) */
.steps {
  display: grid;
  gap: var(--sp-6);
  counter-reset: step;
}

@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  position: relative;
  padding-top: var(--sp-8);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--paper-400);
}

.step h3 {
  margin: 0 0 var(--sp-1);
  font-size: 16px;
  font-weight: 700;
}
.step p {
  margin: 0;
  font-size: 14px;
  color: var(--paper-400);
}

/* Privacy callout on homepage */
.privacy-strip {
  border: 1px solid var(--line);
  background: var(--ink-900);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.privacy-strip__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--segment-700);
  color: var(--segment-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.privacy-strip__icon svg { width: 20px; height: 20px; }

.privacy-strip h3 { margin: 0 0 4px; font-size: 15.5px; font-weight: 700; }
.privacy-strip p { margin: 0; font-size: 14px; color: var(--paper-400); }
.privacy-strip a { color: var(--focus-500); text-decoration: none; font-weight: 600; }
.privacy-strip a:hover { text-decoration: underline; }

/* CTA band */
.cta-band {
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-12) 0;
}
.cta-band h2 {
  margin: 0 0 var(--sp-2);
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 700;
}
.cta-band p {
  margin: 0 0 var(--sp-6);
  color: var(--paper-400);
}

/* ---------- Footer ---------- */
footer {
  padding: var(--sp-8) 0 var(--sp-12);
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}
.footer__links {
  display: flex;
  gap: var(--sp-6);
  font-size: 13.5px;
  color: var(--paper-600);
}
.footer__links a { text-decoration: none; }
.footer__links a:hover { color: var(--paper-100); }
.footer__copy {
  font-size: 12.5px;
  color: var(--paper-600);
}

/* ---------- Legal / privacy page ---------- */
.legal {
  padding: var(--sp-12) 0;
}
.legal__header {
  max-width: 680px;
  margin: 0 0 var(--sp-8);
}
.legal__header h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 var(--sp-2);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.legal__updated {
  font-size: 13px;
  color: var(--paper-600);
  font-family: var(--mono);
}
.legal__lede {
  color: var(--paper-400);
  font-size: 15.5px;
  max-width: 680px;
  margin-top: var(--sp-4);
}

.legal__body {
  max-width: 680px;
}

.legal__body h2 {
  font-size: 18px;
  font-weight: 700;
  margin: var(--sp-8) 0 var(--sp-3);
}
.legal__body h2:first-child { margin-top: 0; }

.legal__body p {
  color: var(--paper-400);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 var(--sp-3);
}

.legal__body ul {
  margin: 0 0 var(--sp-3);
  padding-left: 1.2em;
  color: var(--paper-400);
  font-size: 15px;
  line-height: 1.7;
}
.legal__body li { margin-bottom: 6px; }
.legal__body li strong { color: var(--paper-100); }

.legal__body code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--ink-800);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--paper-100);
}

.legal__body a { color: var(--focus-500); text-decoration: none; }
.legal__body a:hover { text-decoration: underline; }

.legal__callout {
  border: 1px solid color-mix(in srgb, var(--segment-500) 40%, transparent);
  background: var(--segment-700);
  border-radius: var(--radius);
  padding: var(--sp-4);
  color: var(--paper-100);
  font-size: 14px;
  margin-bottom: var(--sp-6);
}
.legal__callout strong { color: var(--segment-500); }
