/* ==========================================================================
   MEDIVO DESIGN SYSTEM & STYLESHEET
   Version: 2.0.0
   Typography: Space Grotesk (Headings), Inter (Body), JetBrains Mono (Meta)
   ========================================================================== */

/* ============ CSS VARIABLES & DESIGN TOKENS ============ */
:root {
  /* Core Color Palette (Light Mode - Clinical Warmth & High Contrast) */
  --bg: #F5F7F2;
  --bg-subtle: #EBF0E6;
  --surface: #FFFFFF;
  --surface-2: #E8EDE2;
  --surface-elevated: #FFFFFF;
  --border: #D5DCD0;
  --border-subtle: #E3E9DF;
  --text: #13221C;
  --text-muted: #4A5B52;
  --text-faint: #7E9085;
  
  /* Brand Accent Tokens (Teal Standard) */
  --accent: #157365;
  --accent-hover: #115D52;
  --accent-soft: #DCEDE9;
  --accent-soft-hover: #CBE4DE;
  --accent-contrast: #FFFFFF;
  --accent-glow: rgba(21, 115, 101, 0.25);
  
  /* Secondary & Status Accents */
  --warm: #D4741B;
  --warm-soft: #FAECDB;
  --warm-contrast: #FFFFFF;
  --danger: #BD3A24;
  --danger-soft: #FDE8E4;
  --success: #1E874B;
  --success-soft: #DCF2E4;
  --info: #2B6CB0;
  --info-soft: #E1EEFC;

  /* Shadows */
  --shadow-sm: 0 4px 14px -4px rgba(18, 38, 30, 0.08), 0 2px 6px -2px rgba(18, 38, 30, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(18, 38, 30, 0.12), 0 4px 12px -2px rgba(18, 38, 30, 0.06);
  --shadow-lg: 0 24px 60px -15px rgba(18, 38, 30, 0.18), 0 8px 24px -6px rgba(18, 38, 30, 0.08);
  --shadow-mockup: 0 35px 90px -25px rgba(12, 32, 24, 0.3), 0 0 0 1px var(--border);
  --shadow-glow: 0 0 40px -10px var(--accent-glow);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout & Animation */
  --maxw: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: all 0.25s var(--ease);
}

/* ============ DARK MODE THEME ============ */
html[data-theme="dark"] {
  --bg: #0A1412;
  --bg-subtle: #0F1D1A;
  --surface: #122420;
  --surface-2: #18302B;
  --surface-elevated: #1E3B35;
  --border: #20423A;
  --border-subtle: #19352F;
  --text: #EAF4EE;
  --text-muted: #9BB3A7;
  --text-faint: #637F73;
  
  --accent: #2EB69F;
  --accent-hover: #3ED5BB;
  --accent-soft: #123832;
  --accent-soft-hover: #194840;
  --accent-contrast: #041B17;
  --accent-glow: rgba(46, 182, 159, 0.35);

  --warm: #E69138;
  --warm-soft: #382410;
  --danger: #E86B52;
  --danger-soft: #3E1B15;
  --success: #36BA6E;
  --success-soft: #123420;
  --info: #4F94E0;
  --info-soft: #152940;

  --shadow-sm: 0 4px 14px -4px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 14px 34px -8px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 28px 75px -15px rgba(0, 0, 0, 0.85);
  --shadow-mockup: 0 40px 100px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px var(--border);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
  position: relative;
}

img, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
}

p {
  margin: 0;
}

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ============ UTILITY CLASSES ============ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.section-pad {
  padding: 130px 0;
  position: relative;
}

@media (max-width: 900px) {
  .section-pad {
    padding: 85px 0;
  }
  .wrap {
    padding: 0 20px;
  }
}

.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}

