/* ==================================================================
   CORTEX9 — shared styles for the static marketing pages
   (public/pricing.html, public/features.html)

   These pages are plain HTML in public/, NOT part of the Vite React
   landing build, so they cannot import landing/styles.css (its asset
   name is content-hashed at build time and there is no stable URL to
   link). This file is the deliberate, self-contained subset of that
   design system — same fonts, same tokens, same class names — served
   from public/ at a stable path both pages <link> to.

   Dark is the default because that is the brand statement on /home.
   Light is opt-in and scoped to :root[data-theme="light"], exactly as
   landing/theme-light.css does it, and reads the SAME localStorage key
   (cortex9_landing_theme) so a visitor's choice survives the jump from
   the homepage to these pages.

   If landing/styles.css tokens change, change them here too.
   ================================================================== */

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

html, body {
  background: #02040A;
  color: #e2e8f0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: clip; }
::selection { background: rgba(168,85,247,0.4); color: white; }

a { color: #22d3ee; }

/* --- top nav ------------------------------------------------------ */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px 6vw;
  background: rgba(2,4,10,0.72);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.top-nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.02em;
  color: white; font-size: 1.05rem; text-decoration: none;
}
.top-nav-brand img { width: 26px; height: 26px; }
.top-nav-links { display: flex; align-items: center; gap: 28px; }
.top-nav-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em; font-weight: 500;
  color: #94a3b8; text-decoration: none; transition: color 0.2s;
  white-space: nowrap;
}
.top-nav-links a:hover, .top-nav-links a[aria-current="page"] { color: white; }
.top-nav-links a[aria-current="page"] { color: #22d3ee; }
.theme-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; font-weight: 700;
  padding: 7px 12px; cursor: pointer;
  background: transparent; color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.2s;
}
.theme-btn:hover { color: white; border-color: rgba(255,255,255,0.4); }

