/* Summit Climate HVAC — dark luxury + brass (client reference palette) */
:root {
  --bg: #0b0b0b;
  --bg-elevated: #141414;
  --bg-card: #1c1c1c;
  --bg-dark: #050505;
  --text: #ffffff;
  --text-muted: #d1d1d1;
  --text-subtle: #8a8a8a;
  --accent: #c5a059;
  --accent-dark: #a88645;
  --accent-light: #d4b878;
  --accent-highlight: #f9e076;
  --accent-soft: rgba(197, 160, 89, 0.14);
  --warm: #e8c547;
  --border: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(197, 160, 89, 0.42);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 12px 32px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --header-h: 4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --content-max: 1160px;
  --hero-content-max: 1920px;
  --hero-pad-x: clamp(0.65rem, 2.8vw, 1.2rem);
  /* Alineación tipo referencia: ~10–12vw desde la izquierda (bajo el logo), tope en pantallas muy anchas */
  --hero-text-inset-start: clamp(2rem, 11vw, 10.5rem);
  --page-pad: clamp(1rem, 4vw, 1.5rem);
  /* Cabeceras interior con foto: más altas que el min-height del .hero, para acercarse al hero real de Home (grid + imagen). */
  --page-hero-photo-min-h: clamp(28rem, 78vh, 54rem);
  --page-hero-photo-min-h-lg: clamp(32rem, 82vh, 58rem);
  --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

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

html {
  scroll-behavior: smooth;
  /* Ancho estable con/sin scrollbar (evita saltos de layout entre páginas cortas y largas) */
  scrollbar-gutter: stable;
}

/* Navegación MPA mismo origen: fundido entre documento anterior y nuevo (Chromium 126+, Safari reciente) */
@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 0.4s;
  animation-timing-function: var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--grain);
  background-size: 200px 200px;
  -webkit-font-smoothing: antialiased;
}

/* Entrada del contenido principal (refuerzo en navegadores sin view transition cross-document) */
#main {
  animation: page-content-in 0.42s var(--ease) both;
}

@keyframes page-content-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-light);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 600;
  border-radius: 8px;
}

