/* ==========================================================================
   Piscinas San José · estilos del sitio
   Diseño mobile-first, sin dependencias externas.
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0b2a43;
  --navy-2: #0f4a73;
  --ink: #15222f;
  --muted: #546478;
  --aqua: #1fb6d9;
  --blue: #2a74d6;
  --sky: #eef8fc;
  --line: #d9e8f0;
  --wa: #0c7d40;
  --wa-d: #096a35;
  --radius: 24px;
  --shadow: 0 12px 34px rgba(11, 42, 67, 0.13);
  --header: 68px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

img,
video {
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}

.ico {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico--fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-wrap: balance;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn .ico {
  width: 22px;
  height: 22px;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn--lg {
  padding: 17px 28px;
  font-size: 17px;
}
@media (max-width: 400px) {
  /* En celulares angostos (360px) el botón principal entra en una sola línea */
  .btn--lg {
    padding: 16px 20px;
    font-size: 16px;
  }
}
.btn--sm {
  padding: 10px 18px;
  font-size: 15px;
}
.btn--wa {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 10px 24px rgba(12, 125, 64, 0.35);
}
.btn--wa:hover {
  background: var(--wa-d);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover {
  background: #fff;
  color: var(--navy);
}
.btn--dark {
  background: var(--navy);
  color: #fff;
}
.btn--dark:hover {
  background: var(--navy-2);
}
.btn--outline {
  border-color: var(--navy);
  color: var(--navy);
  background: transparent;
}
.btn--outline:hover {
  background: var(--navy);
  color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(11, 42, 67, 0.08);
}
.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy);
  text-decoration: none;
}
.brand img {
  height: 44px;
  width: auto;
}
.brand b {
  background: linear-gradient(90deg, var(--aqua), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a:not(.btn) {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.nav a:not(.btn):hover {
  background: var(--sky);
}
.nav .btn {
  margin-left: 8px;
}
.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span {
  top: 22px;
}
.nav-toggle span::before {
  left: 0;
  top: -7px;
}
.nav-toggle span::after {
  left: 0;
  top: 7px;
}
.nav-toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav-toggle[aria-expanded="true"] span::before {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-block;
  }
  .nav {
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .js .nav {
    display: none;
  }
  .js .nav.is-open {
    display: flex;
  }
  .nav a:not(.btn) {
    padding: 14px 12px;
    font-size: 17px;
  }
  .nav .btn {
    margin: 8px 0 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 88vh, 780px);
  min-height: clamp(560px, 88svh, 780px);
  padding: 64px 0 128px;
  color: #fff;
  isolation: isolate;
  overflow: hidden;
}
.hero__bg,
.hero__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 25%;
  z-index: -2;
}
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(7, 31, 50, 0.84) 0%, rgba(7, 31, 50, 0.56) 50%, rgba(7, 31, 50, 0.14) 100%),
    linear-gradient(0deg, rgba(7, 31, 50, 0.42), transparent 45%);
}
.hero__in {
  position: relative;
  z-index: 2;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.eyebrow--dark {
  border-color: var(--line);
  background: var(--sky);
  color: var(--blue);
}
.hero h1 {
  max-width: 13ch;
  margin-bottom: 20px;
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.grad {
  background: linear-gradient(90deg, #7ae3f7, #5db4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (min-width: 900px) {
  .hero h1 {
    max-width: 22ch;
  }
}
/* La foto se agranda y se recorta abajo para que no se vea la persona, en cualquier ancho de pantalla */
.hero__bg img {
  height: 135%;
}
.hero .lead {
  max-width: 34em;
  margin-bottom: 28px;
  font-size: clamp(17px, 2.2vw, 20px);
  color: rgba(255, 255, 255, 0.92);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__tel {
  margin: 20px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
}
.hero__tel a {
  font-weight: 700;
  color: #fff;
}
.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 1;
  width: 100%;
  height: clamp(40px, 6vw, 90px);
}
@media (max-width: 520px) {
  .hero {
    padding: 48px 0 120px;
  }
  .hero__cta .btn {
    width: 100%;
  }
}

/* ---------- Barra de confianza ---------- */
.trust {
  position: relative;
  z-index: 3;
  margin-top: -64px;
}
.trust__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-block: 0;
  padding: 18px;
  list-style: none;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.trust__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}
.trust__list .ico {
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 12px;
  background: var(--sky);
  color: var(--blue);
}
.trust__list strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  color: var(--navy);
}
.trust__list span {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  color: var(--muted);
}
@media (max-width: 860px) {
  .trust__list {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 420px) {
  .trust__list {
    padding: 10px;
  }
  .trust__list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
  }
}

/* ---------- Secciones ---------- */
.section {
  padding: clamp(64px, 9vw, 112px) 0;
}
.section--sky {
  background: linear-gradient(180deg, #f3fafd, #e6f5fb);
}
.section--navy {
  background: radial-gradient(900px 460px at 88% -8%, rgba(31, 182, 217, 0.28), transparent 62%), var(--navy);
  color: #fff;
}
.section__head {
  max-width: 700px;
  margin: 0 auto 44px;
  text-align: center;
}
h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.section--navy h2 {
  color: #fff;
}
.section__sub {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
}

/* ---------- Galería ---------- */
.gallery {
  display: flex;
  gap: 14px;
  margin: 0 -20px;
  padding: 4px 20px 18px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery li {
  flex: 0 0 82%;
  scroll-snap-align: center;
}
.tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--sky);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.tile:hover img {
  transform: scale(1.05);
}
.tile__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 18px 16px;
  background: linear-gradient(0deg, rgba(7, 31, 50, 0.88), transparent);
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}
.tile__cap small {
  display: block;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.92;
}
@media (min-width: 900px) {
  .gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  .tile {
    aspect-ratio: 1 / 1;
  }
}
.gallery-cta {
  margin-top: 28px;
  text-align: center;
}

.testimonial {
  max-width: 720px;
  margin: 48px auto 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  box-shadow: var(--shadow);
  color: #fff;
}
.testimonial video {
  width: 100%;
  aspect-ratio: 640 / 352;
  background: #000;
}
.testimonial figcaption {
  padding: 16px 22px 18px;
  font-weight: 600;
  line-height: 1.4;
}
.testimonial figcaption small {
  display: block;
  margin-top: 2px;
  font-weight: 500;
  opacity: 0.8;
}

/* ---------- Servicios ---------- */
.cards {
  display: grid;
  gap: 22px;
}
@media (min-width: 900px) {
  .cards {
    grid-template-columns: 1fr 1.15fr;
  }
}
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.card__img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  object-position: 50% 45%;
}
.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 30px;
}
.card h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.card p {
  margin-bottom: 0;
  color: var(--muted);
}
.card--feature {
  background: linear-gradient(160deg, #0b2a43, #0f4a73);
  color: #fff;
}
.card--feature h3 {
  color: #fff;
}
.card--feature p {
  color: rgba(255, 255, 255, 0.85);
}
.card .btn {
  margin-top: auto;
  align-self: flex-start;
}
@media (min-width: 900px) {
  /* En escritorio la foto de la tarjeta azul absorbe el alto sobrante */
  .card--feature .card__img {
    flex: 1 1 0;
    min-height: 200px;
    aspect-ratio: auto;
  }
  .card--feature .card__body {
    flex: 0 0 auto;
  }
}
.ticks {
  display: grid;
  gap: 10px;
  margin: 20px 0 26px;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  line-height: 1.45;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--aqua)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 13px no-repeat;
}
@media (min-width: 560px) {
  .ticks--2 {
    grid-template-columns: 1fr 1fr;
    column-gap: 22px;
  }
}

