/* ═══════════════════════════════════════════════════
   CLINICDX — COMPLETE REDESIGN CSS
   Offline AI Clinical Intelligence
   ═══════════════════════════════════════════════════ */

/* ── CSS VARIABLES ──────────────────────────────── */
:root {
  --brand-ink:    #0b2b3c;
  --brand-slate:  #4f6470;
  --brand-blue:   #0f6e8c;
  --brand-teal:   #14b8a6;
  --brand-mint:   #dff6f3;
  --brand-ice:    #f4fbfe;
  --brand-border: #e3edf2;
  --brand-coral:  #ff7b6b;
  --brand-dark:   #061824;

  --shadow-xs:   0 1px 4px rgba(11,43,60,0.06);
  --shadow-sm:   0 4px 16px rgba(11,43,60,0.08);
  --shadow-md:   0 12px 40px rgba(11,43,60,0.10);
  --shadow-lg:   0 24px 64px rgba(11,43,60,0.12);
  --shadow-teal: 0 16px 48px rgba(20,184,166,0.22);

  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;

  --nav-height: 68px;

  --font-display: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
}

/* ── RESET + BASE ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--brand-ink);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* ── TYPOGRAPHY ──────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--brand-ink);
}

h1 { font-size: clamp(2.3rem, 4.2vw, 3.9rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.8rem, 2.8vw, 2.7rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }

p { color: var(--brand-slate); margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

/* ── LAYOUT ──────────────────────────────────────── */
.container {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

.section { padding: 6rem 0; }
.section.alt { background: var(--brand-ice); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}
.btn-primary:hover { background: #0d5e78; box-shadow: 0 8px 24px rgba(15,110,140,0.35); }

.btn-ghost {
  background: #fff;
  color: var(--brand-ink);
  border-color: var(--brand-border);
}
.btn-ghost:hover { border-color: var(--brand-teal); color: var(--brand-teal); }

.btn-white {
  background: #fff;
  color: var(--brand-ink);
  border-color: #fff;
}
.btn-white:hover { background: var(--brand-ice); box-shadow: 0 8px 24px rgba(255,255,255,0.3); }

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }

/* ── SECTION HEADERS ─────────────────────────────── */
.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-teal);
  margin-bottom: 0.75rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-header h2 { margin-bottom: 1rem; }

.section-sub {
  font-size: 1.1rem;
  color: var(--brand-slate);
  line-height: 1.7;
}

/* ══════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(227,237,242,0.7);
  height: var(--nav-height);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--brand-ink);
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7);
  animation: logo-pulse 3s ease-in-out infinite;
  flex-shrink: 0;
}

.logo-mark.small { width: 26px; height: 26px; border-radius: 7px; }

@keyframes logo-pulse {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7), 0 0 0 0 rgba(20,184,166,0.4); }
  50% { box-shadow: inset 0 0 0 2px rgba(255,255,255,0.7), 0 0 0 7px rgba(20,184,166,0); }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand-slate);
}

.nav-link {
  position: relative;
  padding-bottom: 3px;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--brand-teal);
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 1px;
}

.nav-link:hover { color: var(--brand-ink); }
.nav-link:hover::after { width: 100%; }

.nav-actions { display: flex; gap: 0.6rem; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--brand-ink);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
  transform-origin: center;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: var(--nav-height);
  right: 0;
  width: min(320px, 85vw);
  height: calc(100vh - var(--nav-height));
  background: #fff;
  border-left: 1px solid var(--brand-border);
  padding: 2rem 1.5rem;
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  box-shadow: -12px 0 40px rgba(11,43,60,0.1);
}

.mobile-drawer.is-open { transform: translateX(0); }

.mobile-nav-link {
  display: block;
  padding: 0.85rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand-slate);
  border-bottom: 1px solid var(--brand-border);
  transition: color 0.2s ease;
}

.mobile-nav-link:hover { color: var(--brand-teal); }

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mobile-actions .btn { justify-content: center; }

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6,24,36,0.4);
  backdrop-filter: blur(4px);
  z-index: 998;
}

.drawer-overlay.is-visible { display: block; }

/* ══════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #fff;
}

/* Subtle warm gradient — visible until a hero-bg.jpg is dropped in */
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(20,184,166,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(15,110,140,0.05) 0%, transparent 50%);
  z-index: 0;
}

