/* ==========================================================================
   LoWater Xpress — Design System compartido (main.css)
   Cargado por TODAS las páginas. Contiene únicamente lo que es 100%
   idéntico o se unificó a propósito entre home y subpáginas:
   tokens, reset, tipografía base, botones, header, nav móvil,
   footer y botón flotante de WhatsApp.

   Lo que NO está aquí (a propósito): hero del home vs page-hero de
   subpáginas, y cada sección de contenido único (servicios, precios,
   cobertura, testimonios, calculadora). Fusionar eso a ciegas en un
   único archivo habría arriesgado colisiones de especificidad sin
   forma de probarlas — ver CHANGELOG.md, punto "Arquitectura CSS".
   ========================================================================== */

/* Fuentes autoalojadas — WOFF2, subsetteadas a los 4 pesos que el sitio
   realmente usa (400/500/600/700, sin cursiva) y a Latin + Latin-1 +
   símbolos usados (▾ → ↔). El ZIP original cargaba las mismas familias
   DOS VECES: vía Google Fonts (fonts.googleapis.com) Y vía 23 archivos
   .ttf locales sin subsetear (7.4 MB, pesos 100-900 + cursivas que nadie
   usa). Por cascada CSS el @font-face local ganaba siempre, así que la
   petición a Google Fonts se descargaba entera para no usarse nunca.
   Este bloque sustituye a ambos: una sola fuente de verdad, 272 KB en
   total para las 8 variantes (antes: 6.4 MB solo en TTF + la llamada a
   Google Fonts encima). Ver CHANGELOG.md. */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../fonts/space-grotesk-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --primary: #00D4FF;
  --primary-dark: #00A8CC;
  --accent: #0EF6CC;
  --dark: #0A0A0B;
  --dark-2: #111113;
  --dark-3: #1A1A1D;
  --dark-4: #232328;
  --white: #FFFFFF;
  --gray: #8A8A8E;
  --gray-light: #B8B8BC;
  --success: #00E676;
  --whatsapp: #25D366;
  --gradient-primary: linear-gradient(135deg, #00D4FF 0%, #0EF6CC 100%);
  --gradient-dark: linear-gradient(180deg, #0A0A0B 0%, #111113 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

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

html { scroll-behavior: smooth; }

/* backdrop-filter es caro en GPUs móviles de gama baja; se reduce el blur
   con una media query más abajo (prefers-reduced-motion y max-width). */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--dark);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

/* Foco visible — WCAG 2.4.7. El sitio original no tenía ningún estilo de
   :focus-visible propio; con fondo oscuro y sin este anillo, navegar por
   teclado es prácticamente imposible (ver auditoría, Accesibilidad #1). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.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;
}

.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
  background: rgba(10, 10, 11, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 50px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--dark);
  box-shadow: 0 4px 30px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(0, 212, 255, 0.5);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: 0 4px 30px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(37, 211, 102, 0.5);
  background: #20BD5A;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 212, 255, 0.1);
}

.btn-sm {
  padding: 12px 24px;
  font-size: 14px;
}

/* Header — variante sólida por defecto (la usan 5 de 6 páginas).
   El home añade su propia variante "transparente + scroll" en
   page-home.css porque es el único hero a pantalla completa. */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 48px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

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

.nav a {
  color: var(--gray-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 11, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1001;
  display: none;
  flex-direction: column;
  padding: 80px 24px 24px;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 24px;
  font-weight: 500;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav .btn {
  margin-top: 24px;
}

/* Section primitives — usadas por todas las páginas para su contenido único */
.section {
  padding: 100px 0;
  position: relative;
}

.section-dark {
  background: var(--dark-2);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-badge,
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--gray-light);
  line-height: 1.7;
}

/* Page Hero — usado por las 5 subpáginas (servicios, precios, cobertura,
   clientes, cotizar). Verificado idéntico entre ellas. */
.page-hero {
  padding: 160px 0 80px;
  background: linear-gradient(180deg, var(--dark-2) 0%, var(--dark) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 56px);
  margin-bottom: 20px;
}

.page-hero h1 span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero p {
  font-size: 18px;
  color: var(--gray-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Footer — se unificó sobre la versión rica del home (4 columnas,
   redes sociales, enlaces por página) en todo el sitio. Las 5 subpáginas
   traían una versión reducida de una sola fila; mantener dos footers
   distintos perdía enlaces internos de SEO y bajaba la confianza percibida
   en las páginas que sí convierten (precios, cotizar). Ver CHANGELOG. */
.footer {
  background: var(--dark-2);
  padding: 80px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img {
  height: 56px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  margin-bottom: 20px;
}

.footer-brand p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--dark-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-light);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--dark);
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 12px;
}

.footer-col a {
  color: var(--gray);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: var(--gray);
  font-size: 13px;
}

/* WhatsApp Float Button — con pulso y tooltip en todas las páginas
   (antes solo en home). Es el CTA de conversión #1 del sitio. */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
}

.whatsapp-pulse {
  position: absolute;
  width: 64px;
  height: 64px;
  background: var(--whatsapp);
  border-radius: 50%;
  animation: wa-pulse 2s infinite;
  opacity: 0.4;
}

@keyframes wa-pulse {
  0% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.whatsapp-btn {
  width: 64px;
  height: 64px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 32px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
}

.whatsapp-tooltip {
  background: var(--white);
  color: var(--dark);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  animation: wa-slide-in 0.5s ease 2s both;
}

@keyframes wa-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Formularios — base compartida por el widget de reserva del home y el
   cotizador (que hoy declaran esto por separado con valores idénticos) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-light);
}

.form-select, .form-input, .form-textarea {
  padding: 14px 18px;
  background: var(--dark-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  appearance: none;
  cursor: pointer;
}

.form-textarea { cursor: text; resize: vertical; }
.form-input[type="date"],
.form-input[type="tel"],
.form-input[type="text"],
.form-input[type="email"] { cursor: text; }

.form-select:focus, .form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==== Mobile (compartido) ==== */
@media (max-width: 768px) {
  .nav, .header-cta .btn-outline {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .whatsapp-tooltip {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

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

/* Usuarios con "reducir movimiento" activado: sin blur pesado en móvil
   y sin animaciones infinitas (pulso, partículas, slide-in). */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .whatsapp-pulse { animation: none; opacity: 0; }
  .whatsapp-tooltip { animation: none; opacity: 1; transform: none; }
  .btn, .service-card, .city-card, .testimonial-card, .option-card { transition: none !important; }
}

/* backdrop-filter cuesta caro en GPUs de gama baja: en móvil se reduce
   el radio de blur de las superficies "glass" a la mitad. */
@media (max-width: 480px) {
  .glass, .glass-dark, .header.scrolled, .mobile-nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* Contenido legal (Términos, Privacidad) — prosa simple, texto justo lo
   ancho suficiente para leer cómodo, reutilizable en cualquier página
   nueva de este tipo. */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--white);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  font-size: 15px;
  color: var(--gray-light);
  line-height: 1.8;
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 0 0 16px 20px;
  color: var(--gray-light);
  font-size: 15px;
  line-height: 1.8;
}

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
}

.legal-content a:hover {
  color: var(--accent);
}

/* Casilla de aceptación de Términos — widget de reserva del home y
   cotizador. El botón de confirmar se deshabilita hasta marcarla. */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-light);
  line-height: 1.5;
  cursor: pointer;
  margin: 4px 0;
}

.terms-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  accent-color: var(--primary);
  cursor: pointer;
}

.terms-check a {
  color: var(--primary);
  text-decoration: underline;
}

.terms-check a:hover {
  color: var(--accent);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
