/* ============================================================
   Gimnasio El Deleite · Aranjuez
   Paleta del local: blanco, azul Telju, azulejo crema, tinta navy
   Web hermana del portfolio de Juanjo Villajos (Anton + Archivo + GSAP)
   ============================================================ */

:root {
  --paper: #f8f7f3;
  --paper-2: #eeeade;
  --white: #fdfdfb;
  --ink: #101d33;
  --azul: #1c47a5;
  --azul-deep: #122f6f;
  --azul-soft: #e2e8f6;
  --muted: #57606f;
  --line: rgba(16, 29, 51, 0.14);
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Archivo", "Helvetica Neue", sans-serif;
  --radius: 0px;
  --shadow: 0 20px 50px rgba(18, 47, 111, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.005em;
  line-height: 1.04;
  text-transform: uppercase;
}

h2 { font-size: clamp(2.1rem, 4.6vw, 3.7rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }

p { color: var(--muted); max-width: 62ch; }

a { color: inherit; }

::selection { background: var(--azul); color: #fff; }

/* Grano de papel impreso, estático como un cartel antiguo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Palabra resaltada a brocha, como en un rótulo pintado */
.hl {
  background: var(--azul);
  color: #fff;
  padding: 0.04em 0.22em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- Franja de azulejos (la banda azul de la pared) ---------- */

.tiles {
  height: 12px;
  background:
    repeating-linear-gradient(90deg,
      var(--azul) 0 54px,
      var(--paper) 54px 58px);
  border-top: 3px solid var(--azul-deep);
  border-bottom: 3px solid var(--azul-deep);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.95rem 2.2rem;
  white-space: nowrap;
  will-change: transform;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease;
}

.btn:active { transform: scale(0.98); }

.btn--azul {
  background: var(--azul);
  color: #fff;
}
.btn--azul:hover { background: var(--azul-deep); }

.btn--ghost {
  border: 2px solid rgba(16, 29, 51, 0.5);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
  background: rgba(16, 29, 51, 0.06);
}

/* Fantasma sobre foto oscura */
.btn--ghost-light {
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: #fff;
}
.btn--ghost-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- Navegación ---------- */

#top-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
}

.nav--solid {
  background: rgba(253, 253, 251, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
}

.nav--hidden { transform: translateY(-110%); }

.nav__brand {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.2vw, 1.35rem);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
  text-transform: uppercase;
}
.nav__brand span { color: var(--azul); }

/* Marca en blanco mientras está sobre el vídeo */
.nav:not(.nav--solid).nav--overlay .nav__brand {
  color: #fff;
}
.nav:not(.nav--solid).nav--overlay .nav__brand span { color: #9db6ea; }

/* Lado derecho: teléfono directo + botón de menú rotulado */
.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
}

.nav__tel {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 3px solid var(--azul);
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.nav__tel:hover { color: var(--azul); }
.nav:not(.nav--solid).nav--overlay .nav__tel { color: #fff; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.35rem 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav:not(.nav--solid).nav--overlay .nav__menu { color: #fff; }

.nav__menu-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 30px;
}
.nav__menu-bars i {
  display: block;
  height: 3px;
  background: currentColor;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s ease;
}
.nav__menu-bars i:last-child { width: 60%; align-self: flex-end; }
.nav__menu:hover .nav__menu-bars i:last-child { width: 100%; }

/* ---------- Panel de menú a pantalla completa ---------- */

.menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--ink);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  transform: translateY(-100%);
  /* Al cerrar, la visibilidad espera a que termine el deslizamiento;
     si no, el panel desaparece de golpe y el cierre se ve brusco. */
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1),
              visibility 0s linear 0.5s;
  visibility: hidden;
}
.menu.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0s linear 0s;
}

.menu__close {
  position: absolute;
  top: 1.1rem;
  right: clamp(1.2rem, 4vw, 3rem);
  z-index: 3;
  background: rgba(10, 18, 33, 0.72);
  border: 0;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.menu__close svg { display: block; }

.menu__nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem clamp(1.2rem, 5vw, 4.5rem) 3rem;
}

