/* ============================================================================
   Resonant Labs — shared design system
   ----------------------------------------------------------------------------
   Extracted from the NeuroRad.ai mockup set (hub / landing / atlas / training /
   brookes-brain) and reconciled with the DEPLOYED Atlas palette in
   ../../assets/styles.css. This file is the single source of truth for the
   marketing + product-shell surfaces under /site. It does NOT style the
   deployed Atlas SPA (that stays on assets/styles.css, untouched).

   Theming model: one dark "Resonant" base; each product sets an accent by
   putting a theme class on <body> (.theme-resonant / .theme-neurorad /
   .theme-brain / .theme-chatty). Components read --acc, so the same markup
   re-skins per product.
   ============================================================================ */

:root {
  /* ---- surfaces ---- */
  --bg: #07080a;
  --ink: #eef1f6;
  --ink-soft: #cfd4de;
  --muted: #8b909e;
  --faint: #5c616d;

  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .15);
  --glass: rgba(255, 255, 255, .03);
  --glass-2: rgba(255, 255, 255, .055);
  --panel-solid: #101216;

  /* ---- family accents (one company, distinct products) ---- */
  --resonant: #a78bfa;   /* parent hub — violet            */
  --neurorad: #2e90ff;   /* flagship clinical — neon blue  */
  --chatty:   #f5b642;   /* AI literacy — amber            */
  --brain:    #34d3a6;   /* pro workflow — clinical teal   */

  /* neon-blue support tones (match deployed Atlas) */
  --accent: var(--neurorad);
  --accent-2: #5aa8ff;
  --accent-ink: #9cc6ff;
  --accent-deep: #1e5fd0;
  --link: #5aa8ff;

  /* teal support tones */
  --brain-2: #5fe0bd;
  --brain-deep: #1b8f70;

  /* ---- evidence-grade palette (luminous on black; matches Atlas grade.js) ---- */
  --g-strong: #34d399;     --g-strong-bg: rgba(52, 211, 153, .12);
  --g-moderate: #60a5fa;   --g-moderate-bg: rgba(96, 165, 250, .12);
  --g-weak: #fbbf24;       --g-weak-bg: rgba(251, 191, 36, .13);
  --g-consensus: #c084fc;  --g-consensus-bg: rgba(192, 132, 252, .13);
  --g-spec: #9aa0ac;       --g-spec-bg: rgba(154, 160, 172, .12);
  --g-unresolved: #fb7185; --g-unresolved-bg: rgba(251, 113, 133, .13);

  /* ---- type + motion ---- */
  /* No external font requests (keeps CSP tight + matches deployed Atlas, which
     is system-font only). Space Grotesk is used *if present locally*; otherwise
     it falls back to the system UI stack. Self-hosting is a documented next
     step in IMPLEMENTATION_NOTES.md. */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Space Grotesk", var(--font-sans);
  --font-mono: "SF Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 16px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: 160ms;
  --dur: 300ms;
  --shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 24px 50px -28px rgba(0, 0, 0, .85);

  /* default accent used by shared components; overridden per theme below */
  --acc: var(--neurorad);
  --acc-ink: var(--accent-ink);
}