.skip:focus {
  left: 0.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Navegación interna: overlay con spinner (activado por html.nav-loading + sessionStorage cossNav) */
.page-spinner {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(11, 11, 11, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html.nav-loading .page-spinner {
  display: flex;
}

.page-spinner__ring {
  width: 3.25rem;
  height: 3.25rem;
  border: 4px solid rgba(197, 160, 89, 0.35);
  border-top-color: var(--accent-highlight);
  border-radius: 50%;
  animation: page-spinner-rotate 0.55s linear infinite;
  box-shadow: 0 0 24px rgba(197, 160, 89, 0.2);
}

@keyframes page-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-spinner__ring {
    animation: none;
    border-color: rgba(197, 160, 89, 0.35);
    border-top-color: var(--accent);
    opacity: 0.92;
  }
}

.wrap {
  width: 100%;
  /* 100% del contenedor, no 100vw: 100vw ignora la scrollbar y el ancho “útil” cambia entre páginas */
  max-width: min(var(--content-max), calc(100% - 2 * var(--page-pad)));
  margin-inline: auto;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: rgba(11, 11, 11, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

/* Ancho fijo al mismo criterio que .wrap: mismo menú en Home, About y resto (sin estirar a 1920px) */
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  width: 100%;
  min-height: var(--header-h);
  max-width: min(var(--content-max), calc(100% - 2 * var(--page-pad)));
  margin-inline: auto;
  padding: 0.65rem var(--page-pad);
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(
    135deg,
    var(--accent-dark) 0%,
    var(--accent) 45%,
    var(--accent-highlight) 100%
  );
  display: grid;
  place-items: center;
  color: var(--bg-dark);
  font-size: 1.1rem;
  box-shadow: 0 8px 26px rgba(197, 160, 89, 0.3);
}

.logo__text span {
  color: var(--accent);
}

.nav {
  display: none;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.2;
  box-sizing: border-box;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Misma “pill” en Home, About y resto: solo el ítem con aria-current */
.nav a[aria-current="page"] {
  color: var(--accent-light);
  background: rgba(197, 160, 89, 0.2);
  box-shadow: inset 0 0 0 1px var(--border-gold);
}

.nav a[aria-current="page"]:hover {
  color: var(--accent-highlight);
  background: rgba(197, 160, 89, 0.26);
}

.header__cta {
  display: inline-flex;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.48rem 0.75rem;
  font-size: 0.8rem;
  line-height: 1.2;
  border-radius: 10px;
}

.header__cta .header__cta-desktop {
  display: none;
}

.header__cta .header__cta-mobile {
  display: inline;
}

@media (max-width: 879px) {
  .header__cta {
    margin-left: auto;
  }
}

@media (min-width: 880px) {
  .header__inner {
    gap: 1rem;
  }

  .nav {
    display: flex;
  }

  .header__cta {
    margin-left: 0;
    padding: 0.72rem 1.35rem;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .header__cta .header__cta-mobile {
    display: none;
  }

  .header__cta .header__cta-desktop {
    display: inline;
  }
}

@media (min-width: 480px) and (max-width: 879px) {
  .header__cta {
    font-size: 0.85rem;
    padding: 0.52rem 0.95rem;
  }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-gold);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

@media (min-width: 880px) {
  .nav-toggle {
    display: none;
  }
}

.drawer {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: rgba(14, 14, 14, 0.97);
  backdrop-filter: blur(12px);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  border-top: 1px solid var(--border-gold);
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer a {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.drawer a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.drawer a[aria-current="page"] {
  background: rgba(197, 160, 89, 0.2);
  color: var(--accent-light);
  box-shadow: inset 0 0 0 1px var(--border-gold);
}

@media (min-width: 880px) {
  .drawer {
    display: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.35rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: linear-gradient(
    135deg,
    var(--accent-dark) 0%,
    var(--accent) 50%,
    var(--accent-light) 100%
  );
  color: var(--bg-dark);
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(197, 160, 89, 0.32);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(197, 160, 89, 0.42);
  color: var(--bg-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-gold);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-soft);
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--bg);
  /* Más altura = menos recorte vertical con cover (mejor encuadre de la camioneta) */
  min-height: clamp(26rem, 72vh, 50rem);
  z-index: 0;
}

/* Velo legible encima de las fotos, debajo del contenido (z-index 1 < wrap 2) */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(
    100deg,
    rgba(6, 6, 6, 0.78) 0%,
    rgba(8, 8, 8, 0.35) 28%,
    rgba(10, 10, 10, 0.12) 42%,
    rgba(10, 10, 10, 0.04) 52%,
    transparent 65%
  );
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 90% center;
  background-repeat: no-repeat;
}

.hero__bg-layer--a {
  background-image: url("../images/fondo_1.png");
  animation: hero-bg-crossfade-a 16s ease-in-out infinite;
}

.hero__bg-layer--b {
  background-image: url("../images/tecnico.png");
  animation: hero-bg-crossfade-b 16s ease-in-out infinite;
}

@keyframes hero-bg-crossfade-a {
  0%,
  40% {
    opacity: 1;
  }
  45%,
  90% {
    opacity: 0;
  }
  95%,
  100% {
    opacity: 1;
  }
}

@keyframes hero-bg-crossfade-b {
  0%,
  40% {
    opacity: 0;
  }
  45%,
  90% {
    opacity: 1;
  }
  95%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg-layer--a,
  .hero__bg-layer--b {
    animation: none;
  }

  .hero__bg-layer--a {
    opacity: 1;
  }

  .hero__bg-layer--b {
    opacity: 0;
  }
}

/* Prototipo A — Our Services: halos dorados que se desplazan muy lentamente + grain (capa ::before) */
@keyframes services-proto-a-bg-drift {
  0% {
    background-position: 0% 28%, 100% 72%, 0 0;
  }
  100% {
    background-position: 88% 42%, 12% 58%, 0 0;
  }
}

.hero .wrap {
  position: relative;
  z-index: 2;
  max-width: min(
    var(--hero-content-max),
    calc(100% - 2 * var(--hero-pad-x) - var(--hero-text-inset-start))
  );
  padding-left: calc(var(--hero-pad-x) + var(--hero-text-inset-start));
  padding-right: var(--hero-pad-x);
}

.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}

@media (min-width: 900px) {
  .hero {
    min-height: clamp(30rem, 78vh, 54rem);
  }

  .page-hero--photo {
    min-height: var(--page-hero-photo-min-h-lg);
  }

  .hero__grid {
    grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.75fr);
  }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65), 0 6px 32px rgba(0, 0, 0, 0.5);
}

.hero__lead {
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin: 0 0 1.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero__trust strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero__visual {
  position: relative;
  overflow: visible;
  z-index: 1;
}

/* Solo la imagen: sin radio ni sombra tipo “recuadro” */
.hero__visual-photo {
  display: block;
  width: 100%;
  height: auto;
}

/* Home: la camioneta en una columna se ve pequeña/recortada; solo desde el layout de dos columnas */
@media (max-width: 899px) {
  .hero__visual {
    display: none;
  }
}

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section--alt {
  background: var(--bg-elevated);
}

.section__head {
  max-width: 640px;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.section__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.section__head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.cards-3 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow);
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: clamp(2rem, 4vw, 2.75rem);
  background: linear-gradient(
    145deg,
    #0f0f0f 0%,
    #1a1612 48%,
    #141414 100%
  );
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  color: #fff;
  text-align: center;
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stats__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stats__label {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.82);
}

.quotes {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .quotes {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quote {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  position: relative;
}

.quote::before {
  content: "“";
  font-family: Georgia, serif;
  font-size: 3rem;
  line-height: 1;
  color: rgba(197, 160, 89, 0.22);
  position: absolute;
  top: 0.5rem;
  right: 1.25rem;
  opacity: 0.95;
}

.quote p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.quote footer {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.cta-band {
  text-align: center;
  padding: clamp(2.5rem, 5vw, 3.5rem);
  background: linear-gradient(
    135deg,
    #161616 0%,
    #1f1a14 50%,
    #141414 100%
  );
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  box-shadow: inset 0 1px 0 rgba(197, 160, 89, 0.12), var(--shadow-sm);
  color: #fff;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.cta-band p {
  margin: 0 0 1.25rem;
  opacity: 0.95;
  max-width: 520px;
  margin-inline: auto;
}

.cta-band .btn--primary {
  background: linear-gradient(
    135deg,
    var(--accent-dark) 0%,
    var(--accent) 55%,
    var(--accent-light) 100%
  );
  color: var(--bg-dark);
  box-shadow: 0 10px 28px rgba(197, 160, 89, 0.35);
}

.cta-band .btn--primary:hover {
  color: var(--bg-dark);
}

.page-hero {
  padding: clamp(2rem, 5vw, 3rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  background: linear-gradient(180deg, #161616 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 58ch;
  font-size: 1.05rem;
}

/* Cabeceras con foto: ancho full-bleed como .hero; altura mínima mayor (ver :root) para paridad visual con Home. */
.page-hero--photo {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Anula el degradado de .page-hero; el color cubre si la imagen tarda */
  background: var(--bg);
  min-height: var(--page-hero-photo-min-h);
  /* Paridad con .hero: el padding vertical va en .wrap (como .hero__grid), no en .page-hero */
  padding: 0;
}

.page-hero--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 90% center;
}

.page-hero--photo.page-hero--photo-about::before {
  background-image: url("../images/tecnico.png");
}

.page-hero--photo.page-hero--photo-services::before {
  background-image: url("../images/services.png");
}

.page-hero--photo.page-hero--photo-gallery::before {
  background-image: url("../images/tecnico.png");
}

.page-hero--photo.page-hero--photo-contact::before {
  background-image: url("../images/contacto.png");
  /* Mismo criterio que About/Services/Gallery: cover (evita letterboxing en móvil con 100% auto). */
}

.page-hero--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: linear-gradient(
    100deg,
    rgba(6, 6, 6, 0.78) 0%,
    rgba(8, 8, 8, 0.35) 28%,
    rgba(10, 10, 10, 0.12) 42%,
    rgba(10, 10, 10, 0.04) 52%,
    transparent 65%
  );
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* Misma caja de contenido que .hero .wrap + .hero__grid (alineación con Home) */
.page-hero--photo .wrap {
  position: relative;
  z-index: 2;
  max-width: min(
    var(--hero-content-max),
    calc(100% - 2 * var(--hero-pad-x) - var(--hero-text-inset-start))
  );
  padding-left: calc(var(--hero-pad-x) + var(--hero-text-inset-start));
  padding-right: var(--hero-pad-x);
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.page-hero--photo h1 {
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65), 0 6px 28px rgba(0, 0, 0, 0.45);
}

.page-hero--photo p {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.split {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.prose {
  color: var(--text-muted);
}

.prose h2 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.service-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.service-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.service-block h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}

.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 720px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.04);
}

.gallery__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.75rem 1rem;
  background: linear-gradient(transparent, rgba(5, 5, 5, 0.92));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.contact-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.contact-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.contact-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-list strong {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-list a {
  font-weight: 600;
  text-decoration: none;
}

.form label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  color: var(--text);
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--text-subtle);
}

.form input:focus-visible,
.form textarea:focus-visible,
.form select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.form textarea {
  min-height: 140px;
  resize: vertical;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
}

.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.78);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--border-gold);
}

.footer a {
  color: var(--accent-light);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent-highlight);
}