.menu__link {
  position: relative;
  display: block;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.25s ease, padding-left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 5px;
  background: var(--azul);
  transform: translateY(-50%);
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.menu__link:hover,
.menu__link:focus-visible {
  padding-left: clamp(2.4rem, 5vw, 4.5rem);
  color: #dfe7f8;
}
.menu__link:hover::before,
.menu__link:focus-visible::before {
  width: clamp(1.8rem, 4vw, 3.5rem);
}
.menu__link.is-active { color: #8fabe8; }

.menu__foot {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.5rem;
}
.menu__foot span,
.menu__foot a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  text-decoration: none;
}
.menu__foot a:hover { color: #fff; }

/* Panel visual del menú */
.menu__aside {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.menu__aside img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.menu__aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--azul);
  mix-blend-mode: color;
}
.menu__tagline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 2rem;
  background: linear-gradient(180deg, transparent, rgba(16, 29, 51, 0.9));
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  color: #fff;
  line-height: 1.2;
}

/* ---------- Hero (portada) ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* El vídeo va en duotono azul: neutraliza los colores ajenos del metraje
   y lo deja en la paleta del gimnasio */
.hero__media {
  position: absolute;
  inset: 0;
  isolation: isolate;
}

.hero__video,
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(0.95);
}

.hero__duo {
  position: absolute;
  inset: 0;
  background: var(--azul);
  mix-blend-mode: color;
}
.hero__duo + .hero__duo {
  background: linear-gradient(160deg, var(--azul-deep), transparent 65%);
  mix-blend-mode: multiply;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10, 18, 33, 0.55) 0%,
      rgba(10, 18, 33, 0.18) 32%,
      rgba(10, 18, 33, 0.82) 72%,
      rgba(10, 18, 33, 0.94) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.2rem, 5vw, 4rem) clamp(2.5rem, 6vh, 4.5rem);
  /* Suficiente para que el titular quepa en una linea por renglon:
     necesita ~7.8em de ancho y la letra llega a 6.8rem */
  max-width: 1120px;
}

.hero__title {
  font-size: clamp(2.1rem, 8vw, 6.8rem);
  color: #fff;
  /* 1.06 deja sitio a la tilde de la N y al acento de RITMO */
  line-height: 1.06;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  /* aire para las tildes de las mayúsculas, que Anton dibuja muy arriba */
  padding-top: 0.12em;
  margin-top: -0.08em;
}
.hero__title .line__inner {
  display: block;
  /* En reposo el titular se ve. Si GSAP no llega a cargar, el H1 nunca
     se queda invisible; cuando si carga, el propio JS lo oculta con
     gsap.set justo antes de animarlo hacia arriba. */
  transform: none;
}

.hero__sub {
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

/* Hero corto de páginas interiores */
.pagehero {
  position: relative;
  min-height: 62svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--ink);
}
.pagehero__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.pagehero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16,29,51,0.2), rgba(16,29,51,0.82));
}
.pagehero__content {
  position: relative;
  z-index: 2;
  padding: 7rem clamp(1.2rem, 5vw, 4rem) clamp(2.2rem, 5vh, 3.5rem);
}
.pagehero__content h1 {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  color: #fff;
}
.pagehero__content p {
  margin-top: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 52ch;
}

/* ---------- Manifiesto ---------- */

.manifesto {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) clamp(1.2rem, 4vw, 3rem) clamp(1rem, 3vh, 2rem);
}

.manifesto__line {
  font-family: var(--font-display);
  text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(1.7rem, 4.4vw, 3.5rem);
  line-height: 1.18;
  max-width: none;
}

.manifesto__line + .manifesto__line { margin-top: 0.4rem; }

/* ---------- Secciones divididas texto / imagen ---------- */