/* per-product accent themes ------------------------------------------------- */
.theme-resonant { --acc: var(--resonant); --acc-ink: #cbb8ff; }
.theme-neurorad { --acc: var(--neurorad); --acc-ink: var(--accent-ink); }
.theme-chatty   { --acc: var(--chatty);   --acc-ink: #ffd98a; }
.theme-brain    { --acc: var(--brain);    --acc-ink: var(--brain-2); }

/* ---- reset + base --------------------------------------------------------- */
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.62 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: .1px;
  overflow-x: hidden;
}
/* ambient depth — accent-tinted, so it re-colors per theme */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58vw 58vh at 10% -12%, color-mix(in oklab, var(--acc) 12%, transparent), transparent 60%),
    radial-gradient(52vw 52vh at 104% -6%, rgba(167, 139, 250, .08), transparent 55%),
    radial-gradient(46vw 46vh at 50% 120%, rgba(96, 165, 250, .06), transparent 60%),
    var(--bg);
}
a { color: var(--link); text-decoration: none; transition: color var(--dur-fast) ease, opacity var(--dur-fast) ease; }
a:hover { color: var(--acc-ink); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
strong { font-weight: 640; }
::selection { background: color-mix(in oklab, var(--acc) 30%, transparent); color: #fff; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 26px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- top bar -------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 13px 26px;
  background: rgba(9, 10, 13, .62);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .m {
  font-size: 23px; line-height: 1; color: var(--acc);
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--acc) 55%, transparent));
}
.brand .m.badge-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: #04121f; font-weight: 700;
  background: linear-gradient(140deg, var(--acc), color-mix(in oklab, var(--acc) 60%, #000));
  box-shadow: 0 0 20px -4px var(--acc); filter: none;
}
.brand b { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.brand em, .brand .sub { font-size: 10.5px; color: var(--muted); font-style: normal; display: block; letter-spacing: .35px; }
/* "↖ family" up-link back to a parent surface */
.up {
  font-size: 11px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
.up:hover { color: var(--acc-ink); }
.up b { color: var(--acc-ink); font-weight: 600; }
.topnav { margin-left: auto; display: flex; gap: 20px; font-size: 13.5px; color: var(--muted); }
.topnav a { color: var(--muted); letter-spacing: .2px; }
.topnav a:hover { color: var(--acc-ink); }

/* pill / cta buttons in the bar */
.pill {
  border: 1px solid var(--line-strong); padding: 8px 15px; border-radius: 999px;
  font-size: 13px; color: var(--ink-soft); transition: var(--dur) var(--ease);
}
.pill:hover { background: var(--glass-2); border-color: color-mix(in oklab, var(--acc) 50%, transparent); }
.cta {
  border: 1px solid color-mix(in oklab, var(--acc) 45%, transparent);
  background: color-mix(in oklab, var(--acc) 12%, transparent);
  color: var(--acc-ink); padding: 8px 15px; border-radius: 10px; font-size: 13px;
  transition: var(--dur) var(--ease);
}
.cta:hover { background: color-mix(in oklab, var(--acc) 22%, transparent); }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  padding: 13px 22px; border-radius: 12px; font-size: 14.5px; font-weight: 500;
  transition: var(--dur) var(--ease); display: inline-flex; align-items: center; gap: 9px;
}
.btn.p {
  background: linear-gradient(120deg, var(--acc), color-mix(in oklab, var(--acc) 65%, #fff));
  color: #04121f; box-shadow: 0 14px 40px -16px var(--acc);
}
.btn.p:hover { transform: translateY(-2px); }
.btn.g { border: 1px solid var(--line-strong); color: var(--ink-soft); }
.btn.g:hover { background: var(--glass-2); border-color: var(--acc); }

/* ---- evidence chips (the load-bearing shared component) ------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 680; letter-spacing: .5px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; border: 1px solid transparent;
  box-shadow: 0 0 12px -4px currentColor;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
.chip.sm { font-size: 9.5px; padding: 2px 7px; box-shadow: none; }
.chip.strong    { color: var(--g-strong);    background: var(--g-strong-bg);    border-color: rgba(52, 211, 153, .3); }
.chip.moderate  { color: var(--g-moderate);  background: var(--g-moderate-bg);  border-color: rgba(96, 165, 250, .3); }
.chip.weak      { color: var(--g-weak);      background: var(--g-weak-bg);      border-color: rgba(251, 191, 36, .3); }
.chip.consensus { color: var(--g-consensus); background: var(--g-consensus-bg); border-color: rgba(192, 132, 252, .3); }
.chip.spec      { color: var(--g-spec);      background: var(--g-spec-bg);      border-color: rgba(154, 160, 172, .3); }
.chip.unres     { color: var(--g-unresolved);background: var(--g-unresolved-bg);border-color: rgba(251, 113, 133, .3); }

/* access-lock chips used on the landing pillars */
.lock {
  font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted);
}
.lock.free { color: var(--g-strong); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .1); }
.lock.acct { color: var(--g-weak); border-color: rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .1); }
.lock.pro  { color: var(--g-consensus); border-color: rgba(192, 132, 252, .35); background: rgba(192, 132, 252, .1); }

/* ---- panels + cards ------------------------------------------------------- */
.panel {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-2), var(--glass)); padding: 24px;
}
.card {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; background: linear-gradient(180deg, var(--glass-2), var(--glass));
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .5s var(--ease), border-color .4s var(--ease), box-shadow .5s var(--ease);
}
.card:hover { transform: translateY(-5px); border-color: var(--acc); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }

/* ---- section headers ------------------------------------------------------ */
.section-h { margin: 96px 0 28px; }
.section-h .k, .k { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-bottom: 10px; }
.section-h h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); max-width: 24ch; }
.section-h p { color: var(--muted); font-size: 14.5px; margin-top: 12px; max-width: 52ch; }

/* eyebrow used on hero sections */
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--acc); }

/* ---- ethics / responsibility rails --------------------------------------- */
.ethics { margin: 40px 0; padding: 24px 28px; border-left: 2px solid var(--acc); background: var(--glass); border-radius: 0 12px 12px 0; }
.ethics.warn { border-left-color: var(--g-weak); background: rgba(251, 191, 36, .05); }
.ethics b { color: var(--acc-ink); }
.ethics.warn b { color: var(--g-weak); }
.ethics p { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; }

/* ---- footer + status badges ---------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 36px 0 60px; color: var(--faint); font-size: 13px; }
.site-footer .frow { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--acc-ink); }
/* the honest "this is a mockup" badge that rides on every staged page */
.dmbadge {
  display: inline-block; margin-top: 10px; font-size: 11px; color: var(--faint);
  border: 1px dashed var(--line-strong); padding: 4px 10px; border-radius: 6px; font-style: normal;
}

/* ---- reveal-on-scroll (progressive enhancement; see reveal.js) ----------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- responsive + motion safety ------------------------------------------ */
@media (max-width: 820px) {
  .topnav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