/* When hero-bg.jpg is present: background image + overlay for legibility */
/* .hero-bg.has-image {
  background-image: url('/hero-bg.jpg');
  background-size: cover;
  background-position: center 30%;
}
.hero-bg.has-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(6,24,36,0.78) 0%, rgba(11,43,60,0.5) 50%, transparent 100%);
} */

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 780px;
  padding: 5.5rem 0 4.5rem;
  position: relative;
  z-index: 2;
}

.kicker-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--brand-mint);
  color: var(--brand-blue);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid rgba(20,184,166,0.25);
  margin-bottom: 1.75rem;
}

/* Hero headline word stagger */
.hero-headline {
  margin-bottom: 1.5rem;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: wordReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.15s + var(--i) * 0.075s);
  color: var(--brand-ink);
}

.word.accent {
  color: var(--brand-teal);
}

@keyframes wordReveal {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--brand-slate);
  max-width: 620px;
  margin-bottom: 2.25rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.85s;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 1s;
}

/* ── STATS BAND ──────────────────────────────────── */
.stats-band {
  background: var(--brand-dark);
  padding: 3.5rem 0;
}

.stats-band-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  padding: 0 2rem;
  border-left: 1px solid rgba(255,255,255,0.08);
}

.stat-item:first-child { border-left: none; padding-left: 0; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 700;
  color: var(--brand-teal);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
}

@keyframes fadeIn { to { opacity: 1; } }


/* ══════════════════════════════════════════════════
   PROBLEM SECTION
   ══════════════════════════════════════════════════ */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.problem-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.problem-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.problem-icon {
  width: 52px; height: 52px;
  background: var(--brand-ice);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand-blue);
}

.problem-content { flex: 1; min-width: 0; }
.problem-content h3 { font-size: 1rem; margin-bottom: 0.3rem; }
.problem-content p { font-size: 0.875rem; margin: 0; }


/* ══════════════════════════════════════════════════
   SOLUTION OVERVIEW
   ══════════════════════════════════════════════════ */
.solution-overview { text-align: center; }

.solution-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.sys-pill {
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--brand-border);
  color: var(--brand-ink);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.solution-headline { max-width: 800px; margin-inline: auto; }
.solution-headline h2 { margin-bottom: 1.25rem; }

/* ══════════════════════════════════════════════════
   PRINCIPLES
   ══════════════════════════════════════════════════ */
.principles-section {
  background: #fff;
  padding: 6rem 0;
}

.principles-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
}

.principles-header h2 { margin-bottom: 1rem; }

.principles-sub {
  font-size: 1.05rem;
  color: var(--brand-slate);
  line-height: 1.7;
  margin: 0;
}

.principles-list {
  list-style: none;
  max-width: 860px;
  margin: 0 auto;
}

.principle-item {
  display: grid;
  grid-template-columns: 44px 240px 1fr;
  gap: 0 2.5rem;
  align-items: start;
  padding: 2rem 0;
  border-top: 1px solid var(--brand-border);
}

.principle-item:last-child {
  border-bottom: 1px solid var(--brand-border);
}

.principle-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.principle-title {
  color: var(--brand-ink);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.5;
  padding-top: 0.2rem;
}

.principle-desc {
  color: var(--brand-slate);
  font-size: 0.875rem;
  line-height: 1.75;
  margin: 0;
  padding-top: 0.2rem;
}

/* ══════════════════════════════════════════════════
   MODULES
   ══════════════════════════════════════════════════ */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.module-card {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  outline: none;
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20,184,166,0.04), rgba(15,110,140,0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.module-card:hover,
.module-card.is-active {
  transform: translateY(-6px);
  box-shadow: var(--shadow-teal);
  border-color: var(--brand-teal);
}

.module-card:hover::before,
.module-card.is-active::before { opacity: 1; }

.module-card:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 2px;
}

