/* CSS Variables & Design System */
:root {
  /* Colors */
  --color-primary: #1B4332;       /* Verde oscuro */
  --color-primary-dark: #081C15;  /* Verde muy oscuro para footer */
  --color-secondary: #4ADE80;     /* Verde claro */
  --color-crema: #FDFBF7;         /* Fondo crema */
  --color-accent: #F97316;        /* Naranja CTA */
  --color-accent-hover: #EA580C;  /* Naranja hover */
  --color-text: #4B5563;          /* Texto gris oscuro */
  --color-text-light: #9CA3AF;    /* Texto secundario */
  --color-border: #E5E7EB;
  --color-white: #FFFFFF;

  /* Typography */
  --font-sans: 'Inter', system-ui, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-mockup: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Radius */
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Basics */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  line-height: 1.6;
  background-color: var(--color-crema);
  overflow-x: hidden;
}

/* Utility Classes */
.container {
  max-width: 1200px;
  width: 100%;
  padding: 0 2rem;
  margin: 0 auto;
}

.max-w-md { max-width: 48rem; margin: 0 auto; }
.min-w-narrow { max-width: 60rem; margin: 0 auto; }
.w-full { width: 100%; }

/* Colors */
.bg-crema { background-color: var(--color-crema); }
.bg-primary { background-color: var(--color-primary); }
.bg-primary-dark { background-color: var(--color-primary-dark); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-white { background-color: var(--color-white); }

.color-primary { color: var(--color-primary); }
.color-secondary { color: var(--color-secondary); }
.color-accent { color: var(--color-accent); }
.color-text { color: var(--color-text); }
.text-white { color: var(--color-white); }

/* Typography */
.text-display { font-size: 2.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.text-h2 { font-size: 2.25rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;}
.text-h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.4; }
.text-h4 { font-size: 1.25rem; font-weight: 600; }
.text-lg { font-size: 1.125rem; }
.text-sm { font-size: 0.875rem; }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }
.italic { font-style: italic; }
.paragraph-loose { line-height: 1.8; }

