/* ==========================================================================
   Commercial wrapper design system  (product name lives in config.js)
   Matches the platform's design language: dark slate, ONE blue accent,
   triage colors reserved for product illustrations only. System font stack.
   ========================================================================== */

:root {
  /* Slate surfaces (darkest -> lightest) */
  --bg:            #0a0f1a;   /* page */
  --bg-2:          #0d1424;   /* alt sections */
  --surface:       #111a2e;   /* cards */
  --surface-2:     #16233c;   /* raised cards / illustration frames */
  --line:          #22314d;   /* hairlines / borders */
  --line-soft:     #1a2740;

  /* The single blue accent (used sparingly, deliberately) */
  --accent:        #2f6df6;
  --accent-bright: #5b9bff;
  --accent-dim:    #1c3a78;
  --accent-glow:   rgba(47, 109, 246, .16);

  /* Text */
  --text:          #e8eef8;
  --text-2:        #aebbd1;
  --text-3:        #7d8aa3;

  /* Triage palette — ONLY for clinical product illustrations */
  --triage-red:    #e5484d;
  --triage-yellow: #f5a524;
  --triage-green:  #2fbf71;
  --triage-black:  #4b5563;

  --radius:   14px;
  --radius-sm: 9px;
  --maxw:     1120px;
  --shadow:   0 18px 48px -24px rgba(0,0,0,.75);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", "Cascadia Code", Menlo,
          Consolas, monospace;
}

* { box-sizing: border-box; }
/* The [hidden] attribute must win even on elements with an explicit display
   (e.g. .btn { display:inline-flex } would otherwise override the UA rule). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 620px at 78% -8%, var(--accent-glow), transparent 60%),
    radial-gradient(900px 500px at 6% 4%, rgba(47,109,246,.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
section { padding-block: clamp(56px, 8vw, 104px); }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent-bright); margin: 0 0 16px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1.5px; background: var(--accent); display: inline-block;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.3vw, 2.6rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; line-height: 1.2; }
p  { margin: 0 0 1rem; color: var(--text-2); text-wrap: pretty; }
.lead { font-size: clamp(1.08rem, 1.9vw, 1.32rem); color: var(--text-2); max-width: 62ch; text-wrap: pretty; }
.section-head { max-width: 68ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .lead { margin-bottom: 0; }
.section-head > h2 { margin-bottom: .35em; }
a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong { color: var(--text); font-weight: 650; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 10px; font-weight: 620; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  color: #fff; box-shadow: 0 10px 26px -12px var(--accent);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; box-shadow: 0 16px 34px -14px var(--accent); }
.btn-sm { padding: 9px 15px; font-size: .9rem; border-radius: 9px; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line); box-shadow: none;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(47,109,246,.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,15,26,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 720; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.05rem; }
.logo-mark { flex: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-2); font-weight: 550; font-size: .96rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; background: var(--accent); border-radius: 2px; margin-top: 4px;
}
.nav-secondary { opacity: .92; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 9vw, 118px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 8px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .84rem; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); }
.hero-visual { position: relative; min-width: 0; }
.hero-visual svg { display: block; width: 100%; height: auto; }
/* Grid children must be allowed to shrink below their content's intrinsic size,
   otherwise a wide child (e.g. an inline SVG) blows the track past the viewport. */
.hero-grid > *, .split > *, .feature > *, .contact-grid > * { min-width: 0; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-icon { width: 42px; height: 42px; margin-bottom: 16px; color: var(--accent-bright); }

/* Feature block: illustration + copy side by side, alternating */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px);
  align-items: center; padding-block: clamp(28px, 4vw, 44px);
}
.feature:nth-child(even) .feature-media { order: 2; }
.feature-media {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.feature-media svg { display: block; width: 100%; height: auto; }
.feature ul { margin: 14px 0 0; padding: 0; list-style: none; }
.feature li { position: relative; padding-left: 26px; margin-bottom: 9px; color: var(--text-2); }
.feature li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px;
  border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}

/* Illustration caption */
.fig-cap { font-size: .82rem; color: var(--text-3); margin-top: 14px; text-align: center; font-style: italic; }