.module-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--brand-ice), var(--brand-mint));
  border: 1px solid rgba(20,184,166,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  margin-bottom: 1.25rem;
  transition: background 0.3s ease;
}

.module-card:hover .module-icon,
.module-card.is-active .module-icon {
  background: linear-gradient(135deg, var(--brand-mint), rgba(20,184,166,0.2));
}

.module-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.module-card p { font-size: 0.9rem; margin-bottom: 1.25rem; }

.module-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-teal);
  display: block;
  transition: gap 0.2s ease;
}

/* Module Detail Panels */
.module-detail-wrapper { position: relative; }

.module-detail {
  background: linear-gradient(135deg, var(--brand-ice) 0%, #fff 100%);
  border: 1px solid rgba(20,184,166,0.25);
  border-radius: var(--radius-xl);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.35s ease,
              margin-top 0.3s ease;
  position: relative;
}

.module-detail.is-open {
  max-height: 900px;
  opacity: 1;
  margin-top: 1.5rem;
}

.detail-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(11,43,60,0.06);
  border: 1px solid var(--brand-border);
  color: var(--brand-slate);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 5;
}

.detail-close:hover { background: var(--brand-ink); color: #fff; }

.detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 2.5rem;
  align-items: start;
}

.detail-copy h3 { margin-bottom: 0.75rem; color: var(--brand-ink); }
.detail-copy p { font-size: 0.95rem; margin-bottom: 1.25rem; line-height: 1.7; }

.detail-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-bullets li {
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--brand-slate);
  padding-left: 1.2rem;
  position: relative;
}

.detail-bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.85rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-teal);
}

/* Module Mockups */
.detail-mockup {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-dark);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  box-shadow: var(--shadow-md);
}

.mockup-header-bar {
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

/* CDS Mockup */
.mockup-cds .mockup-body {
  padding: 1.25rem;
  min-height: 220px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

.cds-line {
  margin-bottom: 0.4rem;
  opacity: 0;
  animation: cdsReveal 0.3s ease forwards;
}

.cds-line.header { color: var(--brand-teal); font-weight: 500; margin-top: 0.6rem; }
.cds-line.item { padding-left: 1rem; color: rgba(255,255,255,0.7); }
.cds-line.item::before { content: '  '; }
.cds-line.cite { color: rgba(255,255,255,0.3); font-size: 0.72rem; padding-top: 0.4rem; border-top: 1px solid rgba(255,255,255,0.07); margin-top: 0.4rem; }

@keyframes cdsReveal { to { opacity: 1; } }

/* Lab Mockup */
.mockup-lab { padding-bottom: 1.25rem; }

.lab-transform {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
}

.lab-paper {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.paper-lines { display: flex; flex-direction: column; gap: 8px; }

.paper-line {
  height: 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
  width: 100%;
}

.paper-line.short { width: 55%; }
.paper-line.medium { width: 75%; }

.scan-beam {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-teal), transparent);
  animation: scan 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--brand-teal);
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.lab-arrow {
  font-size: 1.5rem;
  color: var(--brand-teal);
  flex-shrink: 0;
  opacity: 0.7;
}

.lab-table { flex: 1.2; font-size: 0.75rem; }

.table-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.3rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
}

.table-row.header { color: rgba(255,255,255,0.4); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; }

.flag {
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.flag-low  { background: rgba(255,123,107,0.2); color: var(--brand-coral); }
.flag-high { background: rgba(255,193,7,0.2); color: #ffc107; }

.table-interpretation {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(20,184,166,0.1);
  border-left: 2px solid var(--brand-teal);
  border-radius: 4px;
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
  line-height: 1.5;
  grid-column: 1/-1;
}

/* Imaging Mockup */
.mockup-imaging { padding-bottom: 1.25rem; }

.dicom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 1rem;
}

.dicom-tile {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.dicom-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
}

.dicom-tile.highlight {
  background: rgba(255,123,107,0.25);
  border: 1px solid rgba(255,123,107,0.5);
  animation: dicom-pulse 2s ease-in-out infinite;
}

.dicom-tile.secondary-hl {
  background: rgba(255,193,7,0.15);
  border: 1px solid rgba(255,193,7,0.3);
}

@keyframes dicom-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,123,107,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(255,123,107,0); }
}

