/* ============================================================
   ClinIQ HealthSnapshot - styles.css
   Design system, layout, components, motion (reduced-motion safe)
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand colour system */
  --indigo:   #3A4FB8;
  --indigo-700: #2D3E96;
  --green:    #3FB6A8;
  --green-700: #2F9286;
  --lavender: #EEF1FB;
  --white:    #FFFFFF;
  --mist:     #F7F9FE;
  --slate:    #1D2440;
  --slate-60: rgba(29, 36, 64, 0.62);
  --slate-40: rgba(29, 36, 64, 0.40);
  --line:     rgba(29, 36, 64, 0.10);

  /* Typography */
  --font-display: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --font-body: "Mulish", system-ui, -apple-system, Segoe UI, sans-serif;

  /* Spacing scale (4 / 8 based) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Radii and shadows */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(29,36,64,.06), 0 2px 8px rgba(29,36,64,.05);
  --shadow-md: 0 8px 24px rgba(29,36,64,.08);
  --shadow-lg: 0 24px 60px rgba(58,79,184,.16);

  --container: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--slate);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; color: var(--slate); }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-5); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.kicker { font-family: var(--font-display); font-weight: 600; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--indigo); margin-bottom: var(--s-3); }
.kicker-light { color: var(--green); }
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--slate-60); max-width: 56ch; }
.lead-light { color: rgba(255,255,255,.82); }
.muted { color: var(--slate-60); }
.section-head { max-width: 60ch; margin-bottom: var(--s-8); }
.section-head h2 { font-size: clamp(1.875rem, 4vw, 3rem); margin-bottom: var(--s-4); }
.section-sub { font-size: 1.0625rem; color: var(--slate-60); max-width: 54ch; }

.skip-link { position: fixed; left: var(--s-4); top: -100%; z-index: 200; background: var(--indigo); color: #fff; padding: var(--s-3) var(--s-5); border-radius: var(--r-sm); transition: top .2s var(--ease); }
.skip-link:focus { top: var(--s-4); }

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 600; font-size: .9375rem; padding: var(--s-3) var(--s-5); border-radius: var(--r-pill); transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); white-space: nowrap; }
.btn-lg { padding: var(--s-4) var(--s-6); font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 8px 20px rgba(58,79,184,.28); }
.btn-primary:hover { background: var(--indigo-700); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(58,79,184,.34); }
.btn-line { border: 1.5px solid var(--line); color: var(--slate); background: var(--white); }
.btn-line:hover { border-color: var(--indigo); color: var(--indigo); transform: translateY(-2px); }
.btn-line-light { border: 1.5px solid rgba(255,255,255,.45); color: #fff; }
.btn-line-light:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn-ghost { color: var(--slate); padding-inline: var(--s-4); }
.btn-ghost:hover { color: var(--indigo); }
.btn-on-dark { color: #fff; }
.btn-on-dark:hover { color: var(--green); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.72); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease); }
.site-header.is-condensed { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); height: 76px; transition: height .3s var(--ease); }
.site-header.is-condensed .header-inner { height: 62px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.brand-mark { overflow: visible; }
.brand-q { color: var(--indigo); }
.brand-pulse { stroke-dasharray: 40; stroke-dashoffset: 0; }
.primary-nav { display: flex; gap: var(--s-6); }
.primary-nav a { font-family: var(--font-display); font-weight: 500; font-size: .95rem; color: var(--slate-60); position: relative; padding-block: var(--s-2); transition: color .2s var(--ease); }
.primary-nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.primary-nav a:hover { color: var(--slate); }
.primary-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: var(--s-3); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: var(--s-2); }
.nav-toggle span { width: 24px; height: 2px; background: var(--slate); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 8vw, 110px); overflow: hidden; background:
  radial-gradient(1100px 540px at 78% -8%, rgba(63,182,168,.16), transparent 60%),
  radial-gradient(900px 520px at 8% 0%, rgba(58,79,184,.14), transparent 55%),
  linear-gradient(180deg, var(--white), var(--mist)); }