.footer__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(197, 160, 89, 0.2);
  font-size: 0.88rem;
  text-align: center;
  color: var(--text-subtle);
}

/* --- Services section design prototypes (services-prototype-*.html only) --- */

.proto-strip {
  background: linear-gradient(90deg, rgba(197, 160, 89, 0.18), rgba(197, 160, 89, 0.06));
  border-bottom: 1px solid var(--border-gold);
  padding: 0.65rem var(--page-pad);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.proto-strip__inner {
  max-width: min(var(--content-max), calc(100% - 2 * var(--page-pad)));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.proto-strip a {
  color: var(--accent-light);
  font-weight: 600;
}

.proto-strip a:hover {
  color: var(--accent-highlight);
}

/* A — Card grid */
.services-proto-a-section.section--alt {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 55%);
  border-block: 1px solid var(--border);
}

.services-proto-a-section.section--alt > .wrap {
  position: relative;
  z-index: 1;
}

.services-proto-a-section.section--alt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 92% 78% at 10% 26%, rgba(197, 160, 89, 0.08), transparent 58%),
    radial-gradient(ellipse 82% 72% at 93% 74%, rgba(168, 134, 69, 0.055), transparent 52%),
    var(--grain);
  background-size: 165% 165%, 175% 175%, 200px 200px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: 0% 30%, 100% 70%, 0 0;
  animation: services-proto-a-bg-drift 78s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .services-proto-a-section.section--alt::before {
    animation: none;
    background-position: 22% 34%, 78% 66%, 0 0;
  }
}

.services-proto-a__head {
  margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem);
  max-width: 38rem;
}

.services-proto-a__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.services-proto-a__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: var(--text);
  line-height: 1.12;
}

.services-proto-a__rule {
  display: block;
  width: 2.75rem;
  height: 3px;
  border-radius: 2px;
  margin: 0 0 1.1rem;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-light));
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.25);
}

.services-proto-a__lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 36rem;
}

.services-proto-a__grid {
  display: grid;
  gap: clamp(1.35rem, 3vw, 1.85rem);
}

@media (min-width: 720px) {
  .services-proto-a__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .services-proto-a__grid {
    gap: 1.5rem 2rem;
  }
}

.services-proto-a__goldline {
  height: 2px;
  margin: clamp(2.25rem, 5vw, 3.5rem) auto;
  max-width: min(52rem, 100%);
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-dark) 10%,
    var(--accent) 38%,
    var(--accent-light) 50%,
    var(--accent) 62%,
    var(--accent-dark) 90%,
    transparent 100%
  );
  box-shadow: 0 0 22px rgba(197, 160, 89, 0.3), 0 0 48px rgba(197, 160, 89, 0.08);
}

.services-proto-a__subhead-wrap {
  margin-bottom: clamp(1.35rem, 3vw, 1.75rem);
  max-width: 36rem;
}

.services-proto-a__eyebrow--muted {
  color: var(--text-subtle);
  letter-spacing: 0.12em;
}

.services-proto-a__subhead-text {
  margin: 0.4rem 0 0;
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (min-width: 720px) {
  .services-proto-a__grid--plus .services-proto-a__card--centered-below {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    max-width: calc(50% - clamp(0.5rem, 1.5vw, 1rem));
  }
}

.services-proto-a__card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(38, 38, 38, 0.55) 0%, var(--bg-card) 42%, var(--bg-card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.2vw, 1.95rem);
  padding-top: calc(clamp(1.5rem, 3.2vw, 1.95rem) + 2px);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.services-proto-a__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent) 45%, var(--accent-light));
  opacity: 0.92;
}