/* ---------- Nosotros ---------- */
.about {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .about {
    grid-template-columns: 1.05fr 1fr;
    gap: 64px;
  }
}
.about h2 {
  margin-top: 4px;
}
.about p {
  font-size: 18px;
  color: var(--muted);
}
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}
.video__btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.video__btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
}
.video__play {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.video__btn:hover .video__play {
  transform: scale(1.08);
}
.video__play::before {
  content: "";
  margin-left: 6px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid var(--navy);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Contacto ---------- */
.contact {
  display: grid;
  gap: 40px;
  align-items: start;
}
@media (min-width: 900px) {
  .contact {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}
.contact__info .eyebrow {
  margin-bottom: 14px;
}
.contact__info p {
  margin-bottom: 28px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
}
.contact__list {
  display: grid;
  gap: 14px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.contact__list a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
}
.contact__list a:hover {
  text-decoration: underline;
}
.contact__list .ico {
  color: #7ae3f7;
}
.form {
  padding: 30px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.form h3 {
  margin-bottom: 4px;
  font-size: 22px;
  color: var(--navy);
}
.form > p {
  margin-bottom: 4px;
  font-size: 15px;
  color: var(--muted);
}
.field {
  margin-top: 16px;
}
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(42, 116, 214, 0.16);
}
.field textarea {
  min-height: 120px;
  resize: vertical;
}
.form .btn {
  width: 100%;
  margin-top: 22px;
}
.form__ok {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #e8f7ee;
  color: #0b5a2e;
  font-weight: 600;
}
.hp {
  position: absolute;
  left: -9999px;
}

/* ---------- Footer ---------- */
.footer {
  padding: 44px 0 28px;
  background: #071f32;
  color: rgba(255, 255, 255, 0.8);
}
.footer__in {
  display: grid;
  gap: 28px;
  align-items: center;
}
@media (min-width: 860px) {
  .footer__in {
    grid-template-columns: 1.4fr 1fr auto;
  }
}
.footer .brand {
  color: #fff;
}
.footer .brand img {
  padding: 5px 8px;
  border-radius: 12px;
  background: #fff;
}
.footer p {
  margin: 10px 0 0;
  font-size: 15px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer nav a {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.footer nav a:hover {
  text-decoration: underline;
}
.social {
  display: flex;
  gap: 10px;
}
.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: background 0.15s ease;
}
.social a:hover {
  background: rgba(255, 255, 255, 0.22);
}
.footer__copy {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
.wa-float:hover {
  background: var(--wa-d);
  transform: translateY(-2px);
}
.wa-float .ico {
  width: 28px;
  height: 28px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.lightbox::backdrop {
  background: rgba(5, 20, 32, 0.92);
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox figure {
  max-width: min(1100px, 92vw);
  margin: 0;
  text-align: center;
}
.lightbox img {
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 14px;
}
.lightbox figcaption {
  margin-top: 14px;
  font-weight: 600;
}
.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4);
  color: #fff;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox button:hover {
  background: rgba(0, 0, 0, 0.8);
}
.lightbox__close {
  top: 16px;
  right: 16px;
}
.lightbox__prev {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__next {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Animación de entrada ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .wa-float,
  .tile img {
    transition: none;
  }
}