.hero-glow { position: absolute; inset: 0; background: radial-gradient(420px 420px at 70% 30%, rgba(63,182,168,.10), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--font-display); font-weight: 600; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--indigo); background: rgba(58,79,184,.08); padding: var(--s-2) var(--s-4); border-radius: var(--r-pill); }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(63,182,168,.22); }
.hero-title { font-size: clamp(2.75rem, 6vw, 4.75rem); margin: var(--s-5) 0 var(--s-4); max-width: 16ch; }
.hero-lede { font-size: clamp(1.0625rem, 1.7vw, 1.3rem); color: var(--slate-60); max-width: 52ch; margin-bottom: var(--s-6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-7); }
.hero-proof { display: flex; flex-wrap: wrap; gap: var(--s-5); }
.hero-proof li { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 600; font-size: .9rem; color: var(--slate-60); }
.hero-proof .i { width: 20px; height: 20px; color: var(--green); }

/* Hero device + assembling dashboard */
.hero-stage { position: relative; }
.device-frame { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--s-4); }
.device-bar { display: flex; gap: 6px; padding: 0 var(--s-2) var(--s-4); }
.device-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--lavender); }
.device-bar span:nth-child(1){ background:#f3b6b0; } .device-bar span:nth-child(2){ background:#f6dca0; } .device-bar span:nth-child(3){ background:#a8e0d6; }
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.dash-card { background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); }
.c-welcome { grid-column: 1 / -1; background: linear-gradient(120deg, rgba(58,79,184,.10), rgba(63,182,168,.10)); }
.c-lock { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-3); color: var(--indigo); font-weight: 600; font-size: .9rem; background: #fff; }
.dc-label { font-size: .8rem; color: var(--slate-60); }
.dc-big { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; margin-top: 2px; }
.dc-mini { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--slate-40); margin-bottom: var(--s-2); }
.dc-num { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.dc-spark { height: 34px; margin-top: var(--s-3); border-radius: 8px; background:
  linear-gradient(90deg, rgba(63,182,168,.0), rgba(63,182,168,.35), rgba(58,79,184,.35), rgba(63,182,168,.0));
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 8px); mask: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 8px); }
.slotlist li { display: flex; align-items: center; gap: var(--s-2); font-size: .82rem; padding-block: 5px; border-bottom: 1px dashed var(--line); }
.slotlist li:last-child { border-bottom: 0; }
.slotlist b { font-family: var(--font-display); }
.pill { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(58,79,184,.10); color: var(--indigo); margin-left: auto; }
.pill-green { background: rgba(63,182,168,.16); color: var(--green-700); }
.msg-row { display: flex; align-items: center; gap: var(--s-2); font-size: .8rem; padding-block: 4px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: .62rem; font-weight: 700; color: #fff; background: var(--indigo); }
.avatar-2 { background: var(--green); }
.hero-phone { position: absolute; right: -8px; bottom: -34px; width: 168px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: var(--s-4) var(--s-3) var(--s-3); }
.phone-notch { width: 54px; height: 5px; border-radius: 5px; background: var(--lavender); margin: 0 auto var(--s-3); }
.ph-title { font-family: var(--font-display); font-weight: 700; font-size: .85rem; margin-bottom: var(--s-2); }
.ph-card { background: var(--mist); border: 1px solid var(--line); border-radius: 12px; padding: var(--s-3); font-size: .76rem; margin-bottom: var(--s-2); }
.ph-card b { font-family: var(--font-display); }
.ph-green { background: rgba(63,182,168,.14); color: var(--green-700); border-color: rgba(63,182,168,.3); font-weight: 600; }

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--slate); color: rgba(255,255,255,.9); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s-5); padding-block: var(--s-5); }
.trust-item { font-family: var(--font-display); font-weight: 600; font-size: .95rem; letter-spacing: .02em; }
.trust-sep { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ---------- Problem ---------- */
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.problem-copy h2 { font-size: clamp(1.875rem, 4vw, 3rem); margin-bottom: var(--s-4); }
.problem-copy .lead { margin-bottom: var(--s-4); }
.problem-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.before, .after { border-radius: var(--r-md); padding: var(--s-5); border: 1px solid var(--line); }
.before { background: var(--white); }
.after { background: var(--lavender); border-color: rgba(58,79,184,.18); }
.col-tag { font-family: var(--font-display); font-weight: 700; font-size: .85rem; margin-bottom: var(--s-4); display: inline-flex; align-items: center; gap: var(--s-2); }
.col-tag-warn { color: var(--slate-40); }
.col-tag-ok { color: var(--indigo); }
.x-list li, .check-list li { font-size: .92rem; padding: var(--s-2) 0 var(--s-2) var(--s-6); position: relative; color: var(--slate-60); }
.x-list li::before { content: ""; position: absolute; left: 0; top: 13px; width: 14px; height: 2px; background: var(--slate-40); }
.check-list li { color: var(--slate); }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 13px; border: solid var(--green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-4); }
.feature-card { grid-column: span 2; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease); position: relative; overflow: hidden; }
.feature-card.feature-wide { grid-column: span 3; }
.feature-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(140deg, rgba(58,79,184,.05), rgba(63,182,168,.05)); opacity: 0; transition: opacity .3s var(--ease); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(58,79,184,.2); }
.feature-card:hover::after { opacity: 1; }
.fc-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--lavender); color: var(--indigo); margin-bottom: var(--s-4); }
.fc-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.3rem; margin-bottom: var(--s-3); }
.feature-card p { color: var(--slate-60); font-size: .98rem; }
.mini-list { margin-top: var(--s-4); display: grid; gap: var(--s-2); }
.mini-list li { position: relative; padding-left: var(--s-5); font-size: .9rem; color: var(--slate-60); }
.mini-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ---------- Security ---------- */
.security { background: linear-gradient(155deg, var(--indigo) 0%, var(--indigo-700) 55%, #243079 100%); color: #fff; position: relative; overflow: hidden; }
.security::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 420px at 18% 20%, rgba(63,182,168,.22), transparent 60%); pointer-events: none; }
.security-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; position: relative; }
.security-visual { display: grid; place-items: center; }
.security-copy h2 { color: #fff; font-size: clamp(1.875rem, 4vw, 3rem); margin-bottom: var(--s-4); }
.sec-list { display: grid; gap: var(--s-3); margin: var(--s-6) 0 var(--s-7); }
.sec-list li { position: relative; padding-left: var(--s-7); font-size: 1rem; color: rgba(255,255,255,.86); }
.sec-list b { color: #fff; }
.sec-list li::before { content: ""; position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 8px; background: rgba(63,182,168,.2); border: 1px solid rgba(63,182,168,.5); }
.sec-list li::after { content: ""; position: absolute; left: 9px; top: 8px; width: 7px; height: 12px; border: solid var(--green); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
/* Shield draw state (animated by JS, visible by default) */
.shield { filter: drop-shadow(0 18px 40px rgba(0,0,0,.25)); }
.shield-draw { stroke-dasharray: 620; stroke-dashoffset: 0; }
.shield-pulse { stroke-dasharray: 220; stroke-dashoffset: 0; }
.shield-lock { transform-origin: 100px 120px; }

/* ---------- Pricing ---------- */
.pricing { background: var(--mist); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); align-items: start; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-7) var(--s-6); position: relative; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-featured { border-color: var(--indigo); box-shadow: var(--shadow-lg); }
.price-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--green); color: #07312c; font-family: var(--font-display); font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: 5px 14px; border-radius: var(--r-pill); }
.price-name { font-size: 1.2rem; margin-bottom: var(--s-3); }
.price-amt { font-family: var(--font-display); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--slate); display: flex; align-items: baseline; gap: 6px; margin-bottom: var(--s-3); }
.price-amt > span:first-child { font-size: 1rem; color: var(--slate-60); font-weight: 600; }
.price-per { font-size: .8rem; font-weight: 600; color: var(--slate-40); }
.price-for { color: var(--slate-60); font-size: .92rem; margin-bottom: var(--s-5); min-height: 2.6em; }
.price-card .check-list { margin-bottom: var(--s-6); display: grid; gap: 2px; }