.services-proto-a__card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(800px 120px at 10% 0%, rgba(197, 160, 89, 0.08), transparent 50%);
  transition: opacity 0.35s var(--ease);
}

.services-proto-a__card:hover {
  border-color: rgba(197, 160, 89, 0.35);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(-4px);
}

.services-proto-a__card:hover::after {
  opacity: 1;
}

.services-proto-a__icon-ring {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.05rem;
  color: var(--accent-light);
  background: linear-gradient(145deg, rgba(197, 160, 89, 0.12), rgba(197, 160, 89, 0.04));
  border: 1px solid rgba(197, 160, 89, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.services-proto-a__icon-ring svg {
  flex-shrink: 0;
}

.services-proto-a__card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
  color: var(--text);
}

.services-proto-a__card p {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.72;
}

.services-proto-a__card--photo {
  padding: 0;
  padding-top: 3px;
}

.services-proto-a__card--photo .services-proto-a__media {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
}

/* Mockups generados: 1376×768 — mantener mismo tamaño en futuras imágenes de tarjeta */
.services-proto-a__card--photo .services-proto-a__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 1376 / 768;
  object-fit: cover;
  display: block;
}

.services-proto-a__card--photo .services-proto-a__card-inner {
  padding: clamp(1.25rem, 3vw, 1.65rem);
}

@media (prefers-reduced-motion: reduce) {
  .services-proto-a__card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .services-proto-a__card:hover {
    transform: none;
  }

  .services-proto-a__card::after {
    transition: none;
  }

}

/* B — Editorial numbered rows */
.services-proto-b__head {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 40rem;
}

.services-proto-b__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.65rem, 3.2vw, 2.1rem);
  margin: 0 0 0.5rem;
  color: var(--text);
}

.services-proto-b__head p {
  margin: 0;
  color: var(--text-subtle);
  font-size: 1rem;
}

.services-proto-b__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.services-proto-b__row {
  display: grid;
  gap: 1rem 2rem;
  grid-template-columns: 1fr;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

@media (min-width: 640px) {
  .services-proto-b__row {
    grid-template-columns: minmax(4rem, 5.5rem) minmax(0, 1fr);
  }
}

.services-proto-b__row:first-of-type {
  border-top: 1px solid var(--border-gold);
}

.services-proto-b__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(197, 160, 89, 0.55);
  letter-spacing: -0.04em;
}

.services-proto-b__body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.services-proto-b__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 62ch;
}

/* C — Bento-style grid */
.services-proto-c__head {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.services-proto-c__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.65rem, 3.2vw, 2.1rem);
  margin: 0 0 0.35rem;
  color: var(--text);
}

.services-proto-c__head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 36rem;
}

.services-proto-c__grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.25rem);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .services-proto-c__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(8rem, auto);
  }

  .services-proto-c__cell--featured {
    grid-column: span 2;
    grid-row: span 2;
  }

  .services-proto-c__cell--tall {
    grid-row: span 2;
  }
}

.services-proto-c__cell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: clamp(1.25rem, 2.5vw, 1.65rem);
  transition: border-color 0.2s var(--ease);
}

.services-proto-c__cell:hover {
  border-color: rgba(197, 160, 89, 0.35);
}

.services-proto-c__cell--featured {
  background: linear-gradient(145deg, rgba(28, 28, 28, 1) 0%, rgba(20, 20, 20, 1) 50%, rgba(26, 22, 18, 0.95) 100%);
  border-color: rgba(197, 160, 89, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 12rem;
}

.services-proto-c__cell--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 0%, rgba(197, 160, 89, 0.12), transparent 55%);
  pointer-events: none;
}

.services-proto-c__cell--featured > * {
  position: relative;
  z-index: 1;
}

.services-proto-c__tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.services-proto-c__cell h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.45rem;
  color: var(--text);
}

.services-proto-c__cell--featured h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
}

.services-proto-c__cell p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.services-proto-c__cell--featured p {
  font-size: 0.95rem;
  max-width: 48ch;
}

