/* ═══════════════════════════════════════════════════════════════════
   AVD Clinical — Shared Design System v2
   Inspired by Medidata, Veeva, athenahealth design language
   Link this in ALL pages before the inline <style> block
   ═══════════════════════════════════════════════════════════════════ */

/* ── PREMIUM TYPOGRAPHY ─────────────────────────────────────────────
   Plus Jakarta Sans: display/headlines — used by Stripe, Linear, etc.
   Inter: body copy — the gold standard for enterprise SaaS
   ──────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,opsz,wght@0,6..18,300..800;1,6..18,300..800&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ── ROOT OVERRIDES ─────────────────────────────────────────────────── */
:root {
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Elevated shadow system */
  --shadow:     0 1px 3px rgba(0,43,77,.06), 0 4px 16px rgba(0,43,77,.07);
  --shadow-lg:  0 4px 12px rgba(0,43,77,.08), 0 16px 48px rgba(0,43,77,.12);
  --shadow-xl:  0 8px 24px rgba(0,43,77,.10), 0 40px 80px rgba(0,43,77,.18);
  --shadow-glow: 0 0 0 1px rgba(102,234,163,.2), 0 8px 32px rgba(102,234,163,.25);

  /* Border radius */
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 100px;
}

/* ── BASE RENDERING ──────────────────────────────────────────────────── */
html {
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  padding-top: 68px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -.025em;
  line-height: 1.1;
}

/* ── NAV UPGRADE ─────────────────────────────────────────────────────── */
nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 68px !important;
  background: rgba(0, 15, 40, 0.97) !important;
  backdrop-filter: blur(24px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 8px 32px rgba(0,0,0,.35) !important;
  padding: 0 3rem !important;
  box-sizing: border-box !important;
}

.nav-logo {
  gap: .75rem !important;
}

.nav-logo img {
  height: 36px !important;
}

.nav-logo .nav-text {
  display: none !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  letter-spacing: -.025em !important;
  color: #ffffff !important;
  line-height: 1.15 !important;
}
.nav-logo img.failed + .nav-text {
  display: block !important;
}

.nav-logo-sub {
  display: block;
  font-family: var(--font-body);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.38);
  line-height: 1;
  margin-top: .1rem;
}

.nav-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 1.75rem !important;
  flex-wrap: nowrap !important;
}

.nav-links li {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.nav-links a {
  font-family: var(--font-body) !important;
  font-size: .825rem !important;
  font-weight: 500 !important;
  letter-spacing: -.01em !important;
  color: rgba(255,255,255,.88) !important;
  transition: color .15s ease !important;
  text-decoration: none;
}

.nav-links a:hover {
  color: rgba(255,255,255,.95) !important;
}

.nav-links a.active,
.nav-links a[style*="color:#09C4A0"],
.nav-links a[style*="color:#66EAA3"] {
  color: #66EAA3 !important;
  font-weight: 600 !important;
}

/* Nav Login: outlined pill button */
a.nav-login,
.nav-links a.nav-login,
li a.nav-login {
  border: 1.5px solid rgba(255,255,255,.35) !important;
  color: rgba(255,255,255,.88) !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: .8rem !important;
  padding: .45rem 1.1rem !important;
  border-radius: var(--radius-pill) !important;
  letter-spacing: -.01em !important;
  transition: border-color .15s ease, color .15s ease !important;
  white-space: nowrap !important;
}
a.nav-login:hover,
.nav-links a.nav-login:hover {
  border-color: #66EAA3 !important;
  color: #66EAA3 !important;
}

/* Nav CTA: pill-shaped gradient button */
a.nav-cta,
.nav-links a.nav-cta,
li a.nav-cta {
  background: linear-gradient(135deg, #66EAA3 0%, #2EB375 100%) !important;
  color: #001830 !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  font-size: .8rem !important;
  padding: .5rem 1.35rem !important;
  border-radius: var(--radius-pill) !important;
  letter-spacing: -.01em !important;
  box-shadow: 0 2px 12px rgba(102,234,163,.28) !important;
  transition: transform .15s ease, box-shadow .15s ease !important;
  white-space: nowrap !important;
}

a.nav-cta:hover,
.nav-links a.nav-cta:hover,
li a.nav-cta:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 20px rgba(102,234,163,.45) !important;
  color: #001830 !important;
}

/* ── BUTTON SYSTEM ───────────────────────────────────────────────────── */
/* Override existing btn-primary with pill style */
.btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  gap: .5rem !important;
  background: linear-gradient(135deg, #66EAA3 0%, #2EB375 100%) !important;
  color: #001830 !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  font-size: .9rem !important;
  padding: .8rem 1.85rem !important;
  border-radius: var(--radius-pill) !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform .15s ease, box-shadow .15s ease !important;
  box-shadow: 0 2px 16px rgba(102,234,163,.32) !important;
  letter-spacing: -.01em !important;
  white-space: nowrap !important;
}

.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 28px rgba(102,234,163,.48) !important;
}

/* Secondary / ghost button upgrade */
.btn-ghost, .btn-secondary {
  display: inline-flex !important;
  align-items: center !important;
  gap: .5rem !important;
  background: rgba(255,255,255,.07) !important;
  color: rgba(255,255,255,.85) !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  font-size: .9rem !important;
  padding: .8rem 1.85rem !important;
  border-radius: var(--radius-pill) !important;
  text-decoration: none !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  cursor: pointer !important;
  transition: border-color .15s ease, color .15s ease, background .15s ease !important;
  letter-spacing: -.01em !important;
  white-space: nowrap !important;
}