.imaging-findings {
  padding: 0 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.finding-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

.finding-label {
  color: var(--brand-teal);
  font-weight: 600;
  min-width: 65px;
}

.severity-badge {
  background: rgba(255,193,7,0.2);
  color: #ffc107;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Scribe Mockup */
.mockup-scribe { padding: 0 1.25rem 1.25rem; }

.scribe-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  border: 1px solid rgba(20,184,166,0.2);
}

.mic-icon { font-size: 1.1rem; flex-shrink: 0; }

.scribe-phrase {
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-style: italic;
}

.scribe-arrow {
  color: rgba(255,255,255,0.3);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.scribe-arrow span { font-size: 0.72rem; letter-spacing: 0.03em; }

.soap-note {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.soap-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}

.soap-label {
  min-width: 18px; height: 18px;
  background: var(--brand-teal);
  color: var(--brand-dark);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ══════════════════════════════════════════════════
   HOW IT WORKS
   ══════════════════════════════════════════════════ */
.steps-wrapper {
  position: relative;
  padding-top: 1rem;
}

.step-progress-track {
  position: absolute;
  top: 30px;
  left: calc(50% / 3);
  right: calc(50% / 3);
  height: 2px;
  background: var(--brand-border);
  border-radius: 1px;
  overflow: hidden;
}

.step-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-teal));
  width: 0%;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 1px;
}

.step-progress-fill.is-filled { width: 100%; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step {
  text-align: center;
  padding: 0 1rem;
}

.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 8px 24px rgba(20,184,166,0.3);
  position: relative;
  z-index: 1;
}

.step h4 { margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; }

/* ══════════════════════════════════════════════════
   OUTCOMES
   ══════════════════════════════════════════════════ */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.outcome-card {
  background: var(--brand-ice);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  border-top: 4px solid var(--card-color, var(--brand-teal));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.outcome-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.outcome-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--card-color, var(--brand-teal));
  margin-bottom: 0.9rem;
}

.outcome-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-ink);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.outcome-card p {
  font-size: 0.85rem;
  color: var(--brand-slate);
  line-height: 1.65;
  margin: 0;
}


/* ══════════════════════════════════════════════════
   AUDIENCE
   ══════════════════════════════════════════════════ */
.audience-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: var(--brand-ink);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.audience-cell {
  padding: 3rem 2.75rem;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  transition: filter 0.25s ease;
}

.audience-cell:hover { filter: brightness(1.06); }

/* Decorative large background icon */
.audience-cell::after {
  content: '';
  position: absolute;
  right: -1.5rem;
  bottom: -1.5rem;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

/* Cell colour themes */
.cell-teal  { background: var(--brand-teal); }
.cell-blue  { background: var(--brand-blue); }
.cell-ink   { background: #122c3a; }
.cell-coral { background: #e8604e; }

/* Icon pill */
.cell-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1.5rem;
}

/* Titles */
.audience-cell h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

/* List */
.cell-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cell-list li {
  color: rgba(255,255,255,0.92);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  padding-left: 1.1rem;
  position: relative;
}

.cell-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.52rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

/* ══════════════════════════════════════════════════
   DATA SOVEREIGNTY
   ══════════════════════════════════════════════════ */
.sovereignty-card {
  background: linear-gradient(135deg, rgba(20,184,166,0.08), rgba(15,110,140,0.06));
  border: 1px solid rgba(20,184,166,0.2);
  border-radius: var(--radius-xl);
  padding: 4rem;
  text-align: center;
  max-width: 880px;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
}

.sovereignty-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(20,184,166,0.12), transparent 60%);
  pointer-events: none;
}

.lock-icon {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, rgba(20,184,166,0.15), rgba(15,110,140,0.1));
  border: 1px solid rgba(20,184,166,0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-teal);
  margin: 0 auto 1.5rem;
  position: relative;
}

