/* ==========================================================================
   ControlOne - Premium Enterprise SaaS Design System
   Inspired by Vanta, Drata, Linear, Stripe & Notion
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette (Explicitly Specified) */
  --accent-primary: #2563EB;       /* Royal Blue */
  --accent-primary-hover: #1D4ED8;
  --midnight-navy: #0F172A;        /* Midnight Navy */
  --bg-dark: #F8FAFC;              /* Light Clean Background */
  --bg-card: #FFFFFF;              /* White Cards */
  --bg-card-hover: #F1F5F9;
  --bg-glass: rgba(255, 255, 255, 0.88);
  
  --text-primary: #0F172A;         /* High Contrast Midnight Navy Text */
  --text-secondary: #475569;       /* Muted Slate Text */
  --text-muted: #94A3B8;
  
  --border-color: #E2E8F0;         /* Subtle Crisp Slate Border */
  --border-hover: rgba(37, 99, 235, 0.35);
  
  /* Status Colors */
  --success: #10B981;              /* Emerald */
  --warning: #F59E0B;              /* Amber */
  --danger: #EF4444;               /* Critical Red */
  --info: #3B82F6;

  /* Typography */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Structural Tokens & Rounded Cards (16px) */
  --container-max: 1280px;
  --nav-height: 76px;
  --radius-sm: 10px;
  --radius-md: 16px;               /* 16px Rounded Cards as requested */
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Soft Shadows (Linear/Stripe Style) */
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 10px 25px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 35px rgba(37, 99, 235, 0.12);
  --shadow-hover: 0 20px 35px -10px rgba(15, 23, 42, 0.08), 0 0 20px rgba(37, 99, 235, 0.15);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Overrides for Toggle Support */
[data-theme="dark"] {
  --bg-dark: #0B0F19;
  --bg-card: #151D2A;
  --bg-card-hover: #1E293B;
  --bg-glass: rgba(15, 23, 42, 0.88);
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --border-color: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(37, 99, 235, 0.5);
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 35px rgba(37, 99, 235, 0.25);
}

/* --------------------------------------------------------------------------
   2. Reset & Minimalist Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 6.5rem 0;
}

/* --------------------------------------------------------------------------
   3. Notion & Linear Inspired Utility Components
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
  letter-spacing: -0.01em;
}

.badge-cyan {
  background: rgba(6, 182, 212, 0.08);
  color: #0284C7;
  border-color: rgba(6, 182, 212, 0.25);
}

.badge-green {
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.25);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md); /* 16px Rounded */
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-heading);
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

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

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

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

.section-header h2 {
  font-size: 2.4rem;
  margin: 1rem 0 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   4. Header & Glassmorphic Navigation Bar
   -------------------------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.35rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--midnight-navy);
}

[data-theme="dark"] .nav-brand {
  color: #F8FAFC;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.15rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem 0.45rem 2.2rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 170px;
  transition: var(--transition);
}

.header-search input:focus {
  outline: none;
  width: 220px;
  border-color: var(--accent-primary);
  background: #FFFFFF;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.15);
}

.header-search i {
  position: absolute;
  left: 0.8rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

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

.theme-toggle-btn:hover {
  border-color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.4rem;
  color: var(--text-primary);
}

/* Mobile Slide-Out Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(-120%);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  z-index: 999;
}

.mobile-nav-drawer.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-drawer a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   5. Hero Section (Vanta & Drata Inspired Clean Layout)
   -------------------------------------------------------------------------- */
.hero {
  padding-top: calc(var(--nav-height) + 3.5rem);
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 480px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.03) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: -1;
}

.hero-content {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 3.5rem;
}

.hero-content h1 {
  font-size: 3.4rem;
  margin: 1.4rem 0;
  letter-spacing: -0.03em;
  color: var(--midnight-navy);
}

[data-theme="dark"] .hero-content h1 {
  color: #F8FAFC;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.2rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-preview-container {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

[data-theme="dark"] .hero-preview-container {
  background: #151D2A;
}

.hero-preview-img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.hero-floating-badge {
  position: absolute;
  bottom: -15px;
  right: 35px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

.floating-score {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--success);
  font-family: var(--font-heading);
}

/* --------------------------------------------------------------------------
   6. Metrics / Impact Counter Bar
   -------------------------------------------------------------------------- */
.metrics-bar {
  background: var(--bg-card);
  border-y: 1px solid var(--border-color);
  padding: 2.2rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.metric-item .number {
  font-size: 2.6rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--midnight-navy);
  margin-bottom: 0.2rem;
  letter-spacing: -0.03em;
}

[data-theme="dark"] .metric-item .number {
  color: #F8FAFC;
}

.metric-item .label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   7. Product Modules Explorer Section (Rounded 16px Cards)
   -------------------------------------------------------------------------- */
.module-explorer {
  position: relative;
}

.explorer-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  margin-bottom: 3rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.tab-btn {
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.modules-search-bar {
  width: 100%;
  max-width: 460px;
  position: relative;
}

.modules-search-bar input {
  width: 100%;
  padding: 0.8rem 1.2rem 0.8rem 2.6rem;
  border-radius: var(--radius-md); /* 16px Rounded */
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.92rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.modules-search-bar input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.15);
}

.modules-search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.6rem;
}

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); /* Explicitly 16px rounded cards */
  padding: 1.8rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-shadow: var(--shadow-card);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.06);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.card-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.04);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
}

