/* =====================================================
   PISCINAS MOTTA — Modernización 2026
   Estética: editorial wellness · oceánica · cálida
   ===================================================== */

/* ---------- Reset mínimo ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body { overflow-x: clip; }

/* Anchors should not hide under the sticky header */
section[id] { scroll-margin-top: 80px; }

body,
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; height: auto; }

button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

input, select, textarea, button { font: inherit; color: inherit; }

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

::selection { background: var(--accent); color: var(--ink); }


/* ---------- Tokens ---------- */
:root {
  /* Paleta acuática — Mediterranean pool */
  --ink:      #062c43;   /* navy profundo (agua a la sombra) */
  --ink-soft: #1a4970;
  --ocean:    #2563a8;   /* azul medio (cielo en el agua) */
  --mist:     #a5d8e8;   /* aqua suave */
  --aqua:     #06b6d4;   /* cyan brillante (agua de pileta) */
  --cream:    #eff7fa;   /* off-white tintado de aqua (revoque pool deck) */
  --paper:    #f7fcfd;
  --paper-2:  #d6ecf2;
  --line:     #b8d8e0;
  --gold:     #ff8a4a;   /* coral cálido (sol sobre el agua) */
  --copper:   #ff6b4a;   /* coral más intenso */
  --whatsapp: #25d366;
  --whatsapp-d: #128c7e;

  --accent: var(--copper);

  /* Tipografía */
  --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
  --font-sans:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Escala */
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1rem);
  --step-1: clamp(1.1rem,  1.04rem + 0.3vw,  1.25rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.7vw,   1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw,   2.5rem);
  --step-4: clamp(2.25rem, 1.7rem + 2.6vw,   3.75rem);
  --step-5: clamp(2.75rem, 2rem + 3.6vw,     5rem);

  /* Layout */
  --container: 1200px;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);

  /* Otros */
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-card: 0 30px 60px -30px rgba(6, 44, 67, 0.35),
                 0 8px 20px -10px rgba(6, 44, 67, 0.18);
  --shadow-soft: 0 12px 30px -18px rgba(6, 44, 67, 0.30);
  --t-fast: 200ms cubic-bezier(.22,.61,.36,1);
  --t-med:  420ms cubic-bezier(.22,.61,.36,1);
}


/* ---------- Base ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle grain */
  background-image:
    radial-gradient(at 0% 0%, rgba(255, 138, 74, 0.06) 0, transparent 45%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.07) 0, transparent 50%);
  background-attachment: fixed;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ocean);
  font-weight: 600;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 0.75rem;
  opacity: 0.6;
}

em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  color: var(--gold);
}


/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 239, 230, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(6, 44, 67, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}
.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
  transition: transform var(--t-med);
}
.brand:hover .brand-logo { transform: scale(1.03); }

/* Desktop nav */
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}
.primary-nav a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.5rem 0;
  transition: color var(--t-fast);
}
.primary-nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  inset: auto 0 4px 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-med);
}
.primary-nav a:not(.nav-cta):hover::after,
.primary-nav a.is-current::after {
  transform: scaleX(1);
  transform-origin: left;
}
.primary-nav a.is-current {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
}
.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  transition: background var(--t-fast), transform var(--t-fast);
}
.nav-cta:hover { background: var(--ocean); transform: translateY(-1px); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 10px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle span:nth-child(1) { transform: translate(-50%, -8px); }
.nav-toggle span:nth-child(3) { transform: translate(-50%, 8px); }
.nav-toggle.is-active span:nth-child(1) { transform: translate(-50%, 0) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translate(-50%, 0) rotate(-45deg); }


/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.hero-deco {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.85;
  pointer-events: none;
}
.hero-deco svg { width: 100%; height: 100%; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--step-5);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.hero-title em {
  font-weight: 400;
  color: var(--copper);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
}
.hero-lead {
  font-size: var(--step-1);
  max-width: 38rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  text-align: center;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--ocean); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(6, 44, 67, 0.25);
}
.btn-ghost:hover { border-color: var(--ink); background: rgba(6,44,67,0.04); }