.sovereignty-card h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
  position: relative;
}

.sovereignty-sub {
  font-size: 1.05rem;
  color: var(--brand-slate);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  position: relative;
}

.sovereignty-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: left;
  position: relative;
}

.sov-point {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.sov-icon {
  color: var(--brand-teal);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.sov-point strong {
  display: block;
  font-size: 0.92rem;
  color: var(--brand-ink);
  margin-bottom: 0.3rem;
}

.sov-point p {
  font-size: 0.83rem;
  color: var(--brand-slate);
  line-height: 1.55;
  margin: 0;
}

/* ══════════════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════════════ */
.faq-list {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.is-open { border-color: rgba(20,184,166,0.35); }
.faq-item:hover { box-shadow: var(--shadow-sm); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-ink);
  transition: color 0.2s ease;
}

.faq-question:hover { color: var(--brand-blue); }

.faq-chevron {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--brand-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.faq-chevron::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  color: var(--brand-slate);
  transition: color 0.2s ease;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  background: var(--brand-teal);
  border-color: var(--brand-teal);
}

.faq-item.is-open .faq-chevron::before { color: #fff; }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.is-open .faq-answer { max-height: 400px; }

.faq-answer-inner {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid var(--brand-border);
  padding-top: 1rem;
}

.faq-answer-inner p {
  font-size: 0.9rem;
  color: var(--brand-slate);
  line-height: 1.7;
  margin: 0;
}

/* ══════════════════════════════════════════════════
   CTA SECTION
   ══════════════════════════════════════════════════ */
.cta-section {
  position: relative;
  padding: 7rem 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-ink) 0%, #0d4a61 50%, #0a3d52 100%);
}

.cta-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(20,184,166,0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 30%, rgba(15,110,140,0.25) 0%, transparent 40%),
    radial-gradient(ellipse at 60% 80%, rgba(20,184,166,0.1) 0%, transparent 35%);
  pointer-events: none;
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-inline: auto;
}

.cta-content h2 {
  color: #fff;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  margin-bottom: 1.25rem;
}

.cta-content p {
  color: rgba(255,255,255,0.65);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ══════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════ */
.site-footer {
  background: var(--brand-ink);
  padding: 4rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-brand .logo-text { color: #fff; }

.footer-brand p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.footer-license {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
}

.footer-license a {
  color: var(--brand-teal);
  opacity: 0.8;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col li, .footer-col p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.footer-col a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--brand-teal); }

/* ══════════════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════════════ */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════
   UTILITY ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤960px)
   ══════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }

  .hero-content { padding: 3.5rem 0 3rem; }


  .problem-grid { grid-template-columns: 1fr; }
  .problem-item { flex-wrap: wrap; }

  .principle-item { grid-template-columns: 44px 1fr; grid-template-rows: auto auto; }
  .principle-desc { grid-column: 2; }
  .modules-grid { grid-template-columns: 1fr 1fr; }
  .detail-inner { grid-template-columns: 1fr; gap: 2rem; }

  .steps-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .step-progress-track { display: none; }

  .outcomes-grid { grid-template-columns: 1fr; }

  .audience-table { grid-template-columns: 1fr 1fr; }

  .sovereignty-points { grid-template-columns: 1fr; gap: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1/-1; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤640px)
   ══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .section { padding: 4rem 0; }

  .hero { min-height: auto; }

  .hero-content { padding: 3rem 0 2.5rem; }

  .hero-headline { font-size: clamp(1.8rem, 7vw, 2.4rem); }

  .stats-band-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .stat-item { border-left: none; padding: 0; }

  .modules-grid { grid-template-columns: 1fr; }

  .audience-table { grid-template-columns: 1fr; }
  .audience-cell { min-height: auto; padding: 2.25rem 2rem; }

  .sovereignty-card { padding: 2rem 1.5rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }

  .cta-buttons { flex-direction: column; align-items: center; }

}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .word { opacity: 1 !important; transform: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero-sub, .hero-cta { opacity: 1 !important; }
}
