/* Qapable public site — premium redesign.
   Dark-first. System font stack only, so the page loads with zero network
   dependencies: no web font, no CDN, no analytics, no tracker, no cookie, no script. */

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --bg:            #050A16;
  --bg-raise:      #0A1223;
  --surface:       #0D1728;
  --line:          rgba(150, 180, 235, 0.14);
  --line-strong:   rgba(150, 180, 235, 0.26);

  --brand-navy:    #002362;   /* approved Qapable brand navy, as used by the app */
  --brand:         #2563EB;   /* AA-safe with white text: 5.19:1 */
  --brand-bright:  #7DB3FF;
  --accent:        #56C8F5;

  --text:          #EDF2FB;
  --text-soft:     #C6D2E6;
  --muted:         #A2B2CC;

  --radius:        14px;
  --radius-lg:     22px;
  --container:     70rem;
  /* px, not rem: gutters must NOT grow with text size, or a 320px viewport
     loses 80px to padding at 200% text and the content reflows badly. */
  --pad:           clamp(20px, 4vw, 32px);

  color-scheme: dark;
}

/* ── reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* long unbreakable tokens (compound words, the support address) must wrap
     rather than push a grid column wider than its track at large text sizes */
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-bright); }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.7vw, 2.05rem); }
h3 { font-size: 1.0625rem; letter-spacing: -0.01em; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

/* ── focus + motion ─────────────────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff;
  padding: 0.75rem 1.1rem; border-radius: 0 0 10px 0;
  font-weight: 600; z-index: 100; text-decoration: none;
}
.skip:focus { left: 0; }

/* ── layout ─────────────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head p { color: var(--muted); font-size: 1.0625rem; margin-bottom: 0; }
.eyebrow {
  display: block;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.7rem;
}

/* ── header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 10, 22, 0.9);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem;
  padding-block: 0.8rem;
}
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.brand img { width: 178px; height: 55px; object-fit: contain; }
.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none; display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.2rem 0.35rem; margin: 0; padding: 0;
}
.site-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; max-width: 100%; text-align: center;
  padding: 0.25rem 0.7rem; border-radius: 9px;
  color: var(--text-soft); text-decoration: none;
  font-size: 0.9375rem; font-weight: 550;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover { color: var(--text); background: rgba(120, 160, 230, 0.12); }
.site-nav a[aria-current] { color: var(--text); background: rgba(120, 160, 230, 0.18); }

@media (max-width: 47rem) {
  .header-inner { justify-content: center; row-gap: 0.3rem; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding-inline: 0.55rem; font-size: 0.875rem; }
  .brand img { width: 146px; height: 45px; }
}

/* ── buttons ────────────────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.4rem;
  border-radius: 11px; border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  /* a button may carry an unbreakable token (the support address). It must
     wrap and stay inside its container at large text sizes, not push the
     page wider — WCAG 2.2 SC 1.4.4, text-only resize. */
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}
.actions { max-width: 100%; }
.btn-primary { background: var(--brand); color: #FFFFFF; }
.btn-primary:hover { background: #1D4ED8; color: #FFFFFF; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(120, 160, 230, 0.08); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); background: rgba(120, 160, 230, 0.16); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: clamp(2.75rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem);
  background:
    radial-gradient(58rem 32rem at 78% -14%, rgba(37, 99, 235, 0.22), transparent 62%),
    linear-gradient(180deg, var(--bg-raise), var(--bg) 72%);
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; gap: clamp(2.5rem, 6vw, 4rem); align-items: center; }
@media (min-width: 62rem) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.hero .lead { font-size: clamp(1.05rem, 1rem + 0.3vw, 1.1875rem); color: var(--text-soft); max-width: 34rem; }
.status-note {
  margin-top: 1.5rem; padding: 0.75rem 1rem;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; background: rgba(86, 200, 245, 0.07);
  color: var(--text-soft); font-size: 0.9375rem;
}
.status-note p { margin: 0; }

/* product visual — exactly one */
.device { justify-self: center; width: 100%; max-width: 20rem; margin: 0; }
.device-frame {
  border: 1px solid var(--line-strong);
  border-radius: 30px; padding: 9px;
  background: linear-gradient(160deg, rgba(120, 160, 230, 0.18), rgba(120, 160, 230, 0.04));
  box-shadow: 0 30px 70px -32px rgba(0, 0, 0, 0.95);
}
.device-frame img { border-radius: 22px; width: 100%; height: auto; }
.device figcaption { margin-top: 0.85rem; color: var(--muted); font-size: 0.8125rem; text-align: center; }

/* ── surfaces ───────────────────────────────────────────────────────────── */
.band { background: var(--bg-raise); border-block: 1px solid var(--line); }
/* minmax(0, 1fr) — not 1fr — so a track may shrink below its content's
   min-content width instead of overflowing the page at large text sizes. */
.grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 56rem) { .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 48rem) { .cols-2-md { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.35rem;
}
.tile h3 { margin-bottom: 0.35rem; color: var(--text); }
.tile p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* steps */
.steps { counter-reset: step; gap: 1.75rem; }
.step { position: relative; padding-left: 3.25rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0.1rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid var(--line-strong);
  color: var(--brand-bright); font-weight: 700; font-size: 0.95rem;
}
.step h3 { margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.9375rem; }

/* privacy checklist */
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.check li { position: relative; padding-left: 1.9rem; color: var(--text-soft); }
.check li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.5em;
  width: 0.7rem; height: 0.38rem;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.notice {
  margin-top: 1.75rem; padding: 1.1rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); font-size: 0.9375rem;
}
.notice p:last-child { margin-bottom: 0; }

/* cta */
.cta {
  background: linear-gradient(150deg, rgba(37, 99, 235, 0.22), rgba(86, 200, 245, 0.07));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.cta h2 { margin-bottom: 0.4rem; }
.cta p { color: var(--text-soft); margin-bottom: 0; max-width: 40rem; }

/* table */
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
/* min-width in rem scales with text size; cap it at the container so text-only
   resize cannot push the table past the viewport. */
table { border-collapse: collapse; width: 100%; min-width: min(19rem, 100%); font-size: 0.9375rem; }
caption { text-align: left; color: var(--muted); font-size: 0.9375rem; padding-bottom: 0.6rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); }
th { font-weight: 650; color: var(--text); }
td { color: var(--text-soft); }
tbody tr:last-child td { border-bottom: 0; }

/* footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raise);
  padding-block: clamp(2.25rem, 5vw, 3rem);
  color: var(--muted); font-size: 0.875rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: flex-start; justify-content: space-between; }
.site-footer img { width: 146px; height: 45px; object-fit: contain; }
.site-footer p { margin: 0.7rem 0 0; max-width: 34rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0.1rem 1.25rem; margin: 0; padding: 0; }
.footer-links a { color: var(--text-soft); text-decoration: none; display: inline-flex;
  align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--accent); text-decoration: underline; }
.fine { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.8125rem; }
.fine p { margin: 0 0 0.35rem; max-width: none; }
