/* ==========================================================================
   AFIBRA de México — hoja de estilos principal
   Paleta base: F1EDE4 (arena) · tipografía editorial · retícula amplia
   ========================================================================== */

:root {
  --sand:        #F1EDE4;
  --sand-deep:   #E7E1D4;
  --paper:       #FAF8F3;
  --ink:         #1E1B16;
  --ink-soft:    #4A443A;
  --muted:       #8C8477;
  --line:        #D8D1C2;
  --accent:      #8A6F4E;

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --max:      1280px;
  --gutter:   clamp(1.5rem, 5vw, 5rem);
  --section:  clamp(5rem, 11vw, 10rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

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

/* --------------------------------------------------------------- Layout - */

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 860px; }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3.5rem, 7vw, 6rem); }
.section--paper { background: var(--paper); }
.section--deep  { background: var(--sand-deep); }
.section--ink   { background: var(--ink); color: var(--sand); }
.section--ink .eyebrow { color: rgba(241, 237, 228, 0.55); }
.section--ink .rule { background: rgba(241, 237, 228, 0.22); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ------------------------------------------------------------ Tipografía - */

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.75rem;
  display: block;
}

.display {
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 0.98;
}

.h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.h2 { font-size: clamp(1.9rem, 4vw, 3.25rem); }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); }

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem);
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 300;
}

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

.text-body p { max-width: 68ch; color: var(--ink-soft); }

/* ---------------------------------------------------------------- Header - */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-solid {
  background: rgba(241, 237, 228, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: padding 0.5s var(--ease);
}

.site-header.is-solid .site-header__inner { padding-block: 1.1rem; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__mark {
  height: 2rem;
  width: auto;
  transition: height 0.5s var(--ease);
}

.site-header.is-solid .brand__mark { height: 1.7rem; }

.brand__text span { color: var(--muted); }

/* Sobre la foto de portada el encabezado va en claro */
.site-header:not(.is-solid) .brand,
.site-header:not(.is-solid) .nav > a,
.site-header:not(.is-solid) .lang button,
.site-header:not(.is-solid) .lang { color: rgba(250, 248, 243, 0.85); }

.site-header:not(.is-solid) .brand__text span { color: rgba(250, 248, 243, 0.6); }
.site-header:not(.is-solid) .nav > a:hover,
.site-header:not(.is-solid) .nav > a.is-active,
.site-header:not(.is-solid) .lang button.is-active { color: #FAF8F3; }
.site-header:not(.is-solid) .burger span { background: #FAF8F3; }

/* Con el menú móvil abierto el fondo es claro, así que volvemos al tono oscuro */
body.menu-open .site-header:not(.is-solid) .nav > a { color: var(--ink-soft); }
body.menu-open .site-header:not(.is-solid) .burger span { background: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.5rem);
}

.nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  position: relative;
  transition: color 0.3s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}

.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav a.is-active { color: var(--ink); }

/* Selector de idioma */
.lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.lang button {
  background: none;
  border: 0;
  padding: 0.25rem 0.1rem;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s var(--ease);
}

.lang button:hover { color: var(--ink); }
.lang button.is-active { color: var(--ink); }
.lang .sep { opacity: 0.45; }

/* Menú móvil */
.burger {
  display: none;
  width: 2rem;
  height: 2rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}

.burger span:nth-child(1) { top: 0.7rem; }
.burger span:nth-child(2) { top: 1.2rem; }

body.menu-open .burger span:nth-child(1) { transform: translateY(0.25rem) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-0.25rem) rotate(-45deg); }

/* ------------------------------------------------------------------ Hero - */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  /* El color de respaldo mantiene legible el texto mientras carga la foto */
  background: #2A2620 center/cover no-repeat;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 27, 22, 0.35) 0%, rgba(30, 27, 22, 0.12) 45%, rgba(30, 27, 22, 0.72) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  color: var(--paper);
}

.hero .eyebrow { color: rgba(250, 248, 243, 0.7); }

.hero__title {
  font-size: clamp(2.75rem, 7.5vw, 6rem);
  line-height: 1.02;
  max-width: 15ch;
}