h2.headline {
  font-size: clamp(32px, 4.6vw, 52px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.lede {
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 18px;
  max-width: 58ch;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background 0.22s, border-color 0.22s, color 0.22s;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 4px 16px -2px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -4px var(--accent-glow);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 13.5px;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 17px;
}

/* ============ SCROLL PROGRESS BAR ============ */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  z-index: 1100;
  transition: width 0.1s linear;
}

/* ============ NAVBAR ============ */
header.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 22px 0;
  transition: padding 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  border-bottom: 1px solid transparent;
}

header.nav.scrolled {
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--warm));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px -2px var(--accent-glow);
}

.logo-mark::after {
  content: "+";
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(15deg);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

.icon-sun { display: none; }
html[data-theme="dark"] .icon-sun { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}

.burger span, .burger span::before, .burger span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: 0.25s;
}

.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }

#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  gap: 14px;
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease);
}

#mobile-menu.open {
  transform: translateY(0);
}

#mobile-menu a {
  font-family: var(--font-display);
  font-size: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
  .nav-links, #navCtaDesktop { display: none; }
  .burger { display: flex; }
}

/* ============ HERO SECTION ============ */
.hero {
  padding: 175px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-canvas-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.7;
  z-index: 0;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--accent);
  top: -240px;
  right: -180px;
  opacity: 0.28;
}

.blob-2 {
  width: 450px;
  height: 450px;
  background: var(--warm);
  bottom: -150px;
  left: -120px;
  opacity: 0.18;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(38px, 6.2vw, 68px);
  line-height: 1.06;
  margin-top: 10px;
  letter-spacing: -0.03em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), var(--warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: 13.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.hero-trust-badge span.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ============ INTERACTIVE HERO APP MOCKUP ============ */
.hero-stage {
  margin-top: 60px;
  position: relative;
  z-index: 1;
}

.mock-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-mockup);
  overflow: hidden;
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.mock-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.mock-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.mock-dots span:nth-child(1) { background: #FF5F56; }
.mock-dots span:nth-child(2) { background: #FFBD2E; }
.mock-dots span:nth-child(3) { background: #27C93F; }

.mock-address-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--success);
}
.mock-live-indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.mock-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 480px;
  background: var(--surface);
}

.mock-sidebar {
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mock-clinic-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mock-clinic-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.mock-clinic-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.2;
}

.mock-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}

.mock-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.mock-nav-item:hover:not(.active) {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--text);
}

.mock-content {
  padding: 26px 30px;
  overflow-y: auto;
  text-align: left;
}

.mock-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.mock-stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.mock-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.mock-stat-card .val {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.mock-stat-card .lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.mock-stat-card .trend {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.mock-stat-card .trend.up { background: var(--success-soft); color: var(--success); }
.mock-stat-card .trend.steady { background: var(--accent-soft); color: var(--accent); }

.mock-dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.mock-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}

.mock-panel-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-patient-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mock-patient-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.mock-patient-table td {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.mock-patient-table tr:last-child td {
  border-bottom: none;
}

.badge-status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  font-weight: 500;
}

.badge-status.waiting { background: var(--warm-soft); color: var(--warm); }
.badge-status.consulted { background: var(--accent-soft); color: var(--accent); }
.badge-status.billed { background: var(--info-soft); color: var(--info); }
.badge-status.done { background: var(--success-soft); color: var(--success); }

@media (max-width: 900px) {
  .mock-layout { grid-template-columns: 1fr; }
  .mock-sidebar { display: none; }
  .mock-stat-cards { grid-template-columns: repeat(2, 1fr); }
  .mock-dashboard-grid { grid-template-columns: 1fr; }
}

/* ============ FLOATING MOTION BADGES ============ */
.hero-floating-badge {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 3;
  animation: floatSlow 6s ease-in-out infinite;
}

.float-badge-1 {
  top: 15%;
  left: -20px;
}

.float-badge-2 {
  bottom: 20%;
  right: -25px;
  animation-delay: 2s;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 1024px) {
  .hero-floating-badge { display: none; }
}

/* ============ REVEAL ON SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.reveal-delay-1.visible { transition-delay: 0.1s; }
.reveal-delay-2.visible { transition-delay: 0.2s; }
.reveal-delay-3.visible { transition-delay: 0.3s; }
.reveal-delay-4.visible { transition-delay: 0.4s; }

/* ============ PROBLEM SECTION ============ */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 60px;
}

