/* Jynqx - jynqx.com
 * Clean, light marketing + legal site. Brand palette mirrors the app
 * (src/theme/tokens.ts): deep "ink" surfaces, an electric-teal "spark",
 * aurora-violet and amber accents. */

:root {
  /* Brand */
  --ink: #0b0f14;
  --ink-raised: #141a21;
  --ink-overlay: #1d2530;
  --ink-border: #26303c;

  --teal: #2fe6c2;
  --teal-deep: #0a7d65;
  --violet: #7c5cff;
  --violet-deep: #5b3fe0;
  --amber: #ffb74d;
  --amber-deep: #9a5b00;
  --red: #ff5d6c;
  --red-deep: #c22636;

  /* Light surfaces */
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --border: #e2e8e4;
  --border-strong: #d2dbd6;

  --text: #101720;
  --text-muted: #46545f;
  --text-faint: #7a8a95;

  /* Soft section tints */
  --tint-teal: #e7fbf5;
  --tint-violet: #f1ecff;
  --tint-amber: #fff4e3;
  --tint-sky: #eaf2fd;
  --tint-mint: #ebf8f0;

  --shadow-sm: 0 1px 2px rgba(16, 23, 32, 0.05), 0 1px 3px rgba(16, 23, 32, 0.06);
  --shadow-md: 0 10px 30px -12px rgba(16, 23, 32, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(16, 23, 32, 0.25);

  --radius: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --font-head: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --maxw: 1120px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

/* Base brand-mark size so an inline mark SVG is never unconstrained; context
   rules (.brand .mark, .compare .brandcol .mark, .admin-logo .mark) override. */
.mark {
  width: 32px;
  height: 32px;
}
.admin-logo .mark {
  width: 54px;
  height: 54px;
  margin: 0 auto;
}

a {
  color: var(--teal-deep);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--text);
}

h1 {
  font-size: clamp(2.3rem, 6vw, 3.6rem);
}
h2 {
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
}
h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

.narrow {
  max-width: 780px;
}

.eyebrow {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 0.75rem;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.center {
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--teal);
  color: var(--ink);
  box-shadow: 0 0 0 0 rgba(47, 230, 194, 0.4);
}
.btn-primary:hover {
  box-shadow: 0 8px 24px -6px rgba(47, 230, 194, 0.6);
}

.btn-ink {
  background: var(--ink);
  color: #f2f7f5;
}
.btn-ink:hover {
  background: #1a222c;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-lg {
  padding: 1rem 1.7rem;
  font-size: 1.05rem;
}

/* App store badges */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--ink);
  color: #f2f7f5;
  border-radius: 14px;
  padding: 0.6rem 1.1rem;
  font-family: var(--font-head);
  min-width: 170px;
}
.store-badge:hover {
  background: #1a222c;
  text-decoration: none;
}
.store-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: currentColor;
}
.store-badge small {
  display: block;
  font-size: 0.64rem;
  opacity: 0.8;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}
