/* =============================================================
   Jupiter Web AI — shared stylesheet
   Design system: custom properties, mobile-first, WCAG AA contrast.
   No framework, no build step. One file, loaded on every page.
   ============================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-height: 100svh; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
table { border-collapse: collapse; width: 100%; }

/* ---------- Tokens ---------- */
:root {
  /* Brand: dark navy header, electric blue action, white content surfaces */
  --navy-900: #0a1626;
  --navy-800: #0d1e34;
  --navy-700: #123256;
  --blue-600: #1f6fed;
  --blue-500: #2f83ff;
  --blue-400: #5fa3ff;
  --blue-100: #e7f0ff;
  --sky-300: #8fd0ff;

  /* JWAi mark accents — used sparingly (icons, dots, gradients) */
  --accent-purple: #7c3aed;
  --accent-yellow: #f2b90c;
  --accent-orange: #ff6a1a;
  --accent-red: #ef3b3b;
  --accent-green: #12a454;

  --ink-900: #0f1a2b;
  --ink-700: #2a3a52;
  --ink-500: #51647e;
  --surface-0: #ffffff;
  --surface-1: #f4f7fb;
  --surface-2: #eaf0f9;
  --border-1: #dbe3ee;
  --border-strong: #b9c6da;

  --cta: var(--blue-600);
  --cta-hover: #1657bf;
  --focus-ring: #ff9f1c;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Avenir Next", "Segoe UI Semibold", Roboto, Helvetica, Arial, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6.5rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --container: 1180px;
  --shadow-card: 0 1px 2px rgba(15, 26, 43, 0.06), 0 12px 32px -16px rgba(15, 26, 43, 0.18);
  --shadow-pop: 0 20px 50px -20px rgba(10, 22, 38, 0.45);
}

@media (prefers-color-scheme: dark) {
  /* Content stays light-mode for brand consistency; only surfaces used on
     dark sections adapt. No separate dark theme is offered site-wide. */
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--surface-0);
  color: var(--ink-900);
  font-size: 1.0625rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p { color: var(--ink-700); }
strong { color: var(--ink-900); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-700);
  max-width: 62ch;
}