.hero__meta {
  margin-top: clamp(2rem, 4vw, 3.25rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  align-items: baseline;
  border-top: 1px solid rgba(250, 248, 243, 0.28);
  padding-top: 1.5rem;
}

.hero__meta p {
  margin: 0;
  font-size: 0.9375rem;
  color: rgba(250, 248, 243, 0.82);
  max-width: 42ch;
}

.hero--inner {
  min-height: 62svh;
  align-items: flex-end;
}

/* Cabecera de página interior sin foto */
.page-head {
  padding-top: clamp(9rem, 15vw, 13rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.page-head .h1 { max-width: 18ch; }
.page-head .lead { max-width: 58ch; margin-top: 1.75rem; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 1.05rem 2rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease);
}

.btn:hover { background: var(--ink); color: var(--sand); }

.btn--solid { background: var(--ink); color: var(--sand); }
.btn--solid:hover { background: transparent; color: var(--ink); }

.btn--light { border-color: rgba(250, 248, 243, 0.6); color: var(--paper); }
.btn--light:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.4s var(--ease), gap 0.4s var(--ease);
}

.link-arrow:hover { border-color: var(--ink); gap: 1rem; }
.link-arrow::after { content: "→"; font-size: 0.9rem; }

/* ---------------------------------------------------------------- Grillas - */

.grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}

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

/* Dos columnas asimétricas: título a la izquierda, texto a la derecha */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.split--reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.sticky { position: sticky; top: 7rem; }

/* ------------------------------------------------------------------ Cifras - */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.stat {
  background: var(--sand);
  padding: clamp(2rem, 3.5vw, 3rem) clamp(1.25rem, 2vw, 2rem);
}

.section--paper .stat { background: var(--paper); }

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 3.75rem);
  line-height: 1;
  display: block;
}

.stat__label {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Tarjetas - */

.card {
  display: block;
  color: inherit;
}

.card__media {
  position: relative;
  overflow: hidden;
  background: var(--sand-deep);
  aspect-ratio: 4 / 5;
}

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

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

.card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-top: 1.4rem;
}

.card__meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card--wide .card__media { aspect-ratio: 16 / 10; }
.card--square .card__media { aspect-ratio: 1 / 1; }

/* Lista numerada tipo índice (soluciones / proceso) */
.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.index-list li {
  border-bottom: 1px solid var(--line);
}

.index-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  padding-block: clamp(1.6rem, 3vw, 2.4rem);
  align-items: baseline;
  transition: padding-inline 0.5s var(--ease);
}

a.index-item:hover { padding-inline: 0.75rem; }

.index-item__num {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 0.5rem;
}

.index-item__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.2;
}

.index-item__desc {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  max-width: 62ch;
  font-size: 0.9375rem;
}

/* Lista de ventajas con viñeta fina */
.tick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: clamp(2rem, 5vw, 4rem);
}

.tick-list li {
  break-inside: avoid;
  padding: 0.85rem 0 0.85rem 1.75rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.tick-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.5rem;
  width: 0.6rem;
  height: 1px;
  background: var(--accent);
}

/* ------------------------------------------------------------------ Cita - */

.quote {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1.25;
  max-width: 22ch;
}

/* --------------------------------------------------------------- Galería - */

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

.gallery > * { grid-column: span 4; }
.gallery > .is-wide { grid-column: span 8; }
.gallery > .is-half { grid-column: span 6; }
.gallery > .is-full { grid-column: span 12; }

/* Destinos hoteleros */
.destinations { border-top: 1px solid var(--line); }