.hero-meta {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-top: 2rem;
  border-top: 1px solid rgba(6, 44, 67, 0.12);
  max-width: 36rem;
}
.hero-meta strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  color: var(--ink);
  font-variation-settings: 'opsz' 144;
}
.hero-meta span {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-top: 0.5rem;
}


/* ---------- Section head ---------- */
.section-head {
  max-width: 720px;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}


/* ---------- Products ---------- */
.products {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  position: relative;
}

.product {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(6, 44, 67, 0.12);
}
.product:first-of-type { border-top: 0; padding-top: 0; }
.product--reverse .product-text { order: 2; }

.product-num {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.product-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.product-title em {
  display: block;
  font-style: italic;
  color: var(--copper);
}
.product-desc {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 32rem;
  margin-bottom: 1.75rem;
}

.link-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: gap var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.link-cta:hover { gap: 0.85rem; color: var(--whatsapp-d); border-color: var(--whatsapp-d); }

/* Gallery: 3 tiles, asymmetric */
.product-gallery {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.75rem;
}
.tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3;
  /* CSS-only placeholder using the tile's --hue variable.
     Reemplazá cada .tile por <img> cuando tengas las fotos. */
  background:
    radial-gradient(ellipse at 30% 20%, hsl(var(--hue, 195) 55% 78% / 0.9), transparent 60%),
    radial-gradient(ellipse at 80% 80%, hsl(var(--hue, 195) 60% 50% / 0.65), transparent 65%),
    linear-gradient(135deg, hsl(var(--hue, 195) 55% 42%) 0%, hsl(var(--hue, 195) 65% 22%) 100%);
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.tile::before {
  /* Subtle water-like noise/lines */
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(115deg,
      rgba(255,255,255,0.06) 0 2px,
      transparent 2px 18px);
  mix-blend-mode: overlay;
  pointer-events: none;
}
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6,44,67,0.55) 100%);
  pointer-events: none;
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 70px -30px rgba(6, 44, 67, 0.5),
              0 12px 24px -12px rgba(6, 44, 67, 0.25);
}
.tile-overlay {
  position: absolute;
  left: 1rem; bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 239, 230, 0.9);
  z-index: 2;
}
/* Asymmetric placement */
.tile-1 { grid-row: span 2; aspect-ratio: 3 / 4.5; }
.tile-2 { aspect-ratio: 4 / 3; }
.tile-3 { aspect-ratio: 4 / 3; }


/* ---------- Contact ---------- */
.contact {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(4rem, 9vw, 7rem);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 70% 40%, rgba(6,182,212,0.15), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(255,138,74,0.10), transparent 50%);
  pointer-events: none;
}
.contact .eyebrow { color: var(--aqua); }
.contact .section-title { color: var(--cream); }
.contact .section-title em { color: var(--gold); }

.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-lead {
  font-size: var(--step-1);
  color: rgba(245, 239, 230, 0.78);
  margin: 1.25rem 0 2.25rem;
  max-width: 28rem;
}

.contact-direct {
  display: grid;
  gap: 1rem;
  border-top: 1px solid rgba(245,239,230,0.15);
  padding-top: 1.5rem;
}
.contact-direct li {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.95rem;
}
.ci-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aqua);
}
.contact-direct a:hover { color: var(--gold); }

/* Form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1rem;
  background: rgba(245, 239, 230, 0.04);
  border: 1px solid rgba(245, 239, 230, 0.12);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border-radius: var(--radius);
  backdrop-filter: blur(4px);
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aqua);
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(245,239,230,0.25);
  padding: 0.7rem 0;
  font-size: 1rem;
  color: var(--cream);
  border-radius: 0;
  outline: none;
  transition: border-color var(--t-fast);
  font-family: inherit;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-bottom-color: var(--gold); }
.field select option { background: var(--ink); color: var(--cream); }

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.contact-form .btn-primary {
  background: var(--gold);
  color: var(--ink);
}
.contact-form .btn-primary:hover { background: var(--cream); }
.form-status { font-size: 0.85rem; color: rgba(245,239,230,0.7); }
.form-status.is-ok { color: var(--aqua); }
.form-status.is-error { color: #ffb29c; }


/* ---------- Footer ---------- */
.site-footer {
  background: #041a2a;
  color: rgba(245, 239, 230, 0.7);
  padding-block: 3rem 2.5rem;
}
.footer-inner {
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: 1fr auto;
  align-items: center;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 28rem;
}
.foot-logo {
  display: block;
  height: 64px;
  width: auto;
  flex-shrink: 0;
  /* El logo es negro: lo invertimos para que se vea en el footer oscuro */
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.foot-brand p { font-size: 0.9rem; }
.foot-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.foot-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transition: color var(--t-fast);
}
.foot-nav a:hover { color: var(--gold); }
.foot-meta {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(245,239,230,0.1);
  padding-top: 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
  color: rgba(245,239,230,0.5);
}