.store-badge strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 248, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover {
  text-decoration: none;
}
.brand .mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.nav-links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.97rem;
}
.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}
.nav-cta {
  margin-left: 0.4rem;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg {
  width: 26px;
  height: 26px;
  stroke: var(--text);
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 20px 1rem;
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-cta {
    margin: 0.6rem 0 0;
  }
  .nav-toggle {
    display: inline-flex;
  }
}

/* ---------- Sections ---------- */
section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}
.section-tight {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.tint {
  border-radius: var(--radius-lg);
}
.panel {
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
}
.panel-teal {
  background: var(--tint-teal);
}
.panel-violet {
  background: var(--tint-violet);
}
.panel-amber {
  background: var(--tint-amber);
}
.panel-sky {
  background: var(--tint-sky);
}
.panel-mint {
  background: var(--tint-mint);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(3rem, 7vw, 5rem);
  padding-bottom: 2rem;
  text-align: center;
}
.hero h1 {
  max-width: 16ch;
  margin-inline: auto;
}
.hero h1 .spark {
  color: var(--teal-deep);
}
.hero .lead {
  max-width: 54ch;
  margin: 1rem auto 1.8rem;
}
.hero .stores {
  justify-content: center;
}
.trustline {
  margin-top: 1.1rem;
  color: var(--text-faint);
  font-size: 0.92rem;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.trustline .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}

/* Showcase card */
.showcase {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(160deg, var(--tint-sky), var(--tint-teal));
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  text-align: left;
}
.showcase h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
}
@media (max-width: 760px) {
  .showcase {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .showcase .phone {
    margin-inline: auto;
  }
}

/* Phone mockup */
.phone {
  width: 240px;
  aspect-ratio: 9 / 18.5;
  background: var(--ink);
  border-radius: 34px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone .screen {
  width: 100%;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 10%, #16343a, #0b0f14 70%);
  position: relative;
}

/* Feature icon row */
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.feature-mini {
  text-align: center;
  padding: 0 0.5rem;
}
.feature-mini .ic {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.9rem;
}
.feature-mini h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.feature-mini p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}
.feature-mini .tag {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-top: 0.6rem;
}
@media (max-width: 680px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ---------- Comparison table ---------- */
.compare {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.compare table {
  width: 100%;
  border-collapse: collapse;
}
.compare th,
.compare td {
  padding: 0.85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.compare th:first-child,
.compare td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text);
  width: 52%;
}
.compare thead th {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--surface-2);
}
.compare thead th.us {
  color: var(--teal-deep);
}
.compare .brandcol {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.compare .brandcol .mark {
  width: 24px;
  height: 24px;
}
.compare tr:last-child td {
  border-bottom: 0;
}
.compare td.val {
  font-weight: 700;
}
.yes {
  color: var(--teal-deep);
}
.no {
  color: var(--red-deep);
}
.ic-check,
.ic-x {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
}
.compare td.us {
  background: rgba(47, 230, 194, 0.07);
}
.compare-note {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: center;
}
@media (max-width: 620px) {
  .compare th,
  .compare td {
    padding: 0.7rem 0.5rem;
    font-size: 0.9rem;
  }
  .compare th:first-child,
  .compare td:first-child {
    width: auto;
  }
}

/* ---------- Alternating feature blocks ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}
.feature.reverse .feature-art {
  order: 2;
}
.feature .feature-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature .feature-art .ic {
  width: clamp(120px, 18vw, 160px);
  height: clamp(120px, 18vw, 160px);
}
.feature h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
}
.feature .sub {
  color: var(--text-muted);
  font-size: 1.08rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(16, 23, 32, 0.08);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
}
.chip svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 760px) {
  .feature {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .feature.reverse .feature-art {
    order: 0;
  }
}

/* ---------- Platform tabs ---------- */
.platforms {
  display: inline-flex;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.35rem;
  box-shadow: var(--shadow-sm);
}
.platforms span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.platforms span svg {
  width: 18px;
  height: 18px;
}
.platforms span.active {
  background: var(--ink);
  color: #f2f7f5;
}

/* ---------- Stats band ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat .num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--teal-deep);
  letter-spacing: -0.03em;
}
.stat .lbl {
  color: var(--text-muted);
  font-size: 0.98rem;
}
@media (max-width: 620px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
}

/* ---------- Safety callout ---------- */
.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
  margin-top: 2rem;
}
.safety-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.safety-card .ic {
  width: 38px;
  height: 38px;
  margin-bottom: 0.8rem;
}
.safety-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}
.safety-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Final CTA ---------- */
.cta-final {
  text-align: center;
}
.cta-final .stores {
  justify-content: center;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: #c3ccd3;
  padding: clamp(3rem, 6vw, 4.5rem) 0 2.5rem;
}
.footer a {
  color: #c3ccd3;
}
.footer a:hover {
  color: var(--teal);
  text-decoration: none;
}
.footer .brand {
  color: #f2f7f5;
  margin-bottom: 1rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}
.footer-cols h4 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7a8a95;
  font-family: var(--font-head);
  margin-bottom: 0.9rem;
}
.footer-cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-cols li {
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}
.footer-blurb {
  font-size: 0.95rem;
  color: #9fb0bb;
  max-width: 34ch;
}
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: 0.87rem;
  color: #7a8a95;
}
@media (max-width: 760px) {
  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .footer-cols .footer-about {
    grid-column: 1 / -1;
  }
}

/* ---------- Legal / doc pages ---------- */
.doc {
  padding-top: 3rem;
  padding-bottom: 4rem;
}
.doc-body {
  max-width: 760px;
  margin-inline: auto;
}
.doc-body h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 1.5rem;
}
.doc-body h2 {
  font-size: 1.5rem;
  margin-top: 2.2rem;
}
.doc-body h3 {
  font-size: 1.15rem;
  margin-top: 1.6rem;
}
.doc-body p,
.doc-body li {
  color: var(--text-muted);
}
.doc-body ul {
  padding-left: 1.3rem;
}
.doc-body li {
  margin-bottom: 0.4rem;
}
.doc-body strong {
  color: var(--text);
}
.doc-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.doc-body a {
  color: var(--teal-deep);
  font-weight: 500;
}
.doc-toc {
  background: var(--tint-teal);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}
