:root {
  --bg: #0d0d14;
  --surface: #161620;
  --surface-sunken: #10101a;
  --border: #2a2a35;
  --accent: #4fd1c5;
  --accent-deep: #0d3b36;
  --accent-ink: #06201d;
  --text: #ffffff;
  --muted: #8a8a9a;
  --display: 'Quicksand', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: #7fe3da;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(13, 13, 20, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

/* Visible only once focused, so the first tab stop is a way past the nav. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 20;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #06201d;
  font-weight: 700;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 12px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* Three bars drawn from one element: the middle is the box, the outer two are
   its pseudo-elements. */
.nav-bars,
.nav-bars::before,
.nav-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}
.nav-bars::before,
.nav-bars::after {
  content: '';
  position: relative;
}
.nav-bars::before {
  top: -6px;
}
.nav-bars::after {
  top: 4px;
}

/* Open: the outer bars meet in the middle and cross. */
[aria-expanded='true'] .nav-bars {
  background: transparent;
}
[aria-expanded='true'] .nav-bars::before {
  transform: translateY(6px) rotate(45deg);
}
[aria-expanded='true'] .nav-bars::after {
  transform: translateY(-4px) rotate(-45deg);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}
.nav-links a {
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--text);
}

/* ---------- hero ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 84px 0 96px;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}

.accent {
  color: var(--accent);
}

.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 30px;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  border-radius: 15px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
}

.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.button.primary:hover {
  background: #7fe3da;
  color: var(--accent-ink);
}

.button.ghost {
  border: 1.5px solid var(--border);
  color: var(--text);
}
.button.ghost:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cta-note {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.hero-board {
  display: flex;
  justify-content: center;
}

.board {
  width: 100%;
  max-width: 380px;
  filter: drop-shadow(0 24px 60px rgba(79, 209, 197, 0.12));
}

/* the hero path draws itself once on load */
.trail {
  /* Set from the measured path length in board.js: a keyframe cannot know how
     long the route is, and a guessed dash length either stalls or snaps. */
  stroke-dashoffset: 0;
  opacity: 0;
  transition: none;
}

/* ---------- sections ---------- */

.section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(27px, 3.4vw, 38px);
  letter-spacing: -0.01em;
  margin: 0 0 34px;
}

.section-lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 62ch;
  margin: -18px 0 36px;
  text-wrap: pretty;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}

.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 24px 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-deep);
  border: 2px solid var(--accent);
  color: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 16px;
}

.steps h3,
.card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 9px;
}

.steps p,
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 24px;
}

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

.fact {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px 22px;
}

.fact-key {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 11px;
}

.fact p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

/* ---------- screenshots ---------- */

.shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.shot {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* A thin bezel so the screenshots read as a phone rather than floating art. */
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.shot figcaption {
  font-size: 14px;
  color: var(--muted);
  text-wrap: pretty;
}

.shot figcaption strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

@media (max-width: 1000px) {
  .shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .shots {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* ---------- download ---------- */

.nav-cta {
  color: var(--accent) !important;
  font-weight: 700;
}

.button-icon {
  width: 18px;
  height: 18px;
  margin-right: 9px;
}

.download {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: start;
}

.download-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.download-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.download-glyph {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  color: var(--accent);
}

.download-head h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  margin: 0 0 2px;
}

.download-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.download-button {
  width: 100%;
}

.download-button.is-pending {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
}
.download-button.is-pending:hover {
  background: transparent;
  color: var(--text);
}

.install-steps {
  margin: 0;
  padding: 24px 24px 24px 44px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.install-steps li {
  color: var(--muted);
  font-size: 15px;
  text-wrap: pretty;
}

.install-steps li::marker {
  color: var(--accent);
  font-weight: 800;
}

.download-fine {
  margin: 22px 0 0;
  font-size: 13px;
  color: #55555f;
  max-width: 68ch;
  text-wrap: pretty;
}

/* ---------- prose pages ---------- */

.prose {
  max-width: 68ch;
  padding: 56px 24px 72px;
}

.prose h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 40px);
  margin: 0 0 6px;
}

.prose-meta {
  margin: 0 0 32px;
  font-size: 13px;
  font-weight: 600;
  color: #55555f;
}

.prose h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  margin: 38px 0 12px;
}

.prose p,
.prose li {
  color: var(--muted);
  font-size: 16px;
  text-wrap: pretty;
}

.prose p {
  margin: 0 0 14px;
}

.prose ul {
  margin: 0 0 14px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.prose li::marker {
  color: var(--accent);
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 46px 24px 56px;
  text-align: center;
}

.footer-mark {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
}

.footer p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.footer-fine {
  margin-top: 6px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #55555f !important;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 56px 0 72px;
  }
  .hero-board {
    order: -1;
  }
  .board {
    max-width: 300px;
  }
  .steps,
  .cards,
  .facts,
  .download {
    grid-template-columns: 1fr;
  }
}

/* Five links plus the wordmark need about 610px. Below that they collapse
   behind the button rather than shrinking until they overflow. */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  /* Only collapsed when the script that opens it is running. */
  .has-nav-js .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 6px 0 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .has-nav-js .nav-links.is-open {
    display: flex;
  }
  .has-nav-js .nav-links a {
    padding: 14px 20px;
    font-size: 15px;
  }
  .has-nav-js .nav-links a + a {
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  }

  /* Without the script the links simply wrap, which is ugly but usable. */
  .nav {
    position: relative;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .nav {
    padding: 14px 16px;
  }
  main {
    padding: 0 16px;
  }
  .section {
    padding: 56px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-bars,
  .nav-bars::before,
  .nav-bars::after,
  .skip-link {
    transition: none;
  }
}
