/* ==================== CSS VARIABLES ==================== */
:root {
  /* Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #8b5cf6;
  --success: #10b981;
  --success-dark: #059669;
  --success-light: #34d399;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  
  /* Typography with clamp() for responsive sizing */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3rem);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 2.5rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
  
  /* Transitions */
  --transition-fast: all 0.15s ease;
  --transition: all 0.3s ease;
  --transition-slow: all 0.5s ease;
  
  /* Z-index scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-top: 80px;
}

h1, h2, h3, h4, h5, h6 {
  text-rendering: optimizeLegibility;
  line-height: 1.2;
  font-weight: 700;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

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

/* ==================== LAYOUT ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-alt {
  background: var(--bg-white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==================== LANDING PAGE BUTTON SYSTEM ==================== */

/* Override default styles for landing page consistency */
.hero .btn-hero-primary,
.hero .btn-hero-outline,
.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.025em;
}

/* Hero primary button - white on gradient background */
.hero .btn-hero-primary {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #1e293b;
  box-shadow: 
    0 4px 14px rgba(255, 255, 255, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero .btn-hero-primary:hover {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 8px 25px rgba(255, 255, 255, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: #ffffff;
}

/* Hero outline button - glass effect */
.hero .btn-hero-outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero .btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

/* Regular buttons for content sections */
.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Secondary button for footer CTA */
.footer-cta .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.footer-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

/* Ghost button for header */
.header .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #6366f1;
  border: 1.5px solid rgba(99, 102, 241, 0.8);
  backdrop-filter: blur(10px);
}

.header .btn-ghost:hover {
  background: #6366f1;
  color: white;
  transform: translateY(-1px);
  border-color: #6366f1;
}

.btn-full {
  width: 100%;
}

/* ==================== HEADER ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-fixed);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.98);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm);
  min-height: 64px;
}

.logo {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  z-index: var(--z-fixed);
}

.logo-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.nav-desktop {
  display: none;
  gap: var(--space-lg);
  align-items: center;
}

.nav-desktop a {
  color: var(--text);
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius);
  transition: var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-desktop a:hover,
.nav-desktop a:focus {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.mobile-menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: var(--text-xl);
  color: var(--text);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius);
  transition: var(--transition);
  min-height: 44px;
  min-width: 44px;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.nav-links {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--space-xl);
  transform: translateX(-100%);
  transition: var(--transition);
  z-index: var(--z-modal);
  list-style: none;
}

.nav-links.active {
  transform: translateX(0);
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: var(--text-xl);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  transition: var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

/* ==================== HERO SECTION ==================== */
.hero.hero--pricing {
  position: relative;
  padding: calc(80px + var(--space-xl)) 0 var(--space-3xl);
  min-height: 70vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.hero--pricing .container {
  max-width: 900px; 
  margin: 0 auto; 
  text-align: center; 
  position: relative; 
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.hero--pricing h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-sub {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  opacity: 0.95;
  margin: 0 auto var(--space-xl);
  max-width: 46ch;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.hero-trust {
  margin-top: 1.5rem;
  opacity: 0.85;
  font-size: var(--text-sm);
}

/* Decorative elements */
.hero-shapes .blob {
  position: absolute;
  filter: blur(24px);
  opacity: 0.35;
  pointer-events: none;
}

.hero-shapes .blob-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, #7c3aed 0%, rgba(124,58,237,0) 60%);
  top: -60px;
  left: -80px;
}

.hero-shapes .blob-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #22c55e 0%, rgba(34,197,94,0) 60%);
  bottom: -120px;
  right: -80px;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

/* ==================== PRICING SECTION ==================== */
.pricing {
  padding: var(--space-3xl) 0;
}

.price-toggle {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-2xl);
}

.toggle-container{
    display:grid;
    grid-template-columns: 1fr 1fr;
    align-items:center;
    gap:0;
    background: var(--bg-white);
    border:1px solid var(--border);
    border-radius: var(--radius-xl);
    padding:6px;
    box-shadow: var(--shadow);
    position: relative;
}

.toggle-option{
    appearance:none;
    background:transparent;
    border:0;
    padding:10px 14px;
    border-radius: calc(var(--radius-xl) - 6px);
    font-weight:700;
    color: var(--text-light);
    cursor:pointer;
    text-align:center;
    min-height:44px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}
.toggle-option.active{ color:#fff; }

.toggle-slider {
    position:absolute;
    top:6px; left:6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    border-radius: calc(var(--radius-xl) - 6px);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    transition: transform .25s ease;
    box-shadow: var(--shadow-sm);
}

.toggle-slider.annual {
  transform: translateX(100%);
}

.plan-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--success));
}

.plan-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: var(--text);
}

.price-display {
  margin-bottom: var(--space-xl);
  padding: var(--space-lg);
  background: linear-gradient(135deg, var(--bg), var(--border-light));
  border-radius: var(--radius-lg);
}

.price {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.price-period {
  font-size: var(--text-lg);
  color: var(--text-light);
  margin-top: var(--space-xs);
}

.annual-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--success), var(--success-light));
  color: white;
  padding: 4px 12px;
  border-radius: var(--radius);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-xs);
}

.plan-cta {
  margin-bottom: var(--space-xl);
}

.features-list {
  list-style: none;
  text-align: left;
  background: var(--bg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--text-base);
}

.features-list li:last-child {
  margin-bottom: 0;
}

.features-list li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  font-size: var(--text-lg);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
}

/* ==================== WHY IT WORKS ==================== */
.why-works {
  padding: var(--space-2xl) 0;
  background: var(--bg-white);
}

.why-works h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-2xl);
  color: var(--text);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .benefits-grid { grid-template-columns: 1fr; }
}

.benefit-card {
  text-align: center;
  padding: clamp(16px, 2vw, 22px); /* menos padding */
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.benefit-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
}

.benefit-card h3 {
  font-size: var(--text-xl);
  line-height: 1.25;
  margin: 0;
  min-height: calc(1.25em * 2);
  color: var(--text);
}

.benefit-card p {
  margin: 0;
  color: var(--text-light);
  max-width: 28ch;
}

/* ==================== FAQ ==================== */
.faq {
  padding: var(--space-3xl) 0;
}

.faq h2 {
  font-size: var(--text-3xl);
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--space-2xl);
  color: var(--text);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  padding: var(--space-lg);
  background: none;
  border: none;
  text-align: left;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  min-height: 44px;
}

.faq-question:hover,
.faq-question:focus {
  color: var(--primary);
  background: var(--bg);
}

.faq-question::after {
  content: "+";
  font-size: var(--text-xl);
  font-weight: 300;
  transition: var(--transition);
  color: var(--primary);
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-light);
  line-height: 1.6;
  display: none;
}

.faq-answer.active {
  display: block;
}

/* ==================== FOOTER CTA ==================== */
.footer-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
  color: white;
  text-align: center;
  padding: var(--space-2xl) 0;
  position: relative;
  overflow: hidden;
}

.footer-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.footer-cta .container {
  position: relative;
  z-index: 2;
}

.footer-cta p {
  font-size: var(--text-lg);
  margin-bottom: var(--space-lg);
  opacity: 0.95;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--text);
  color: white;
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  transition: var(--transition);
  padding: var(--space-xs);
  border-radius: var(--radius);
}

.footer-links a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.footer-contact {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
}

.footer-contact a:hover {
  color: white;
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}