.problem-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.problem-card {
  display: flex;
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.problem-card:hover {
  border-color: var(--danger);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.problem-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.problem-card h4 {
  font-size: 17px;
  margin-bottom: 4px;
}

.problem-card p {
  font-size: 14px;
  color: var(--text-muted);
}

.problem-visual-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.problem-visual-wrap img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.problem-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 20, 18, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #FFFFFF;
}

@media (max-width: 900px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* ============ BEFORE / WITH COMPARISON ============ */
.compare-section {
  background: var(--surface-2);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 56px;
}

.compare-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.compare-box.with-medivo {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.compare-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 20px;
  font-weight: 600;
}

.compare-box.without-medivo .compare-badge {
  background: var(--danger-soft);
  color: var(--danger);
}

.compare-box.with-medivo .compare-badge {
  background: var(--accent-soft);
  color: var(--accent);
}

.workflow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 28px;
}

.workflow-chain span {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.workflow-chain.connected span {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  font-weight: 600;
}

.workflow-chain .arrow {
  color: var(--text-faint);
  font-size: 12px;
}

.compare-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compare-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-muted);
}

.compare-item .marker {
  font-weight: 700;
  flex-shrink: 0;
  font-size: 16px;
}

.compare-box.without-medivo .marker { color: var(--danger); }
.compare-box.with-medivo .marker { color: var(--accent); }

@media (max-width: 860px) {
  .compare-grid { grid-template-columns: 1fr; }
}

/* ============ SIGNATURE PATIENT JOURNEY ============ */
.journey-track-wrap {
  position: relative;
  margin-top: 64px;
}

.journey-progress-line {
  position: absolute;
  top: 36px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: var(--border);
  z-index: 0;
}

.journey-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  transition: width 0.3s ease;
}

.journey-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.journey-step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  position: relative;
}

.journey-step-card:hover, .journey-step-card.active {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.step-node-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.step-number-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.journey-step-card h4 {
  font-size: 17px;
  margin-bottom: 8px;
}

.journey-step-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.mini-preview-frame {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 12px;
  font-size: 11.5px;
  font-family: var(--font-mono);
}

.mini-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
}
.mini-preview-row:last-child { border-bottom: none; }

@media (max-width: 1080px) {
  .journey-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .journey-progress-line { display: none; }
}

@media (max-width: 600px) {
  .journey-steps-grid { grid-template-columns: 1fr; }
}

/* ============ APPLICATION SHOWCASE & TABS ============ */
.showcase-container {
  margin-top: 60px;
}

.showcase-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
}
.showcase-tabs::-webkit-scrollbar { display: none; }

.showcase-tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition);
}

.showcase-tab-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.showcase-tab-btn.active {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: transparent;
  box-shadow: 0 4px 14px -2px var(--accent-glow);
}

.showcase-content-card {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  margin-top: 24px;
}

.showcase-content-card.active {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.showcase-text-col h3 {
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: 16px;
}

.showcase-text-col p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 24px;
}

.showcase-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.showcase-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
}

