/* ============================================
   DEI — Descalcificadores Inteligentes
   Design tokens tomados del Manual de Identidad
   ============================================ */

:root {
  --blue: #1E76D5;
  --blue-dark: #194B77;
  --navy: #002C47;
  --pink: #F85AA6;
  --lime: #BAE505;

  --white: #FFFFFF;
  --ink: #0B1B26;
  --gray-600: #55707F;
  --gray-300: #C9D6DE;
  --gray-100: #EEF3F6;
  --gray-50: #F7FAFC;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 10px rgba(0, 44, 71, 0.08);
  --shadow-md: 0 12px 32px rgba(0, 44, 71, 0.14);
  --shadow-lg: 0 24px 60px rgba(0, 44, 71, 0.18);

  --container: 1180px;
  --header-h: 84px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

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

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  background: var(--white);
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.08; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.15rem; }

p { color: var(--gray-600); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}
.eyebrow-light { color: #8FC2F2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--gray-300);
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid rgba(0, 44, 71, 0.06);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(0, 44, 71, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

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

.brand-logo { height: 40px; width: auto; }

.main-nav {
  display: flex;
  gap: 32px;
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a {
  position: relative;
  color: var(--navy);
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--blue);
  transition: width .2s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 0 auto;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections generic ---------- */
.section { padding: 120px 0; }
.section-alt { background: var(--gray-50); }
.section-dark {
  background: linear-gradient(160deg, var(--navy) 0%, #01324f 60%, var(--blue-dark) 100%);
  color: var(--white);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #B9D3E4; }

.section-head { max-width: 720px; margin-bottom: 64px; }
.section-lead { font-size: 1.08rem; margin-top: 16px; }
.section-lead-light { color: #B9D3E4; }

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--header-h) + 72px) 0 90px;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(30,118,213,0.14), transparent 60%),
    radial-gradient(800px 500px at -10% 100%, rgba(186,229,5,0.10), transparent 55%),
    var(--white);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
}
.hero h1 { margin-bottom: 22px; }
.hero .lead { font-size: 1.12rem; max-width: 540px; }
.hero-actions { display: flex; gap: 16px; margin: 34px 0 44px; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 40px;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 800; color: var(--navy); }
.hero-stats span { font-size: 0.85rem; color: var(--gray-600); }

.hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-media-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(30,118,213,0.22), transparent 70%);
  filter: blur(10px);
  z-index: 0;
}
.hero-product {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  filter: drop-shadow(0 30px 45px rgba(0,44,71,0.28));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}

/* ---------- Como funciona ---------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 56px;
}
.how-step {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}
.how-step-num {
  display: inline-block;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--white);
  background: var(--blue);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.how-step h3 { margin-bottom: 10px; }
.how-step p { font-size: 0.96rem; }

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.feature-pill {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue-dark);
  background: #EAF3FC;
  border: 1px solid #D7E8F9;
  padding: 10px 18px;
  border-radius: 999px;
}

/* ---------- Beneficios ---------- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.benefit-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.benefit-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin-bottom: 20px;
  background: var(--blue);
  position: relative;
}
.benefit-icon::before {
  content: "";
  position: absolute;
  inset: 14px;
  background: var(--white);
  border-radius: 4px;
}
.benefit-card:nth-child(2) .benefit-icon { background: var(--blue-dark); }
.benefit-card:nth-child(3) .benefit-icon { background: var(--pink); }
.benefit-card:nth-child(4) .benefit-icon { background: var(--navy); }
.benefit-card h3 { margin-bottom: 10px; font-size: 1.05rem; }
.benefit-card p { font-size: 0.93rem; }

/* ---------- Piscinas strip ---------- */
.pool-strip {
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-dark) 100%);
  padding: 72px 0;
  color: var(--white);
}
.pool-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.pool-copy { max-width: 620px; }
.pool-copy h2 { color: var(--white); margin-bottom: 14px; }
.pool-copy p { color: #DCEBFA; }
.pool-badges {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}
.pool-badges span {
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  padding: 10px 20px;
  border-radius: 999px;
  text-align: center;
}

/* ---------- Lineas de producto ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.product-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.product-card-featured {
  background: linear-gradient(160deg, #eef7ff 0%, var(--gray-50) 100%);
  border-color: #D7E8F9;
}
.product-card-media {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #e7eef3 100%);
  padding: 28px;
}
.product-card-media img { max-height: 100%; width: auto; object-fit: contain; }
.product-card-body { padding: 26px 26px 30px; }
.product-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 10px;
}
.product-card-body h3 { margin-bottom: 8px; }
.product-card-body p { font-size: 0.92rem; }

/* ---------- Industrial ---------- */
.industrial-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.industrial-list {
  display: grid;
  gap: 22px;
}
.industrial-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 24px 26px;
}
.industrial-item h3 { font-size: 1.02rem; margin-bottom: 8px; }
.industrial-item p { font-size: 0.92rem; }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact-list { margin-top: 32px; display: grid; gap: 18px; }
.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-100);
  font-weight: 700;
}
.contact-label {
  width: 100px;
  flex-shrink: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-600);
  font-weight: 700;
}
.contact-list a { color: var(--blue-dark); }
.contact-list a:hover { color: var(--blue); }

.contact-form {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: grid;
  gap: 20px;
}
.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
}
.contact-form input,
.contact-form textarea {
  font-family: inherit;
  font-weight: 500;
  font-size: 0.96rem;
  padding: 13px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,118,213,0.15);
}
.form-hint { font-size: 0.8rem; color: var(--gray-600); text-align: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #B9D3E4;
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.footer-logo { height: 28px; width: auto; }
.footer-copy { font-size: 0.85rem; }
.footer-back { font-size: 0.85rem; font-weight: 700; color: var(--white); }
.footer-back:hover { color: var(--lime); }

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .industrial-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-media { order: -1; margin-bottom: 20px; }
  .hero-product { max-width: 320px; margin: 0 auto; }
  .hero-stats { justify-content: space-between; }
  .pool-inner { flex-direction: column; align-items: flex-start; }
  .pool-badges { flex-direction: row; flex-wrap: wrap; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
  .nav-toggle { display: flex; }
  .header-actions .btn-primary { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .benefit-grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  .hero-stats { flex-wrap: wrap; gap: 20px 32px; }
  .brand-logo { height: 32px; }
}
