/* 
  4Autom8AI Redesign - Core Styles
  Theme: Sophisticated, High-End Fintech, Modern, "Smart"
  Audience: Female-led Accounting/Advisory Firms
*/

:root {
  /* Color Palette - Refined */
  /* Deep Indigo/Midnight base instead of harsh black */
  --bg-dark: #0f172a;
  --bg-card: #1e293b;

  /* Accents - Moving from Neon Cyan to Sophisticated Gradients */
  --accent-primary: #8b5cf6;
  /* Violet */
  --accent-secondary: #06b6d4;
  /* Cyan - kept for tech feel but softer */
  --accent-glow: #e879f9;
  /* Fuchsia/Purple for subtle glows */

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;

  /* Glassmorphism Variables - Softer */
  --glass-bg: rgba(30, 41, 59, 0.4);
  /* Lighter, more elegant glass */
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 16px;
  /* Higher blur for smoother look */

  /* Spacing & Layout */
  --section-padding: 6rem 2rem;
  /* More breathing room */
  --container-width: 1100px;
  /* Slightly tighter for editorial feel */
  --border-radius: 20px;
  /* Softer, rounder corners */

  /* Typography */
  --font-main: 'Outfit', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  /* Softer, multi-hued ambient background */
  background-image:
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15), transparent 40%),
    /* Violet top left */
    radial-gradient(circle at 90% 60%, rgba(6, 182, 212, 0.1), transparent 40%);
  /* Cyan bottom right */
}

/* Typography - Elegant & Clean */
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 600;
  /* Slightly lighter weight than before */
  color: var(--text-main);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  margin-bottom: 2rem;
  /* Sophisticated Gradient Text */
  background: linear-gradient(135deg, #fff 20%, #e879f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-main);
  /* Keep headings white for cleanliness */
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 300;
  /* Lighter reading weight */
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding);
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.grid {
  display: grid;
  gap: 2.5rem;
}

.grid-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-responsive-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

/* Mobile Responsiveness Overhaul */
@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .grid-cols-3,
  .grid-responsive-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .glass-card {
    padding: 2rem 1.5rem !important;
  }

  /* Force center alignment for mobile when requested */
  .mobile-center {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .mobile-center * {
    text-align: center !important;
  }

  /* Form specific mobile tweaks */
  .radio-card,
  .checkbox-card {
    padding: 1.25rem 1.25rem 1.25rem 3.2rem !important;
    width: 100% !important;
  }

  /* Navigation mobile tweaks */
  nav .container {
    padding: 1rem;
  }
}

/* Components */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 500;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
  /* Gradient Button - More organic */
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-glow));
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--accent-glow), var(--accent-primary));
  box-shadow: 0 15px 35px -5px rgba(232, 121, 249, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  border-color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.system-card .card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.system-card .card-label {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 1rem;
}

.system-card .card-value {
  text-align: right;
  font-weight: 500;
}

.glass-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Specific Aesthetic Helper Classes */
.text-gradient {
  background: linear-gradient(135deg, #c084fc 0%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Multi-step Form Styles */
.form-step {
  animation: slideIn 0.4s ease-out forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.radio-card,
.checkbox-card {
  display: block;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  /* Ensure it doesn't look like a standard list item */
  margin-bottom: 0.5rem;
}

.radio-card.sm {
  padding: 0.8rem 0.8rem 0.8rem 2.8rem;
  font-size: 0.9rem;
}

.radio-card:hover,
.checkbox-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-primary);
}

/* Hide Native Radio/Checkbox */
.radio-card input,
.checkbox-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Custom Radio/Checkbox Indicator */
.radio-card::before,
.checkbox-card::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
}

.radio-card::before {
  border-radius: 50%;
}

.checkbox-card::before {
  border-radius: 4px;
}

/* Selected State (robust approach) */
.radio-card:has(input:checked),
.checkbox-card:has(input:checked),
.radio-card.selected,
.checkbox-card.selected {
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.radio-card:has(input:checked)::before,
.radio-card.selected::before {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  box-shadow: inset 0 0 0 4px var(--bg-card);
}

.checkbox-card:has(input:checked)::before,
.checkbox-card.selected::before {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.radio-card:has(input:checked) span,
.radio-card.selected span,
.checkbox-card:has(input:checked) span,
.checkbox-card.selected span {
  color: #fff;
  font-weight: 500;
}

.progress-container {
  overflow: hidden;
}

#debug-log {
  display: none !important;
  /* Hide the debug log by default unless needed */
}