.doc-toc strong {
  font-family: var(--font-head);
}

/* Page header for subpages */
.page-head {
  background: linear-gradient(160deg, var(--tint-teal), var(--tint-sky));
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}
.page-head .eyebrow {
  color: var(--teal-deep);
}
.page-head h1 {
  margin-bottom: 0.4rem;
}
.page-head p {
  color: var(--text-muted);
  max-width: 60ch;
  font-size: 1.1rem;
}

/* Callout box */
.callout {
  background: var(--tint-amber);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 1.5rem 0;
}
.callout.teal {
  background: var(--tint-teal);
}
.callout.violet {
  background: var(--tint-violet);
}
.callout strong {
  color: var(--text);
}
.callout p:last-child {
  margin-bottom: 0;
}

.contact-big {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--teal-deep);
}

/* ---------- Admin portal ---------- */
.admin-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
}
.admin-login {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 20px;
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}
.field input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
}
.field input:focus {
  outline: none;
  border-color: var(--teal-deep);
  box-shadow: 0 0 0 3px rgba(47, 230, 194, 0.18);
}
.admin-msg {
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.admin-msg.err {
  background: rgba(194, 38, 54, 0.1);
  color: var(--red-deep);
}
.admin-msg.ok {
  background: rgba(47, 230, 194, 0.14);
  color: var(--teal-deep);
}
.admin-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.admin-topbar .brand {
  font-size: 1.1rem;
}
.admin-topbar .spacer {
  margin-left: auto;
}
.report-list {
  max-width: 820px;
  margin: 1.5rem auto;
  padding-inline: 20px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.report {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
}
.report-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}
.badge-reason {
  background: rgba(194, 38, 54, 0.1);
  color: var(--red-deep);
}
.badge-status {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-banned {
  background: var(--red-deep);
  color: #fff;
}
.report .who {
  font-weight: 600;
}
.report .by {
  font-size: 0.85rem;
  color: var(--text-faint);
}
.report .details {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.report .evidence {
  margin-top: 0.6rem;
  max-height: 140px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem;
  font-size: 0.8rem;
  font-family: ui-monospace, monospace;
  color: var(--text-muted);
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.report-actions .btn {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
}
.btn-danger {
  background: rgba(194, 38, 54, 0.1);
  color: var(--red-deep);
}
.btn-danger:hover {
  background: rgba(194, 38, 54, 0.18);
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--teal-deep);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.admin-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 4rem 1rem;
}

.hidden {
  display: none !important;
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Motion & transitions ---------- */

/* Smooth cross-page fade where the browser supports it (Chrome). Progressive -
   no effect elsewhere, no JS. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  /* Entrance reveal. Hidden only when JS ran (.js-anim is set pre-paint) so a
     no-JS visitor always sees content. app.js adds .in as sections scroll in;
     the first (above-fold) sections reveal immediately as a load animation. */
  .js-anim main > section {
    opacity: 0;
    transform: translateY(22px);
  }
  .js-anim main > section.in {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.7s cubic-bezier(0.16, 0.84, 0.44, 1),
      transform 0.7s cubic-bezier(0.16, 0.84, 0.44, 1);
  }

  /* Admin + legal cards get a gentle load fade (they aren't main > section). */
  .js-anim .admin-card,
  .js-anim .doc-body {
    animation: jx-rise 0.6s cubic-bezier(0.16, 0.84, 0.44, 1) both;
  }
}

@keyframes jx-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Micro-interactions: lift cards and the brand mark on hover. */
.safety-card,
.feature-mini,
.store-badge,
.platforms span {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.safety-card:hover,
.feature-mini:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.nav-links a {
  transition: color 0.15s ease;
}
.brand .mark {
  transition: transform 0.25s ease;
}
.brand:hover .mark {
  transform: rotate(-8deg) scale(1.05);
}

/* "Open in your browser" link under the hero CTAs. */
.browser-link {
  margin-top: 0.9rem;
  font-size: 0.95rem;
}
.browser-link a {
  color: var(--teal-deep);
  font-weight: 600;
}

/* ---------- Maps & trails section ---------- */
/* #map is the first section after #features; its own padding already provides
   the gap, so the showcase must not add another margin on top of it. */
#map {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}
.map-showcase {
  margin-top: 0;
  background: linear-gradient(160deg, var(--tint-teal), var(--tint-violet));
}
.map-phone {
  /* draw-in animation looks best when the route owns the dark screen */
  box-shadow: var(--shadow-lg);
}

/* The recorded route draws itself when the section scrolls into view. The line
   is fully drawn by default so no-JS and reduced-motion visitors always see it;
   .js-anim (set pre-paint only when JS runs) hides it ready to animate. */
.map-route {
  fill: none;
  stroke: #2fe6c2;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(47, 230, 194, 0.5));
}
.js-anim .map-route {
  stroke-dasharray: 640;
  stroke-dashoffset: 640;
}
.map-wp,
.map-heat {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .js-anim main > section#map.in .map-route {
    animation: jx-draw 2.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  }
  /* Waypoints fade in just behind the drawing line. */
  .js-anim #map .map-wp {
    opacity: 0;
  }
  .js-anim main > section#map.in .map-wp {
    animation: jx-fade 0.5s ease forwards;
  }
  .js-anim #map.in .map-wp:nth-of-type(1) {
    animation-delay: 0.3s;
  }
  .js-anim #map.in .map-wp:nth-of-type(2) {
    animation-delay: 1.1s;
  }
  .js-anim #map.in .map-wp:nth-of-type(3) {
    animation-delay: 1.9s;
  }
  /* Live puck ping. */
  .map-ping {
    transform-box: fill-box;
    transform-origin: center;
    animation: jx-ping 2.6s ease-out infinite;
  }
  /* Staggered reveal of the feature cards. */
  .js-anim #map .map-grid .safety-card {
    opacity: 0;
    transform: translateY(16px);
  }
  .js-anim main > section#map.in .map-grid .safety-card {
    animation: jx-rise 0.55s cubic-bezier(0.16, 0.84, 0.44, 1) both;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(1) {
    animation-delay: 0.04s;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(2) {
    animation-delay: 0.1s;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(3) {
    animation-delay: 0.16s;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(4) {
    animation-delay: 0.22s;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(5) {
    animation-delay: 0.28s;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(6) {
    animation-delay: 0.34s;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(7) {
    animation-delay: 0.4s;
  }
  .js-anim #map.in .map-grid .safety-card:nth-child(8) {
    animation-delay: 0.46s;
  }
}

@keyframes jx-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes jx-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes jx-ping {
  0% {
    transform: scale(0.5);
    opacity: 0.6;
  }
  70% {
    transform: scale(2.6);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin: 1.8rem auto 0;
  display: grid;
  gap: 0.75rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.03rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-chev {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--text-faint);
  transition: transform 0.25s ease;
}
.faq-item[open] .faq-chev {
  transform: rotate(180deg);
}
.faq-a {
  padding: 0 1.3rem 1.2rem;
}
.faq-a p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}
.faq-item:hover {
  border-color: var(--border-strong);
}

/* ======================================================================
   Maps page (/maps) - animated "how it works" walkthrough
   ====================================================================== */
.mp-hero {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.mp-hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
}
.mp-hero .lead {
  margin-top: 1rem;
}
@media (max-width: 820px) {
  .mp-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .mp-stage {
    margin-inline: auto;
  }
}

/* The device "stage" holding the looping map animation. */
.mp-stage {
  position: relative;
  width: min(340px, 86vw);
  aspect-ratio: 300 / 380;
  background: var(--ink);
  border-radius: 34px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
.mp-stage svg {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  display: block;
  background: radial-gradient(120% 90% at 50% 8%, #123039, #080c11 72%);
}

/* The route the GPS puck traces, drawn via a normalised pathLength of 100. */
.mp-route,
.mp-heat {
  fill: none;
}
.mp-route {
  stroke: #2fe6c2;
  stroke-width: 3.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(47, 230, 194, 0.55));
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: mp-draw 12s ease-in-out infinite;
}
.mp-heat {
  stroke: #ffb74d;
  stroke-opacity: 0.16;
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: mp-draw 12s ease-in-out infinite;
}
.mp-wp {
  fill: #9bffe9;
}
/* The travelling GPS puck follows the exact route via a motion path. */
.mp-puck {
  offset-path: path('M40 332 C86 300 66 244 118 224 S192 182 198 138 232 92 254 64');
  offset-rotate: 0deg;
  opacity: 0;
  animation: mp-travel 12s ease-in-out infinite;
}
.mp-live {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: mp-live 12s ease-out infinite;
}
.mp-back {
  fill: none;
  stroke: #7c5cff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 5 7;
  opacity: 0;
  animation: mp-back 12s ease infinite;
}
.mp-backarrow {
  offset-path: path('M254 64 Q150 120 58 326');
  offset-rotate: auto;
  fill: #c9bcff;
  opacity: 0;
  animation: mp-backtravel 12s ease-in-out infinite;
}

/* Cross-fading captions that narrate each phase of the loop. */
.mp-caps {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 22px;
  display: grid;
}
.mp-cap {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(10, 14, 19, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #eaf6f2;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
}
.mp-cap b {
  color: #2fe6c2;
}
.mp-cap:nth-child(1) {
  animation: mp-cap1 12s linear infinite;
}
.mp-cap:nth-child(2) {
  animation: mp-cap2 12s linear infinite;
}
.mp-cap:nth-child(3) {
  animation: mp-cap3 12s linear infinite;
}
.mp-cap:nth-child(4) {
  animation: mp-cap4 12s linear infinite;
}
.mp-cap-static {
  grid-area: 1 / 1;
  opacity: 0;
}

@keyframes mp-draw {
  0% {
    stroke-dashoffset: 100;
  }
  38% {
    stroke-dashoffset: 0;
  }
  90% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  97%,
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes mp-travel {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  3% {
    opacity: 1;
  }
  38% {
    offset-distance: 100%;
    opacity: 1;
  }
  90% {
    offset-distance: 100%;
    opacity: 1;
  }
  97%,
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}
@keyframes mp-live {
  0%,
  54% {
    opacity: 0;
    transform: scale(0.4);
  }
  58% {
    opacity: 0.75;
    transform: scale(0.7);
  }
  72% {
    opacity: 0;
    transform: scale(2.7);
  }
  100% {
    opacity: 0;
  }
}
@keyframes mp-back {
  0%,
  72% {
    opacity: 0;
  }
  78% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  97%,
  100% {
    opacity: 0;
  }
}
@keyframes mp-backtravel {
  0%,
  74% {
    offset-distance: 0%;
    opacity: 0;
  }
  77% {
    opacity: 1;
  }
  90% {
    offset-distance: 100%;
    opacity: 1;
  }
  95%,
  100% {
    opacity: 0;
  }
}
@keyframes mp-cap1 {
  0%,
  3% {
    opacity: 0;
  }
  6%,
  33% {
    opacity: 1;
  }
  38%,
  100% {
    opacity: 0;
  }
}
@keyframes mp-cap2 {
  0%,
  40% {
    opacity: 0;
  }
  44%,
  52% {
    opacity: 1;
  }
  57%,
  100% {
    opacity: 0;
  }
}
@keyframes mp-cap3 {
  0%,
  56% {
    opacity: 0;
  }
  60%,
  70% {
    opacity: 1;
  }
  75%,
  100% {
    opacity: 0;
  }
}
@keyframes mp-cap4 {
  0%,
  74% {
    opacity: 0;
  }
  78%,
  90% {
    opacity: 1;
  }
  95%,
  100% {
    opacity: 0;
  }
}

/* Reduced motion: freeze on a clean, fully-drawn state with a static caption. */
@media (prefers-reduced-motion: reduce) {
  .mp-route,
  .mp-heat,
  .mp-puck,
  .mp-live,
  .mp-back,
  .mp-backarrow,
  .mp-cap {
    animation: none !important;
  }
  .mp-route,
  .mp-heat {
    stroke-dashoffset: 0 !important;
  }
  .mp-puck {
    opacity: 1 !important;
    offset-distance: 100% !important;
  }
  .mp-live,
  .mp-back,
  .mp-backarrow,
  .mp-cap {
    opacity: 0 !important;
  }
  .mp-cap-static {
    opacity: 1 !important;
  }
}

/* Numbered "how it works" steps. */
.mp-steps {
  display: grid;
  gap: 1.1rem;
  max-width: 760px;
  margin: 2rem auto 0;
}
.mp-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem 1.3rem;
}
.mp-step .n {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  color: var(--ink);
  background: var(--teal);
}
.mp-step h3 {
  font-size: 1.08rem;
  margin: 0 0 0.25rem;
}
.mp-step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.55;
}

/* Use-case strip. */
.mp-uses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.mp-use {
  text-align: center;
  padding: 1.3rem 0.8rem;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.mp-use .ic {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.6rem;
}
.mp-use h3 {
  font-size: 1rem;
  margin: 0 0 0.2rem;
}
.mp-use p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}
