/* ══════════════════════════════════════════
   MedLab LIS — Marketing site
   Palette drawn straight from the product itself (navy #0d3b66, the same
   status-badge colors used on every sample in the app) plus one fresh
   accent (teal) reserved for calls to action, so it never competes with
   the badge colors it's standing next to.
   ══════════════════════════════════════════ */

:root {
  --navy-950: #071b30;
  --navy-900: #0d3b66;
  --navy-800: #123f6b;
  --navy-700: #17568f;
  --ink: #1a1a2e;
  --ink-soft: #4a5265;
  --paper: #f7f9fb;
  --white: #ffffff;
  --line: #e4e9f0;
  --teal: #0f9d8c;
  --teal-dark: #0b7d70;
  --amber: #b05e00;
  --green: #2e7d32;
  --purple: #6a1b9a;

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --shadow-sm: 0 1px 3px rgba(7, 27, 48, .06);
  --shadow-md: 0 8px 24px rgba(7, 27, 48, .09);
  --shadow-lg: 0 20px 48px rgba(7, 27, 48, .16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); color: var(--navy-950); line-height: 1.15; letter-spacing: -.01em; }
p { color: var(--ink-soft); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 700px; }

/* ══ BUTTONS ══ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--navy-900); color: #fff; }
.btn-solid:hover { background: var(--navy-800); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn-outline:hover { background: var(--navy-900); color: #fff; }
.btn-accent { background: var(--teal); color: #fff; }
.btn-accent:hover { background: var(--teal-dark); box-shadow: 0 10px 26px rgba(15, 157, 140, .35); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--navy-900); }
.btn-ghost:hover { text-decoration: underline; }
.btn-lg { padding: 13px 24px; font-size: 14.5px; }
.btn-block { width: 100%; }

/* ══ NAV ══ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 249, 251, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.nav.scrolled { background: rgba(255, 255, 255, .92); border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--navy-950); }
.nav-brand strong { font-weight: 700; }
.nav-brand-icon { font-size: 19px; }
.nav-links { display: flex; gap: 26px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.nav-links a:hover { color: var(--navy-900); }
.nav-actions { display: flex; gap: 10px; }
.nav-burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { width: 20px; height: 2px; background: var(--navy-950); border-radius: 2px; }
.nav-mobile { display: none; flex-direction: column; gap: 4px; padding: 8px 28px 18px; }
.nav-mobile a:not(.btn) { padding: 10px 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.nav-mobile .btn { margin-top: 8px; }

/* ══ HERO ══ */
.hero { position: relative; overflow: hidden; padding: 70px 0 90px; }
.hero-bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 720px;
  background:
    radial-gradient(560px 360px at 82% 10%, rgba(15,157,140,.16), transparent 60%),
    radial-gradient(640px 420px at 8% 30%, rgba(13,59,102,.10), transparent 60%);
  filter: blur(2px);
  z-index: -1;
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--teal-dark);
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; margin-bottom: 18px; }
.hero-sub { font-size: 15.5px; max-width: 46ch; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-facts { display: flex; flex-direction: column; gap: 10px; }
.hero-fact { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.hero-fact-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-registered { background: var(--green); }
.dot-workarea { background: var(--purple); }
.dot-authenticated { background: var(--teal); }

/* ── Hero pipeline widget (signature element) ── */
.hero-widget { display: flex; justify-content: center; }
.pipeline-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-lg);
  transform: rotate(1deg);
}
.pipeline-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pipeline-title { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--navy-950); }
.pipeline-live { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .08em; }
.pipeline-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(15,157,140,.6); animation: pulse-dot 1.8s infinite; }
.pipeline-visit { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); margin-bottom: 22px; }
.pipeline-visit b { color: var(--navy-900); font-weight: 600; }