.card-body h3 {
  font-size: 1.18rem;
  margin-bottom: 0.5rem;
  color: var(--midnight-navy);
}

[data-theme="dark"] .card-body h3 {
  color: #F8FAFC;
}

.card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 0.9rem;
  margin-top: auto;
}

.card-cat-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  font-weight: 700;
}

.card-btn {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.card-btn:hover {
  gap: 0.55rem;
  color: var(--accent-primary-hover);
}

/* --------------------------------------------------------------------------
   8. Showcase Section
   -------------------------------------------------------------------------- */
.command-centre-showcase {
  background: #F1F5F9;
  border-y: 1px solid var(--border-color);
}

[data-theme="dark"] .command-centre-showcase {
  background: #0F172A;
}

.showcase-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.showcase-text h2 {
  font-size: 2.2rem;
  margin-bottom: 1.1rem;
}

.showcase-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.8rem;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.feature-item i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.showcase-image-wrapper {
  border-radius: var(--radius-md); /* 16px Rounded */
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

/* --------------------------------------------------------------------------
   9. Interactive Calculator Widget (Clean White Card)
   -------------------------------------------------------------------------- */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); /* 16px Rounded */
  padding: 2.8rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.calc-inputs h3 {
  font-size: 1.45rem;
  margin-bottom: 1.4rem;
}

.control-group {
  margin-bottom: 1.3rem;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.control-group input[type="range"] {
  width: 100%;
  accent-color: var(--accent-primary);
}

.calc-results {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

[data-theme="dark"] .calc-results {
  background: #0B0F19;
}

.gauge-container {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 1.4rem;
}

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

.gauge-bg {
  fill: none;
  stroke: #E2E8F0;
  stroke-width: 12;
}

[data-theme="dark"] .gauge-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.gauge-fill {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 180;
  transition: stroke-dashoffset 0.5s ease;
}

.gauge-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-score {
  font-size: 2.4rem;
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--midnight-navy);
}

[data-theme="dark"] .gauge-score {
  color: #F8FAFC;
}

.gauge-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-metrics-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  width: 100%;
  margin-top: 1rem;
}

.calc-mini-stat {
  background: var(--bg-card);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.calc-mini-stat .val {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent-primary);
}

.calc-mini-stat .lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   10. Key Differentiators Grid (Rounded 16px Cards)
   -------------------------------------------------------------------------- */
.differentiator-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.8rem;
}

.diff-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); /* 16px Rounded */
  padding: 2.4rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.diff-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.diff-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.4rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.diff-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.7rem;
  color: var(--midnight-navy);
}

[data-theme="dark"] .diff-card h3 {
  color: #F8FAFC;
}

.diff-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.4rem;
}

/* --------------------------------------------------------------------------
   11. Modals (Clean White Cards with Soft Backdrop)
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md); /* 16px Rounded */
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.4rem;
  position: relative;
  transform: scale(0.95);
  transition: var(--transition);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

[data-theme="dark"] .modal-close-btn {
  background: #1E293B;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.modal-header h3 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}

.modal-body {
  margin-top: 1.4rem;
}

.modal-body p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

.modal-body ul {
  list-style: none;
  margin-bottom: 1.4rem;
}

.modal-body ul li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.modal-body ul li i {
  color: var(--success);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #0B0F19;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

/* --------------------------------------------------------------------------
   12. Minimalist Professional Footer
   -------------------------------------------------------------------------- */
footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  color: var(--text-secondary);
}

[data-theme="dark"] footer {
  background: #0B0F19;
}

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

.footer-brand p {
  margin: 1rem 0;
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.95rem;
  color: var(--midnight-navy);
  margin-bottom: 1.1rem;
}

[data-theme="dark"] .footer-col h4 {
  color: #F8FAFC;
}

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

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

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

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

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.08);
  color: var(--success);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* --------------------------------------------------------------------------
   13. Granular Tablet & Mobile Breakpoints (Mobile Overlap Fixes)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.7rem;
  }

  .showcase-layout,
  .calc-card,
  .differentiator-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .hero-floating-badge {
    right: 20px;
    bottom: -10px;
    padding: 0.7rem 1.1rem;
  }
}

@media (max-width: 768px) {
  /* Fix Header Navigation Overlap */
  .nav-links,
  .header-search,
  .nav-actions .btn {
    display: none !important;
  }

  .nav-brand .badge {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 1.8rem);
    padding-bottom: 3rem;
  }

  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.25;
  }

  .hero-content p {
    font-size: 1.02rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  /* Fix Hero Image & Floating Badge Overlap */
  .hero-preview-container {
    padding: 6px;
    border-radius: 16px;
  }

  .hero-floating-badge {
    position: relative !important;
    bottom: 0 !important;
    right: 0 !important;
    margin-top: 0.8rem;
    width: 100%;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
    padding: 0.75rem 1rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .calc-card {
    padding: 1.6rem 1.1rem;
  }

  .calc-metrics-summary {
    grid-template-columns: 1fr;
  }

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

  .diff-card {
    padding: 1.6rem 1.2rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .modal-card {
    padding: 1.5rem 1rem;
    border-radius: 14px;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

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

  .category-tabs {
    flex-direction: column;
    width: 100%;
    border-radius: var(--radius-md);
  }

  .tab-btn {
    width: 100%;
    text-align: center;
  }
}
