/* Report-It landing — palette from docs/design-system.md, craft patterns after davidhawley.co.uk */

@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('fonts/hanken-grotesk.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0a0a0a;
  --surface: #141416;
  --surface-2: #17171a;
  --line: #262629;
  --line-strong: #303034;
  --fg: #f4f4f5;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --faint: #52525b;
  --brand: #6366f1;
  --brand-deep: #4f46e5;
  --accent: #06b6d4;
  --attention: #fbbf24;
  --success: #34d399;
  --danger: #f43f5e;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --radius: 1rem;
  --container: 72rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; line-height: 1.3; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.9rem;
}
.lede { font-size: 1.125rem; color: var(--muted); max-width: 36rem; }
.strava { color: #fc4c02; font-weight: 600; }
.grad-text {
  background: linear-gradient(100deg, var(--brand) 10%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wide-only { display: none; }
@media (min-width: 48rem) { .wide-only { display: inline; } }

/* ---------- buttons, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 500; font-size: 0.95rem;
  padding: 0.7rem 1.5rem; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--fg);
  background: var(--surface); text-decoration: none; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--faint); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep) 60%, var(--accent) 140%);
  border-color: transparent;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(99, 102, 241, 0.5); }
.btn-block { width: 100%; margin-top: 1.5rem; }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
  margin-bottom: 1rem; text-transform: uppercase;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-cyan { color: var(--accent); }
.chip-brand { color: var(--brand); }
.chip-amber { color: var(--attention); }
.chip-emerald { color: var(--success); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin-inline: auto; padding: 0.8rem 1.5rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  color: var(--fg); text-decoration: none;
}
.nav-brand img { border-radius: 7px; }
.nav-links { display: none; gap: 1.4rem; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.92rem;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-cta { margin-left: auto; padding: 0.5rem 1.15rem; font-size: 0.88rem; }
@media (min-width: 48rem) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: 5rem 0 4rem; }
.hero-glow {
  position: absolute; inset: -20% -10% auto; height: 80%;
  background:
    radial-gradient(38rem 22rem at 22% 30%, rgba(99, 102, 241, 0.16), transparent 70%),
    radial-gradient(34rem 20rem at 78% 20%, rgba(6, 182, 212, 0.1), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; gap: 3rem; align-items: center;
}
@media (min-width: 62rem) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
  .hero { padding: 6.5rem 0 6rem; }
}
.hero-copy h1 { margin-bottom: 1.25rem; }
.hero-copy .lede { margin-bottom: 2rem; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.form-note { font-size: 0.85rem; color: var(--subtle); margin-top: 0.7rem; }
.form-note.is-success { color: var(--success); }
.form-note.is-error { color: var(--danger); }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem;
  list-style: none; margin-top: 2.75rem;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--display); font-size: 1.35rem; letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--brand), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { font-size: 0.82rem; color: var(--subtle); }

/* app window frame */
.window {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(99, 102, 241, 0.07);
}
.window-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 0.55rem 0.9rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.window-bar i:first-child { background: #3f3f46; }
.window-bar span {
  font-family: var(--mono); font-size: 0.7rem; color: var(--subtle);
  margin-inline: auto; transform: translateX(-24px);
}
.window video { width: 100%; }

.hero-shot { perspective: 1400px; }
.hero-shot .window {
  transform: rotateY(-7deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.hero-shot:hover .window { transform: rotateY(0) rotateX(0); }
.hero-shot figcaption {
  font-family: var(--mono); font-size: 0.75rem; color: var(--subtle);
  text-align: center; margin-top: 1rem;
}

/* ---------- pains ---------- */
.pains { padding: 5.5rem 0; border-top: 1px solid var(--line); }
.pain-grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
@media (min-width: 48rem) { .pain-grid { grid-template-columns: repeat(3, 1fr); } }
.pain {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.75rem;
}
.pain-num {
  font-family: var(--mono); font-size: 0.78rem; color: var(--danger);
  display: block; margin-bottom: 1rem;
}
.pain h3 { margin-bottom: 0.6rem; }
.pain p { color: var(--muted); font-size: 0.97rem; }
.pains-close { margin-top: 2.25rem; }

/* ---------- tour / rail ---------- */
.tour { padding: 5.5rem 0 3rem; border-top: 1px solid var(--line); }
.builds { position: relative; margin-top: 3.5rem; }
@media (min-width: 62rem) {
  .builds { padding-left: 3rem; }
  .builds::before {
    content: ''; position: absolute; left: 0.4rem; top: 1rem; bottom: 1rem;
    width: 2px; background: var(--line);
  }
  .builds::after {
    content: ''; position: absolute; left: 0.4rem; top: 1rem; bottom: 1rem;
    width: 2px;
    background: linear-gradient(180deg, var(--brand), var(--accent));
    transform: scaleY(0); transform-origin: top;
    transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .builds.is-drawn::after { transform: scaleY(1); }
  .build::before {
    content: ''; position: absolute; left: -3rem; top: 0.65rem;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--faint);
    transform: translateX(-0.15rem);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
  }
  .build.is-visible::before {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.6);
  }
}
.build {
  position: relative;
  display: grid; gap: 2rem; align-items: center;
  padding: 3rem 0;
}
.build > * { min-width: 0; }
@media (min-width: 62rem) {
  .build { grid-template-columns: 1fr 1.2fr; gap: 3.5rem; padding: 3.5rem 0; }
  .build:nth-child(even) .build-copy { order: 2; }
  .build:nth-child(even) .build-shot { order: 1; }
}
.build-copy h3 { font-size: 1.55rem; margin-bottom: 0.75rem; }
.build-copy > p:not(.chip) { color: var(--muted); }
.ticks { list-style: none; margin-top: 1.25rem; display: grid; gap: 0.5rem; }
.ticks li {
  position: relative; padding-left: 1.6rem; color: var(--muted); font-size: 0.95rem;
}
.ticks li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  color: var(--success); font-weight: 700;
}
.build-shot .window { box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5); }
.build-shot .window + .fieldticker { margin-top: 1rem; }

/* field ticker */
.fieldticker {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.25rem 0;
  overflow: hidden; width: 100%; max-width: 100%; contain: inline-size;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.fieldticker-track {
  display: flex; gap: 0.75rem; width: max-content;
  animation: tick 28s linear infinite;
}
.fieldticker span {
  font-family: var(--mono); font-size: 0.8rem; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.45rem 1rem; white-space: nowrap; background: var(--surface-2);
}
.fieldticker b { color: var(--success); font-weight: 600; }
@keyframes tick { to { transform: translateX(-50%); } }
.fieldticker-track + .fieldticker-track { margin-top: 0.75rem; }
.fieldticker-track.reverse { animation-direction: reverse; animation-duration: 34s; }
.fieldticker-note {
  font-family: var(--mono); font-size: 0.75rem; color: var(--subtle);
  text-align: center; margin-top: 1rem;
}

/* ---------- pricing ---------- */
.pricing { padding: 5.5rem 0; border-top: 1px solid var(--line); }
.price-card {
  max-width: 26rem; margin-top: 2.5rem;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong); border-radius: 1.25rem; padding: 2rem;
  position: relative;
}
.price-card::before {
  content: ''; position: absolute; inset: -1px;
  border-radius: 1.25rem; padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.3), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.price { display: flex; align-items: baseline; gap: 0.6rem; margin: 0.5rem 0 1.25rem; }
.price strong { font-family: var(--display); font-size: 3rem; letter-spacing: -0.03em; }
.price span { color: var(--subtle); font-size: 0.9rem; }

/* ---------- final cta ---------- */
.cta-final {
  position: relative; padding: 6rem 0; text-align: center;
  border-top: 1px solid var(--line); overflow: hidden;
}
.cta-glow {
  position: absolute; inset: auto -10% -40%; height: 90%;
  background: radial-gradient(42rem 24rem at 50% 100%, rgba(99, 102, 241, 0.18), transparent 70%);
  pointer-events: none;
}
.cta-final .container { position: relative; }
.cta-final .lede { margin-inline: auto; margin-bottom: 2rem; }

/* ---------- join form ---------- */
.join-card {
  max-width: 40rem; margin-inline: auto; text-align: left;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong); border-radius: 1.25rem;
  padding: 2rem;
}
.join-field label, .pill-group legend {
  display: block; padding: 0;
  font-size: 0.85rem; color: var(--muted);
  margin-bottom: 0.55rem;
}
.join-field input {
  width: 100%;
  font: inherit; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 0.75rem; padding: 0.7rem 1.1rem;
  outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.join-field input::placeholder { color: var(--subtle); }
.join-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.join-field input.is-error { border-color: var(--danger); }
.join-grid { display: grid; gap: 1.4rem; margin-top: 1.5rem; }
@media (min-width: 40rem) {
  .join-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem 2rem; }
  .pill-group-wide { grid-column: 1 / -1; }
}
.pill-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { position: relative; }
.pill input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.pill span {
  display: inline-flex; align-items: center;
  font-family: var(--display); font-size: 0.88rem; font-weight: 500;
  padding: 0.45rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--muted); cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.pill:hover span { border-color: var(--faint); color: var(--fg); }
.pill input:checked + span {
  border-color: var(--brand); color: var(--fg);
  background: rgba(99, 102, 241, 0.16);
  box-shadow: 0 0 0 1px var(--brand);
}
.pill input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}
.join-select select {
  width: 100%;
  font: inherit; font-size: 0.95rem; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 0.75rem; padding: 0.7rem 2.5rem 0.7rem 1.1rem;
  outline: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.join-select select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.join-select select:invalid, .join-select select option[value=""] { color: var(--subtle); }
.pill-group.is-missing legend { color: var(--danger); }
.pill-group.is-missing .pill span { border-color: rgba(244, 63, 94, 0.5); }
.pill-group.is-missing .join-select select { border-color: rgba(244, 63, 94, 0.5); }
.join-card .btn-block { margin-top: 1.75rem; }
.join-card .form-note { margin-top: 0.9rem; text-align: center; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 2.5rem 0; }
.footer-inner { display: grid; gap: 0.5rem; }
.footer p { color: var(--subtle); font-size: 0.88rem; }
.footer-fine { font-size: 0.78rem; }
.footer a { color: var(--muted); }

/* ---------- floating cta ---------- */
.cta-float {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  font-family: var(--display); font-weight: 500; font-size: 0.9rem;
  color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep) 60%, var(--accent) 140%);
  padding: 0.75rem 1.4rem; border-radius: 999px;
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cta-float.is-shown { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ---------- reveals ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-shot .window { transform: none; transition: none; }
  .fieldticker-track { animation: none; flex-wrap: wrap; width: auto; padding-inline: 1rem; }
  .fieldticker { mask-image: none; -webkit-mask-image: none; }
  .builds::after { transition: none; }
  .btn, .pill span, .cta-float { transition: none; }
}