.pipeline-track { position: relative; display: flex; justify-content: space-between; margin-bottom: 20px; padding: 0 2px; }
.pipeline-line { position: absolute; top: 6px; left: 8px; right: 8px; height: 2px; background: var(--line); z-index: 0; }
.pipeline-line-fill { position: absolute; top: 6px; left: 8px; height: 2px; width: 0%; background: var(--teal); z-index: 1; transition: width .5s ease; }
.pipeline-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 25%; }
.pipeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 2px solid var(--line); transition: background .3s ease, border-color .3s ease, transform .3s ease; }
.pipeline-stage label { font-size: 9.5px; font-weight: 600; color: var(--ink-soft); text-align: center; letter-spacing: .01em; }
.pipeline-stage.done .pipeline-dot { background: var(--teal); border-color: var(--teal); }
.pipeline-stage.active .pipeline-dot { background: var(--white); border-color: var(--teal); transform: scale(1.25); box-shadow: 0 0 0 4px rgba(15,157,140,.15); }
.pipeline-stage.active label { color: var(--navy-900); }

.pipeline-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px dashed var(--line); }
.pipeline-badge { font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 10px; background: #e8f5e9; color: var(--green); transition: background .3s ease, color .3s ease; }
.pipeline-tat { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }
.pipeline-tat b { color: var(--navy-950); }

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(15,157,140,.5); }
  70% { box-shadow: 0 0 0 7px rgba(15,157,140,0); }
  100% { box-shadow: 0 0 0 0 rgba(15,157,140,0); }
}

/* ══ SECTIONS ══ */
.section { padding: 84px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 620px; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; margin-top: 6px; }
.section-sub { margin-top: 12px; font-size: 14.5px; }

/* ══ FEATURES ══ */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 22px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d6dde7; }
.feature-icon { font-size: 26px; margin-bottom: 14px; transition: transform .3s ease; }
.feature-card:hover .feature-icon { transform: scale(1.12) rotate(-3deg); }
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 13px; line-height: 1.55; }

/* ── AI anomaly card: small radar-pulse behind the icon ── */
.feature-card-ai { position: relative; overflow: hidden; }
.feature-icon-ai { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; }
.ai-radar-ring {
  position: absolute;
  inset: -10px;
  border: 1.5px solid var(--teal);
  border-radius: 50%;
  opacity: 0;
  animation: ai-radar 2.6s ease-out infinite;
}
.ai-radar-ring-2 { animation-delay: 1.3s; }
@keyframes ai-radar {
  0% { transform: scale(.55); opacity: .55; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* ── Inventory icon: gentle restock bounce ── */
.feature-icon-inv { display: inline-block; animation: inv-bounce 3.2s ease-in-out infinite; }
@keyframes inv-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ══ PORTALS ══ */
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.portal-card {
  display: block;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 32px 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.portal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal); background: var(--white); }
.portal-icon { font-size: 30px; margin-bottom: 14px; }
.portal-card h3 { font-size: 19px; margin-bottom: 8px; }
.portal-card p { font-size: 13.5px; margin-bottom: 18px; }
.portal-link { font-size: 13px; font-weight: 700; color: var(--teal-dark); }

/* ══ APPLY FORM ══ */
.apply-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 12px; font-weight: 600; color: var(--navy-950); }
.form-field .optional { font-weight: 400; color: #a3acbb; }
.form-field input, .form-field textarea {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
  resize: vertical;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--teal); background: var(--white); }
.apply-hint { text-align: center; font-size: 11.5px; color: #9aa3b2; }
.apply-msg { font-size: 13px; font-weight: 600; padding: 11px 14px; border-radius: 8px; }
.apply-msg.ok { background: #e8f5e9; color: var(--green); }
.apply-msg.err { background: #fdecea; color: #c0392b; }

/* ══ FOOTER ══ */
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-brand { font-size: 15px; }
.footer-links { display: flex; gap: 20px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); flex-wrap: wrap; }
.footer-links a:hover { color: var(--navy-900); }
.footer-contact { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }

/* ══ SCROLL REVEAL ══ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--delay, 0ms); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ══ RESPONSIVE ══ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-widget { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 720px) {
  .nav-actions { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile.open { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .portal-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 60px; }
  .section { padding: 60px 0; }
}

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