/* ---------- Focus & a11y ---------- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  background: var(--navy-900);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.15s ease;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
.section { padding-block: var(--space-6); }
.section--tight { padding-block: var(--space-5); }
.section--alt { background: var(--surface-1); }
.section--navy { background: linear-gradient(180deg, var(--navy-900), var(--navy-800)); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #c7d5e8; }

.stack { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.grid { display: grid; gap: var(--space-3); }
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: var(--space-2);
}
.section--navy .eyebrow { color: var(--sky-300); }
.eyebrow::before {
  content: "";
  width: 22px; height: 3px;
  background: currentColor;
  border-radius: 2px;
}

.section-head { max-width: 64ch; margin-bottom: var(--space-4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(31, 111, 237, 0.6);
}
.btn-primary:hover { background: var(--cta-hover); }
.btn-secondary {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--navy-900); background: var(--surface-1); }
.section--navy .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.4); }
.section--navy .btn-secondary:hover { border-color: #fff; background: rgba(255,255,255,0.08); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--navy-900);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: var(--space-3);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
}
.brand img { width: 38px; height: 38px; border-radius: 50%; }
.brand small { display: block; font-size: 0.68rem; font-weight: 600; color: #9fb4cf; letter-spacing: 0.03em; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  color: #fff;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="false"] .icon-close { display: none; }

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.site-nav ul {
  display: flex;
  flex-direction: column;
}
.site-nav ul a {
  display: block;
  padding: 0.85rem 0;
  text-decoration: none;
  font-weight: 600;
  color: #dce6f5;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-nav ul a[aria-current="page"] { color: #fff; }
.site-nav .btn-primary { margin-top: var(--space-2); }

@media (max-width: 899px) {
  .site-nav {
    position: absolute;
    inset: 72px 0 auto 0;
    background: var(--navy-900);
    padding: var(--space-2) var(--space-3) var(--space-3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-pop);
  }
  .site-nav[hidden] { display: none; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-header .container { min-height: 76px; }
  .site-nav { flex-direction: row; align-items: center; gap: var(--space-4); }
  .site-nav ul { flex-direction: row; gap: var(--space-3); }
  .site-nav ul a { border-bottom: none; padding: 0.4rem 0; position: relative; }
  .site-nav ul a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 3px;
    background: var(--blue-500);
    border-radius: 2px;
  }
  .site-nav .btn-primary { margin-top: 0; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(95, 163, 255, 0.35), transparent),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--blue-600) 130%);
  color: #fff;
  padding-block: var(--space-6) var(--space-5);
  position: relative;
  overflow: clip;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: var(--space-4); align-items: center; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-5); }
}
.hero h1 { color: #fff; }
.hero .lede { color: #dbe8fb; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: var(--space-3); }
.hero-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
}
.hero-art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-orbs { position: absolute; inset: 0; }
.hero-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.85;
}
.hero-card {
  position: relative;
  background: rgba(10, 22, 38, 0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  width: 82%;
}
.hero-card img { width: 44px; height: 44px; margin-bottom: 0.6rem; }
.hero-card p { color: #eaf1fc; font-size: 0.92rem; margin: 0; }
.hero-card strong { color: #fff; }

/* Page header (non-home hero, shorter) */
.page-hero {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: #fff;
  padding-block: var(--space-5) var(--space-4);
}
.page-hero h1 { color: #fff; }
.page-hero .lede { color: #dbe8fb; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #b7c9e2;
  margin-bottom: var(--space-2);
}
.breadcrumbs a { color: #b7c9e2; text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span[aria-hidden] { color: #6f88a8; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-0);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-card);
  height: 100%;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { margin-bottom: 0; }
.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: var(--space-2);
  color: #fff;
}
.card-icon svg { width: 24px; height: 24px; }
.icon-blue { background: linear-gradient(135deg, var(--blue-600), var(--blue-400)); }
.icon-purple { background: linear-gradient(135deg, var(--accent-purple), #a78bfa); }
.icon-orange { background: linear-gradient(135deg, var(--accent-orange), var(--accent-yellow)); }
.icon-green { background: linear-gradient(135deg, var(--accent-green), #4ade80); }
.icon-red { background: linear-gradient(135deg, var(--accent-red), #fb7185); }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: var(--space-2);
  font-weight: 700;
  color: var(--blue-600);
  text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

.list-check { display: grid; gap: 0.75rem; }
.list-check li { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--ink-700); }
.list-check svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; }
.list-check.is-bad svg { color: var(--accent-red); }
.list-check.is-good svg { color: var(--accent-green); }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.steps { display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: var(--space-2); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--blue-500);
  display: block;
  margin-bottom: 0.4rem;
}

/* ---------- Stat / who-for strip ---------- */
.pillbar { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-700);
}

/* ---------- FAQ (details/summary accordion) ---------- */
.faq-list { display: grid; gap: var(--space-2); max-width: 78ch; }
.faq-item {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.3rem;
  font-weight: 700;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { flex-shrink: 0; width: 20px; height: 20px; transition: transform 0.2s ease; color: var(--blue-600); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-body { padding: 0 1.3rem 1.2rem; color: var(--ink-700); }
.faq-item summary:focus-visible { outline-offset: -3px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .form-grid.two-col { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-weight: 700; font-size: 0.92rem; color: var(--ink-900); }
.field .hint { font-size: 0.8rem; color: var(--ink-500); }
.field input,
.field select,
.field textarea {
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  min-height: 48px;
  background: #fff;
  font-size: 1rem;
  color: var(--ink-900);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--accent-red); }
.field-error {
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 1.1em;
}
.checkbox-group { display: grid; gap: 0.5rem; }
.checkbox-row { display: flex; align-items: center; gap: 0.55rem; }
.checkbox-row input { width: 20px; height: 20px; }
.checkbox-row label { font-weight: 500; color: var(--ink-700); }
.radio-row { display: flex; flex-wrap: wrap; gap: 1rem; }

.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { background: #e7f8ee; color: #0b6b3a; border: 1px solid #b5e6c9; }
.form-status.is-error { background: #fdecec; color: #a4222a; border: 1px solid #f5bcbe; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: #c7d5e8;
  padding-block: var(--space-5) var(--space-4);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.site-footer h2 { color: #fff; font-size: 1.4rem; margin-bottom: 0.5rem; }
.site-footer .brand { color: #fff; margin-bottom: 0.6rem; }
.site-footer a { color: #c7d5e8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-col h3 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.8rem;
}
.footer-col ul { display: grid; gap: 0.55rem; }
.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #9fb4cf;
}
.footer-bottom nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ---------- Misc content pages ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: var(--space-4); margin-bottom: 0.6rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-700); margin-bottom: 0.9rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: var(--blue-600); text-decoration-thickness: 1.5px; }

.cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--blue-700, var(--blue-600)));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  display: grid;
  gap: var(--space-3);
  justify-items: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #dbe8fb; max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; }

table.compare { border: 1px solid var(--border-1); border-radius: var(--radius-md); overflow: hidden; }
table.compare th, table.compare td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border-1); }
table.compare th { background: var(--surface-1); font-family: var(--font-display); }
table.compare tr:last-child td { border-bottom: none; }

.table-scroll { overflow-x: auto; }

/* Visually-hidden utility already covered by .sr-only */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