.btn-ghost:hover, .btn-secondary:hover {
  border-color: rgba(255,255,255,.42) !important;
  color: #fff !important;
  background: rgba(255,255,255,.11) !important;
}

/* ── SECTION EYEBROW ─────────────────────────────────────────────────── */
.eyebrow, .section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2EB375;
  margin-bottom: .875rem;
}

/* ── TRUST / COMPLIANCE STRIP ────────────────────────────────────────── */
.avd-trust-strip {
  padding: 1.1rem 0;
  background: #ffffff;
  border-bottom: 1px solid #F0F4F8;
  overflow: hidden;
}

.avd-trust-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.avd-trust-label {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9CA3AF;
  white-space: nowrap;
  flex-shrink: 0;
  padding-right: 1rem;
  border-right: 1px solid #E5E7EB;
}

.avd-trust-logos {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
}

.avd-trust-item {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #6B7280;
  white-space: nowrap;
  padding: .3rem .75rem;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  background: #FAFAFA;
  transition: color .2s, border-color .2s, background .2s;
  cursor: default;
}

.avd-trust-item:hover {
  color: #374151;
  border-color: #D1D5DB;
  background: #F3F4F6;
}

/* ── VIDEO MODAL ─────────────────────────────────────────────────────── */
.avd-video-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,5,20,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

.avd-video-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.avd-video-container {
  position: relative;
  width: 100%;
  max-width: 900px;
}

.avd-video-close {
  position: absolute;
  top: -48px;
  right: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.65);
  font-family: var(--font-body);
  font-size: .825rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: .35rem .75rem;
  border-radius: 6px;
  transition: color .15s, background .15s;
}

.avd-video-close:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.avd-video-frame {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 48px 120px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.06);
}

.avd-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Play button trigger */
.btn-watch {
  display: inline-flex;
  align-items: center;
  gap: .875rem;
  color: rgba(255,255,255,.75);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .875rem;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color .15s ease;
  letter-spacing: -.01em;
}

.btn-watch:hover {
  color: rgba(255,255,255,.95);
}

.btn-watch-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: background .15s, transform .15s, box-shadow .15s;
  flex-shrink: 0;
}

.btn-watch:hover .btn-watch-icon {
  background: rgba(102,234,163,.22);
  border-color: rgba(102,234,163,.45);
  transform: scale(1.08);
  box-shadow: 0 0 24px rgba(102,234,163,.25);
}

.btn-watch-icon svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  margin-left: 2px;
}

/* ── IN-PAGE VIDEO SECTION ───────────────────────────────────────────── */
.avd-video-section {
  padding: 6rem 2rem;
  background: #F5F9FC;
}

.avd-video-section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.avd-video-section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.avd-video-section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: #002B4D;
  letter-spacing: -.035em;
  margin-bottom: .75rem;
}

.avd-video-section-head p {
  font-size: 1rem;
  color: #6B7280;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.65;
}

.avd-video-embed {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,43,77,.18), 0 0 0 1px rgba(0,111,191,.08);
}

.avd-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── SCROLL REVEAL ───────────────────────────────────────────────────── */
.avd-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}

.avd-reveal.avd-visible {
  opacity: 1;
  transform: translateY(0);
}

.avd-reveal-d1 { transition-delay: .08s; }
.avd-reveal-d2 { transition-delay: .16s; }
.avd-reveal-d3 { transition-delay: .24s; }
.avd-reveal-d4 { transition-delay: .32s; }

/* ── HERO ANIMATION UPGRADES ─────────────────────────────────────────── */
@keyframes avdOrb1 {
  0%   { transform: translate(0, 0) scale(1); }
  40%  { transform: translate(60px, -50px) scale(1.12); }
  80%  { transform: translate(-30px, 30px) scale(.94); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes avdOrb2 {
  0%   { transform: translate(0, 0) scale(1); }
  35%  { transform: translate(-50px, 40px) scale(1.08); }
  70%  { transform: translate(40px, -30px) scale(.96); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero-glow {
  animation: avdOrb1 18s ease-in-out infinite !important;
}

.hero-glow2 {
  animation: avdOrb2 22s ease-in-out infinite !important;
}

/* Hero grid — more subtle */
.hero-grid {
  opacity: .5 !important;
}

/* ── STAT COUNTER ────────────────────────────────────────────────────── */
[data-avd-count] {
  font-variant-numeric: tabular-nums;
  transition: none;
}

/* ── ANIMATED GRADIENT MESH (hero enhancement) ───────────────────────── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 70% 50%, rgba(0,111,191,.12) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 20% 80%, rgba(46,179,117,.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  nav {
    padding: 0 1.5rem !important;
  }
}

@media (max-width: 768px) {
  .avd-trust-label {
    display: none;
  }
  .avd-trust-logos {
    gap: .75rem;
  }
  .avd-trust-item {
    font-size: .65rem;
    padding: .25rem .55rem;
  }
  .avd-video-section {
    padding: 4rem 1.25rem;
  }
}

/* ── FOOTER UPGRADE ──────────────────────────────────────────────────── */
footer {
  font-family: var(--font-body) !important;
}

footer h4, footer h5 {
  font-family: var(--font-display) !important;
  letter-spacing: -.02em !important;
}

/* ── MISC UTILITY ────────────────────────────────────────────────────── */
.font-display { font-family: var(--font-display) !important; }
.font-body    { font-family: var(--font-body) !important; }