.split {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.split--flip .split__media { order: -1; }

.split__text h2 { margin-bottom: 1.3rem; }
.split__text h2 em {
  font-style: normal;
  color: var(--azul);
}
.split__text p + p { margin-top: 1rem; }
.split__text .btn { margin-top: 1.8rem; }

.split__media {
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split__media img {
  width: 100%;
  height: clamp(340px, 56vh, 560px);
  object-fit: cover;
  will-change: transform;
}

/* Marco tipo cuadro colgado, como los carteles del gimnasio */
.split__media--frame {
  border: 10px solid #fff;
  outline: 1px solid var(--line);
  transform: rotate(-0.8deg);
}

/* ---------- Banda a sangre completa (fondo foto) ---------- */

.band-photo {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.band-photo__bg {
  position: absolute;
  inset: -8% 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  opacity: 0.38;
  will-change: transform;
}
/* Degradado desde la izquierda para que el texto se lea sobre cualquier foto */
.band-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    rgba(16, 29, 51, 0.92) 0%,
    rgba(16, 29, 51, 0.75) 45%,
    rgba(16, 29, 51, 0.25) 100%);
}

.band-photo__inner {
  position: relative;
  z-index: 2;
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4.5rem, 12vh, 8rem) clamp(1.2rem, 4vw, 3rem);
}
.band-photo h2 { color: #fff; max-width: 16ch; }
.band-photo p {
  color: rgba(255, 255, 255, 0.85);
  margin-top: 1.2rem;
  max-width: 52ch;
}
.band-photo .btn { margin-top: 1.8rem; }

/* ---------- Zonas del gimnasio (mosaico) ---------- */

.zones {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 3rem);
}
.zones > h2 { margin-bottom: 2.2rem; max-width: 18ch; }

.zones__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 240px;
  gap: 14px;
}

.zone {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.zone--a { grid-column: span 7; grid-row: span 2; }
.zone--b { grid-column: span 5; }
.zone--c { grid-column: span 5; }
.zone--d { grid-column: span 4; }
.zone--e { grid-column: span 4; }
.zone--f { grid-column: span 4; }
.zone--g { grid-column: span 8; grid-row: span 2; }
.zone--h { grid-column: span 4; grid-row: span 2; }

.zone img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
.zone:hover img { transform: scale(1.05); opacity: 0.65; }

.zone__label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, transparent, rgba(16, 29, 51, 0.88));
  color: #fff;
}
.zone__label h3 { font-size: 1.15rem; }
.zone__label p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  margin-top: 0.15rem;
  max-width: none;
}

/* Celda de texto plano dentro del mosaico */
.zone--text {
  background: var(--azul);
  display: flex;
  align-items: center;
  padding: 1.6rem;
}
.zone--text p {
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* ---------- Opiniones ---------- */

.reviews {
  background: var(--paper-2);
}
.reviews__inner {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 6.5rem) clamp(1.2rem, 4vw, 3rem);
}
.reviews__inner > h2 { max-width: 20ch; margin-bottom: 2.6rem; }

/* Notas pegadas en el tablón: tamaños desiguales, no tres tarjetas clónicas */
.reviews__wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.6rem;
  align-items: start;
}

.review {
  grid-column: span 3;
  background: var(--white);
  border-left: 5px solid var(--azul);
  padding: 1.5rem 1.6rem;
  box-shadow: 0 8px 22px rgba(16, 29, 51, 0.08);
}
.review--wide {
  grid-column: span 6;
  border-left-width: 8px;
}

.review blockquote {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: none;
  color: var(--ink);
  line-height: 1.24;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}
.review--wide blockquote { font-size: clamp(1.5rem, 3vw, 2.3rem); }