/* Spacing */
.py-section { padding: var(--space-xl) 0; }
.mb-xs { margin-bottom: 0.5rem; }
.mb-sm { margin-bottom: 1rem; }
.mb-medium { margin-bottom: 1.5rem; }
.mb-large { margin-bottom: 3rem; }
.mb-offset { margin-bottom: 4rem; }
.mt-large { margin-top: 3rem; }
.p-medium { padding: 1.5rem; }
.p-large { padding: 2.5rem; }
.px-sm { padding-left: 1rem; padding-right: 1rem; }
.py-xs { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Flexbox Layouts */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { display: flex; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-sm { gap: 1rem; }
.gap-medium { gap: 1.5rem; }
.gap-large { gap: 3rem; }

@media (min-width: 1024px) {
  .lg-flex-row { flex-direction: row; }
  .text-display { font-size: 4rem; }
  .text-h2 { font-size: 3rem; }
}

/* Borders & Shadows & Shapes */
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-md { box-shadow: var(--shadow-md); }
.border-subtle { border: 1px solid var(--color-border); }
.border-top { border-top: 1px solid rgba(0,0,0,0.05); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: inherit;
}
.btn-large { padding: 1.125rem 2rem; font-size: 1.125rem; }
.btn-primary { background-color: var(--color-primary); color: white; }
.btn-primary:hover { background-color: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent { background-color: var(--color-accent); color: white; }
.btn-accent:hover { background-color: var(--color-accent-hover); transform: translateY(-2px); }
.btn-outline { background-color: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background-color: rgba(27, 67, 50, 0.05); }
.btn-outline.border-white { border-color: white; color: white; }
.btn-outline.hover-white:hover { background-color: rgba(255,255,255,0.1); }

/* Elements */
.inline-block { display: inline-block; }
.block { display: block; }
.relative { position: relative; }
.z-10 { z-index: 10; }

.hover-lift { transition: transform var(--transition-smooth); }
.hover-lift:hover { transform: translateY(-8px); }

/* Specific Sections */

/* Hero Section */
.hero { min-height: 100vh; display: flex; align-items: center; padding: 6rem 0; overflow: hidden; }
.hero-content { flex: 1; max-width: 600px; z-index: 10; }
.hero-visual { flex: 1; display: flex; justify-content: center; position: relative; z-index: 10; }

.shape {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; z-index: 0;
}
.shape-1 { background-color: var(--color-secondary); width: 600px; height: 600px; top: -200px; right: -100px; }
.shape-2 { background-color: var(--color-accent); width: 400px; height: 400px; bottom: -150px; left: -100px; opacity: 0.15;}

/* Mockup Image */
.mockup-img {
  width: 320px;
  border-radius: 35px;
  box-shadow: var(--shadow-mockup);
  display: block;
}

/* Grid Sections */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.step-card { padding: 2rem; }
.icon-box { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.icon-box-large { width: 80px; height: 80px; }

.bullets-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 3rem; text-align: left; }
.bullet-item { display: flex; align-items: center; gap: 1rem; font-size: 1.125rem; font-weight: 500; background: rgba(255,255,255,0.1); padding: 1rem; border-radius: 0.75rem; }

.split-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; max-width: 1000px; margin: 0 auto; }
@media (min-width: 768px) { .split-grid { grid-template-columns: 1fr 1fr; } }
.feature-list { list-style: none; text-align: left; }
.feature-list li { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; font-weight: 500; color: var(--color-text); }

.app-cards-showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.card-float { text-align: left; transition: transform 0.3s; }
.card-float:hover { transform: translateY(-5px); border-color: var(--color-secondary); }

/* Animations classes controlled by JS */
.fade-up { transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-right { transform: translateX(-30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-left { transform: translateX(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.opacity-0 { opacity: 0; }
.opacity-100 { opacity: 1; transform: translate(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Forms specific */
.form-section { padding: 4rem 1rem; }
.form-container { max-width: 600px; margin: 0 auto; background: white; padding: 2.5rem; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); text-align: center; }
.form-container h2 { color: var(--color-primary); margin-bottom: 0.5rem; font-size: 2rem; }
.form-container p { color: var(--color-text); margin-bottom: 2rem; }
.cv-form h3 { color: var(--color-primary); margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--color-border); text-align: left; }
.form-group { margin-bottom: 1.5rem; display: flex; flex-direction: column; text-align: left; }
.form-group label { font-weight: 600; color: var(--color-primary); margin-bottom: 0.5rem; }
.form-group input, .form-group select { padding: 0.75rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); font-family: inherit; font-size: 1rem; width: 100%; transition: border-color var(--transition-fast); }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2); }
.form-group input[type="file"] { padding: 0.5rem; font-size: 0.9rem; background: var(--color-crema); cursor: pointer; }
.referencia-box { background: rgba(0,0,0,0.02); padding: 1.5rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; border: 1px solid var(--color-border); }
.referencia-box h4 { margin-top: 0; color: var(--color-primary-dark); margin-bottom: 1rem; text-align: left;}
.btn-block { width: 100%; margin-top: 1.5rem; }
.small-text { font-size: 0.85rem; color: var(--color-text-light); margin-bottom: 1rem; display: block; text-align: left; }
.hidden { display: none !important; }
#loading-message { text-align: center; color: var(--color-accent); font-weight: 600; margin-top: 1.5rem; padding: 1rem; background: rgba(249, 115, 22, 0.1); border-radius: var(--radius-md); }
#response-message { text-align: center; font-weight: 600; margin-top: 1rem; }

/* Header & Logo */
.header { transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out; min-height: 120px; display: flex; align-items: center; }
.header--hidden { transform: translateY(-100%); box-shadow: none; }
.logo-img { height: 240px; max-width: 100%; object-fit: contain; }
.justify-between { justify-content: space-between; }

@media (max-width: 768px) {
  .header { min-height: 100px; }
  .header .container {
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .logo-img {
    height: 168px;
  }
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50%;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}
.whatsapp-float:hover {
  background-color: #20b858;
  transform: translateY(-5px);
  box-shadow: 2px 5px 15px rgba(0,0,0,0.3);
}
.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  display: block;
}
@media (max-width: 768px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
  }
  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}