.compare { margin-top: var(--s-8); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); }
.compare-title { font-size: 1.2rem; margin-bottom: var(--s-5); }
.table-wrap { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.compare-table th, .compare-table td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); font-size: .92rem; }
.compare-table thead th { font-family: var(--font-display); color: var(--slate); }
.compare-table tbody th { font-weight: 600; color: var(--slate-60); }
.compare-table td { text-align: center; color: var(--slate); }
.compare-table tbody tr:hover { background: var(--mist); }

/* ---------- Audience ---------- */
.aud-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.aud-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-6); transition: transform .3s var(--ease), border-color .3s var(--ease); }
.aud-card:hover { transform: translateY(-4px); border-color: rgba(63,182,168,.4); }
.aud-tag { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: .95rem; color: var(--indigo); margin-bottom: var(--s-3); }
.aud-card p { font-size: .92rem; color: var(--slate-60); }

/* ---------- Stories ---------- */
.story-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-5); align-items: start; }
.story-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); }
.story-feature { background: linear-gradient(150deg, var(--lavender), #fff); }
.story-card blockquote { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; line-height: 1.5; color: var(--slate); margin-bottom: var(--s-5); }
.story-feature blockquote { font-size: 1.3rem; }
.story-card figcaption { display: flex; align-items: center; gap: var(--s-3); }
.story-ph { position: relative; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: linear-gradient(135deg, rgba(58,79,184,.25), rgba(63,182,168,.25)); }
.story-ph::after { content: attr(data-img); position: absolute; inset: 0; display: grid; place-items: center; font-size: 5px; text-align: center; color: var(--slate-40); padding: 3px; }
.story-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-who { display: flex; flex-direction: column; font-size: .85rem; color: var(--slate-60); }
.story-who b { font-family: var(--font-display); color: var(--slate); font-size: .95rem; }

/* ---------- Demo ---------- */
.demo { background: linear-gradient(160deg, #243079, var(--indigo)); color: #fff; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.demo-copy h2 { color: #fff; font-size: clamp(1.875rem, 4vw, 3rem); margin-bottom: var(--s-4); }
.demo-points { margin-top: var(--s-6); display: grid; gap: var(--s-3); }
.demo-points li { position: relative; padding-left: var(--s-6); color: rgba(255,255,255,.86); }
.demo-points li::before { content: ""; position: absolute; left: 0; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--green); }
.demo-form { background: #fff; border-radius: var(--r-lg); padding: clamp(24px, 3vw, 40px); box-shadow: var(--shadow-lg); }
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: var(--slate); margin-bottom: var(--s-2); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: .95rem; color: var(--slate); background: var(--mist); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--indigo); background: #fff; box-shadow: 0 0 0 4px rgba(58,79,184,.12); }
.field textarea { resize: vertical; }
.field.is-invalid input, .field.is-invalid select { border-color: #d8584f; background: #fff5f4; }
.err { color: #c8443b; font-size: .78rem; margin-top: 4px; min-height: 1em; }
.form-status { font-weight: 600; font-size: .9rem; margin-top: var(--s-2); min-height: 1.2em; }
.form-status.ok { color: var(--green-700); }
.form-status.bad { color: #c8443b; }
.form-note { font-size: .78rem; color: var(--slate-40); margin-top: var(--s-3); }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate); color: rgba(255,255,255,.72); padding-block: var(--s-8) var(--s-6); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-6); padding-bottom: var(--s-7); border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-foot { color: #fff; }
.foot-tag { margin-top: var(--s-3); font-size: .9rem; max-width: 34ch; }
.foot-h { font-family: var(--font-display); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: var(--s-4); }
.foot-col { display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }
.foot-col a, .linklike { font-size: .92rem; color: rgba(255,255,255,.78); transition: color .2s var(--ease); }
.foot-col a:hover, .linklike:hover { color: var(--green); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-5); font-size: .85rem; }
.foot-legal a:hover { color: var(--green); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: var(--s-5); }
.modal.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15,19,38,.55); backdrop-filter: blur(4px); }
.modal-card { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: var(--r-lg); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-lg); animation: modalIn .3s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: var(--s-3); right: var(--s-4); font-size: 1.6rem; line-height: 1; color: var(--slate-40); }
.modal-close:hover { color: var(--slate); }
.modal-title { font-size: 1.4rem; margin-bottom: var(--s-5); }
.role-tabs { display: flex; gap: 4px; background: var(--mist); border-radius: var(--r-pill); padding: 4px; margin-bottom: var(--s-5); }
.role-tab { flex: 1; padding: var(--s-2) var(--s-3); border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: var(--slate-60); transition: background .25s var(--ease), color .25s var(--ease); }
.role-tab.is-active { background: #fff; color: var(--indigo); box-shadow: var(--shadow-sm); }
.demo-creds { font-size: .76rem; color: var(--slate-40); margin-top: var(--s-4); text-align: center; }

/* ---------- App shell (gated views) ---------- */
.app-shell { position: fixed; inset: 0; z-index: 160; background: var(--mist); overflow-y: auto; overflow-x: hidden; display: none; }
.app-shell.is-open { display: block; }
.app-topbar { background: var(--indigo); color: #fff; position: sticky; top: 0; z-index: 2; }
.app-topbar-inner { display: flex; align-items: center; gap: var(--s-4); height: 64px; }
.app-role-label { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: .85rem; color: rgba(255,255,255,.78); }
.app-body { padding-block: var(--s-7); }
.app-h { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: var(--s-2); }
.app-sub { color: var(--slate-60); margin-bottom: var(--s-6); }
.metric-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s-4); margin-bottom: var(--s-6); }
.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.metric .m-num { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--indigo); }
.metric .m-lab { font-size: .82rem; color: var(--slate-60); }
.app-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-5); align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); margin-bottom: var(--s-5); }
.panel h2 { font-size: 1.15rem; margin-bottom: var(--s-4); }
.app-list li { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.app-list li:last-child { border-bottom: 0; }
.app-list .t { font-family: var(--font-display); font-weight: 700; color: var(--indigo); min-width: 54px; }
.audit li { font-size: .82rem; color: var(--slate-60); padding: var(--s-2) 0; border-bottom: 1px dashed var(--line); }
.audit .who { color: var(--slate); font-weight: 600; }

/* ---------- Reveal animation (visible by default, JS adds motion) ---------- */
.reveal { opacity: 1; }
.js-anim .reveal { opacity: 0; transform: translateY(24px); }
.js-anim .reveal.is-visible { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.is-missing { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stage { max-width: 520px; margin-inline: auto; min-width: 0; }
  .hero-copy { text-align: center; min-width: 0; }
  .hero-title, .hero-lede { margin-inline: auto; }
  .hero-cta, .hero-proof { justify-content: center; }
  .eyebrow { max-width: 100%; }
  .security-grid, .demo-grid, .problem-grid { grid-template-columns: 1fr; }
  .feature-card, .feature-card.feature-wide { grid-column: span 3; }
  .story-grid { grid-template-columns: 1fr 1fr; }
  .story-feature { grid-column: 1 / -1; }
  .aud-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .primary-nav { position: fixed; inset: 76px 0 auto; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: var(--s-4) var(--s-5); transform: translateY(-130%); transition: transform .35s var(--ease); box-shadow: var(--shadow-md); }
  .primary-nav.is-open { transform: none; }
  .primary-nav a { padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
  .header-inner { gap: var(--s-3); }
  .header-actions .btn-ghost { display: inline-flex; padding-inline: var(--s-3); }
  .header-actions .btn-primary { display: none; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card, .feature-card.feature-wide { grid-column: 1 / -1; }
  .price-grid { grid-template-columns: 1fr; }
  .problem-cols { grid-template-columns: 1fr; }
  .story-grid, .aud-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-phone { display: none; }
  .dash { grid-template-columns: 1fr; }
  .metric-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .metric-row { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js-anim .reveal { opacity: 1 !important; transform: none !important; }
}