/* ---------- WhatsApp Widget ---------- */
.wa-widget {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 80;
}

/* FAB */
.wa-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--whatsapp);
  color: #fff;
  padding: 0.85rem 1.25rem 0.85rem 1rem;
  border-radius: 999px;
  box-shadow: 0 18px 35px -10px rgba(18, 140, 126, 0.6),
              0 6px 14px -6px rgba(0,0,0,0.2);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.wa-fab:hover {
  transform: translateY(-2px);
  background: var(--whatsapp-d);
  box-shadow: 0 22px 40px -10px rgba(18, 140, 126, 0.7),
              0 8px 18px -6px rgba(0,0,0,0.25);
}
.wa-fab svg { width: 26px; height: 26px; }
.wa-fab-label { font-size: 0.95rem; }

.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid var(--whatsapp);
  animation: wa-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  80%  { transform: scale(1.35); opacity: 0;   }
  100% { transform: scale(1.35); opacity: 0;   }
}

.wa-fab--tease {
  animation: wa-bounce 0.6s ease 0s 2;
}
@keyframes wa-bounce {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-8px); }
  60%      { transform: translateY(0); }
  80%      { transform: translateY(-4px); }
}

/* Popup */
.wa-popup {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: min(340px, calc(100vw - 2rem));
  background: var(--paper);
  color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(6,44,67,0.4),
              0 10px 25px -10px rgba(6,44,67,0.2);
  overflow: hidden;
  transform: translateY(10px) scale(0.96);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--t-med), opacity var(--t-med);
}
.wa-popup.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.wa-popup-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1rem 1rem 1rem;
  background: var(--whatsapp-d);
  color: #fff;
}
.wa-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
}
.wa-avatar svg { width: 26px; height: 26px; }
.wa-popup-title { flex: 1; line-height: 1.2; }
.wa-popup-title p { margin: 0; font-size: 0.95rem; }
.wa-status {
  font-size: 0.72rem !important;
  opacity: 0.85;
  margin-top: 2px !important;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.wa-status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #5eff8c;
  box-shadow: 0 0 0 0 rgba(94,255,140,0.7);
  animation: wa-dot 1.8s ease-in-out infinite;
}
@keyframes wa-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(94,255,140,0.6); }
  50%     { box-shadow: 0 0 0 6px rgba(94,255,140,0); }
}
.wa-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.9);
  transition: background var(--t-fast);
}
.wa-close:hover { background: rgba(255,255,255,0.15); }

.wa-popup-body {
  padding: 1.25rem;
  background:
    radial-gradient(circle at 20% 10%, rgba(6,182,212,0.12), transparent 50%),
    var(--paper);
}
.wa-bubble {
  background: #fff;
  border: 1px solid rgba(6,44,67,0.08);
  padding: 0.85rem 1rem;
  border-radius: 14px 14px 14px 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px -6px rgba(6,44,67,0.1);
}
.wa-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wa-chip {
  background: var(--whatsapp);
  color: #fff;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background var(--t-fast), transform var(--t-fast);
}
.wa-chip:hover { background: var(--whatsapp-d); transform: translateY(-1px); }
.wa-chip--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(6,44,67,0.2);
}
.wa-chip--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.wa-popup-foot {
  padding: 0.85rem 1.25rem;
  background: #f0e8d8;
  font-size: 0.75rem;
  color: var(--ocean);
  text-align: center;
  letter-spacing: 0.05em;
}