.destination {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.destination__place {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
}

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

.destination li {
  padding-block: 0.4rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------- Formulario - */

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

.field { display: flex; flex-direction: column; gap: 0.6rem; }
.field--full { grid-column: 1 / -1; }

.field label {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0;
  border-radius: 0;
  transition: border-color 0.4s var(--ease);
  appearance: none;
}

.field textarea { resize: vertical; min-height: 6.5rem; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238C8477'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
}

.form__foot {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.form__note { font-size: 0.8125rem; color: var(--muted); max-width: 46ch; margin: 0; }

.form-status {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  display: none;
}

.form-status.is-visible { display: block; }
.form-status.is-ok { border-color: var(--accent); color: var(--accent); }
.form-status.is-error { border-color: #A44A32; color: #A44A32; }

/* Bloque de datos de contacto */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

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

.contact-list dt,
.contact-list .label {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.contact-list .value { font-size: 1.0625rem; color: var(--ink); }
.contact-list a.value { border-bottom: 1px solid transparent; transition: border-color 0.35s var(--ease); }
.contact-list a.value:hover { border-bottom-color: var(--ink); }

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

.site-footer {
  background: var(--ink);
  color: rgba(241, 237, 228, 0.72);
  padding-block: clamp(4rem, 7vw, 6.5rem) 2.5rem;
  font-size: 0.9375rem;
}

.site-footer a { color: rgba(241, 237, 228, 0.72); transition: color 0.35s var(--ease); }
.site-footer a:hover { color: var(--paper); }

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr));
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--paper);
  line-height: 1.15;
  max-width: 16ch;
}

.footer__col h4 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(241, 237, 228, 0.45);
  margin-bottom: 1.25rem;
}

.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col li { margin-bottom: 0.6rem; }

.footer__bottom {
  border-top: 1px solid rgba(241, 237, 228, 0.16);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(241, 237, 228, 0.5);
}

/* ---------------------------------------------------------- Logo pie - */

.footer__mark {
  height: 2.75rem;
  width: auto;
  margin-bottom: 1.75rem;
}

/* ----------------------------------------------------- Slider portada - */

.slider {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  background: #2A2620;
}

.slider__track { position: absolute; inset: 0; }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.slide.is-active { opacity: 1; }

.slide__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s linear;
}

.slide.is-active .slide__img { transform: scale(1); }

.slider__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(30, 27, 22, 0.5) 0%, rgba(30, 27, 22, 0.22) 38%, rgba(30, 27, 22, 0.82) 100%),
    linear-gradient(90deg, rgba(30, 27, 22, 0.45) 0%, rgba(30, 27, 22, 0.05) 55%);
}

.slider__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  color: var(--paper);
}

.slider .eyebrow { color: rgba(250, 248, 243, 0.7); }

.slider__title {
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  line-height: 1.02;
  max-width: 15ch;
}

/* Pie del slider: obra actual + controles */
.slider__foot {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid rgba(250, 248, 243, 0.28);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.slider__caption { min-height: 3.5rem; }

.slider__caption .label {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.55);
  display: block;
  margin-bottom: 0.5rem;
}

.slider__name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.15;
  display: block;
}

.slider__name a { border-bottom: 1px solid transparent; transition: border-color 0.4s var(--ease); }
.slider__name a:hover { border-bottom-color: rgba(250, 248, 243, 0.7); }

.slider__place {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.6);
  margin-top: 0.5rem;
  display: block;
}

.slider__controls { display: flex; align-items: center; gap: 1.25rem; }

.slider__dots { display: flex; gap: 0.9rem; align-items: center; }

.slider__dot {
  width: 2.75rem;
  height: 2px;
  background: rgba(250, 248, 243, 0.3);
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.slider__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: left;
}

.slider__dot.is-active::after { transform: scaleX(1); transition: transform 0.5s var(--ease); }

.slider__arrow {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(250, 248, 243, 0.4);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}

.slider__arrow:hover { background: var(--paper); color: var(--ink); }

/* --------------------------------------------------- Bloques de obras - */

.works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.work {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sand-deep);
  color: var(--paper);
}

.work img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.work::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 27, 22, 0) 35%, rgba(30, 27, 22, 0.75) 100%);
  transition: background 0.6s var(--ease);
}

.work:hover img { transform: scale(1.05); }
.work:hover::after { background: linear-gradient(180deg, rgba(30, 27, 22, 0.15) 20%, rgba(30, 27, 22, 0.85) 100%); }

.work__body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: clamp(1.25rem, 2vw, 1.75rem);
}

.work__name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  line-height: 1.15;
}

.work__place {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.75);
  margin-top: 0.4rem;
}

/* ------------------------------------------------------- Página obra - */

.obra-hero {
  position: relative;
  min-height: 72svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  background: #2A2620;
  overflow: hidden;
}

.obra-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.obra-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30, 27, 22, 0.4) 0%, rgba(30, 27, 22, 0.1) 40%, rgba(30, 27, 22, 0.75) 100%);
}

.obra-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  color: var(--paper);
}