/* ---------- Operational story (flow strip) ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.flow-step {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 20px;
}
.flow-step .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; font-weight: 700; font-size: .9rem;
  color: var(--accent-bright); background: rgba(47,109,246,.12); border: 1px solid var(--accent-dim);
  margin-bottom: 14px;
}
.flow-step h3 { font-size: 1.06rem; }
.flow-step p { font-size: .93rem; margin-bottom: 0; }
.flow-step:not(:last-child)::after {
  content: "→"; position: absolute; right: -12px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 1.2rem; z-index: 2;
}

/* ---------- Differentiator / founder ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center;
}
.stat-row { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 26px; }
.stat { }
.stat .num { font-size: 2.1rem; font-weight: 750; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.stat .num .accent { color: var(--accent-bright); }
.stat .lbl { font-size: .86rem; color: var(--text-3); margin-top: 6px; }

.pull {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; margin: 0;
  font-size: 1.15rem; color: var(--text); font-weight: 500;
}

/* ---------- Buyer-concern map (platform page) ---------- */
.concern { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--line-soft); }
.concern:last-child { border-bottom: 1px solid var(--line-soft); }
.concern-q { color: var(--text); font-weight: 650; }
.concern-q .tag { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-bright); margin-bottom: 6px; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 80% -20%, var(--accent-glow), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: 20px; padding: clamp(34px, 5vw, 60px);
  text-align: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band .lead { margin-inline: auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 44px 26px; margin-top: 24px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--line-soft); }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-tag { width: 100%; color: var(--text-3); font-size: .9rem; margin: 8px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.footer-links a { color: var(--text-2); font-size: .92rem; }
.footer-legal { padding-top: 18px; color: var(--text-3); font-size: .84rem; }

/* ---------- Report page bits ---------- */
.report-section-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.report-section-list li {
  display: grid; grid-template-columns: 34px 1fr; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px;
}
.report-section-list .n { color: var(--accent-bright); font-weight: 700; font-variant-numeric: tabular-nums; }
.report-section-list h3 { font-size: 1.02rem; margin-bottom: 4px; }
.report-section-list p { margin: 0; font-size: .93rem; }

/* ---------- Contact page + lead form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-points { list-style: none; margin: 22px 0 0; padding: 0; }
.contact-points li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--text-2); }
.contact-points li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px;
  border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}
.contact-direct { margin-top: 24px; color: var(--text-3); font-size: .95rem; }

.form-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow);
}
.lead-form .field { margin-bottom: 16px; }
.lead-form label {
  display: block; font-size: .88rem; font-weight: 600; color: var(--text-2); margin-bottom: 7px;
}
.lead-form label .opt { color: var(--text-3); font-weight: 500; }
.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; font: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lead-form textarea { resize: vertical; min-height: 96px; }
.lead-form input:focus, .lead-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.lead-form input:user-invalid { border-color: var(--triage-red); }
.form-submit { width: 100%; margin-top: 6px; }
.form-submit[disabled] { opacity: .65; cursor: default; }
.form-alt { text-align: center; font-size: .9rem; color: var(--text-3); margin: 14px 0 0; }
.form-note { font-size: .85rem; color: var(--text-3); margin-top: 12px; }
.form-status { margin: 12px 0 0; font-size: .92rem; text-align: center; }
.form-status.is-err { color: var(--triage-red); }
.form-done { text-align: center; padding: 12px 0; }
.form-done svg { color: var(--accent-bright); margin-bottom: 10px; }
.form-done h3 { margin: 0 0 6px; }
.form-done p { margin: 0; }

/* Honeypot — off-screen but focusable-free; hidden from real users */
.hp-field {
  position: absolute !important; left: -9999px !important; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .feature, .grid-2, .grid-3, .grid-4, .contact-grid { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-media { order: 0; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow-step:not(:last-child)::after { display: none; }
  .concern { grid-template-columns: 1fr; gap: 8px; }
  .hero-visual { order: -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links .btn { margin-top: 12px; }
  .flow { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Focus visibility for keyboard users */
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }
