/* HAMD AI — public landing page (/). Standalone: no app.js, no app.css.
   Palette is the HAMD AI app's own (assets/css/app.css) and the logo's. */
:root {
  --night: #030f2b;          /* deepest ground behind the anatomy */
  --navy: #041e4f;           /* app navy */
  --ink: #082341;            /* app text-primary */
  --slate: #5f738f;          /* app text-secondary */
  --blue: #1c5fd4;           /* app primary */
  --blue-logo: #0562df;      /* the "HAMD AI" wordmark */
  --blue-dark: #124cae;
  --blue-light: #67b6ff;
  --cyan: #15d8ea;           /* "HealthAssistMD" */
  --mist: #f4f9ff;           /* app background */
  --mist-2: #e8f2ff;
  --line: #cfe1f5;
  --on-dark: #e6f0ff;
  --on-dark-2: #9fb6d8;
  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  /* Saira, a little wide: the geometric, squared-off letterforms of the HAMD AI wordmark. */
  --display: 'Saira', system-ui, sans-serif;
  --text: 'Saira', system-ui, -apple-system, sans-serif;
  --mono: 'Saira', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--on-dark);
  font: 400 16px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; font-weight: 600; letter-spacing: -0.01em; font-stretch: 108%; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.light :focus-visible { outline-color: var(--blue); }

