/* Gentle Dose - Landing Page & Documentation Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand Colors from Gentle Dose Flutter app */
  --primary: #1446a1;
  --primary-light: #407ce2;
  --primary-lighter: #87ceeb;
  --primary-dark: #0d2b63;
  --primary-rgb: 20, 70, 161;

  /* Accent & Functional */
  --accent-teal: #0ea5e9;
  --accent-cyan: #38bdf8;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);

  /* Light Theme */
  --bg-main: #f8fafd;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-surface: #ffffff;
  --border-color: rgba(20, 70, 161, 0.1);
  --border-subtle: rgba(20, 70, 161, 0.06);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-primary: #1446a1;
  --shadow-sm: 0 2px 8px rgba(20, 70, 161, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 70, 161, 0.08);
  --shadow-lg: 0 20px 40px rgba(20, 70, 161, 0.12);
  --shadow-phone: 0 25px 60px -15px rgba(20, 70, 161, 0.25);
  --code-bg: #0f172a;
  --code-header: #1e293b;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.6);

  /* Fonts */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --container-max: 1280px;
  --nav-height: 76px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-main: #070d19;
  --bg-card: #0f192c;
  --bg-card-subtle: #17243d;
  --bg-surface: #111e36;
  --border-color: rgba(64, 124, 226, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-primary: #60a5fa;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-phone: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  --code-bg: #0b1120;
  --code-header: #131c31;
  --glass-bg: rgba(15, 25, 44, 0.85);
  --glass-border: rgba(64, 124, 226, 0.2);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Background Gradients & Glows */
.bg-ambient-light {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 900px;
  background: radial-gradient(circle at 50% 15%, rgba(64, 124, 226, 0.15) 0%, rgba(135, 206, 235, 0.05) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* ========================================================
   NAVIGATION
   ======================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.navbar .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(20, 70, 161, 0.15);
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(20, 70, 161, 0.1);
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-light);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

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

/* Quick Search Button */
.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: 24px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.search-trigger:hover {
  background: var(--bg-surface);
  border-color: var(--primary-light);
  color: var(--text-main);
}

.search-shortcut {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Theme Toggle */
.btn-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(20, 70, 161, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 70, 161, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main) !important;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  background: var(--bg-card-subtle);
}

.btn-outline {
  background: transparent;
  color: var(--primary-light) !important;
  border: 1.5px solid var(--primary-light);
}

.btn-outline:hover {
  background: rgba(64, 124, 226, 0.1);
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
}

/* ========================================================
   HERO SECTION
   ======================================================== */
.hero {
  position: relative;
  padding: 60px 0 90px;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 50px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 70, 161, 0.08);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.15;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #0ea5e9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.stats-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ========================================================
   INTERACTIVE SMARTPHONE MOCKUP
   ======================================================== */
.device-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.device-glow {
  position: absolute;
  width: 320px;
  height: 520px;
  background: radial-gradient(circle, rgba(64, 124, 226, 0.3) 0%, rgba(135, 206, 235, 0.1) 50%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.phone-mockup {
  position: relative;
  z-index: 1;
  width: 340px;
  height: 680px;
  background: #0f172a;
  border-radius: 48px;
  box-shadow: var(--shadow-phone);
  border: 10px solid #1e293b;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s ease;
}

.phone-mockup:hover {
  transform: translateY(-4px);
}

/* Phone Speaker & Camera Notch */
.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: #000000;
  border-radius: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.notch-camera {
  width: 8px;
  height: 8px;
  background: #111e36;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.notch-speaker {
  width: 38px;
  height: 4px;
  background: #222;
  border-radius: 4px;
}

.phone-screen {
  flex: 1;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: var(--font-body);
}

/* Phone Status Bar */
.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  z-index: 10;
}

/* Phone Role Toggle Bar */
.phone-role-selector {
  display: flex;
  padding: 6px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.role-tab-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  color: #64748b;
  text-align: center;
  transition: all var(--transition-fast);
}

.role-tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Phone App Header */
.phone-app-header {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}

.phone-header-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.85rem;
  overflow: hidden;
}

.phone-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-user-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.phone-user-info p {
  font-size: 0.72rem;
  color: #64748b;
}

.phone-badge-sync {
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Phone Scrollable Body */
.phone-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Progress / Adherence Widget in Phone */
.phone-card-progress {
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  border-radius: 18px;
  padding: 14px 16px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(20, 70, 161, 0.2);
}

.phone-card-progress h5 {
  font-size: 0.85rem;
  color: #ffffff;
  margin-bottom: 4px;
}

.phone-card-progress p {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.8);
}

.circular-progress {
  width: 52px;
  height: 52px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circular-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circular-progress circle {
  fill: none;
  stroke-width: 4;
}

.circle-bg {
  stroke: rgba(255, 255, 255, 0.25);
}

.circle-fill {
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-dasharray: 140;
  stroke-dashoffset: 45;
  transition: stroke-dashoffset 0.6s ease;
}

.circular-progress span {
  position: absolute;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
}

/* Medication Item Card in Phone */
.med-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px;
  transition: all 0.2s ease;
}

.med-card:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.med-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.med-pill-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.badge-upcoming {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.badge-missed {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.med-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.med-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 10px;
}

.med-actions {
  display: flex;
  gap: 8px;
}

.btn-med-action {
  flex: 1;
  padding: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 8px;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-take-dose {
  background: var(--primary);
  color: #ffffff;
}

.btn-take-dose:hover {
  background: #1d4ed8;
}

.btn-simulate-miss {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.btn-simulate-miss:hover {
  background: #fee2e2;
}

/* Caregiver Alert Toast in Phone */
.caregiver-push-alert {
  background: #ffffff;
  border-left: 4px solid var(--danger);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: slideInDown 0.35s ease;
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-icon {
  color: var(--danger);
  font-size: 1.1rem;
}

.alert-text h6 {
  font-size: 0.78rem;
  font-weight: 700;
  color: #991b1b;
}

.alert-text p {
  font-size: 0.68rem;
  color: #475569;
}

/* Phone Bottom Nav */
.phone-bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.nav-item-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  font-weight: 500;
  color: #94a3b8;
}

.nav-item-icon.active {
  color: var(--primary);
  font-weight: 700;
}

/* ========================================================
   SECTION TITLE & SUBTITLE
   ======================================================== */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.section-tag {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary-light);
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ========================================================
   KEY FEATURES SECTION
   ======================================================== */
.features-section {
  padding: 100px 0;
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-icon-wrapper {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  font-size: 1.6rem;
  background: rgba(20, 70, 161, 0.08);
  color: var(--primary);
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ========================================================
   DUAL PORTALS SECTION (PATIENT VS CAREGIVER)
   ======================================================== */
.ecosystem-section {
  padding: 100px 0;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.roles-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.role-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.role-card.patient-theme {
  border-top: 5px solid #2563eb;
}

.role-card.caregiver-theme {
  border-top: 5px solid #059669;
}

.role-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.role-image-thumb {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  border: 2px solid var(--border-color);
}

.role-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role-headline h3 {
  font-size: 1.45rem;
  margin-bottom: 4px;
}

.role-headline span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

.role-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}

.role-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
}

.role-feature-item i {
  color: var(--success);
  margin-top: 4px;
  font-size: 1rem;
}

.role-banner-preview {
  margin-top: auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.preview-art {
  width: 80px;
  height: auto;
  border-radius: 8px;
}

/* ========================================================
   LIVE ESCALATION WORKFLOW SIMULATOR
   ======================================================== */
.simulator-section {
  padding: 100px 0;
}

.simulator-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-lg);
}

.simulator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.simulator-title h3 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.simulator-title p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.sim-steps-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
  position: relative;
}

.sim-step-card {
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
}

.sim-step-card.active {
  border-color: var(--primary);
  background: rgba(20, 70, 161, 0.04);
  box-shadow: 0 4px 16px rgba(20, 70, 161, 0.12);
}

.sim-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 auto 10px;
}

.sim-step-card.active .sim-step-number {
  background: var(--primary);
  color: #ffffff;
}

.sim-step-card h5 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.sim-step-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sim-interactive-console {
  background: var(--code-bg);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.console-output {
  line-height: 1.7;
}

.console-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

/* ========================================================
   DOCUMENTATION & ARCHITECTURE HUB
   ======================================================== */
.docs-section {
  padding: 100px 0;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-subtle);
}

.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Docs Sidebar */
.docs-sidebar {
  background: var(--bg-card-subtle);
  border-right: 1px solid var(--border-color);
  padding: 28px 20px;
}

.docs-nav-group {
  margin-bottom: 24px;
}

.docs-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-left: 10px;
}

.docs-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-nav-btn {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-fast);
}

.docs-nav-btn:hover {
  background: rgba(20, 70, 161, 0.06);
  color: var(--text-main);
}

.docs-nav-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(20, 70, 161, 0.25);
}

