@tailwind base;
@tailwind components;
@tailwind utilities;

/* =========================================================
   HIDROSÉPTICOS — Paleta "Tierra & Agua" (Re-diseño 2026)
   Ni oscuro ni claro — elegante, cálido, vivo.
   ========================================================= */

:root {
  /* Backgrounds */
  --bg-cream:   #F5F0E8;      /* fondo crema cálido */
  --bg-slate:   #1C2E3E;      /* azul pizarra profundo */
  --bg-slate-2: #243547;      /* variante más clara del pizarra */
  --bg-light:   #FDFAF5;      /* casi blanco cálido */

  /* Acento */
  --accent:     #00BF8E;      /* verde esmeralda vibrante */
  --accent-2:   #00A07A;      /* esmeralda oscuro */
  --accent-glow: rgba(0, 191, 142, 0.25);

  /* Textos */
  --text-dark:  #1C2E3E;      /* texto sobre fondos claros */
  --text-cream: #F5F0E8;      /* texto sobre fondos oscuros */
  --text-muted-dark: #5A7088; /* muted sobre claro */
  --text-muted-light: #9BB5C8;/* muted sobre oscuro */

  /* Bordes */
  --border-cream: rgba(28, 46, 62, 0.12);
  --border-slate: rgba(245, 240, 232, 0.1);
  --border-accent: rgba(0, 191, 142, 0.3);

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(28, 46, 62, 0.08);
  --shadow-md: 0 8px 30px rgba(28, 46, 62, 0.12);
  --shadow-lg: 0 20px 60px rgba(28, 46, 62, 0.15);
  --shadow-accent: 0 8px 30px rgba(0, 191, 142, 0.25);
}

/* ──────────── BASE ──────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: auto;  /* Lenis controla el scroll suave */
  background-color: var(--bg-cream);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-cream);
  color: var(--text-dark);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Outfit', sans-serif;
}

/* ──────────── CURSOR GLOW ──────────── */
#cursor-glow {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,191,142,0.07) 0%, transparent 70%);
  z-index: 0;
  mix-blend-mode: multiply;
  transition: none; /* movido por JS — sin CSS transition */
  will-change: transform;
}
@media (max-width: 768px) {
  #cursor-glow { display: none; }
}

/* ──────────── SCROLLBAR ──────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-cream); }
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-2); }

/* ──────────── NOISE OVERLAY (muy sutil) ──────────── */
.noise-bg {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 150px;
  opacity: 0.025;
  mix-blend-mode: multiply;
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

/* ──────────── HERO ──────────── */
.hero-gradient {
  background: linear-gradient(
    to top,
    var(--bg-slate) 0%,
    rgba(28, 46, 62, 0.55) 40%,
    rgba(28, 46, 62, 0.1) 100%
  );
}

#hero-bg {
  will-change: transform;
}

.hero-title-glow {
  text-shadow: 0 0 60px rgba(0, 191, 142, 0.15);
}

/* Accent label line */
.label-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.label-line::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ──────────── NAV ──────────── */
.nav-blur {
  background: rgba(245, 240, 232, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-cream);
  box-shadow: var(--shadow-sm);
  transition: background 0.5s ease, box-shadow 0.5s ease;
}
.nav-blur .nav-link { color: var(--text-dark) !important; }
.nav-blur .nav-link:hover { color: var(--accent) !important; }

#header {
  will-change: transform;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* ──────────── BUTTONS ──────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: var(--shadow-accent);
  transform: translateY(-3px);
}

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid rgba(245, 240, 232, 0.5);
  color: var(--text-cream);
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 6px;
  transition: all 0.3s ease;
}
.btn-outline-light:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 191, 142, 0.08);
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--border-cream);
  color: var(--text-dark);
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 6px;
  transition: all 0.3s ease;
}
.btn-outline-dark:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ──────────── STATS SECTION (sobre pizarra) ──────────── */
.stats-section {
  background: var(--bg-slate);
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted-light);
  margin-top: 6px;
  font-weight: 500;
}