/* —— Gallery prototype (editorial grid; gallery.html unchanged) —— */
@keyframes gallery-proto-kenburns {
  0% {
    transform: scale(1.09) translate(0%, 0%);
  }
  100% {
    transform: scale(1.172) translate(-2.5%, -1.6%);
  }
}

@keyframes gallery-proto-section-drift {
  0% {
    background-position: 0% 22%, 100% 78%, 0 0;
  }
  100% {
    background-position: 82% 40%, 18% 60%, 0 0;
  }
}

.gallery-proto-section.section--alt {
  position: relative;
  isolation: isolate;
  border-block: 1px solid var(--border);
}

.gallery-proto-section.section--alt > .wrap {
  position: relative;
  z-index: 1;
}

.gallery-proto-section.section--alt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 88% 72% at 8% 24%, rgba(197, 160, 89, 0.07), transparent 56%),
    radial-gradient(ellipse 78% 68% at 94% 76%, rgba(168, 134, 69, 0.048), transparent 50%),
    var(--grain);
  background-size: 170% 170%, 180% 180%, 200px 200px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-position: 0% 28%, 100% 72%, 0 0;
  animation: gallery-proto-section-drift 82s ease-in-out infinite alternate;
}

/* Reveal: cabecera y pie (no son .gallery-proto__item) */
.gallery-proto-section[data-gallery-animate] .gallery-proto__reveal:not(.gallery-proto__item):not(.is-revealed) {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease),
    filter 0.7s var(--ease);
  transition-delay: var(--gp-reveal-delay, 0ms);
}

.gallery-proto-section[data-gallery-animate] .gallery-proto__reveal:not(.gallery-proto__item).is-revealed {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Reveal: tarjetas foto (tilt 3D en el artículo vía --gp-tilt-*) */
.gallery-proto-section[data-gallery-animate] .gallery-proto__item.gallery-proto__reveal:not(.is-revealed) {
  opacity: 0;
  filter: blur(7px);
  transition:
    opacity 0.8s var(--ease),
    filter 0.65s var(--ease);
  transition-delay: var(--gp-reveal-delay, 0ms);
}

.gallery-proto-section[data-gallery-animate] .gallery-proto__item.gallery-proto__reveal.is-revealed {
  opacity: 1;
  filter: blur(0);
}

.gallery-proto-section[data-gallery-animate] .gallery-proto__item.gallery-proto__reveal:not(.is-revealed) .gallery-proto__item-link {
  transform: translateY(48px);
  transition: transform 0.8s var(--ease);
  transition-delay: var(--gp-reveal-delay, 0ms);
}

.gallery-proto-section[data-gallery-animate] .gallery-proto__item.gallery-proto__reveal.is-revealed .gallery-proto__item-link {
  transform: translateY(0);
}

.gallery-proto__head {
  margin-bottom: clamp(2.25rem, 4.5vw, 3.25rem);
  max-width: 40rem;
}

.gallery-proto__eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.gallery-proto__head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.65rem, 3.2vw, 2.1rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: var(--text);
  line-height: 1.12;
}

.gallery-proto__rule {
  display: block;
  width: 2.75rem;
  height: 3px;
  border-radius: 2px;
  margin: 0 0 1.1rem;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), var(--accent-light));
  box-shadow: 0 0 20px rgba(197, 160, 89, 0.25);
}

.gallery-proto__lede {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 38rem;
}

.gallery-proto {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.35rem);
  grid-template-columns: 1fr;
}

/* 2 columnas desde tablet: tarjetas más grandes (9 → 5 filas, última con 1 celda) */
@media (min-width: 720px) {
  .gallery-proto {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
}

.gallery-proto__item {
  --gp-tilt-x: 0deg;
  --gp-tilt-y: 0deg;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transform: perspective(920px) rotateY(var(--gp-tilt-x)) rotateX(var(--gp-tilt-y));
  transform-style: preserve-3d;
  transition:
    transform 0.2s ease-out,
    border-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease),
    opacity 0.8s var(--ease),
    filter 0.65s var(--ease);
  aspect-ratio: 4 / 3;
}

.gallery-proto__item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    125deg,
    rgba(197, 160, 89, 0.14) 0%,
    transparent 42%,
    rgba(197, 160, 89, 0.06) 78%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}

.gallery-proto__item:hover::before,
.gallery-proto__item:has(.gallery-proto__item-link:focus-visible)::before {
  opacity: 1;
}