.review cite {
  display: block;
  margin-top: 0.9rem;
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.reviews__foot {
  margin-top: 2rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Dueño / Juanjo ---------- */

.owner {
  background: var(--ink);
  color: #fff;
}
.owner .split__text h2 { color: #fff; }
.owner .split__text h2 em { color: #8fabe8; }
.owner .split__text p { color: rgba(255, 255, 255, 0.82); }

/* ---------- La cuota (cartel de precios colgado) ---------- */

.fee__inner {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.fee__sign {
  background: var(--white);
  border: 4px solid var(--azul);
  outline: 1px solid var(--line);
  outline-offset: 6px;
  box-shadow: var(--shadow);
  padding: clamp(1.8rem, 3.5vw, 2.8rem);
  transform: rotate(-1.3deg);
}

.fee__label {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--azul);
}

.fee__price {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 9vw, 7rem);
  line-height: 1;
  color: var(--ink);
  margin-top: 0.4rem;
}
.fee__price small {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700;
}

.fee__terms {
  list-style: none;
  margin-top: 1.4rem;
}
.fee__terms li {
  padding: 0.55rem 0;
  border-top: 1px dashed rgba(16, 29, 51, 0.3);
  color: var(--muted);
  font-weight: 500;
  font-size: 0.98rem;
}

.fee__sign .btn { margin-top: 1.5rem; }

.fee__text h2 { margin-bottom: 1.2rem; }
.fee__text p + p { margin-top: 1rem; }

/* ---------- Contacto ---------- */

.contact {
  background: var(--paper-2);
}
.contact__inner {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}
.contact__intro h2 { max-width: 14ch; margin-bottom: 1.2rem; }

.contact__cards {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.contact__card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.4rem 1.6rem;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
a.contact__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.contact__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--azul);
}
.contact__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-top: 0.3rem;
  color: var(--ink);
  text-transform: uppercase;
}
.contact__extra {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Galería tipo muro de carteles ---------- */

.wall {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 3rem);
}
.wall > h2 { max-width: 20ch; }
.wall > p { margin-top: 1rem; }

.wall__grid {
  margin-top: 2.5rem;
  columns: 3;
  column-gap: 18px;
}

.wall__item {
  display: block;
  width: 100%;
  margin-bottom: 18px;
  border: 0;
  padding: 0;
  cursor: zoom-in;
  background: var(--white);
  break-inside: avoid;
  box-shadow: 0 10px 28px rgba(16, 29, 51, 0.12);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
/* Cada foto cuelga un poco torcida, como en la pared de verdad */
.wall__item:nth-child(odd) { transform: rotate(-0.8deg); }
.wall__item:nth-child(even) { transform: rotate(0.6deg); }
.wall__item:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: 0 18px 42px rgba(16, 29, 51, 0.2);
}
.wall__item img {
  width: 100%;
  border: 8px solid #fff;
  outline: 1px solid var(--line);
}
.wall__item figcaption {
  padding: 0.6rem 0.9rem 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: left;
}

.wall__note {
  margin-top: 1.6rem;
  font-size: 0.9rem;
}

/* ---------- Historia / hitos ---------- */

.legacy {
  background: var(--ink);
  color: #fff;
}
.legacy__inner {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 4vw, 3rem);
}
.legacy h2 { color: #fff; max-width: 18ch; }
.legacy > .legacy__inner > p { color: rgba(255, 255, 255, 0.85); }

/* Cada cita ocupa una fila: el cartel de la ultima edicion junto al texto */
.legacy__cols {
  margin-top: 2.8rem;
  display: grid;
  gap: clamp(2.8rem, 6vw, 4.5rem);
}

.legacy__cita {
  display: grid;
  grid-template-columns: minmax(170px, 250px) 1fr;
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: start;
}
/* La segunda cita invierte el orden para romper la simetria.
   Hay que invertir tambien el ancho de las columnas y colocar cada
   pieza a mano: con 'order' el cartel se quedaba la columna ancha. */
.legacy__cita--flip { grid-template-columns: 1fr minmax(170px, 250px); }
.legacy__cita--flip .legacy__cartel { grid-column: 2; grid-row: 1; }
.legacy__cita--flip .legacy__block  { grid-column: 1; grid-row: 1; }

.legacy__cartel {
  background: #fff;
  padding: 8px 8px 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  transform: rotate(-1.2deg);
  cursor: zoom-in;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease;
}
.legacy__cita--flip .legacy__cartel { transform: rotate(1deg); }
.legacy__cartel:hover,
.legacy__cartel:focus-visible {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}
.legacy__cartel img { width: 100%; }
.legacy__cartel figcaption {
  padding: 0.55rem 0.2rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.legacy__block h3 {
  color: #8fabe8;
  margin-bottom: 0.9rem;
}
.legacy__block p { color: rgba(255, 255, 255, 0.8); }
.legacy__block p + p { margin-top: 0.9rem; }

.legacy__years {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.legacy__year {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 0.7rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- CTA final ---------- */

.cta-final {
  position: relative;
  overflow: hidden;
  background: var(--azul);
  color: #fff;
  text-align: center;
}
.cta-final__inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(4rem, 11vh, 7rem) clamp(1.2rem, 4vw, 3rem);
}
.cta-final h2 {
  color: #fff;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
}
.cta-final p {
  color: rgba(255, 255, 255, 0.88);
  margin: 1.2rem auto 0;
}
.cta-final .btn { margin-top: 2rem; }
.cta-final .btn--azul {
  background: #fff;
  color: var(--azul-deep);
}
.cta-final .btn--azul:hover { background: var(--paper); }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
}

.footer__main {
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 4.5rem) clamp(1.2rem, 4vw, 3rem) 2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
}
.footer__logo span { color: #8fabe8; }

.footer__tag {
  margin-top: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  max-width: 40ch;
}

.footer__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.footer__h {
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: #8fabe8;
  margin-bottom: 0.9rem;
}
.footer__col a, .footer__col span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}
.footer__col a:hover { color: #fff; }

.footer__orgs {
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 3rem) 1.5rem;
}
.footer__orgs-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.9rem;
}
.footer__logos {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  padding: 0.45rem 0.7rem;
}
.footer__chip img { height: 40px; width: auto; }