.obra-hero .eyebrow { color: rgba(250, 248, 243, 0.7); }

.obra-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.obra-meta__item { background: var(--sand); padding: clamp(1.5rem, 2.5vw, 2.25rem) clamp(1rem, 2vw, 1.75rem); }

.obra-meta__label {
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.obra-meta__value { font-size: 1.0625rem; color: var(--ink); }

/* Galería de fotos de la obra */
.fotos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.foto {
  grid-column: span 2;
  aspect-ratio: 3 / 2;
  background: var(--sand-deep);
  overflow: hidden;
  cursor: zoom-in;
  border: 0;
  padding: 0;
}

.foto:nth-child(7n + 1) { grid-column: span 4; aspect-ratio: 16 / 10; }
.foto:nth-child(7n + 6) { grid-column: span 3; aspect-ratio: 3 / 2; }
.foto:nth-child(7n + 7) { grid-column: span 3; aspect-ratio: 3 / 2; }

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

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

/* Visor a pantalla completa */
.visor {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 18, 15, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.visor.is-open { display: flex; }

.visor img {
  max-width: 100%;
  max-height: 85svh;
  object-fit: contain;
}

.visor__close,
.visor__prev,
.visor__next {
  position: absolute;
  background: none;
  border: 0;
  color: rgba(250, 248, 243, 0.75);
  cursor: pointer;
  font-size: 1.5rem;
  padding: 1rem;
  transition: color 0.3s var(--ease);
  font-family: var(--font-body);
}

.visor__close:hover,
.visor__prev:hover,
.visor__next:hover { color: #FAF8F3; }

.visor__close { top: 0.5rem; right: 1rem; }
.visor__prev { left: 0.25rem; top: 50%; transform: translateY(-50%); }
.visor__next { right: 0.25rem; top: 50%; transform: translateY(-50%); }

.visor__count {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: rgba(250, 248, 243, 0.6);
}

/* Navegación entre obras */
.obra-nav {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- WhatsApp - */

.wa {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 90;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--sand);
  display: grid;
  place-items: center;
  transition: transform 0.45s var(--ease), background 0.45s var(--ease);
}

.wa:hover { transform: translateY(-3px); background: var(--accent); }
.wa svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }

/* ------------------------------------------------------- Animación scroll - */

/* Sólo ocultamos el contenido si hay JavaScript para volver a mostrarlo:
   si el script falla, la página se ve completa igualmente. */
.js .reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: repeat(2, 1fr); }
  .obra-meta { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .burger { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.25rem;
    background: var(--sand);
    padding: var(--gutter);
    transform: translateX(100%);
    transition: transform 0.6s var(--ease);
  }

  body.menu-open .nav { transform: none; }
  body.menu-open { overflow: hidden; }

  .nav a { font-size: 1.5rem; letter-spacing: 0.04em; text-transform: none; font-family: var(--font-display); }

  .header-tools { display: flex; align-items: center; gap: 1.25rem; }

  .split,
  .split--reverse,
  .grid--2,
  .grid--3,
  .destination { grid-template-columns: 1fr; }

  .sticky { position: static; }
  .tick-list { columns: 1; }
  .gallery > * { grid-column: span 6; }
  .gallery > .is-wide { grid-column: span 12; }
  .fotos { grid-template-columns: repeat(2, 1fr); }
  .fotos .foto,
  .fotos .foto:nth-child(7n + 1),
  .fotos .foto:nth-child(7n + 6),
  .fotos .foto:nth-child(7n + 7) { grid-column: span 1; aspect-ratio: 3 / 2; }
  .fotos .foto:nth-child(7n + 1) { grid-column: span 2; aspect-ratio: 16 / 10; }
  .form { grid-template-columns: 1fr; }
  .index-item { grid-template-columns: 3rem minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .works { grid-template-columns: 1fr; }
  .obra-meta { grid-template-columns: 1fr; }
  .brand__text { display: none; }
  .slider__foot { flex-direction: column; align-items: flex-start; }
  .gallery > * { grid-column: span 12; }
  .footer__top { grid-template-columns: 1fr; }
  .brand { font-size: 0.9375rem; letter-spacing: 0.24em; }
}

/* Utilidades */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: clamp(3rem, 5vw, 4.5rem); }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