.gallery-proto__item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* por encima del ::before (wash dorado) */
  background: radial-gradient(ellipse 100% 90% at 50% 100%, transparent 35%, rgba(197, 160, 89, 0.12) 100%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.gallery-proto__item:hover::after,
.gallery-proto__item:has(.gallery-proto__item-link:focus-visible)::after {
  opacity: 1;
}

.gallery-proto__item:hover,
.gallery-proto__item:has(.gallery-proto__item-link:focus-visible) {
  border-color: rgba(197, 160, 89, 0.5);
  box-shadow:
    0 0 0 1px rgba(197, 160, 89, 0.18),
    0 20px 50px rgba(0, 0, 0, 0.48);
}

.gallery-proto__item-link {
  position: relative;
  display: block;
  height: 100%;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
  outline: none;
  transition: transform 0.8s var(--ease);
}

.gallery-proto__item-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.gallery-proto__item-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s var(--ease);
  animation: gallery-proto-kenburns 26s ease-in-out infinite alternate;
  will-change: transform;
}

/* Fases distintas para que no vayan todas sincronizadas (ciclo ~26s) */
.gallery-proto .gallery-proto__item:nth-child(1) .gallery-proto__item-link img {
  animation-delay: 0s;
}
.gallery-proto .gallery-proto__item:nth-child(2) .gallery-proto__item-link img {
  animation-delay: -3.2s;
}
.gallery-proto .gallery-proto__item:nth-child(3) .gallery-proto__item-link img {
  animation-delay: -6.4s;
}
.gallery-proto .gallery-proto__item:nth-child(4) .gallery-proto__item-link img {
  animation-delay: -9.6s;
}
.gallery-proto .gallery-proto__item:nth-child(5) .gallery-proto__item-link img {
  animation-delay: -12.8s;
}
.gallery-proto .gallery-proto__item:nth-child(6) .gallery-proto__item-link img {
  animation-delay: -16s;
}
.gallery-proto .gallery-proto__item:nth-child(7) .gallery-proto__item-link img {
  animation-delay: -19.2s;
}
.gallery-proto .gallery-proto__item:nth-child(8) .gallery-proto__item-link img {
  animation-delay: -22.4s;
}
.gallery-proto .gallery-proto__item:nth-child(9) .gallery-proto__item-link img {
  animation-delay: -12s;
}

.gallery-proto__item:hover .gallery-proto__item-link img,
.gallery-proto__item .gallery-proto__item-link:hover img,
.gallery-proto__item .gallery-proto__item-link:focus-visible img {
  animation: none;
  transform: scale(1.06);
}

.gallery-proto__cap {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: linear-gradient(transparent, rgba(5, 5, 5, 0.55) 35%, rgba(5, 5, 5, 0.94));
}

.gallery-proto__cap-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.gallery-proto__cap-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.45;
}

