/* TrackX site. The palette and shapes mirror the app (src/theme.ts). */
:root {
  --bg: #0b0d10;
  --surface: #14181d;
  --surface-raised: #1c2229;
  --border: #27303a;
  --text: #f4f6f8;
  --text-dim: #9aa6b2;
  --text-faint: #66727f;
  --accent: #c8f03c;
  --on-accent: #0b0d10;
  --star: #ffc83d;
  --runner: #4da3ff;

  --radius: 18px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 9vw, 112px);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ol,
ul,
figure,
blockquote {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1 {
  font-size: clamp(2.4rem, 6.4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
}

h3 {
  font-size: 1.12rem;
  line-height: 1.3;
  font-weight: 700;
}

.wrap {
  width: min(1120px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.narrow-wrap {
  width: min(760px, 100%);
}

.lead {
  color: var(--text-dim);
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.55;
}

.narrow {
  max-width: 62ch;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  z-index: 20;
}

.skip:focus {
  left: 12px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand.small {
  font-size: 1.05rem;
}

.brand-mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

nav {
  display: flex;
  gap: clamp(12px, 2.4vw, 28px);
  overflow-x: auto;
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

nav a {
  color: var(--text-dim);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding-block: 8px;
}

nav a:hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding-block: clamp(40px, 7vw, 88px) var(--section);
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(200, 240, 60, 0.1), transparent 70%),
    radial-gradient(50% 40% at 10% 0%, rgba(77, 163, 255, 0.08), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

/* Phone illustration */
.phone {
  justify-self: center;
  width: min(320px, 78vw);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
}

.phone svg {
  display: block;
  width: 100%;
  height: auto;
}

.phone-body {
  fill: #05070a;
  stroke: var(--border);
  stroke-width: 2;
}

.phone-screen {
  fill: #10161b;
}

.phone-island {
  fill: #05070a;
}

.streets path {
  fill: none;
  stroke: #1f2831;
  stroke-width: 7;
  stroke-linecap: round;
}

.route {
  fill: rgba(200, 240, 60, 0.04);
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linejoin: round;
  opacity: 0.75;
}

.zones circle {
  fill: rgba(200, 240, 60, 0.12);
  stroke: var(--accent);
  stroke-width: 1;
}

.zones .active-area {
  fill: rgba(200, 240, 60, 0.3);
}

.pins circle {
  fill: var(--surface-raised);
  stroke: var(--accent);
  stroke-width: 2;
}

.pins text {
  fill: var(--text);
  font: 700 12px -apple-system, 'Segoe UI', Roboto, sans-serif;
  text-anchor: middle;
}

.pins .active circle {
  fill: var(--accent);
}

.pins .active text {
  fill: var(--on-accent);
}

.runner-halo {
  fill: rgba(77, 163, 255, 0.25);
}

.runner {
  fill: var(--runner);
  stroke: #fff;
  stroke-width: 2.5;
}

.panel {
  fill: var(--surface);
}

.panel-edge {
  stroke: var(--border);
  stroke-width: 1;
}

.label {
  fill: var(--text-dim);
  font: 700 9.5px -apple-system, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0.08em;
}

.art {
  fill: var(--surface-raised);
}

.note {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.note-head {
  fill: var(--accent);
}

.song {
  fill: var(--text);
  font: 800 18px -apple-system, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.02em;
}

.next {
  fill: var(--text-dim);
  font: 500 11px -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.progress-track {
  fill: var(--surface-raised);
}

.progress {
  fill: var(--accent);
}

/* Sections */
section {
  padding-block: var(--section);
  /* Keep headings clear of the sticky header when jumping to a section. */
  scroll-margin-top: 56px;
}

.band {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

section h2 {
  margin-bottom: 18px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 36px;
}

.steps li,
.cards li,
.services li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.band .steps li {
  background: var(--bg);
}

.steps p,
.cards p,
.services p,
details p {
  color: var(--text-dim);
  font-size: 0.98rem;
}

.step-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.95rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cards li {
  background: var(--surface);
}

.review {
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.stars {
  color: var(--star);
  font-size: 1.3rem;
  letter-spacing: 0.12em;
}

.review blockquote {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.review figcaption {
  color: var(--text-faint);
  font-size: 0.88rem;
}

.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.services li {
  background: var(--surface);
}

.tag {
  justify-self: start;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim) !important;
  font-size: 0.78rem !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag.ok {
  border-color: var(--accent);
  color: var(--accent) !important;
}

details {
  border-bottom: 1px solid var(--border);
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}

details[open] summary::after {
  content: '–';
}

details p {
  padding-bottom: 20px;
  max-width: 64ch;
}

/* Footer */
.site-footer {
  padding-block: 36px 48px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 12px;
}

.fine {
  color: var(--text-faint);
  font-size: 0.88rem;
  max-width: 70ch;
}

.fine a {
  color: var(--text-dim);
}

/* Smaller screens */
@media (max-width: 900px) {
  .hero-grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .cards,
  .services {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Only the links that fit beside the name; the rest are a scroll away on a one-page site. */
  nav a:nth-child(n + 3) {
    display: none;
  }

  .button {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