/* ──────────── ABOUT / IDENTITY ──────────── */
.section-cream { background: var(--bg-cream); }
.section-light { background: var(--bg-light); }
.section-slate { background: var(--bg-slate); }
.section-slate-2 { background: var(--bg-slate-2); }

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 191, 142, 0.08);
  border: 1px solid rgba(0, 191, 142, 0.2);
  border-radius: 100px;
  padding: 10px 18px;
  font-size: 0.875rem;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
}
.feature-pill:hover {
  background: rgba(0, 191, 142, 0.15);
  border-color: var(--accent);
  transform: translateX(4px);
}
.feature-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* Photo frame */
.photo-frame {
  position: relative;
}
.photo-frame::after {
  content: '';
  position: absolute;
  bottom: -16px;
  right: -16px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: 16px;
  z-index: -1;
  opacity: 0.4;
  transition: all 0.4s ease;
}
.photo-frame:hover::after {
  bottom: -10px;
  right: -10px;
  opacity: 0.7;
}

/* ──────────── SERVICE CARDS ──────────── */
.service-card-new {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid var(--border-cream);
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.45s ease,
              border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.service-card-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.service-card-new:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-accent);
}
.service-card-new:hover::before { opacity: 1; }

.service-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 191, 142, 0.12), rgba(0, 191, 142, 0.05));
  border: 1px solid rgba(0, 191, 142, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  color: var(--accent);
}
.service-card-new:hover .service-icon-wrap {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
  transform: rotate(5deg) scale(1.05);
}

/* ──────────── PROCESS STEPS (sobre pizarra) ──────────── */
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 191, 142, 0.1);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.step-item:hover .step-number {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

/* ──────────── GALLERY ──────────── */
.gallery-wrapper {
  overflow: hidden;
  border-radius: 16px;
  position: relative;
  box-shadow: var(--shadow-md);
  will-change: transform;
}
.gallery-img {
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.gallery-wrapper:hover .gallery-img {
  transform: scale(1.07);
}
.gallery-overlay {
  background: linear-gradient(
    to top,
    rgba(28, 46, 62, 0.92) 0%,
    rgba(28, 46, 62, 0.3) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: absolute;
  inset: 0;
}
.gallery-wrapper:hover .gallery-overlay {
  opacity: 1;
}

/* ──────────── CONTACT FORM ──────────── */
.form-field-label {
  display: block;
  font-size: 0.7rem;
  font-family: 'Inter', monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--text-muted-dark);
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  background: var(--bg-light);
  border: 1.5px solid var(--border-cream);
  border-radius: 8px;
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 191, 142, 0.12);
  background: #fff;
}
input::placeholder, textarea::placeholder {
  color: var(--text-muted-dark);
  opacity: 0.6;
}
select option {
  color: var(--text-dark);
  background: #fff;
}

/* Contact card */
.contact-info-card {
  background: var(--bg-cream);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border-cream);
}

.contact-icon-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 191, 142, 0.1);
  border: 1.5px solid rgba(0, 191, 142, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.contact-item:hover .contact-icon-ring {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

/* ──────────── FOOTER ──────────── */
.footer-dark {
  background: #111D27;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ──────────── GSAP REVEAL ──────────── */
.gsap-reveal {
  opacity: 0;
  will-change: transform, opacity;
  visibility: hidden;
}

/* ──────────── FEATURE PILLS ──────────── */
.feature-pill {
  will-change: transform;
}

/* ──────────── HOVER LIFT ──────────── */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease;
  will-change: transform;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* ──────────── ANIMATED SCROLL INDICATOR ──────────── */
@keyframes scroll-pulse {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}
.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: scroll-pulse 1.8s ease-in-out infinite;
}

/* ──────────── DECORATIVE GRID LINES ──────────── */
.grid-lines-bg {
  background-image:
    linear-gradient(rgba(28,46,62,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28,46,62,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ──────────── DIVIDER WAVE ──────────── */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ──────────── MOBILE MENU ──────────── */
.mobile-menu-bg {
  background: var(--bg-slate);
}

/* ──────────── SELECTION ──────────── */
::selection {
  background: var(--accent);
  color: var(--bg-slate);
}

/* ──────────── CARD GLASS (on slate bg) ──────────── */
.card-glass {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
}
.card-glass:hover {
  border-color: rgba(0, 191, 142, 0.25);
}