.eyebrow {
  font: 600 13px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--cyan);
  margin: 0 0 18px;
}
.light .eyebrow { color: var(--blue); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 16px/1 var(--text);
  letter-spacing: .01em;
  text-decoration: none;
  border-radius: 10px;
  padding: 15px 22px;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  white-space: nowrap;
}
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-logo); }
.btn-ghost { color: var(--on-dark); border: 1px solid rgba(159, 182, 216, .35); }
.btn-ghost:hover { border-color: var(--on-dark); }
.btn-nav { padding: 12px 20px; font-size: 16px; background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(159, 182, 216, .3); }
.btn-nav:hover { background: var(--blue); border-color: var(--blue); }
.btn-store { background: var(--ink); color: #fff; margin-top: 22px; }
.btn-store:hover { background: var(--navy); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 12px var(--gutter);
  transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(3, 15, 43, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom-color: rgba(159,182,216,.12); }
.nav.on-light { background: rgba(255,255,255,.9); border-bottom-color: var(--line); color: var(--ink); }
.nav.on-light .btn-nav { color: #fff; background: var(--blue); border-color: var(--blue); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 52px; height: 52px; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word b { font: 700 27px/1 var(--display); font-stretch: 118%; letter-spacing: .01em; color: #3d86ff; }
.brand-word small { font: 600 14.5px/1 var(--display); font-stretch: 112%; color: var(--cyan); letter-spacing: .01em; margin-top: 4px; }
.nav.on-light .brand-word b { color: var(--blue-logo); }
.nav.on-light .brand-word small { color: #00c4d6; }
.nav-links { display: flex; gap: 40px; }
.nav-links a { text-decoration: none; font-size: 17px; font-weight: 500; letter-spacing: .01em; color: var(--on-dark-2); transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav.on-light .nav-links a { color: var(--slate); }
.nav.on-light .nav-links a:hover { color: var(--ink); }

/* ---------- the anatomy scene ---------- */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; transition: opacity .2s linear; }
.scene canvas { width: 100%; height: 100%; display: block; }
.scene-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 70% 30%, rgba(28, 95, 212, .14), transparent 70%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(3, 15, 43, .85) 100%);
}
.no-webgl .scene canvas { display: none; }
main, .foot { position: relative; z-index: 1; }

/* ---------- scale rail ---------- */
.rail {
  position: fixed; left: var(--gutter); top: 50%; z-index: 20;
  transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.rail.is-on { opacity: 1; visibility: visible; }
.rail button {
  all: unset; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: rgba(159, 182, 216, .55);
  padding: 7px 0;
  transition: color .25s;
  font-size: 0;
}
.rail button.is-on, .rail button:hover, .rail button:focus-visible { font-size: 11px; }
.rail button span { width: 22px; height: 2px; border-radius: 1px; background: currentColor; font-size: 0; transition: width .3s var(--ease); }
.rail button:hover, .rail button.is-on { color: #fff; }
.rail button.is-on span { width: 40px; background: var(--cyan); }
.rail button:focus-visible { outline: 2px solid var(--cyan); }

/* ---------- hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; padding: 130px 0 80px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 78px); line-height: 1.03; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.lede { max-width: 33rem; margin: 26px 0 0; font-size: clamp(16px, 1.35vw, 18.5px); color: var(--on-dark-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  font: 500 10.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-2);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.scroll-cue span { width: 1px; height: 42px; background: linear-gradient(var(--cyan), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- the story ---------- */
.step { min-height: 110vh; min-height: 110svh; display: flex; align-items: center; }
.step-card { width: min(440px, 38vw); margin-left: max(calc(var(--gutter) + 150px), calc((100vw - 1200px) / 2 + var(--gutter))); }
.step-right .step-card { margin-left: auto; margin-right: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); }
.step-n { font: 600 13px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); margin: 0 0 18px; }
.step h2 { font-size: clamp(28px, 3.1vw, 42px); line-height: 1.1; }
.step p { color: var(--on-dark-2); margin: 18px 0 0; }
.step-card > * { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.step.is-in .step-card > * { opacity: 1; transform: none; }
.step.is-in .step-card > :nth-child(2) { transition-delay: .06s; }
.step.is-in .step-card > :nth-child(3) { transition-delay: .12s; }
.step.is-in .step-card > :nth-child(4) { transition-delay: .18s; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.chip {
  all: unset; cursor: pointer;
  font: 500 13px/1 var(--text);
  padding: 9px 13px 9px 28px;
  border: 1px solid rgba(159, 182, 216, .28);
  border-radius: 8px;
  color: var(--on-dark);
  position: relative;
  transition: border-color .2s, background-color .2s, color .2s;
}
.chip::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; border: 1.5px solid var(--on-dark-2); transition: background-color .2s, border-color .2s; }
.chip:hover, .chip.is-on, .chip[aria-pressed="true"] { border-color: var(--cyan); background: rgba(21, 216, 234, .08); }
.chip.is-on::before, .chip[aria-pressed="true"]::before { background: var(--cyan); border-color: var(--cyan); }
.chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* explode dial */
.knob-row { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.knob { --a: -135deg; --v: 0; position: relative; width: 78px; height: 78px; border-radius: 50%; cursor: grab; touch-action: none; flex: none; }
.knob:active { cursor: grabbing; }
.knob-track { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from -135deg, var(--cyan) 0deg, #8b6cff calc(var(--v) * 2.7deg), rgba(159, 182, 216, .2) calc(var(--v) * 2.7deg) 270deg, transparent 270deg); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px)); }
.knob-cap { position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #1d3f8a, #0a1f4d 70%); border: 1px solid rgba(159, 182, 216, .3); box-shadow: 0 8px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); transform: rotate(var(--a)); transition: transform .12s linear; }
.knob-cap i { position: absolute; left: 50%; top: 7px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.knob:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.knob-text { display: flex; flex-direction: column; gap: 3px; }
.knob-text b { font-weight: 600; color: #fff; }
.knob-text small { font-size: 14px; color: var(--cyan); font-weight: 600; letter-spacing: .02em; }
.knob-text span { font-size: 12.5px; color: var(--on-dark-2); }
.credit { font-size: 11.5px !important; color: rgba(159, 182, 216, .7) !important; margin-top: 16px !important; }
.credit a { color: inherit; }

/* ---------- light sections ---------- */
.light { background: var(--mist); color: var(--ink); padding: clamp(80px, 11vw, 140px) 0; }
/* Platform → EMR share one ground and ease from one to the next; Mobile arrives as its own sheet. */
.emr { background: linear-gradient(180deg, var(--mist) 0%, #edf5ff 100%); padding-top: clamp(48px, 7vw, 96px); position: relative; }
.emr::before { content: ""; position: absolute; top: 0; left: 50%; width: min(1100px, calc(100% - 2 * var(--gutter))); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); }
.mobile { background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%); border-top-left-radius: 32px; border-top-right-radius: 32px; box-shadow: 0 -24px 48px -24px rgba(8, 35, 65, .16); position: relative; z-index: 2; }
.security { padding-top: clamp(64px, 9vw, 120px); }
.platform { border-top-left-radius: 28px; border-top-right-radius: 28px; }
.sec-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head h2, .mobile h2 { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.06; color: var(--ink); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* features */
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.feat-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.feat-tab {
  all: unset; cursor: pointer;
  display: grid; grid-template-columns: 44px 1fr; gap: 6px; align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.feat-tab::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: var(--blue); transition: width .5s var(--ease); }
.feat-tab[aria-selected="true"]::after { width: 100%; }
.feat-k { font: 600 13px/1 var(--mono); color: var(--slate); letter-spacing: .08em; }
.feat-tab b { display: block; font: 600 18px/1.25 var(--display); color: var(--slate); transition: color .2s; }
.feat-tab small { display: block; font-size: 14px; color: var(--slate); margin-top: 4px; opacity: .8; }
.feat-tab:hover b, .feat-tab[aria-selected="true"] b { color: var(--ink); }
.feat-tab[aria-selected="true"] .feat-k { color: var(--blue); }
.feat-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.feat-stage {
  position: sticky; top: 96px;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: clamp(22px, 3vw, 36px);
  min-height: 380px;
}
.panel > p { margin: 0 0 24px; font-size: 17px; color: var(--ink); max-width: 36rem; }
.panel.is-on { animation: panel-in .5s var(--ease); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.mock { background: var(--mist); border: 1px solid var(--line); border-radius: 14px; padding: 18px; font-size: 14px; }
.mock-bar { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 12px; }
.pill { font: 500 11px/1 var(--mono); padding: 5px 8px; border-radius: 6px; background: var(--mist-2); color: var(--blue); letter-spacing: .06em; text-transform: uppercase; }
.mock-note dl { margin: 0; display: grid; grid-template-columns: 100px 1fr; gap: 10px 14px; }
.mock-note dt { font: 500 11px/1.8 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--slate); }
.mock-note dd { margin: 0; color: var(--ink); }
.mock-note i { font-style: normal; color: var(--blue); font-weight: 600; }
.mock-note code { font: 500 12px var(--mono); background: var(--mist-2); color: var(--blue-dark); padding: 2px 6px; border-radius: 5px; }
.mock-flow { list-style: none; margin: 0; display: grid; gap: 0; counter-reset: s; }
.mock-flow li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0 13px 30px; position: relative; border-bottom: 1px dashed var(--line); }
.mock-flow li:last-child { border-bottom: 0; }
.mock-flow li::before { content: ""; position: absolute; left: 4px; top: 50%; margin-top: -6px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.mock-flow li.done::before { background: var(--blue); border-color: var(--blue); }
.mock-flow li.now::before { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(21,216,234,.18); }
.mock-flow span { color: var(--slate); font-size: 13px; }
.mock-matrix { display: grid; grid-template-columns: 1.1fr repeat(3, 1fr); gap: 4px; font-size: 12.5px; }
.mock-matrix b { font-weight: 600; padding: 8px 4px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.mock-matrix i { font-style: normal; text-align: center; padding: 9px 4px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.mock-matrix .x { color: var(--line); }
.sev-c { background: #fde4e4; color: #b42318; }
.sev-m { background: #fdf3d8; color: #8a5a00; }
.sev-n { background: #e3f6ee; color: #0b7a4b; }
.mock-img { display: grid; grid-template-columns: 140px 1fr; gap: 18px; align-items: center; }
.scan { aspect-ratio: 1; border-radius: 10px; background: radial-gradient(circle at 50% 45%, #5b7bb0 0 22%, #2a4373 23% 40%, #0c1d3d 60%); position: relative; overflow: hidden; }
.scan span { position: absolute; left: 0; right: 0; height: 2px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: scanline 2.6s var(--ease) infinite; }
@keyframes scanline { 0% { top: 8%; } 50% { top: 90%; } 100% { top: 8%; } }
.mock-img ul, .mock-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mock-img li { color: var(--slate); }
.mock-img b { color: var(--ink); margin-right: 8px; }
.mock-list li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tag { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--blue); background: var(--mist-2); border-radius: 6px; padding: 6px 8px; min-width: 86px; text-align: center; }
.mock-wave { display: flex; align-items: center; justify-content: space-between; height: 120px; padding: 18px 22px; }
.mock-wave span { width: 4px; border-radius: 2px; background: var(--blue); animation: wave 1.4s ease-in-out infinite; }
.mock-wave span:nth-child(3n) { background: var(--cyan); }
.mock-wave span:nth-child(odd) { animation-delay: -.4s; }
.mock-wave span:nth-child(4n) { animation-delay: -.8s; }
.mock-wave span:nth-child(5n) { animation-delay: -1.1s; }
@keyframes wave { 0%, 100% { height: 12%; } 50% { height: 88%; } }

/* EMR */
.switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 34px; }
.switch button { all: unset; cursor: pointer; position: relative; z-index: 1; padding: 11px 20px; font: 600 14px/1 var(--text); color: var(--slate); text-align: center; transition: color .3s var(--ease); }
.switch button[aria-checked="true"] { color: #fff; }
.switch button:focus-visible { outline: 2px solid var(--blue); border-radius: 8px; }
.switch-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); background: var(--blue); border-radius: 9px; transition: transform .45s var(--ease); }
.switch.is-solo .switch-thumb { transform: translateX(100%); }
.flow { display: grid; grid-template-columns: 1fr 80px 1fr 80px 1fr; align-items: stretch; }
.node { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.node b { font: 600 19px/1.25 var(--display); color: var(--ink); }
.node small { font-size: 14px; color: var(--slate); }
.node-k { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--blue); }
.node-core { background: var(--navy); border-color: var(--navy); align-items: flex-start; }
.node-core b { color: #fff; }
.node-core small { color: var(--on-dark-2); }
.flow b, .flow small, .flow li { transition: opacity .25s var(--ease); }
.feed, .work, .out { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.feed li, .out li { font: 600 12px/1 var(--text); letter-spacing: .02em; padding: 7px 10px; border-radius: 7px; background: var(--mist-2); color: var(--blue-dark); }
.out li { background: #e9fbfd; color: #077c88; }
.work li { font: 600 12px/1 var(--text); padding: 7px 10px; border-radius: 7px; background: rgba(255,255,255,.08); color: var(--on-dark-2); }
.core-mark { position: relative; width: 56px; height: 56px; display: grid; place-items: center; }
.core-mark::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 55%, var(--cyan) 75%, var(--blue-light) 90%, transparent); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px)); animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.flow.is-run .feed li { animation: feed-in 6s var(--ease) infinite both; }
.flow.is-run .feed li:nth-child(2) { animation-delay: .25s; }
.flow.is-run .feed li:nth-child(3) { animation-delay: .5s; }
.flow.is-run .feed li:nth-child(4) { animation-delay: .75s; }
@keyframes feed-in { 0% { opacity: 0; transform: translateX(-12px); } 8%, 100% { opacity: 1; transform: none; } }
.flow.is-run .work li { animation: work 6s ease-in-out infinite both; }
.flow.is-run .work li:nth-child(1) { animation-delay: 1.4s; }
.flow.is-run .work li:nth-child(2) { animation-delay: 1.9s; }
.flow.is-run .work li:nth-child(3) { animation-delay: 2.4s; }
.flow.is-run .work li:nth-child(4) { animation-delay: 2.9s; }
@keyframes work { 0%, 100% { background: rgba(255,255,255,.08); color: var(--on-dark-2); } 6%, 14% { background: var(--cyan); color: var(--navy); } 22% { background: rgba(21,216,234,.18); color: #fff; } }
.flow.is-run .out li { animation: out-in 6s var(--ease) infinite both; }
.flow.is-run .out li:nth-child(1) { animation-delay: 3.4s; }
.flow.is-run .out li:nth-child(2) { animation-delay: 3.65s; }
.flow.is-run .out li:nth-child(3) { animation-delay: 3.9s; }
.flow.is-run .out li:nth-child(4) { animation-delay: 4.15s; }
@keyframes out-in { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 8%, 100% { opacity: 1; transform: none; } }
.flow.is-run .node:first-child { animation: glow-node 6s ease-in-out infinite; }
.flow.is-run .node:last-child { animation: glow-node 6s ease-in-out 3.4s infinite; }
@keyframes glow-node { 0%, 100% { box-shadow: 0 0 0 0 rgba(28,95,212,0); } 10% { box-shadow: 0 0 0 4px rgba(28,95,212,.14); } 30% { box-shadow: 0 0 0 0 rgba(28,95,212,0); } }
.flow.is-swapping [data-emr] { opacity: 0; }
.link { position: relative; align-self: center; height: 2px; background: var(--line); margin: 0 10px; overflow: hidden; }
.link { overflow: visible; }
.link i { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(21,216,234,.18); opacity: 0; animation: packet 2s var(--ease) infinite; }
.link i:nth-child(2) { animation-delay: .66s; background: var(--blue); box-shadow: 0 0 0 4px rgba(28,95,212,.16); }
.link i:nth-child(3) { animation-delay: 1.33s; background: #8b6cff; box-shadow: 0 0 0 4px rgba(139,108,255,.16); }
@keyframes packet { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
.facts { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.facts li { color: var(--slate); border-top: 2px solid var(--blue); padding-top: 16px; font-size: 15px; }
.facts b { color: var(--ink); display: block; margin-bottom: 4px; }

/* Mobile app */
.mobile-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.mobile-copy { max-width: 40rem; }
.app-block { padding-bottom: 6px; }
.app-block .btn-store { margin-top: 20px; }
.lede-dark { color: var(--slate); font-size: 17px; max-width: 32rem; margin: 22px 0 28px; }
.app-card { display: flex; align-items: center; gap: 16px; }
.app-card img { width: 72px; height: 72px; border-radius: 17px; box-shadow: 0 6px 18px rgba(8, 35, 65, .14); }
.app-card b { font: 600 19px/1.2 var(--display); display: block; }
.app-card small { color: var(--slate); font-size: 14px; }
.note { font-size: 13px; color: var(--slate); margin: 12px 0 0; }
.gallery { margin-top: clamp(36px, 5vw, 56px); }
.gallery-track {
  list-style: none; margin: 0; display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 10px max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))) 30px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter)));
  cursor: grab; user-select: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.gallery-track li { flex: 0 0 clamp(190px, 21vw, 250px); scroll-snap-align: start; }
.gallery-track img { width: 100%; height: auto; border-radius: 22px; box-shadow: 0 18px 40px -18px rgba(8, 35, 65, .4); transition: transform .4s var(--ease), box-shadow .4s var(--ease); pointer-events: none; }
.gallery-track li:hover img { transform: translateY(-6px); box-shadow: 0 26px 50px -20px rgba(8, 35, 65, .45); }
.gallery-track:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.gallery-nav { display: flex; align-items: center; gap: 16px; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.gal-btn { all: unset; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 18px; transition: background-color .2s, color .2s, border-color .2s; }
.gal-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.gal-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.gal-progress { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.gal-progress i { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); transition: transform .2s linear; }

/* Security */
.sec-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sec-grid li { background: #fff; padding: 26px 22px; display: flex; flex-direction: column; gap: 8px; }
.sec-grid b { font: 600 17px/1.3 var(--display); }
.sec-grid span { color: var(--slate); font-size: 14.5px; }
.sec-links { display: flex; gap: 24px; margin: 26px 0 0; font-size: 14px; }
.sec-links a { color: var(--blue); text-underline-offset: 3px; }

/* closing + footer */
.closing { background: var(--navy); text-align: center; padding: clamp(80px, 11vw, 140px) 0; }
.closing h2 { font-size: clamp(30px, 4vw, 54px); line-height: 1.08; margin: 0 auto 32px; max-width: 18ch; color: #fff; }
.foot { background: #fff; color: var(--slate); padding: 30px 0; font-size: 14px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot img { width: 150px; height: auto; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .rail { display: none; }
  .step-card { margin-left: var(--gutter); }
}
@media (max-width: 900px) {
  .mobile-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .step { min-height: 100vh; min-height: 100svh; align-items: flex-end; padding-bottom: 12vh; }
  .step-card, .step-right .step-card {
    width: auto; margin: 0 var(--gutter);
    background: rgba(3, 15, 43, .78);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border: 1px solid rgba(159, 182, 216, .16);
    border-radius: var(--radius);
    padding: 22px;
  }
  .feat { grid-template-columns: 1fr; }
  .feat-stage { position: static; min-height: 0; }
  .flow { grid-template-columns: 1fr; gap: 0; }
  .link { width: 2px; height: 36px; margin: 0 auto; }
  .link i { left: 50%; top: 0; margin: -5px 0 0 -5px; animation-name: packetdown; }
  @keyframes packetdown { 0% { top: 0; opacity: 0; } 12%, 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
  .facts { grid-template-columns: 1fr; gap: 18px; }
  .sec-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hero { align-items: flex-end; padding-bottom: 96px; }
  .btn { padding: 14px 18px; }
  .btn-nav { padding: 9px 13px; }
  .brand-word small { display: none; }
  .brand img { width: 40px; height: 40px; }
  .brand-word b { font-size: 21px; }
  .knob-row { margin-top: 18px; }
  .sec-grid { grid-template-columns: 1fr; }
  .mock-note dl { grid-template-columns: 1fr; gap: 2px; }
  .mock-note dd { margin-bottom: 8px; }
  .mock-img { grid-template-columns: 90px 1fr; }
  .switch { display: grid; width: 100%; }
  .switch button { padding: 11px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .step-card > *, .reveal { opacity: 1; transform: none; }
}

#platform, #emr, #mobile, #security { scroll-margin-top: 72px; }