.footer__bottom {
  max-width: 1250px;
  margin: 0 auto;
  padding: 1.2rem clamp(1.2rem, 4vw, 3rem) 1.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer__bottom a { color: rgba(255, 255, 255, 0.7); }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(16, 29, 51, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(1000px, 100%);
  max-height: 85svh;
  object-fit: contain;
  border: 10px solid #fff;
}
.lightbox__close {
  position: absolute;
  top: 1rem; right: 1.4rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Animaciones (estado inicial gestionado por JS) ---------- */

.anim-up, .anim-head { will-change: transform, opacity; }
.anim-reveal { will-change: clip-path; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .zone img, .wall__item, .btn, .contact__card { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .zones__grid { grid-auto-rows: 200px; }
  .zone--a { grid-column: span 12; grid-row: span 1; }
  .zone--b, .zone--c { grid-column: span 6; }
  .zone--d { grid-column: span 5; }
  .zone--e { grid-column: span 7; }
  .zone--f { grid-column: span 7; }
  .zone--g { grid-column: span 5; grid-row: span 1; }
  .zone--h { grid-column: span 12; grid-row: span 1; }
  .wall__grid { columns: 2; }
}

@media (max-width: 860px) {
  /* El panel visual sobra en pantallas pequeñas: manda la lista */
  .menu { grid-template-columns: 1fr; }
  .menu__aside { display: none; }
  .menu__nav { padding-top: 6rem; }
  .nav__tel { display: none; }

  .split,
  .contact__inner,
  .fee__inner {
    grid-template-columns: 1fr;
  }

  .legacy__cita,
  .legacy__cita--flip { grid-template-columns: 1fr; }
  .legacy__cita--flip .legacy__cartel,
  .legacy__cita--flip .legacy__block { grid-column: 1; grid-row: auto; }
  .legacy__cartel { max-width: 300px; }
  .split--flip .split__media { order: 0; }
  .split__media img { height: 320px; }
  .fee__sign { transform: rotate(-0.8deg); }

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

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

@media (max-width: 560px) {
  .zones__grid { display: block; }
  .zone { height: 220px; margin-bottom: 12px; }
  .zone--text { height: auto; }
  .wall__grid { columns: 1; }
  .hero__actions .btn { width: 100%; text-align: center; }
}