/* --- page hero ---------------------------------------------------- */
.page-hero {
  padding: 200px 6vw 110px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(168,85,247,0.10), transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(34,211,238,0.08), transparent 55%),
    #02040A;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 500; letter-spacing: 0.22em;
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.08);
  color: #c4b5fd; margin-bottom: 36px;
}
.hero-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #a855f7; box-shadow: 0 0 12px #a855f7;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.page-title {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 700; line-height: 0.98; letter-spacing: -0.04em;
  color: white; margin-bottom: 32px;
}
.page-title .muted { color: #475569; }
.page-sub { font-size: clamp(1rem, 1.2vw, 1.2rem); line-height: 1.65; color: #94a3b8; max-width: 720px; }
.page-sub strong { color: #cbd5e1; font-weight: 500; }

/* --- sections ----------------------------------------------------- */
.section {
  position: relative; z-index: 20;
  padding: 120px 6vw;
  background: #02040A;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.section.tint {
  background: radial-gradient(ellipse at bottom, rgba(34,211,238,0.05), transparent 62%), #02040A;
}
.section-head { max-width: 1200px; margin: 0 auto 56px; }
.section-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.3em; color: #a855f7; margin-bottom: 20px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; color: white;
}
.section-title .muted { color: #475569; }
.section-sub { font-size: 15px; line-height: 1.7; color: #94a3b8; max-width: 760px; margin-top: 22px; }
.section-sub strong { color: #cbd5e1; font-weight: 500; }
.inner { max-width: 1200px; margin: 0 auto; }

/* --- pricing cards (mirrors landing/styles-extra.css) ------------- */
.pricing-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-grid.two { grid-template-columns: repeat(2, 1fr); max-width: 860px; }
.pricing-grid.four { grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pricing-card {
  position: relative; padding: 40px 32px;
  background: #06080e;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 20px;
}
.pricing-grid.four .pricing-card { padding: 32px 26px; gap: 16px; }
.pricing-card.pop {
  border-color: rgba(34,211,238,0.5);
  background: linear-gradient(180deg, rgba(34,211,238,0.05), transparent);
  box-shadow: 0 0 60px rgba(34,211,238,0.1);
  transform: translateY(-16px);
}
.pricing-card.pop .pricing-btn { background: #22d3ee; color: black; border-color: #22d3ee; }
.pricing-badge {
  position: absolute; top: -12px; right: 32px;
  padding: 6px 14px; background: #22d3ee; color: black;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
}
.pricing-name { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.3em; color: white; }
.pricing-tag { font-size: 15px; color: #94a3b8; line-height: 1.5; }
.pricing-price {
  font-size: 64px; font-weight: 700; line-height: 1; color: white;
  letter-spacing: -0.04em; display: flex; align-items: flex-start;
}
.pricing-grid.four .pricing-price { font-size: 46px; }
.pricing-currency { font-size: 24px; color: #64748b; margin-right: 4px; margin-top: 8px; }
.pricing-per { font-size: 14px; color: #64748b; font-weight: 400; margin-left: 8px; margin-top: 14px; letter-spacing: 0; }
.pricing-btn {
  padding: 16px; background: transparent;
  border: 1px solid rgba(255,255,255,0.15); color: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.3em; font-weight: 700;
  cursor: pointer; transition: all 0.2s; text-align: center; text-decoration: none; display: block;
}
.pricing-btn:hover { background: white; color: black; }
/* `.pricing-card.pop .pricing-btn` (0,3,0) out-specifies `.pricing-btn:hover` (0,2,0), so without
   this the primary CTA on every highlighted plan had no hover feedback at all. */
.pricing-card.pop .pricing-btn:hover { background: white; color: black; border-color: white; }
.pricing-incl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; color: #64748b;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.05);
}
.pricing-feats { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.pricing-feats li { font-size: 14px; color: #cbd5e1; line-height: 1.5; }
.pricing-note { max-width: 1200px; margin: 40px auto 0; font-size: 14px; line-height: 1.7; color: #64748b; }
.pricing-note strong { color: #94a3b8; font-weight: 500; }

/* --- numbered steps ----------------------------------------------- */
.steps { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.step {
  display: grid; grid-template-columns: 76px 1fr; gap: 28px;
  padding: 36px 32px;
  background: #06080e;
  border: 1px solid rgba(255,255,255,0.08);
}
.step-n {
  font-family: 'JetBrains Mono', monospace;
  font-size: 34px; font-weight: 700; line-height: 1;
  color: transparent;
  background: linear-gradient(140deg, #a855f7, #22d3ee);
  -webkit-background-clip: text; background-clip: text;
}
.step h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: white; margin-bottom: 14px; }
.step p { font-size: 15px; line-height: 1.7; color: #94a3b8; margin-bottom: 18px; }
.step .how {
  font-size: 14px; line-height: 1.7; color: #64748b;
  border-left: 2px solid rgba(34,211,238,0.35);
  padding: 4px 0 4px 18px;
}
.step .how b { color: #cbd5e1; font-weight: 500; }
.step .how .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; color: #22d3ee;
  display: block; margin-bottom: 8px;
}

/* --- feature cards ------------------------------------------------ */
.feat-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px;
}
.feat {
  padding: 30px 28px;
  background: #06080e;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column;
}
.feat h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: white; margin-bottom: 12px; }
.feat p { font-size: 14px; line-height: 1.7; color: #94a3b8; }
.feat .mech {
  font-size: 13px; line-height: 1.7; color: #64748b;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.feat .mech b { color: #cbd5e1; font-weight: 500; }
.feat .mech .lbl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; color: #22d3ee; margin-right: 8px;
}

/* --- status pills ------------------------------------------------- */
.pill {
  display: inline-block; vertical-align: middle;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
  padding: 4px 8px; margin-left: 10px;
}
.pill.soon { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.pill.beta { background: rgba(168,85,247,0.12); color: #c4b5fd; border: 1px solid rgba(168,85,247,0.3); }
.pill.free { background: rgba(52,211,153,0.12); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }

/* --- tables ------------------------------------------------------- */
.table-wrap { max-width: 1200px; margin: 0 auto; overflow-x: auto; border: 1px solid rgba(255,255,255,0.08); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; }
thead th {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.2em; font-weight: 700;
  color: #64748b; background: #06080e; white-space: nowrap;
}
tbody th { font-weight: 500; color: white; }
td { color: #94a3b8; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
.yes { color: #34d399; }
/* #475569 measured 2.68:1 on #02040A — below WCAG AA, and `.no` is the cell that carries the
   "not included" meaning in both pricing tables. #94a3b8 is 8.0:1 and still reads as de-emphasised
   next to the emerald ✓. */
.no { color: #94a3b8; }

/* --- FAQ ---------------------------------------------------------- */
.faq { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 2px; }
.faq details { background: #06080e; border: 1px solid rgba(255,255,255,0.08); }
.faq summary {
  cursor: pointer; padding: 22px 26px; list-style: none;
  font-size: 16px; font-weight: 500; color: white;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-family: 'JetBrains Mono', monospace;
  color: #22d3ee; font-size: 20px; flex-shrink: 0;
}
.faq details[open] summary::after { content: '\2212'; }
.faq p { padding: 0 26px 24px; font-size: 14px; line-height: 1.75; color: #94a3b8; }

/* --- CTA + footer ------------------------------------------------- */
.cta { max-width: 900px; margin: 0 auto; text-align: center; }
.cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 700; letter-spacing: -0.03em; color: white; margin-bottom: 20px; }
.cta p { font-size: 15px; line-height: 1.7; color: #94a3b8; margin-bottom: 36px; }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-row .pricing-btn { display: inline-block; padding: 16px 32px; }
.cta-row .pricing-btn.primary { background: #22d3ee; color: black; border-color: #22d3ee; }
.cta-row .pricing-btn.primary:hover { background: white; border-color: white; }

.foot {
  padding: 60px 6vw; background: #02040A;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.2em; color: #64748b; text-decoration: none;
}
.foot-links a:hover { color: #22d3ee; }
/* Carries the "INVITE-ONLY" statement, so it has to be readable: #475569 was 2.68:1 on #02040A. */
.foot-copy { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.15em; color: #94a3b8; }

/* ==================================================================
   LIGHT THEME — scoped, opt-in, same key as landing/theme-light.css
   ================================================================== */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="light"], :root[data-theme="light"] body { background: #F7F8FC; color: #1e293b; }
:root[data-theme="light"] ::selection { background: rgba(99,102,241,0.22); color: #0f172a; }
:root[data-theme="light"] a { color: #0e7490; }

:root[data-theme="light"] .top-nav { background: rgba(255,255,255,0.82); border-bottom-color: #e2e8f0; }
:root[data-theme="light"] .top-nav-brand { color: #0f172a; }
:root[data-theme="light"] .top-nav-links a { color: #64748b; }
:root[data-theme="light"] .top-nav-links a:hover { color: #0f172a; }
:root[data-theme="light"] .top-nav-links a[aria-current="page"] { color: #4f46e5; }
:root[data-theme="light"] .theme-btn { color: #64748b; border-color: #cbd5e1; }
:root[data-theme="light"] .theme-btn:hover { color: #0f172a; border-color: #94a3b8; }

:root[data-theme="light"] .page-hero {
  background: linear-gradient(160deg, #eef2ff 0%, #f8fafc 45%, #ecfeff 100%);
  border-bottom-color: #e2e8f0;
}
:root[data-theme="light"] .hero-kicker { border-color: rgba(99,102,241,0.28); background: rgba(99,102,241,0.08); color: #4338ca; }
:root[data-theme="light"] .hero-dot { background: #6366f1; box-shadow: 0 0 10px rgba(99,102,241,0.6); }
:root[data-theme="light"] .page-title { color: #0f172a; }
:root[data-theme="light"] .page-title .muted { color: #94a3b8; }
:root[data-theme="light"] .page-sub { color: #475569; }
:root[data-theme="light"] .page-sub strong { color: #1e293b; }

:root[data-theme="light"] .section { background: #F7F8FC; border-top-color: #e2e8f0; }
:root[data-theme="light"] .section.tint { background: linear-gradient(180deg, #ffffff, #F7F8FC); }
:root[data-theme="light"] .section-kicker { color: #4f46e5; }
:root[data-theme="light"] .section-title { color: #0f172a; }
:root[data-theme="light"] .section-title .muted { color: #94a3b8; }
:root[data-theme="light"] .section-sub { color: #475569; }
:root[data-theme="light"] .section-sub strong { color: #1e293b; }

:root[data-theme="light"] .pricing-card,
:root[data-theme="light"] .step,
:root[data-theme="light"] .feat,
:root[data-theme="light"] .faq details {
  background: #ffffff; border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(15,23,42,0.05);
}
:root[data-theme="light"] .pricing-card.pop {
  border-color: #4f46e5;
  background: linear-gradient(180deg, rgba(79,70,229,0.05), #ffffff);
  box-shadow: 0 10px 40px rgba(79,70,229,0.12);
}
:root[data-theme="light"] .pricing-card.pop .pricing-btn { background: #4f46e5; color: white; border-color: #4f46e5; }
:root[data-theme="light"] .pricing-card.pop .pricing-btn:hover { background: #0f172a; color: white; border-color: #0f172a; }
:root[data-theme="light"] .pricing-badge { background: #4f46e5; color: white; }
:root[data-theme="light"] .pricing-name { color: #0f172a; }
:root[data-theme="light"] .pricing-tag { color: #475569; }
:root[data-theme="light"] .pricing-price { color: #0f172a; }
:root[data-theme="light"] .pricing-currency, :root[data-theme="light"] .pricing-per { color: #94a3b8; }
:root[data-theme="light"] .pricing-btn { border-color: #cbd5e1; color: #0f172a; }
:root[data-theme="light"] .pricing-btn:hover { background: #0f172a; color: white; border-color: #0f172a; }
:root[data-theme="light"] .pricing-incl { color: #94a3b8; border-top-color: #e2e8f0; }
:root[data-theme="light"] .pricing-feats li { color: #334155; }
:root[data-theme="light"] .pricing-note { color: #64748b; }
:root[data-theme="light"] .pricing-note strong { color: #334155; }

:root[data-theme="light"] .step h3, :root[data-theme="light"] .feat h3 { color: #0f172a; }
:root[data-theme="light"] .step p, :root[data-theme="light"] .feat p { color: #475569; }
:root[data-theme="light"] .step .how, :root[data-theme="light"] .feat .mech { color: #64748b; }
:root[data-theme="light"] .step .how { border-left-color: #a5b4fc; }
:root[data-theme="light"] .feat .mech { border-top-color: #e2e8f0; }
:root[data-theme="light"] .step .how b, :root[data-theme="light"] .feat .mech b { color: #334155; }
:root[data-theme="light"] .step .how .lbl, :root[data-theme="light"] .feat .mech .lbl { color: #4f46e5; }
/* background-IMAGE, not the `background` shorthand: the shorthand resets background-clip back to
   border-box, and .step-n paints its text via `color: transparent` + `background-clip: text`. Using
   the shorthand here turned all five step numbers into solid gradient blocks with invisible text in
   light mode. */
:root[data-theme="light"] .step-n { background-image: linear-gradient(140deg, #4f46e5, #0891b2); }

:root[data-theme="light"] .pill.soon { background: rgba(180,83,9,0.08); color: #b45309; border-color: rgba(180,83,9,0.25); }
:root[data-theme="light"] .pill.beta { background: rgba(91,33,182,0.08); color: #6d28d9; border-color: rgba(109,40,217,0.25); }
:root[data-theme="light"] .pill.free { background: rgba(6,95,70,0.08); color: #047857; border-color: rgba(4,120,87,0.25); }

:root[data-theme="light"] .table-wrap { border-color: #e2e8f0; background: #ffffff; }
:root[data-theme="light"] th, :root[data-theme="light"] td { border-bottom-color: #e2e8f0; }
:root[data-theme="light"] thead th { color: #64748b; background: #f8fafc; }
:root[data-theme="light"] tbody th { color: #0f172a; }
:root[data-theme="light"] td { color: #475569; }
:root[data-theme="light"] .yes { color: #059669; }
/* #cbd5e1 measured 1.48:1 on white — effectively invisible. #64748b is 4.78:1. */
:root[data-theme="light"] .no { color: #64748b; }

:root[data-theme="light"] .faq summary { color: #0f172a; }
:root[data-theme="light"] .faq summary::after { color: #4f46e5; }
:root[data-theme="light"] .faq p { color: #475569; }

:root[data-theme="light"] .cta h2 { color: #0f172a; }
:root[data-theme="light"] .cta p { color: #475569; }
:root[data-theme="light"] .cta-row .pricing-btn.primary { background: #4f46e5; color: white; border-color: #4f46e5; }
:root[data-theme="light"] .cta-row .pricing-btn.primary:hover { background: #0f172a; border-color: #0f172a; }

:root[data-theme="light"] .foot { background: #F7F8FC; border-top-color: #e2e8f0; }
:root[data-theme="light"] .foot-links a { color: #64748b; }
:root[data-theme="light"] .foot-links a:hover { color: #4f46e5; }
/* On the #F7F8FC footer (not pure white) #64748b measures 4.48:1 — just under AA. #475569 is 7.1:1. */
:root[data-theme="light"] .foot-copy { color: #475569; }

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 1040px) {
  .pricing-grid, .pricing-grid.two { grid-template-columns: 1fr; max-width: 560px; }
  .pricing-grid.four { grid-template-columns: repeat(2, 1fr); }
  .pricing-card.pop { transform: none; }
}
@media (max-width: 760px) {
  .top-nav { padding: 14px 5vw; gap: 14px; }
  .top-nav-links { gap: 16px; }
  .top-nav-links a.hide-sm { display: none; }
  .page-hero { padding: 150px 6vw 80px; }
  .section { padding: 80px 6vw; }
  .section-head { margin-bottom: 40px; }
  .pricing-grid.four { grid-template-columns: 1fr; max-width: 560px; }
  .step { grid-template-columns: 1fr; gap: 16px; padding: 28px 24px; }
  .feat-grid { grid-template-columns: 1fr; }
}

/* MUST come after the 760px block — equal specificity, so source order decides which wins at widths
   where both match.
   The nav is position:fixed, so it contributes no scrollable overflow, and `body { overflow-x: clip }`
   propagates to the viewport: anything that does not fit is simply unreachable. At <=400px that was
   the theme toggle. Shrink to fit rather than wrap — wrapping would change the fixed nav's height and
   push it over the hero text, which sits at a fixed top offset. */
@media (max-width: 400px) {
  .top-nav { padding: 12px 4vw; gap: 8px; }
  .top-nav-brand { font-size: 0.95rem; gap: 7px; }
  .top-nav-brand img { width: 22px; height: 22px; }
  .top-nav-links { gap: 11px; }
  .top-nav-links a { font-size: 10px; letter-spacing: 0.08em; }
  .theme-btn { padding: 6px 8px; font-size: 9px; letter-spacing: 0.08em; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-dot { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