/* ---------- Reveal animation ----------
   Only hidden initially when JS is active AND user allows motion.
   This prevents a blank page if JS fails or is disabled. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(.22,.61,.36,1);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}


/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 960px) {
  .product {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .product--reverse .product-text { order: 0; }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .foot-brand { flex-direction: column; text-align: center; }
  .foot-nav { justify-content: center; }
}

/* Mobile */
@media (max-width: 720px) {
  /* Nav becomes a panel */
  .nav-toggle { display: inline-grid; place-items: center; }

  .primary-nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 72px);
    height: calc(100dvh - 72px);
    background: var(--cream);
    padding: 2rem var(--pad-x);
    transform: translateX(100%);
    transition: transform var(--t-med);
    z-index: 40;
    overflow-y: auto;
  }
  .primary-nav.is-open { transform: translateX(0); }
  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  .primary-nav a {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    padding: 0.75rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(6,44,67,0.1);
  }
  .primary-nav a.is-current { color: var(--copper); }
  .nav-cta {
    margin-top: 1.5rem;
    text-align: center;
    background: var(--ink) !important;
    color: var(--paper) !important;
    font-family: var(--font-sans) !important;
    font-size: 0.95rem !important;
    font-style: normal !important;
    border-radius: 999px !important;
    padding: 0.85rem 1.5rem !important;
    border-bottom: 0 !important;
  }

  .brand-logo { height: 44px; }

  .hero-meta {
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
  }
  .hero-meta > div { flex: 1 1 30%; }

  /* Gallery becomes single column-friendly */
  .product-gallery {
    grid-template-columns: 1fr 1fr;
  }
  .tile-1 {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 16 / 10;
  }

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

  .contact-direct li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  /* WhatsApp: keep label on mobile too but smaller */
  .wa-fab { padding: 0.75rem 1rem 0.75rem 0.85rem; }
  .wa-fab-label { font-size: 0.85rem; }
  .wa-fab svg { width: 22px; height: 22px; }

  .foot-nav { gap: 1rem; }
}

/* Very small */
@media (max-width: 420px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .wa-fab-label { display: none; }
  .wa-fab { padding: 0.85rem; }
}


/* ============================================================
   COMPONENTES NUEVOS para multipágina
   ============================================================ */

/* Hero variants */
.hero--home {
  padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 7vw, 5.5rem);
}
.hero--inner {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
}
.hero--inner .hero-title { font-size: var(--step-4); }
.hero--inner .eyebrow a {
  color: inherit;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--t-fast);
}
.hero--inner .eyebrow a:hover { opacity: 0.6; }


/* ---- Featured grid (home) ---- */
.featured { padding-block: clamp(3rem, 7vw, 5.5rem); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  height: min(70vh, 640px);
  min-height: 480px;
}
.feat-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.feat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.feat-card:hover img { transform: scale(1.05); }
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.feat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(6,44,67,0.7) 100%);
  pointer-events: none;
}
.feat-card--big {
  grid-column: span 2;
  grid-row: span 2;
}
.feat-caption {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  color: var(--cream);
}
.feat-caption .meta {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 4px;
  font-weight: 600;
}
.feat-caption strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.1;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.feat-card--big .feat-caption strong { font-size: clamp(1.5rem, 3vw, 2.25rem); }


/* ---- Quicknav (home) ---- */
.quicknav { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(4rem, 9vw, 7rem); }
.qn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.qn-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  background: var(--paper);
  border: 1px solid rgba(6,44,67,0.08);
  border-radius: var(--radius);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  min-height: 240px;
}
.qn-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  background: #fff;
}
.qn-num {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  font-variation-settings: 'opsz' 144, 'WONK' 1;
}
.qn-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}
.qn-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  flex: 1;
}
.qn-arrow {
  align-self: flex-start;
  margin-top: 1rem;
  font-size: 1.25rem;
  transition: transform var(--t-fast);
}
.qn-card:hover .qn-arrow { transform: translateX(4px); }
.qn-card--accent {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.qn-card--accent:hover { background: var(--ocean); }
.qn-card--accent p { color: rgba(245,239,230,0.7); }
.qn-card--accent .qn-num { color: var(--aqua); }


/* ---- Piscinas grid ---- */
.piscinas-grid-section { padding-block: clamp(2rem, 5vw, 4rem) clamp(4rem, 9vw, 7rem); }
.pisc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pisc-card {
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.pisc-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
}
.pisc-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-soft);
}
.pisc-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}
.pisc-card:hover .pisc-img img { transform: scale(1.07); }
.pisc-body {
  padding: 1.5rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pisc-body .meta {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ocean);
  font-weight: 600;
}
.pisc-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.15;
  font-variation-settings: 'opsz' 36, 'SOFT' 50;
}
.pisc-cta {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--copper);
  transition: gap var(--t-fast);
}
.pisc-card:hover .pisc-cta { color: var(--gold); }