.gallery-proto__cap-cta {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-top: 0.2rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.gallery-proto__item:hover .gallery-proto__cap-cta,
.gallery-proto__item-link:focus-visible .gallery-proto__cap-cta {
  opacity: 1;
  transform: translateY(0);
}

.gallery-proto__footnote {
  margin: clamp(2rem, 4vw, 2.75rem) auto 0;
  text-align: center;
  color: var(--text-muted);
  max-width: 52ch;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Gallery prototype — full-image lightbox (<dialog>) */
.gallery-proto-lightbox {
  padding: 0;
  border: none;
  margin: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  background: transparent;
  box-sizing: border-box;
  color: #fff;
}

.gallery-proto-lightbox::backdrop {
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(8px);
}

.gallery-proto-lightbox__panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: clamp(3.25rem, 7vw, 4.5rem) clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
}

.gallery-proto-lightbox__figure {
  margin: 0;
  max-width: min(1120px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.gallery-proto-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(72vh, 780px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow:
    0 4px 0 rgba(197, 160, 89, 0.12),
    0 28px 70px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(197, 160, 89, 0.25);
}

.gallery-proto-lightbox__figcaption {
  text-align: center;
  max-width: 48ch;
  padding: 0 0.5rem;
}

.gallery-proto-lightbox__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.gallery-proto-lightbox__meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.gallery-proto-lightbox__kbd-hint {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.gallery-proto-lightbox__close,
.gallery-proto-lightbox__nav {
  appearance: none;
  margin: 0;
  border: 1px solid rgba(197, 160, 89, 0.35);
  background: rgba(12, 12, 12, 0.75);
  color: var(--accent-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.2s ease;
}

.gallery-proto-lightbox__close:hover,
.gallery-proto-lightbox__nav:hover {
  background: rgba(197, 160, 89, 0.14);
  border-color: rgba(197, 160, 89, 0.55);
  color: #fff;
}

.gallery-proto-lightbox__close:focus-visible,
.gallery-proto-lightbox__nav:focus-visible {
  outline: 2px solid var(--accent, #c5a059);
  outline-offset: 3px;
}

.gallery-proto-lightbox__close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
}

.gallery-proto-lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
}

.gallery-proto-lightbox__nav--prev {
  left: max(0.5rem, env(safe-area-inset-left));
}

.gallery-proto-lightbox__nav--next {
  right: max(0.5rem, env(safe-area-inset-right));
}

@media (max-width: 520px) {
  .gallery-proto-lightbox__nav {
    top: auto;
    bottom: max(5rem, env(safe-area-inset-bottom));
    transform: none;
  }

  .gallery-proto-lightbox__nav--prev {
    left: calc(50% - 3.25rem);
  }

  .gallery-proto-lightbox__nav--next {
    right: calc(50% - 3.25rem);
    left: auto;
  }

  .gallery-proto-lightbox__img {
    max-height: min(58vh, 560px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-proto-lightbox__close,
  .gallery-proto-lightbox__nav {
    transition: none;
  }

  .gallery-proto-lightbox::backdrop {
    backdrop-filter: none;
  }

  .gallery-proto-section.section--alt::before {
    animation: none;
    background-position: 24% 32%, 76% 68%, 0 0;
  }

  .gallery-proto-section[data-gallery-animate] .gallery-proto__reveal:not(.gallery-proto__item) {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .gallery-proto-section[data-gallery-animate] .gallery-proto__item.gallery-proto__reveal {
    opacity: 1;
    filter: none;
    transition: none;
    transform: none;
  }

  .gallery-proto-section[data-gallery-animate] .gallery-proto__item .gallery-proto__item-link {
    transform: none;
    transition: none;
  }

  .gallery-proto__item::before {
    transition: none;
    opacity: 0.35;
  }

  .gallery-proto__item-link img {
    animation: none;
    will-change: auto;
    transition: none;
  }

  .gallery-proto__item:hover .gallery-proto__item-link img,
  .gallery-proto__item .gallery-proto__item-link:hover img,
  .gallery-proto__item .gallery-proto__item-link:focus-visible img {
    transform: none;
  }

  .gallery-proto__cap-cta {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .gallery-proto__item::after {
    transition: none;
    opacity: 0.5;
  }
}

/* —— Floating WhatsApp (body[data-wa-phone]) —— */
.wa-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 60;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: linear-gradient(155deg, #2fe06d 0%, #25d366 42%, #128c7e 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.12),
    0 14px 36px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(197, 160, 89, 0.55);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.wa-float__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wa-float:hover {
  color: #fff;
  transform: scale(1.07);
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.1),
    0 18px 44px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.wa-float:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.wa-float__icon svg {
  width: 1.9rem;
  height: 1.9rem;
  display: block;
  flex-shrink: 0;
}

/* Evita que el botón tape el pie en móvil */
@media (max-width: 767px) {
  body.has-wa-float {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 768px) {
  .wa-float {
    width: auto;
    min-height: 3.35rem;
    height: auto;
    padding: 0.55rem 1.15rem 0.55rem 0.7rem;
    border-radius: 999px;
    gap: 0.5rem;
    right: 1.25rem;
    bottom: 1.25rem;
  }

  .wa-float__label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
  }

  .wa-float__icon svg {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media (min-width: 900px) {
  .wa-float {
    right: 1.4rem;
    bottom: 1.4rem;
    padding-inline: 1.2rem 1.25rem;
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float {
    transition: none;
  }

  .wa-float:hover {
    transform: none;
  }
}

@media print {
  .wa-float {
    display: none !important;
  }

  body.has-wa-float {
    padding-bottom: 0 !important;
  }
}
