/* ============================================
   WAITER - Sistema de Diseño CSS
   ============================================ */

/* Variables CSS */
:root {
  /* Colores */
  --color-primary: #163B5C;
  --color-primary-dark: #0F2A42;
  --color-primary-light: #1E4A6B;
  --color-accent: #2EAE6E;
  --color-accent-dark: #238A57;
  --color-accent-light: #3BC585;
  
  /* Backgrounds */
  --bg-white: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-dark: #0F172A;
  
  /* Textos */
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  
  /* Sombras */
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-large: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  
  /* Espaciado */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  
  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utilidades */
.container-custom {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding: 0 2rem;
  }
}

.section-padding {
  padding: 4rem 0;
}

@media (min-width: 640px) {
  .section-padding {
    padding: 5rem 0;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 6rem 0;
  }
}

.text-center {
  text-align: center;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  color: white;
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-large);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
  background: var(--color-primary-dark);
  box-shadow: var(--shadow-medium);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-base);
}

.card-hover:hover {
  box-shadow: var(--shadow-large);
  transform: translateY(-4px);
}

/* Inputs */
.input-group {
  width: 100%;
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.input,
.select {
  width: 100%;
  height: 3rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text-primary);
  background: white;
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.input:focus,
.select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(46, 174, 110, 0.1);
}

.input.error,
.select.error {
  border-color: #EF4444;
}

.input.error:focus,
.select.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-error {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #EF4444;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-success {
  background: rgba(46, 174, 110, 0.1);
  color: var(--color-accent-dark);
}

.badge-default {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

.header-transparent {
  background: transparent;
}

.header-solid {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.header-logo img {
  height: 2.5rem;
  width: auto;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.header-nav a:hover {
  color: var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-btn {
  display: block;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu {
  display: none;
  padding: 1rem 0;
  border-top: 1px solid #E2E8F0;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu a {
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--text-primary);
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-content {
    grid-template-columns: 2fr repeat(4, 1fr);
  }
}

.footer-brand {
  max-width: 300px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

.footer-description {
  color: #94A3B8;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: #94A3B8;
  transition: color var(--transition-fast);
}

.footer-social a:hover {
  color: var(--color-accent);
}

.footer-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: white;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #1E293B;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom p {
  color: #94A3B8;
  font-size: 0.875rem;
}

.footer-badges {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: #94A3B8;
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 767px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Backgrounds */
.bg-white { background-color: var(--bg-white); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-dark { background-color: var(--bg-dark); }

.bg-gradient-soft {
  background: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 100%);
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.bg-gradient-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 5rem;
  background: var(--bg-gradient-soft);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 24rem;
  height: 24rem;
  background: rgba(46, 174, 110, 0.1);
  border-radius: 50%;
  filter: blur(80px);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24rem;
  height: 24rem;
  background: rgba(22, 59, 92, 0.1);
  border-radius: 50%;
  filter: blur(80px);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  text-align: center;
}

.hero-headline {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .hero-headline {
    font-size: 3.75rem;
  }
}

@media (min-width: 1024px) {
  .hero-headline {
    font-size: 4.5rem;
  }
}

.hero-subheadline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  .hero-subheadline {
    font-size: 1.5rem;
  }
}

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .hero-ctas {
    flex-direction: row;
  }
}

.hero-social-proof {
  margin-bottom: 2rem;
}

.hero-social-proof p {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.hero-stars {
  font-size: 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.scroll-indicator-inner {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid var(--text-light);
  border-radius: 9999px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0.5rem;
}

.scroll-indicator-dot {
  width: 0.25rem;
  height: 0.75rem;
  background: var(--text-light);
  border-radius: 9999px;
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.75rem); }
}

/* Loading States */
.loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
}

/* Responsive Typography */
@media (max-width: 639px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* Utility Classes */
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.w-full { width: 100%; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.flex-col { flex-direction: column; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
