/* ==========================================================================
   EmailListClean — Modern High-Converting SaaS Marketing Stylesheet
   ========================================================================== */

:root {
  --brand-primary: #4f46e5;
  --brand-primary-hover: #4338ca;
  --brand-secondary: #06b6d4;
  --brand-secondary-hover: #0891b2;
  --brand-emerald: #10b981;
  --brand-dark: #090d16;
  --brand-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #06b6d4 100%);
  --brand-gradient-hover: linear-gradient(135deg, #4338ca 0%, #4f46e5 45%, #0891b2 100%);
  --brand-gradient-glow: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(6, 182, 212, 0.12) 100%);
  --brand-gradient-subtle: linear-gradient(180deg, rgba(79, 70, 229, 0.05) 0%, rgba(6, 182, 212, 0.02) 100%);
  
  --glass-bg: rgba(255, 255, 255, 0.94);
  --glass-border: rgba(228, 228, 231, 0.85);
  --glass-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(228, 228, 231, 0.7);
  --card-hover-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.22), 0 0 0 1px rgba(99, 102, 241, 0.35);
}

/* Base resets & layout */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

/* Glassmorphism & Elevation */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 18px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-glass-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(37, 99, 235, 0.35);
}

/* Gradients & Accents */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.btn-gradient-primary {
  background: var(--brand-gradient);
  color: #ffffff !important;
  border: none;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.32);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-gradient-primary:hover {
  background: var(--brand-gradient-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.45);
  color: #ffffff !important;
}

.btn-gradient-primary:active {
  transform: translateY(0);
}

/* Interactive Range Slider Styles */
.form-range {
  height: 1.5rem;
  padding: 0;
  background-color: transparent;
  appearance: none;
}

.form-range:focus {
  outline: none;
}

.form-range::-webkit-slider-runnable-track {
  width: 100%;
  height: 0.55rem;
  cursor: pointer;
  background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: 9999px;
  border: none;
}

.form-range::-webkit-slider-thumb {
  height: 1.45rem;
  width: 1.45rem;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #4f46e5;
  cursor: grab;
  appearance: none;
  margin-top: -0.45rem;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.40);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.60);
}

.form-range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.05);
}

/* Code Snippets & Copy Button */
.code-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #1e293b;
}

.code-copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  font-size: 0.75rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

/* Test Presets & Badge Buttons */
.preset-badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  user-select: none;
}

.preset-badge:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

/* Checkmark item animations in Live Demo */
.stage-check-item {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.stage-check-item:hover {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.2);
}

/* Modern Tabler accordion overrides */
.accordion-button:not(.collapsed) {
  background-color: rgba(37, 99, 235, 0.08);
  color: var(--brand-primary);
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: var(--brand-primary);
}

/* Hero Trust Bar */
.trust-metric-box {
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trust-metric-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

/* ==========================================================================
   Mobile Viewport & Touch Optimization (QA & UI/UX Standards)
   ========================================================================== */

/* 1. Mobile Navigation Drawer (<992px) */
@media (max-width: 991.98px) {
  .marketing-nav .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.25rem;
    margin-top: 0.75rem;
    border: 1px solid rgba(228, 228, 231, 0.9);
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.12);
  }

  .marketing-nav .nav-link-custom {
    padding: 0.75rem 1rem !important;
    border-radius: 10px;
    font-size: 1rem;
    display: flex;
    align-items: center;
  }

  .marketing-nav .nav-link-custom:hover,
  .marketing-nav .nav-link-custom.active {
    background: rgba(79, 70, 229, 0.08);
  }

  .mobile-nav-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    width: 100% !important;
    padding-top: 1rem !important;
    margin-top: 0.75rem !important;
    border-top: 1px solid rgba(228, 228, 231, 0.8) !important;
  }

  .mobile-nav-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
    font-size: 0.95rem !important;
  }
}

/* 2. Responsive Headings & Containers (<768px) */
@media (max-width: 767.98px) {
  /* Fluid Typography Scaling */
  .display-3 { font-size: 2.15rem !important; line-height: 1.2 !important; }
  .display-4 { font-size: 1.95rem !important; line-height: 1.22 !important; }
  .display-5 { font-size: 1.7rem !important; line-height: 1.25 !important; }
  .display-6 { font-size: 1.4rem !important; line-height: 1.3 !important; }
  
  .lead { font-size: 1.05rem !important; line-height: 1.6 !important; }

  /* Container Spacing */
  .container-marketing {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
  }
  
  .py-5.py-lg-7,
  .py-5.py-lg-6 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Code Container Viewport Containment */
  .code-container pre {
    overflow-x: auto !important;
    white-space: pre !important;
    word-break: normal !important;
    word-wrap: normal !important;
    -webkit-overflow-scrolling: touch;
    font-size: 0.78rem !important;
    padding: 1rem !important;
    border-radius: 10px;
  }

  .code-copy-btn {
    top: 0.45rem;
    right: 0.45rem;
    padding: 0.25rem 0.55rem;
    font-size: 0.7rem;
  }

  /* Comparison Tables Horizontal Scroll Bounds */
  .table-responsive table {
    min-width: 660px;
  }

  .table-scroll-hint {
    display: inline-flex !important;
  }

  /* Touch Targets for Buttons & Badges */
  .btn-lg {
    min-height: 48px;
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
    font-size: 1rem !important;
  }

  .preset-badge {
    padding: 0.45rem 0.8rem;
    font-size: 0.76rem;
    margin-bottom: 0.25rem;
  }

  /* Accordion Header Padding (Chevron Collision Protection) */
  .accordion-button {
    padding: 0.85rem 1rem !important;
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
  }

  /* Mobile Range Slider Handles */
  .form-range::-webkit-slider-thumb {
    height: 1.65rem;
    width: 1.65rem;
    margin-top: -0.55rem;
  }

  /* Stats / Impact Metrics Display */
  .trust-metric-box {
    padding: 1rem 1.15rem;
  }
}

/* 3. Ultra-Compact Phones (<576px) */
@media (max-width: 575.98px) {
  .display-4 { font-size: 1.75rem !important; }
  .display-5 { font-size: 1.55rem !important; }

  /* Stacked Full-Width Buttons in Heroes */
  .hero-cta-group a,
  .hero-cta-group button {
    width: 100% !important;
  }

  /* Live Sandbox Form on Phones */
  .input-group-responsive-sm {
    flex-direction: column !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 0.5rem;
  }

  .input-group-responsive-sm .input-group-text {
    display: none !important;
  }

  .input-group-responsive-sm input {
    border-radius: 10px !important;
    border: 1px solid #cbd5e1 !important;
    width: 100% !important;
    font-size: 0.95rem !important;
    padding: 0.75rem 1rem !important;
  }

  .input-group-responsive-sm button {
    border-radius: 10px !important;
    width: 100% !important;
    padding: 0.75rem !important;
  }

  /* Result Badge Grid on Phones */
  .stage-check-item {
    font-size: 0.78rem;
    padding: 0.35rem 0.5rem;
  }
}

