/* ConneXt — marketing site
   Dark navy design system, sampled from the 2026 app redesign.
   Tokens mirror frontend/lib/utils/constants.dart (AppColors). */

:root {
  /* brand palette */
  --navy-900: #00133B;
  --navy-800: #03205C;
  --navy-750: #0A2550;
  --navy-700: #0C2C63;
  --primary: #1296FA;
  --primary-dark: #0E7FE0;
  --primary-bright: #2AA6FF;

  /* ink on dark */
  --ink: #FFFFFF;
  --text: #C4D6EF;
  --text-muted: #8AA6D0;
  --text-faint: #6E86AE;

  /* surfaces */
  --card: rgba(255, 255, 255, 0.035);
  --card-solid: #0A2452;
  --chip-bg: rgba(18, 150, 250, 0.12);
  --chip-text: #86C2FF;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(140, 180, 255, 0.22);
  --danger: #E5484D;

  /* scale */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --maxw: 1160px;
  --shadow-card: 0 18px 50px rgba(0, 6, 24, 0.45);
  --shadow-phone: 0 40px 90px rgba(0, 8, 30, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--navy-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* full-page navy gradient + subtle orbit glows */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 700px at 78% -6%, rgba(18, 150, 250, 0.22), transparent 60%),
    radial-gradient(900px 800px at 6% 12%, rgba(10, 60, 160, 0.28), transparent 55%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 55%, #021A45 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(1200px 700px at 70% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { color: var(--ink); font-weight: 600; line-height: 1.14; letter-spacing: -0.02em; }
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--chip-text);
}
.x { /* the accented X in the wordmark */
  background: linear-gradient(150deg, #2AA6FF 0%, #046EF5 55%, #20BBFD 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-weight: 600;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { position: relative; }
.eyebrow + h2 { margin-top: 14px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: #021035;
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark { width: 34px; height: 34px; filter: drop-shadow(0 0 14px rgba(42, 166, 255, 0.4)); }
.wordmark { font-size: 22px; font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-muted); font-size: 15px; font-weight: 500; transition: color 0.18s; }
.nav-links a:hover { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; font-weight: 600; font-size: 15px; cursor: pointer;
  border-radius: var(--r-pill); border: 1.5px solid transparent;
  padding: 13px 26px; transition: transform 0.15s ease, background 0.18s, box-shadow 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 10px 26px rgba(18, 150, 250, 0.34);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 14px 34px rgba(18, 150, 250, 0.45); }
.btn-ghost { background: transparent; color: #dbe8ff; border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); color: #fff; }
.btn-sm { padding: 10px 20px; font-size: 14px; }

/* store badges */
.stores { display: flex; flex-wrap: wrap; gap: 14px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 20px 11px 18px; border-radius: 14px;
  background: #05194a; border: 1px solid var(--border-strong);
  transition: transform 0.15s, border-color 0.18s, background 0.18s;
}
.store:hover { transform: translateY(-2px); border-color: var(--primary); background: #061e59; }
.store svg { width: 26px; height: 26px; flex: none; }
.store .s-top { font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.store .s-main { font-size: 16px; font-weight: 600; color: #fff; line-height: 1.1; }
.store.is-primary { background: var(--primary); border-color: transparent; box-shadow: 0 10px 26px rgba(18, 150, 250, 0.32); }
.store.is-primary .s-top { color: rgba(255, 255, 255, 0.82); }
.store.is-primary:hover { background: var(--primary-dark); }

/* ---------- hero ---------- */
.hero { padding: 76px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: var(--r-pill);
  background: var(--chip-bg); border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 500; color: var(--chip-text); margin-bottom: 26px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #35d07f; box-shadow: 0 0 10px #35d07f; }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); line-height: 1.05; letter-spacing: -0.03em; }
.hero h1 span.accent { color: var(--primary-bright); }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--text); max-width: 30ch; margin: 24px 0 34px; }
.hero .stores { margin-bottom: 26px; }
.hero-trust { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.hero-trust svg { width: 18px; height: 18px; color: var(--primary-bright); flex: none; }

/* hero phone */
.phone {
  position: relative; width: 300px; margin: 0 auto;
  border-radius: 44px; padding: 11px;
  background: linear-gradient(160deg, #17325f, #071a3f);
  border: 1px solid rgba(150, 190, 255, 0.16);
  box-shadow: var(--shadow-phone);
}
/* no fake notch — screenshots include the device's own status bar / Dynamic Island */
.phone img { border-radius: 34px; width: 100%; display: block; }
.hero-phone-wrap { position: relative; }
.hero-phone-wrap::after {
  content: ""; position: absolute; inset: -14% -6% -14% -6%; z-index: -1;
  background: radial-gradient(closest-side, rgba(18, 150, 250, 0.4), transparent 72%);
  filter: blur(10px);
}

/* ---------- trust strip ---------- */
.trust { padding: 30px 0 8px; }
.trust-label { text-align: center; font-size: 13px; color: var(--text-faint); letter-spacing: 0.04em; margin-bottom: 18px; }
.creds { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cred {
  padding: 9px 18px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--border);
  font-size: 14.5px; font-weight: 500; color: #cfe0f7;
}
.cred b { color: var(--primary-bright); font-weight: 600; }

/* ---------- section heads ---------- */
.sec-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.025em; }
.sec-head p { margin-top: 16px; color: var(--text); font-size: 17px; }
.section-pad { padding: 96px 0; }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-bottom: 108px; }
.feature:last-child { margin-bottom: 0; }
.feature.reverse .f-media { order: -1; }
.f-copy .eyebrow { display: inline-block; margin-bottom: 14px; }
.f-copy h3 { font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -0.02em; }
.f-copy p { margin-top: 16px; color: var(--text); font-size: 16.5px; }
.f-list { list-style: none; margin-top: 22px; display: grid; gap: 12px; }
.f-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; color: #cddbf1; }
.f-list svg { width: 20px; height: 20px; flex: none; color: var(--primary-bright); margin-top: 2px; }
.f-media { display: flex; justify-content: center; }
.f-media .phone { width: 268px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step {
  position: relative; padding: 30px 26px 28px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
}
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--chip-bg); border: 1px solid var(--border-strong);
  color: var(--primary-bright); font-weight: 700; font-size: 18px; margin-bottom: 18px;
}
.step h4 { font-size: 19px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ---------- value cards ---------- */
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.vcard {
  padding: 30px 26px; border-radius: var(--r-md);
  background: var(--card); border: 1px solid var(--border);
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.vcard:hover { transform: translateY(-4px); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.055); }
.vcard .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--chip-bg); border: 1px solid var(--border-strong); margin-bottom: 18px;
}
.vcard .ic svg { width: 24px; height: 24px; color: var(--primary-bright); }
.vcard h4 { font-size: 18px; margin-bottom: 8px; }
.vcard p { color: var(--text-muted); font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band { padding: 40px 0 110px; }
.cta-card {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 66px 40px; text-align: center;
  background: linear-gradient(150deg, #072a6b, #041a48 70%);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}
.cta-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(600px 300px at 50% -20%, rgba(18, 150, 250, 0.35), transparent 65%);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.03em; }
.cta-card p { margin: 16px auto 30px; max-width: 46ch; color: #cddbf1; font-size: 17px; }
.cta-card .stores { justify-content: center; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 60px 0 40px; background: rgba(1, 12, 38, 0.6); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand .brand { margin-bottom: 16px; }
.foot-brand p { color: var(--text-muted); font-size: 14.5px; max-width: 30ch; }
.foot-col h5 { color: #fff; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; font-weight: 600; }
.foot-col a { display: block; color: var(--text-muted); font-size: 14.5px; margin-bottom: 11px; transition: color 0.16s; }
.foot-col a:hover { color: #fff; }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 13.5px;
}

/* ---------- legal / content pages ---------- */
.doc { padding: 60px 0 96px; }
.doc-wrap { max-width: 780px; margin: 0 auto; }
.doc .back { display: inline-flex; align-items: center; gap: 8px; color: var(--chip-text); font-size: 14px; font-weight: 500; margin-bottom: 30px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.03em; }
.doc .updated { color: var(--text-faint); font-size: 14px; margin-top: 12px; }
.doc-body { margin-top: 40px; }
.doc-body h2 { font-size: 22px; margin: 40px 0 12px; letter-spacing: -0.01em; }
.doc-body h3 { font-size: 17px; margin: 26px 0 8px; color: #dbe8ff; }
.doc-body p, .doc-body li { color: var(--text); font-size: 15.5px; line-height: 1.72; }
.doc-body p { margin-bottom: 14px; }
.doc-body ul { margin: 4px 0 18px; padding-left: 22px; }
.doc-body li { margin-bottom: 8px; }
.doc-body a { color: var(--chip-text); text-decoration: underline; text-underline-offset: 3px; }
.doc-body strong { color: #fff; }
.doc-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 24px 26px; margin: 22px 0;
}
.doc-card p:last-child { margin-bottom: 0; }
.callout {
  border-left: 3px solid var(--primary); background: rgba(18, 150, 250, 0.07);
  padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 8px; }
.toc a { font-size: 13px; padding: 6px 13px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--border); color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: #fff; border-color: var(--primary); }

/* ---------- dark device showcase ---------- */
.showcase-sec { padding-top: 0; }
.showcase-phones {
  position: relative; display: flex; justify-content: center; align-items: center;
  min-height: 660px; margin-top: 4px;
}
.showcase-phones .phone { position: absolute; width: 270px; }
.showcase-phones .phone-back { transform: translateX(-158px) translateY(-8px) rotate(-6deg); z-index: 1; opacity: 0.97; }
.showcase-phones .phone-front { transform: translateX(158px) translateY(12px) rotate(5deg); z-index: 2; }
.showcase-glow {
  position: absolute; left: 50%; top: 50%; width: 620px; height: 620px;
  transform: translate(-50%, -50%); z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(18, 150, 250, 0.26), transparent 70%);
}
@media (max-width: 900px) {
  .showcase-phones { min-height: auto; flex-direction: column; gap: 24px; margin-top: 24px; }
  .showcase-phones .phone { position: relative; transform: none; width: 250px; }
  .showcase-phones .phone-back { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero .stores, .hero-badge, .hero-trust { justify-content: center; }
  .hero-badge { margin-left: auto; margin-right: auto; }
  .hero h1 { max-width: 16ch; margin: 0 auto; }
  .feature { grid-template-columns: 1fr; gap: 36px; text-align: center; margin-bottom: 76px; }
  .feature.reverse .f-media { order: 0; }
  .f-list { text-align: left; max-width: 380px; margin-left: auto; margin-right: auto; }
  .f-copy .eyebrow { margin-left: auto; margin-right: auto; }
  .steps, .vgrid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .section-pad { padding: 68px 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .cta-card { padding: 48px 22px; }
  .hero-trust { flex-direction: column; }
}