/* Docs Content Area */
.docs-content-area {
  padding: 40px;
  overflow-y: auto;
  max-height: 820px;
}

.doc-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.doc-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.doc-pane h2 {
  font-size: 1.85rem;
  margin-bottom: 12px;
}

.doc-pane .doc-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.doc-pane h3 {
  font-size: 1.35rem;
  margin: 32px 0 14px;
}

.doc-pane p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* Code Snippets & Blocks */
.code-block-container {
  background: var(--code-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 20px 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: var(--code-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-lang-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
}

.btn-copy-code {
  font-size: 0.78rem;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* Syntax Highlighting Tokens */
.hl-kw { color: #f472b6; }
.hl-fn { color: #60a5fa; }
.hl-str { color: #a7f3d0; }
.hl-type { color: #fde047; }
.hl-cm { color: #64748b; font-style: italic; }
.hl-num { color: #fb923c; }

/* Tables in Docs */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
}

.doc-table th, .doc-table td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
  font-size: 0.92rem;
}

.doc-table th {
  background: var(--bg-card-subtle);
  font-weight: 600;
  color: var(--text-main);
}

.doc-table td {
  color: var(--text-muted);
}

.doc-table code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: rgba(20, 70, 161, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary);
}

/* Architecture Flow Diagram */
.arch-diagram-wrapper {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}

.arch-node-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 16px;
}

.arch-node {
  flex: 1;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.arch-node h5 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.arch-node p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.arch-arrow {
  color: var(--primary-light);
  font-size: 1.2rem;
  font-weight: bold;
}

/* ========================================================
   FAQ ACCORDION
   ======================================================== */
.faq-section {
  padding: 100px 0;
}

.faq-grid {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: var(--primary);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

/* ========================================================
   COMMAND PALETTE MODAL (Ctrl + K)
   ======================================================== */
.search-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-modal-backdrop.open {
  display: flex;
}

.search-modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
}

.search-results-list {
  list-style: none;
  max-height: 340px;
  overflow-y: auto;
  padding: 10px 12px;
}

.search-result-item {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-result-item:hover, .search-result-item.selected {
  background: rgba(20, 70, 161, 0.08);
}

.search-result-info h6 {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.search-result-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-category-tag {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-card-subtle);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* ========================================================
   CALL TO ACTION & FOOTER
   ======================================================== */
.cta-banner {
  margin: 60px 0 100px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #0284c7 100%);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 20px 50px rgba(20, 70, 161, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  max-width: 600px;
}

.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 70px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand h4 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.footer-brand p {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  font-size: 0.95rem;
  margin-bottom: 18px;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================================
   RESPONSIVE DESIGN
   ======================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin: 0 auto 32px;
  }
  .hero-ctas {
    justify-content: center;
  }
  .stats-bar {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .roles-wrapper {
    grid-template-columns: 1fr;
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .sim-steps-flow {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links, .search-trigger {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.4rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .sim-steps-flow {
    grid-template-columns: 1fr;
  }
  .cta-banner {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 40px 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