/* ---- Solo image gallery on accesorios ---- */
.product-gallery--solo {
  grid-template-columns: 1fr !important;
}
.tile-solo {
  aspect-ratio: 16 / 10 !important;
  grid-column: 1 / -1 !important;
}

/* Tiles use real images now */
.tile { background: var(--ink-soft); }
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.tile:hover img { transform: scale(1.05); }
/* Disable the gradient pattern overlay when there's a real img */
.tile:has(img)::before { background: none; }


/* ---- CTA Band ---- */
.cta-band {
  background: var(--ink);
  color: var(--cream);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at 80% 50%, rgba(6,182,212,0.15), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(255,138,74,0.10), transparent 50%);
  pointer-events: none;
}
.cta-band-inner {
  position: relative;
  text-align: center;
  max-width: 720px;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}
.cta-band p {
  font-size: var(--step-1);
  color: rgba(245,239,230,0.75);
  margin-bottom: 2rem;
}
.cta-band-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-ghost-light {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(245,239,230,0.35);
}
.btn-ghost-light:hover {
  border-color: var(--cream);
  background: rgba(245,239,230,0.06);
}


/* ---- Detail page ---- */
.detail-meta {
  display: grid;
  gap: 0.5rem;
  max-width: 42rem;
  margin: 1.5rem 0 2rem;
  color: var(--ink-soft);
  font-size: var(--step-1);
}
.detail-meta p { margin: 0; }

.detail-gallery { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(4rem, 8vw, 6rem); }
.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gal-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-soft);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-soft);
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.gal-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.gal-item:hover img { transform: scale(1.05); }
.gal-item figcaption {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,239,230,0.95);
  background: rgba(6,44,67,0.7);
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  backdrop-filter: blur(6px);
}
.gal-item--hero {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 4 / 3;
}


/* ---- Product actions (multiple buttons on SPA) ---- */
.product-actions {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.link-cta--wa { color: var(--whatsapp-d); border-bottom-color: var(--whatsapp-d); }


/* ---- Footer additions ---- */
.foot-address {
  font-size: 0.78rem;
  color: rgba(245,239,230,0.55);
  margin-top: 0.25rem;
  display: inline-block;
}
.foot-contact {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  align-items: flex-end;
}
.foot-contact a:hover { color: var(--gold); }
.footer-inner {
  grid-template-columns: 1fr auto 1fr;
}


/* ============================================================
   RESPONSIVE (componentes nuevos)
   ============================================================ */

@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    height: auto;
  }
  .feat-card { aspect-ratio: 4 / 3; }
  .feat-card--big { grid-column: span 2; aspect-ratio: 16 / 9; }

  .qn-grid { grid-template-columns: repeat(2, 1fr); }

  .pisc-grid { grid-template-columns: repeat(2, 1fr); }

  .gal-grid { grid-template-columns: repeat(2, 1fr); }
  .gal-item--hero {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 960px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .foot-contact { align-items: center; }
}

@media (max-width: 640px) {
  .featured-grid { grid-template-columns: 1fr; }
  .feat-card--big { grid-column: span 1; }

  .qn-grid { grid-template-columns: 1fr; gap: 1rem; }
  .qn-card { min-height: auto; padding: 1.5rem; }

  .pisc-grid { grid-template-columns: 1fr; }

  .gal-grid { grid-template-columns: 1fr; }
  .gal-item--hero { grid-column: span 1; }

  .product-actions { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  .cta-band h2 { font-size: var(--step-2); }
  .cta-band-actions { flex-direction: column; align-items: stretch; }
  .cta-band-actions .btn { justify-content: center; }
}
