:root {
  --verde: #a6cd0f;
  --negro: #111111;
  --gris-oscuro: #1e1e1e;
  --gris: #2b2b2b;
  --gris-claro: #bdbdbd;
  --blanco: #ffffff;
  --verde-whatsapp: #25d366;

  --fuente-titulos: "Bebas Neue", "Anton", Impact, sans-serif;
  --fuente-texto: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ancho-maximo: 1200px;
  --radio: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--fuente-texto);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--blanco);
  background: var(--negro);
}

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

[hidden] {
  display: none !important;
}

h1,
h2 {
  font-family: var(--fuente-titulos);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  color: var(--verde);
}

:focus-visible {
  outline: 3px solid var(--verde);
  outline-offset: 3px;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
}

.boton-whatsapp {
  background: var(--verde);
  color: var(--negro);
}

.boton-whatsapp:hover {
  background: var(--blanco);
  transform: translateY(-2px);
}

.boton-grande {
  font-size: 1.15rem;
  padding: 1.1rem 2.4rem;
}

/* ---------- Portada ---------- */
.portada {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 3rem 1.25rem;
  text-align: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(166, 205, 15, 0.16), transparent 60%),
    linear-gradient(180deg, var(--gris-oscuro), var(--negro));
}

.logo {
  width: clamp(180px, 55vw, 280px);
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.55));
}

/* El logo ya incluye el nombre: el título queda solo para lectores de pantalla y Google.
   Si el logo no carga, el título se vuelve visible (clase sin-logo). */
.titulo-marca {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sin-logo .titulo-marca {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
  white-space: normal;
  font-size: clamp(2.8rem, 10vw, 4.5rem);
  color: var(--verde);
  margin-bottom: 0.5rem;
}

.eslogan {
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  color: var(--gris-claro);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

/* ---------- Secciones ---------- */
.seccion {
  max-width: var(--ancho-maximo);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.descripcion,
.contacto {
  text-align: center;
}

.descripcion p,
.contacto p {
  max-width: 44rem;
  margin: 0 auto 1.5rem;
  color: #dcdcdc;
}

.seccion-galeria {
  border-top: 1px solid var(--gris);
  border-bottom: 1px solid var(--gris);
}

.seccion-galeria h2 {
  text-align: center;
}

.contacto .numero {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--gris-claro);
}

/* ---------- Galería ---------- */
.galeria {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.foto {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--radio);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--gris);
  color: var(--gris-claro);
  font: inherit;
}

.foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.foto:hover img {
  transform: scale(1.05);
}

/* Recuadro gris cuando la foto aún no existe */
.foto.sin-foto::after,
.visor-respaldo {
  content: attr(data-texto);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--fuente-titulos);
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: #8a8a8a;
  background: repeating-linear-gradient(45deg, #2b2b2b, #2b2b2b 14px, #303030 14px, #303030 28px);
}

/* ---------- Pie ---------- */
.pie {
  padding: 2.5rem 1.25rem 6rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gris-claro);
  background: var(--gris-oscuro);
}

.pie p {
  margin: 0.2rem 0;
}

.redes {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.redes a {
  color: var(--verde);
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp-flotante {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 50;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--verde-whatsapp);
  color: var(--blanco);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s;
}

.whatsapp-flotante:hover {
  transform: scale(1.08);
}

/* ---------- Visor (lightbox) ---------- */
.visor {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.93);
  touch-action: pan-y;
}

.visor[hidden] {
  display: none;
}

.visor-figura {
  position: relative;
  margin: 0;
  width: min(92vw, 1400px);
  height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.visor-figura img {
  max-width: 100%;
  max-height: calc(82vh - 2.5rem);
  object-fit: contain;
  border-radius: 6px;
}

.visor-respaldo {
  position: relative;
  inset: auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: calc(82vh - 2.5rem);
  border-radius: 6px;
}

.visor-respaldo[hidden] {
  display: none;
}

.visor-figura figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--gris-claro);
}

.visor-boton {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--blanco);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s;
}

.visor-boton:hover {
  background: var(--verde);
  color: var(--negro);
}

.visor-cerrar {
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
}

/* En celular las flechas van abajo para no tapar la foto */
.visor-anterior {
  left: calc(50% - 110px);
  bottom: 1.25rem;
}

.visor-siguiente {
  right: calc(50% - 110px);
  bottom: 1.25rem;
}

body.visor-abierto {
  overflow: hidden;
}

/* ---------- Tablet ---------- */
@media (min-width: 600px) {
  .galeria {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Escritorio ---------- */
@media (min-width: 960px) {
  .seccion {
    padding: 6rem 2rem;
  }

  .galeria {
    gap: 1.25rem;
  }

  .visor-anterior,
  .visor-siguiente {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }

  .visor-anterior {
    left: 1.5rem;
  }

  .visor-siguiente {
    right: 1.5rem;
  }
}

/* 5 columnas: las 10 fotos quedan en dos filas completas */
@media (min-width: 1200px) {
  .galeria {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