.showcase-features-list li svg {
  color: var(--accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.showcase-visual-col {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  .showcase-content-card.active {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

/* ============ OFFLINE & SYNC SECTION ============ */
.offline-banner {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.offline-flow-diagram {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
}

.flow-node.active-sync {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.flow-arrow-down {
  text-align: center;
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 900px) {
  .offline-banner {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }
}

/* ============ ROLE SOLUTIONS CARDS ============ */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.role-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.role-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 16px;
  font-weight: 600;
}

.role-card h4 {
  font-size: 20px;
  margin-bottom: 14px;
}

.role-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.role-card li {
  padding-left: 18px;
  position: relative;
}

.role-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

@media (max-width: 960px) {
  .roles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .roles-grid { grid-template-columns: 1fr; }
}

/* ============ MANAGEMENT VISIBILITY & METRICS ============ */
.metrics-section-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-top: 60px;
}

.interactive-chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.chart-bars-container {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 180px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar-pillar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent));
  border-radius: 6px 6px 2px 2px;
  transition: height 1s var(--ease), background 0.3s;
}

.chart-bar-pillar:hover {
  background: var(--warm);
}

.chart-bar-day {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

@media (max-width: 900px) {
  .metrics-section-grid { grid-template-columns: 1fr; }
}

/* ============ INTERACTIVE CLINIC CUSTOMIZER ============ */
.customizer-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  margin-top: 56px;
  align-items: center;
}

.swatch-picker {
  display: flex;
  gap: 12px;
  margin: 18px 0 28px;
}

.swatch-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
}

.swatch-btn:hover {
  transform: scale(1.15);
}

.swatch-btn.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg);
}

.demo-card-live {
  background: var(--demo-bg, var(--surface));
  border: 1px solid var(--demo-border, var(--border));
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

@media (max-width: 900px) {
  .customizer-box {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
}

/* ============ DAY IN THE LIFE TIMELINE ============ */
.day-timeline {
  max-width: 720px;
  margin: 60px auto 0;
  position: relative;
}

.day-timeline::before {
  content: "";
  position: absolute;
  left: 85px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border);
}

.timeline-row {
  display: grid;
  grid-template-columns: 85px 1fr;
  gap: 32px;
  padding: 20px 0;
  position: relative;
}

.timeline-row .time-stamp {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
  padding-top: 2px;
}

.timeline-row .node-dot {
  position: absolute;
  left: 80px;
  top: 25px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg);
}

.timeline-row h4 {
  font-size: 17px;
  margin-bottom: 4px;
}

.timeline-row p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============ CONTACT & DEMO REQUEST FORM ============ */
.contact-section {
  background: var(--surface-2);
}

.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  margin-top: 60px;
}

.contact-card-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.form-control {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--surface);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-feedback {
  display: none;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 24px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.form-feedback.show {
  display: block;
}

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .form-group-row { grid-template-columns: 1fr; }
  .contact-card-box { padding: 28px 20px; }
}

/* ============ FOOTER ============ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 60px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14.5px;
  color: var(--text-muted);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}

/* ============ COOKIE CONSENT BANNER & MODAL ============ */
#cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  display: none;
  animation: slideUp 0.4s var(--ease);
}

#cookie-banner.show {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-content h4 {
  font-size: 17px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-content p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Cookie Preferences Modal */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal-backdrop.show {
  display: flex;
}

.cookie-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-category {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.cookie-category:last-of-type { border-bottom: none; }

.cookie-cat-info h5 {
  font-size: 15px;
  margin-bottom: 4px;
}

.cookie-cat-info p {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  transition: 0.3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent); }
input:checked + .slider:before { transform: translateX(20px); }
input:disabled + .slider { opacity: 0.6; cursor: not-allowed; }

/* ============ LEGAL / PRIVACY & TERMS CONTENT ============ */
.legal-page-header {
  padding: 160px 0 60px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.legal-content-body {
  padding: 70px 0 100px;
  max-width: 820px;
  margin: 0 auto;
}

.legal-content-body h2 {
  font-size: 26px;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content-body h3 {
  font-size: 20px;
  margin: 24px 0 10px;
}

.legal-content-body p, .legal-content-body ul {
  font-size: 15.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

.legal-content-body ul {
  list-style: disc;
  padding-left: 24px;
}

.legal-content-body li {
  margin-bottom: 8px;
}
