/* ==========================================================================
   RetinaX — Clinical Medical Design System (HERO BACKGROUND WITH DARK OVERLAY)
   Theme: Serene Clinical White, Slate Navy & Medical Teal
   Typography: Fraunces Editorial Serif + Plus Jakarta Sans UI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  /* Solid Clinical Color Palette */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-dark-card: #0f172a;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-white: #ffffff;
  
  --clinical-teal: #0d9488;
  --clinical-teal-light: #ccfbf1;
  --clinical-teal-dark: #115e59;
  --clinical-blue: #0284c7;
  --clinical-blue-light: #e0f2fe;
  --clinical-navy: #1e293b;
  
  --status-green: #16a34a;
  --status-green-bg: #dcfce7;
  --status-amber: #d97706;
  --status-rose: #e11d48;
  
  --border-color: #e2e8f0;
  --border-accent: #cbd5e1;
  
  /* High-End Typography */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Crisp Shadows & Radii */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  overflow-x: hidden;
}

body {
  background-color: var(--bg-page);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   Header & Navigation (Dark Translucent Overlay Friendly)
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.9rem 0;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clinical-teal);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.5px;
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background-color: rgba(13, 148, 136, 0.25);
  color: #5eead4;
  border: 1px solid rgba(94, 234, 212, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #5eead4;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.network-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  background-color: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(22, 163, 74, 0.4);
  color: #4ade80;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4ade80;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background-color: var(--clinical-teal);
  color: var(--text-white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--clinical-teal-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: #334155;
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background-color: #475569;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: #5eead4;
  color: #5eead4;
}

/* ==========================================================================
   Hero Section with Custom Background Image & Dark Black Overlay
   ========================================================================== */

.hero {
  padding: 10rem 0 6rem 0;
  position: relative;
  background-image: url('assets/hero_bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  color: var(--text-white);
}

/* Black Semi-Transparent Overlay for Maximum Text Visibility */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 15, 25, 0.82); /* Dark black/navy overlay */
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  background-color: rgba(14, 165, 233, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-white);
  margin-bottom: 1.25rem;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-sub {
  font-size: 1.15rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: var(--bg-dark-card);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-caption-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background-color: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  color: var(--text-white);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Stats Bar Overlay Friendly */
.stats-bar {
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  position: relative;
  z-index: 2;
}

.stat-item {
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: #5eead4;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 600;
}

/* ==========================================================================
   Feature Highlights with Context Images
   ========================================================================== */

.feature-segment {
  padding: 5.5rem 0;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-page);
}

.feature-segment.alt-bg {
  background-color: var(--bg-surface);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-grid.reverse {
  grid-template-columns: 1fr 1fr;
}

.feature-content h2 {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.feature-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
}

.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--clinical-teal-light);
  color: var(--clinical-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.segment-img-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
}

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

/* ==========================================================================
   Interactive Protocol Demo Section
   ========================================================================== */

.demo-section {
  padding: 6rem 0;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
}

.demo-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.demo-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
}

.demo-tab-btn {
  padding: 1.1rem 1.8rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.demo-tab-btn.active {
  color: var(--clinical-teal);
  border-bottom-color: var(--clinical-teal);
  background-color: var(--bg-surface);
}

.demo-body {
  padding: 2.5rem;
}

.demo-tab-panel {
  display: none;
}

.demo-tab-panel.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
}

.form-input, .form-select {
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border 0.2s ease;
}

.form-input:focus, .form-select:focus {
  border-color: var(--clinical-teal);
}

.slider-input {
  width: 100%;
  accent-color: var(--clinical-teal);
}

.code-console {
  background-color: var(--bg-dark-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #a7f3d0;
  max-height: 380px;
  overflow-y: auto;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.75rem;
}

/* ==========================================================================
   Contract Modules Grid
   ========================================================================== */

.modules-section {
  padding: 6rem 0;
}

.contract-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 3rem;
}

.contract-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.contract-card:hover {
  transform: translateY(-4px);
  border-color: var(--clinical-teal);
  box-shadow: var(--shadow-md);
}

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--clinical-teal-dark);
  background-color: var(--clinical-teal-light);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: 600;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ==========================================================================
   Footer
   ========================================================================== */

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

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--clinical-teal);
}

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

/* Responsive adjustments */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .feature-grid, .feature-grid.reverse { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .contract-grid { grid-template-columns: 1fr 1fr; }
  .demo-tab-panel.active { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 2.3rem; }
  .nav-links { display: none; }
  .stats-bar { grid-template-columns: 1fr; }
  .contract-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
