/* ============================================
   OIKOS - Light Mode Theme
   ============================================ */

/* 1. Variables (light mode) - Modern Eternal Palette */
:root {
  /* Fondos cálidos y acogedores */
  --bg: #fcfaf7;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-2: #f5f3f0;
  
  /* Textos con calidez */
  --text: #1a202c;
  --muted: #475569;
  --soft: #64748b;
  --border: #e5e1da;
  
  /* Acentos refinados */
  --accent: #059669;
  --accent-dark: #047857;
  --accent-2: #0891b2;
  --accent-3: #d97706;
  --accent-purple: #4f46e5;
  
  /* Colores para Baby Steps - Paleta armónica */
  --step-0: #0891b2;
  --step-1: #059669;
  --step-2: #d97706;
  --step-3: #4f46e5;
  
  /* Sombras mejoradas */
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.15);
  
  /* Glassmorphism */
  --glass: rgba(255,255,255,0.7);
  --glass-border: rgba(255,255,255,0.3);
  
  --radius: 18px;
  --max: 1120px;
  
  /* Footer colors - Más profundo y sólido */
  --footer-bg-start: #111827;
  --footer-bg-end: #1f2937;
  --footer-text: #e2e8f0;
  --footer-text-muted: #94a3b8;
  --footer-accent: #059669;
}

/* 2. Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    /* Orbes luminosos refinados con nueva paleta */
    radial-gradient(circle at 20% 10%, rgba(5,150,105,0.12), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(8,145,178,0.1), transparent 45%),
    radial-gradient(circle at 40% 90%, rgba(217,119,6,0.08), transparent 50%),
    /* Base cálida con textura sutil */
    linear-gradient(135deg, #fcfaf7 0%, #ffffff 50%, #f5f3f0 100%);
  background-attachment: fixed;
  line-height: 1.55;
  position: relative;
  overflow-x: hidden;
}

/* Floating shapes decorativos */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 15% 25%, rgba(5,150,105,0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 75%, rgba(8,145,178,0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(217,119,6,0.04) 0%, transparent 50%);
  animation: float 60s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* 3. Typography */
h1 {
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.05;
  margin: 16px 0 12px;
  letter-spacing: -1px;
  font-weight: 800;
  background: linear-gradient(135deg, #1a202c 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0;
}

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

a:hover {
  text-decoration: underline;
}

/* 4. Layout components */
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* 5. UI components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.8);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow);
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.95);
  border-color: var(--accent-2);
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
}

.btn.primary {
  border: none;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  font-weight: 700;
  padding: 14px 24px;
  box-shadow: 
    0 4px 16px rgba(5,150,105,0.3),
    0 1px 3px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.btn.primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn.primary:hover::before {
  opacity: 1;
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 8px 24px rgba(5,150,105,0.4),
    0 2px 6px rgba(0,0,0,0.15);
  text-decoration: none;
}

.btn.primary .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
  margin-left: 4px;
}

.btn.primary:hover .arrow {
  transform: translateX(4px);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.input {
  flex: 1 1 auto;
  width: 320px;
  max-width: 100%;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.95);
  color: var(--text);
  outline: none;
  font-size: 15px;
  line-height: 40px;
  transition: border-color .12s ease, box-shadow .12s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
  box-sizing: border-box;
}

.input:focus {
  border-color: var(--accent-2);
  box-shadow: 
    0 0 0 3px rgba(59,130,246,.1),
    inset 0 2px 4px rgba(0,0,0,0.04);
}

.input::placeholder {
  color: var(--soft);
}

textarea.input {
  border-radius: 10px;
  resize: vertical;
  min-height: 100px;
  height: auto;
  padding: 12px 16px;
  line-height: 1.6;
  box-sizing: border-box;
}

/* 6. Page-specific */
/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(5,150,105,0.1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: rotate(5deg) scale(1.05);
}

.brand b {
  letter-spacing: .2px;
  font-size: 18px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: -2px;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  color: var(--muted);
  font-size: 14px;
}

nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.burger {
  display: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.burger svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.burger[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

main {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* Sections */
section {
  padding: 70px 0;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

/* Patrón de puntos en secciones alternas */
section:nth-child(even) {
  background-image: 
    radial-gradient(circle, rgba(5,150,105,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0;
}

/* Dividers decorativos */
section + section::before {
  content: '';
  display: block;
  height: 1px;
  width: 100px;
  margin: 0 auto -70px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(5,150,105,0.3), 
    transparent
  );
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.hero {
  padding: 80px 0 60px;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.hero .container > div {
  max-width: 800px;
}

.hero-form {
  display: inline-flex;
  margin: 0;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 26px;
  align-items: stretch;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.8);
  color: var(--muted);
  font-size: 13px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
  font-weight: 500;
  max-width: 62ch;
}

.identity {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(5,150,105,0.2);
  background: linear-gradient(135deg, rgba(5,150,105,0.1), rgba(8,145,178,0.05));
  backdrop-filter: blur(10px);
  border-radius: 16px;
  color: var(--text);
  box-shadow: 
    0 8px 24px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.5);
  position: relative;
  overflow: hidden;
}

.identity::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #059669, #0891b2);
  pointer-events: none;
  z-index: 0;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  align-items: center;
}

.micro {
  margin-top: 10px;
  color: var(--soft);
  font-size: 13px;
}

.box {
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
  border-radius: var(--radius);
}

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

.box h4 svg {
  vertical-align: middle;
  margin-right: 8px;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.box:hover h4 svg {
  opacity: 1;
  transform: scale(1.1);
}

.box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Baby Steps con colores diferenciados */
.card.box[data-step="0"] {
  border-left: 4px solid var(--step-0);
}

.card.box[data-step="1"] {
  border-left: 4px solid var(--step-1);
}

.card.box[data-step="2"] {
  border-left: 4px solid var(--step-2);
}

.card.box[data-step="3"] {
  border-left: 4px solid var(--step-3);
}

.card.box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: var(--step-color, var(--accent));
  opacity: 0.1;
  border-radius: 0 0 0 100%;
  pointer-events: none;
  z-index: 0;
}

.card.box[data-step="0"]::before {
  background: var(--step-0);
}

.card.box[data-step="1"]::before {
  background: var(--step-1);
}

.card.box[data-step="2"]::before {
  background: var(--step-2);
}

.card.box[data-step="3"]::before {
  background: var(--step-3);
}

.bullets {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.bullets li {
  margin: 6px 0;
}

.step {
  padding: 24px;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: 
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #059669, #0891b2) border-box;
  box-shadow: 
    0 10px 40px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.step:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 
    0 16px 48px rgba(0,0,0,0.12),
    0 4px 12px rgba(0,0,0,0.06);
}

.step .num {
  display: inline-flex;
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, #059669, #047857);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1;
  transition: transform 0.3s ease;
}

.step:hover .num {
  transform: scale(1.1);
  animation: breathing 2s ease-in-out infinite;
}

@keyframes breathing {
  0%, 100% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1.15);
  }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.8);
  color: var(--muted);
  font-size: 12px;
}

.quote {
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(217,119,6,.08), rgba(5,150,105,.05));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.quote p {
  margin: 0;
  font-size: 16px;
  color: var(--text);
}

.quote p + p {
  margin-top: 8px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0 0;
}

.section-title {
  font-weight: 800;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 80ch;
}

.form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

/* Form vertical: inputs full width */
.form[style*="flex-direction: column"] .input,
.form[style*="flex-direction: column"] .btn {
  width: 100%;
}

.hint {
  font-size: 12px;
  color: var(--soft);
  margin-top: 10px;
}

/* Footer */
footer {
  padding: 48px 0;
  background: linear-gradient(135deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%);
  color: var(--footer-text);
  position: relative;
  overflow: hidden;
  margin-top: 60px;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(5,150,105,0.5), 
    transparent
  );
}

/* Footer typography */
footer h5,
footer .brand b,
footer .fineprint {
  color: var(--footer-text);
}

footer .brand small {
  color: var(--footer-text-muted);
}

footer a {
  color: var(--footer-text);
  font-size: 14px;
  display: block;
  padding: 5px 0;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--footer-accent);
  text-decoration: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .8fr .8fr;
  gap: 18px;
}

.footer-grid h5 {
  margin: 0 0 10px;
  font-size: 14px;
}

.fineprint {
  margin-top: 18px;
  color: var(--soft);
  font-size: 12px;
}

footer .fineprint {
  color: var(--footer-text-muted);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  padding: 16px 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.mobile-menu.open {
  display: block;
  max-height: 500px;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu a {
  display: block;
  padding: 10px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

/* Baby Steps specific */
.baby-steps-timeline {
  position: relative;
  padding-left: 30px;
}

.baby-steps-timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.step-card {
  position: relative;
  margin-bottom: 32px;
}

.step-card::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
}

/* Founders grid */
.founders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.founder-card {
  text-align: center;
}

.founder-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
  border: 3px solid var(--accent);
}

/* Calculator specific */
.calculator-container {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 24px;
}

.calculator-results {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.health-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.health-indicator.green {
  background: rgba(5,150,105,.15);
  color: var(--accent);
}

.health-indicator.yellow {
  background: rgba(245,158,11,.15);
  color: var(--accent-3);
}

.health-indicator.red {
  background: rgba(239,68,68,.15);
  color: #ef4444;
}

.chart-container {
  margin: 24px 0;
  max-width: 400px;
}

/* Community preview */
.community-preview {
  background: 
    linear-gradient(135deg, 
      rgba(5,150,105,0.1) 0%, 
      rgba(8,145,178,0.1) 50%,
      rgba(217,119,6,0.08) 100%
    );
  backdrop-filter: blur(40px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 
    0 20px 60px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.4);
  border-radius: 24px;
  padding: 48px;
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}

.community-preview .benefits {
  margin: 20px 0;
}

.community-preview .benefits li {
  margin: 8px 0;
  color: var(--text);
}

.pricing {
  margin: 24px 0;
}

.pricing strong {
  font-size: 56px;
  font-weight: 900;
  background: linear-gradient(135deg, #059669, #0891b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
}

.pricing small {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 8px;
}

/* Badge "Plazas limitadas" */
.note {
  position: relative;
  display: inline-block;
}

.note::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 8px;
  background: rgba(5,150,105,0.2);
  animation: pulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

/* 7. Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-center {
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 12px;
}

/* Animaciones de entrada */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading state para botones */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 8. Responsive */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .founders-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  nav ul {
    display: none;
  }
  
  .burger {
    display: inline-flex;
  }
  
  .nav-cta {
    min-width: 180px;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  /* Números más grandes en mobile */
  .step .num {
    font-size: 56px;
  }
  
  /* Hero más compacto pero impactante */
  h1 {
    font-size: 36px;
    line-height: 1.1;
  }
  
  /* Botones full-width en mobile */
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-form {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .input {
    width: 100%;
  }
  
  .community-preview {
    padding: 32px 24px;
  }
  
  .pricing strong {
    font-size: 42px;
  }
}
