/* ============================================================
   ESCAPARATE — styles.css · Identidad «Mar adentro»
   tokens.css (la fuente de verdad de la marca) se carga como
   <link> previo en cada página — aquí no se reinventa nada.
   Mobile-first · sin build · se sirve tal cual.
   ============================================================ */

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

html { scroll-padding-top: 96px; }

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

::selection { background: rgba(199, 168, 122, 0.35); }

:focus-visible {
  outline: 2px solid var(--esc-mar);
  outline-offset: 3px;
  border-radius: 2px;
}

.marco {
  width: min(1200px, 100% - clamp(40px, 8vw, 96px));
  margin-inline: auto;
}

.display { font-family: var(--esc-font-display); font-weight: 400; }

h2 {
  font-size: clamp(1.9rem, 4.2vw, var(--esc-text-3xl));
  margin-bottom: var(--esc-space-6);
  max-width: 22ch;
}
h2 em, .maneras-cierre em, .contacto-titulo em { font-style: italic; }
h2 em, .contacto-titulo em {
  background-image: linear-gradient(transparent 62%, rgba(199, 168, 122, 0.38) 62%);
}

.seccion { position: relative; z-index: 4; background: var(--esc-fondo); padding-block: clamp(80px, 13vw, 140px); }
.seccion-label { margin-bottom: var(--esc-space-4); display: flex; align-items: center; gap: 12px; }
.seccion-label::before { content: ''; width: 28px; border-top: 1px solid var(--esc-perfil); }
.seccion-sub { color: var(--esc-gris); max-width: 46ch; margin-bottom: var(--esc-space-8); }

/* Botón secundario (el principal, .cta, vive en tokens.css) */
.cta { display: inline-block; border: 0; cursor: pointer; text-decoration: none; font-weight: 500; font-size: 0.95rem; font-family: var(--esc-font-ui); }
.cta-sec {
  display: inline-block; cursor: pointer; text-decoration: none;
  font-weight: 500; font-size: 0.95rem;
  color: var(--esc-tinta); background: transparent;
  border: 1px solid var(--esc-tinta); border-radius: var(--esc-radius-pill);
  padding: var(--esc-space-3) var(--esc-space-6);
  transition: background var(--esc-dur-corta) var(--esc-ease), color var(--esc-dur-corta) var(--esc-ease), transform var(--esc-dur-corta) var(--esc-ease);
}
.cta-sec:hover { background: var(--esc-tinta); color: #FFFFFF; transform: translateY(-2px); }

/* Salto de accesibilidad */
.salto {
  position: fixed; top: -100px; left: 16px; z-index: 90;
  background: var(--esc-tinta); color: #FFF; padding: 10px 18px;
  border-radius: var(--esc-radius-pill); text-decoration: none;
  transition: top var(--esc-dur-corta) var(--esc-ease);
}
.salto:focus-visible { top: 12px; }

/* Revelado por scroll — CSS defensivo: sin JS todo es visible,
   y si main.js no llega, una red CSS lo revela todo a los 7 s */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s var(--esc-ease), transform 0.7s var(--esc-ease);
  animation: reveal-red-seguridad 0.6s var(--esc-ease) 7s forwards;
}
.js .reveal.in { opacity: 1; transform: none; animation: none; }
.reveal[data-split] { opacity: 1; transform: none; }
@keyframes reveal-red-seguridad { to { opacity: 1; transform: none; } }

/* ============================================================
   Preloader — solo primera visita · doble red de seguridad
   ============================================================ */
#preloader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--esc-fondo);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.55s var(--esc-ease), visibility 0.55s;
  animation: pre-red-seguridad 0.6s var(--esc-ease) 4.5s forwards; /* red CSS: pase lo que pase, se va */
}
#preloader.fuera { opacity: 0; visibility: hidden; }
html.esc-revisita #preloader { display: none; animation: none; }
@keyframes pre-red-seguridad { to { opacity: 0; visibility: hidden; } }

.pre-centro { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 240px; height: 240px; }
.pre-arco { position: absolute; inset: 20px; transform: rotate(-90deg); }
.pre-arco circle { fill: none; }
.pre-arco-guia { stroke: var(--esc-perfil); stroke-width: 1; }
.pre-arco-traza { stroke: var(--esc-tinta); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 553; stroke-dashoffset: 553; }
.pre-wordmark { font-family: var(--esc-font-logo); font-size: 1.05rem; letter-spacing: 0.18em; color: var(--esc-tinta); padding-left: 0.18em; }
.pre-contador { margin-top: 8px; font-variant-numeric: tabular-nums; }

/* ============================================================
   Capas del hero 3D
   ============================================================ */
#palabra-fondo {
  position: fixed; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--esc-font-logo);
  font-size: calc(var(--esc-text-hero) * 0.92);
  letter-spacing: 0.08em;
  color: var(--esc-mar);
  opacity: 0;                 /* el JS lo enciende en la entrada */
  user-select: none; pointer-events: none;
  padding-bottom: 6vh;
  white-space: nowrap;
}

#stage { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
#stage canvas { width: 100%; height: 100%; display: block; touch-action: pan-y; }
#stage.activo { pointer-events: auto; cursor: grab; }
#stage.arrastrando { cursor: grabbing; }

#stage-velo {
  position: fixed; left: 0; right: 0; bottom: 0; height: 26vh; z-index: 3;
  background: linear-gradient(to bottom, rgba(251, 250, 247, 0) 0%, var(--esc-fondo) 82%);
  pointer-events: none; opacity: 0;
}

/* Cuando el hero queda atrás, el 3D se apaga del todo */
html.esc-pasado-hero #stage,
html.esc-pasado-hero #stage-velo,
html.esc-pasado-hero #palabra-fondo,
html.esc-pasado-hero .dock,
html.esc-pasado-hero .tambor-nombre { visibility: hidden; }

/* ============================================================
   Navegación
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(20px, 4vw, 48px);
  background: rgba(251, 250, 247, 0.72);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--esc-dur-media) var(--esc-ease), border-color var(--esc-dur-media) var(--esc-ease);
}
.nav.rodada { background: rgba(251, 250, 247, 0.88); border-bottom-color: var(--esc-perfil); }

.logo { display: inline-flex; align-items: baseline; text-decoration: none; }
.logo-palabra { font-family: var(--esc-font-logo); font-size: 1rem; letter-spacing: 0.16em; color: var(--esc-tinta); }
.logo .horizonte { width: 26px; margin-left: 6px; }
.logo .horizonte-punto { margin-left: 3px; }

.nav-enlaces { display: none; gap: clamp(20px, 3vw, 36px); }
.nav-enlaces a {
  text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--esc-gris);
  transition: color var(--esc-dur-corta) var(--esc-ease);
}
.nav-enlaces a:hover { color: var(--esc-tinta); }
.nav-enlaces a.activo { color: var(--esc-mar); }

.nav-acciones { display: flex; align-items: center; gap: clamp(12px, 2vw, 20px); }
.nav-cta { display: none; padding: 9px 20px; font-size: 0.9rem; }

.idiomas { display: inline-flex; align-items: center; gap: 6px; font-size: var(--esc-text-xs); letter-spacing: var(--esc-tracking-caps); color: var(--esc-perfil); }
.idiomas button {
  background: none; border: 0; cursor: pointer; padding: 4px 2px;
  font-size: var(--esc-text-xs); letter-spacing: var(--esc-tracking-caps);
  color: var(--esc-gris); font-weight: 500;
}
.idiomas button.activo { color: var(--esc-mar); font-weight: 700; }
.idiomas button:hover { color: var(--esc-tinta); }

.burger { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: none; border: 0; cursor: pointer; }
.burger span, .burger span::before, .burger span::after {
  content: ''; display: block; width: 20px; height: 1.6px; background: var(--esc-tinta);
  position: relative; transition: transform var(--esc-dur-corta) var(--esc-ease), opacity var(--esc-dur-corta);
}
.burger span::before { position: absolute; top: -6px; }
.burger span::after { position: absolute; top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Menú móvil */
.menu {
  position: fixed; inset: 0; z-index: 29;
  background: var(--esc-fondo);
  display: flex; align-items: center; justify-content: center; text-align: center;
  opacity: 0; visibility: hidden;
  transition: opacity var(--esc-dur-media) var(--esc-ease), visibility var(--esc-dur-media);
}
.menu.abierto { opacity: 1; visibility: visible; }
.menu nav { display: flex; flex-direction: column; align-items: center; gap: var(--esc-space-6); }
.menu nav > a:not(.cta) {
  font-family: var(--esc-font-display); font-size: 2rem; color: var(--esc-mar); text-decoration: none;
}
.menu .cta { margin-top: var(--esc-space-4); }
.menu .idiomas { margin-top: var(--esc-space-6); }

/* ============================================================
   Hero — el escaparate giratorio
   ============================================================ */
/* El hero deja pasar el puntero al canvas 3D (#stage, z-index 2);
   solo los hijos interactivos lo recuperan */
.hero { position: relative; z-index: 4; height: 180vh; background: transparent; pointer-events: none; }
.hero-escena { position: sticky; top: 0; height: 100vh; height: 100svh; pointer-events: none; }
.hero-escena .hero-linea, .hero-escena .hero-baja, .hero-escena .dock { pointer-events: auto; }

.hero-linea {
  position: absolute; top: clamp(80px, 11vh, 120px); left: 50%; transform: translateX(-50%);
  z-index: 6; width: min(94%, 46ch); text-align: center;
  font-family: var(--esc-font-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  line-height: var(--esc-leading-tight);
  color: var(--esc-mar);
  opacity: 0; /* entra con el tambor */
}
.hero-linea em { font-style: italic; background-image: linear-gradient(transparent 62%, rgba(199, 168, 122, 0.38) 62%); }

.tambor-nombre {
  position: absolute; left: 50%; top: 67%; transform: translate(-50%, -50%);
  z-index: 5; pointer-events: none; text-align: center;
  font-family: var(--esc-font-display);
  font-size: clamp(2rem, 5.5vw, 4rem);
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 0 rgba(16, 27, 38, 0.22), 0 6px 30px rgba(16, 27, 38, 0.38);
  opacity: 0;
  white-space: nowrap;
}

.hero-baja {
  position: absolute; left: clamp(20px, 4vw, 48px); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 6; color: var(--esc-gris); opacity: 0;
}
@media (max-width: 719px) {
  /* que no choque con el dock: centrada encima de él */
  .hero-baja { left: 50%; transform: translateX(-50%); bottom: calc(104px + env(safe-area-inset-bottom, 0px)); white-space: nowrap; }
}

/* Dock flotante */
.dock {
  position: absolute; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 7;
  display: flex; align-items: center; gap: clamp(8px, 2vw, 14px);
  background: var(--esc-superficie);
  border: 1px solid var(--esc-perfil);
  border-radius: var(--esc-radius-pill);
  box-shadow: var(--esc-sombra-md);
  padding: 8px clamp(12px, 2vw, 18px) 8px 8px;
  opacity: 0;
}
.dock-mini {
  width: 44px; height: 58px; border-radius: var(--esc-radius-sm); overflow: hidden;
  border: 1px solid var(--esc-perfil); background: var(--esc-fondo); padding: 0; cursor: pointer; flex: none;
}
.dock-mini img { width: 100%; height: 100%; object-fit: cover; }
.dock-nombre {
  background: none; border: 0; cursor: pointer; padding: 4px 2px;
  font-family: var(--esc-font-display); font-size: clamp(1rem, 2.4vw, 1.15rem); color: var(--esc-mar);
  max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dock-nombre:hover { color: var(--esc-tinta); }
.dock-flechas { display: inline-flex; gap: 6px; }
.dock-flecha {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--esc-perfil); background: var(--esc-superficie);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--esc-tinta);
  transition: background var(--esc-dur-corta) var(--esc-ease), color var(--esc-dur-corta) var(--esc-ease), transform var(--esc-dur-corta) var(--esc-ease);
}
.dock-flecha:hover { background: var(--esc-tinta); color: #FFF; transform: translateY(-1px); }
.dock-contador { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Fallback 2D: sin WebGL o equipo flojo, el hero se pliega con elegancia */
html.esc-2d #stage, html.esc-2d #stage-velo, html.esc-2d #palabra-fondo,
html.esc-2d .dock, html.esc-2d .tambor-nombre { display: none; }
html.esc-2d .hero { height: auto; }
html.esc-2d .hero-escena { position: static; height: auto; padding: 200px 0 96px; }
html.esc-2d .hero-linea { position: static; transform: none; margin-inline: auto; opacity: 1; font-size: clamp(1.8rem, 5vw, 2.8rem); width: min(92%, 24ch); }
html.esc-2d .hero-baja { position: static; margin: 40px auto 0; text-align: center; opacity: 1; }

/* Sin JS: hero legible, nada oculto */
.no-js .hero { height: auto; }
.no-js .hero-escena { position: static; height: auto; padding: 200px 0 96px; }
.no-js .hero-linea, .no-js .hero-baja { opacity: 1; position: static; transform: none; margin-inline: auto; }
.no-js .dock, .no-js .tambor-nombre, .no-js #stage, .no-js #palabra-fondo, .no-js #preloader { display: none; }

/* ============================================================
   Manifiesto
   ============================================================ */
.manifiesto .marco { max-width: 880px; }
.mani-linea {
  font-size: clamp(1.75rem, 4.8vw, 3.05rem);
  line-height: 1.18;
  color: rgba(16, 27, 38, 0.2);
  transition: color 0.7s var(--esc-ease);
  margin-bottom: var(--esc-space-4);
}
.mani-linea.lit { color: var(--esc-mar); }
.mani-luz {
  background-image: var(--esc-degradado-mar);
  background-repeat: no-repeat;
  background-size: 0% 0.14em;
  background-position: 0 92%;
  transition: background-size 0.9s var(--esc-ease);
  padding-bottom: 0.08em;
}
.mani-linea.lit .mani-luz { background-size: 100% 0.14em; }

.mani-stats { margin-top: var(--esc-space-12); display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: baseline; }
.stat { white-space: nowrap; }
.stat-num { color: var(--esc-mar); font-weight: 600; font-size: 1rem; }
.stat-sep { color: var(--esc-arena); }

/* ============================================================
   La vitrina
   ============================================================ */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--esc-space-8); }
.filtro {
  border: 1px solid var(--esc-perfil); background: var(--esc-superficie); color: var(--esc-gris);
  border-radius: var(--esc-radius-pill); padding: 8px 16px; cursor: pointer;
  font-size: var(--esc-text-xs); text-transform: uppercase; letter-spacing: var(--esc-tracking-caps); font-weight: 500;
  transition: background var(--esc-dur-corta) var(--esc-ease), color var(--esc-dur-corta) var(--esc-ease), border-color var(--esc-dur-corta) var(--esc-ease);
}
.filtro:hover { color: var(--esc-tinta); border-color: var(--esc-gris); }
.filtro.activo { background: var(--esc-tinta); color: #FFF; border-color: var(--esc-tinta); }

.vitrina-vacio { margin: var(--esc-space-6) 0; color: var(--esc-arena-quemada); font-size: var(--esc-text-base); }

.cuadricula { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 48px); }

.pieza-abre { display: block; width: 100%; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.pieza-cover {
  position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--esc-radius-sm);
  background: var(--c0, var(--esc-mar));
  box-shadow: var(--esc-sombra-sm);
  transition: box-shadow var(--esc-dur-media) var(--esc-ease), transform var(--esc-dur-media) var(--esc-ease);
}
.pieza-cover::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, var(--c1, var(--esc-arena)) 0%, transparent 60%);
  opacity: 0.16;
}
.pieza-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; z-index: 2; transition: transform 0.8s var(--esc-ease); }
.pieza-cover img.sin-img { display: none; }
/* Loop de la web real (cover.webm) por encima del fotograma */
.pieza-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top; z-index: 3;
  opacity: 0; transition: opacity 0.6s var(--esc-ease);
}
.pieza-video.lista { opacity: 1; }
.pieza-abre:hover .pieza-cover { box-shadow: var(--esc-sombra-md); transform: translateY(-4px); }
.pieza-abre:hover .pieza-cover img { transform: scale(1.03); }

.pieza-ph {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; text-align: center;
}
.pieza-ph b { font-family: var(--esc-font-display); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--c2, #FFF); }
.ph-horizonte { position: relative; width: 42%; border-top: 1px solid var(--c1, var(--esc-arena)); opacity: 0.85; }
.ph-horizonte::after {
  content: ''; position: absolute; right: -8px; top: -3px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--c1, var(--esc-arena));
}

.pieza-info { display: block; padding-top: var(--esc-space-4); }
.pieza-ficha { display: block; margin-bottom: 6px; }
.pieza-nombre { display: block; font-size: var(--esc-text-xl); color: var(--esc-mar); margin-bottom: var(--esc-space-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; border: 1px solid var(--esc-perfil); border-radius: var(--esc-radius-pill);
  background: var(--esc-superficie); color: var(--esc-gris);
  font-size: var(--esc-text-xs); letter-spacing: 0.03em; padding: 3px 10px;
}

/* ============================================================
   Tres maneras de trabajar
   ============================================================ */
.maneras-tarjetas { display: grid; grid-template-columns: 1fr; gap: var(--esc-space-6); }
.manera {
  background: var(--esc-superficie);
  border: 1px solid var(--esc-perfil);
  border-radius: var(--esc-radius-md);
  padding: clamp(24px, 3.4vw, 40px);
  position: relative;
  transition: transform var(--esc-dur-media) var(--esc-ease), box-shadow var(--esc-dur-media) var(--esc-ease);
}
.manera::after {
  /* el borde que se enciende: filo degradado de marca */
  content: ''; position: absolute; inset: -1px; z-index: -1;
  border-radius: var(--esc-radius-md);
  background: var(--esc-degradado-mar);
  opacity: 0; transition: opacity var(--esc-dur-media) var(--esc-ease);
}
.manera:hover { transform: translateY(-4px); box-shadow: var(--esc-sombra-md); }
.manera:hover::after { opacity: 1; }
.manera-num { margin-bottom: var(--esc-space-6); }
.manera-nombre { font-family: var(--esc-font-ui); font-weight: 600; font-size: 1rem; letter-spacing: var(--esc-tracking-caps); color: var(--esc-tinta); margin-bottom: var(--esc-space-3); }
.manera-tag { font-style: italic; font-size: var(--esc-text-lg); color: var(--esc-mar); margin-bottom: var(--esc-space-4); }
.manera-txt { color: var(--esc-gris); margin-bottom: var(--esc-space-6); }
.manera-plazo { color: var(--esc-arena-quemada); font-size: var(--esc-text-sm); }

.maneras-cierre { margin-top: clamp(48px, 7vw, 80px); text-align: center; font-style: italic; font-size: clamp(1.4rem, 3vw, 1.95rem); color: var(--esc-mar); }
.maneras-cta { text-align: center; margin-top: var(--esc-space-8); }

/* ============================================================
   Cómo trabajamos
   ============================================================ */
.hitos { position: relative; display: flex; flex-direction: column; gap: var(--esc-space-12); margin-top: var(--esc-space-12); }
.hito { position: relative; padding-left: 36px; }
.hito-punto {
  position: absolute; left: 0; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--esc-fondo); border: 1px solid var(--esc-perfil);
  transition: background var(--esc-dur-media) var(--esc-ease), border-color var(--esc-dur-media) var(--esc-ease), box-shadow var(--esc-dur-media) var(--esc-ease);
}
.hito.lit .hito-punto { background: var(--esc-mar); border-color: var(--esc-mar); box-shadow: 0 0 0 5px rgba(22, 50, 79, 0.1); }
.hito-num { margin-bottom: var(--esc-space-2); }
.hito-titulo { font-size: var(--esc-text-2xl); color: rgba(16, 27, 38, 0.35); transition: color 0.6s var(--esc-ease); margin-bottom: var(--esc-space-2); }
.hito.lit .hito-titulo { color: var(--esc-mar); }
.hito-txt { color: var(--esc-gris); max-width: 34ch; }

/* ============================================================
   El estudio
   ============================================================ */
.estudio-txt { font-size: var(--esc-text-lg); max-width: 46ch; margin-bottom: var(--esc-space-12); }
.socios { display: flex; flex-wrap: wrap; gap: var(--esc-space-6); margin-bottom: var(--esc-space-12); }
.socio {
  flex: 1 1 240px; max-width: 320px;
  background: var(--esc-superficie); border: 1px solid var(--esc-perfil); border-radius: var(--esc-radius-md);
  padding: var(--esc-space-8);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--esc-space-3);
}
.socio-retrato {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--esc-mar);
  display: flex; align-items: center; justify-content: center;
}
.socio-retrato i { font-family: var(--esc-font-display); font-style: normal; font-size: 1.5rem; color: rgba(251, 250, 247, 0.85); }
.socio-nombre { font-family: var(--esc-font-display); font-weight: 400; font-size: 1.35rem; color: var(--esc-mar); }

.ficha-estudio { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.ficha-estudio b { color: var(--esc-mar); font-weight: 600; }

/* ============================================================
   Contacto
   ============================================================ */
.contacto { min-height: 92vh; display: flex; align-items: center; }
.contacto .marco { width: min(880px, 100% - clamp(40px, 8vw, 96px)); }
.contacto-titulo { font-size: clamp(2.2rem, 6.4vw, 3.8rem); max-width: 16ch; margin-bottom: clamp(32px, 5vw, 56px); }

.formulario { display: flex; flex-direction: column; gap: var(--esc-space-6); }
.f-fila { display: grid; grid-template-columns: 1fr; gap: var(--esc-space-6); }
.f-campo { display: flex; flex-direction: column; gap: 6px; }
.f-campo > label { font-size: var(--esc-text-xs); text-transform: uppercase; letter-spacing: var(--esc-tracking-caps); color: var(--esc-gris); }
.f-campo input[type="text"], .f-campo select, .f-campo textarea {
  width: 100%;
  background: var(--esc-superficie); border: 1px solid var(--esc-perfil); border-radius: var(--esc-radius-sm);
  padding: 13px 14px; font: inherit; font-size: var(--esc-text-base); color: var(--esc-tinta);
  transition: border-color var(--esc-dur-corta) var(--esc-ease);
}
.f-campo textarea { resize: vertical; min-height: 120px; }
.f-campo input:focus, .f-campo select:focus, .f-campo textarea:focus { border-color: var(--esc-mar); }
.f-campo.error input, .f-campo.error textarea, .f-campo.error select { border-color: var(--esc-error); }

.f-miel { position: absolute; left: -9999px; opacity: 0; }

.f-rgpd { flex-direction: row; align-items: flex-start; gap: 10px; }
.f-rgpd input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--esc-mar); flex: none; }
.f-rgpd label { font-size: var(--esc-text-sm); color: var(--esc-gris); text-transform: none; letter-spacing: 0; }
.f-rgpd label a { color: var(--esc-mar); }
.f-rgpd.error label { color: var(--esc-error); }

.f-envio { display: flex; align-items: center; gap: var(--esc-space-6); flex-wrap: wrap; }
.f-estado { font-size: var(--esc-text-sm); color: var(--esc-gris); min-height: 1.4em; }
.f-estado.exito { color: var(--esc-exito); }
.f-estado.error { color: var(--esc-error); }

.contacto-nota { margin-top: var(--esc-space-8); color: var(--esc-gris); }

/* ============================================================
   Footer — bloque de Azul mar
   ============================================================ */
.pie { position: relative; z-index: 4; background: var(--esc-mar); color: rgba(255, 255, 255, 0.78); padding-block: clamp(56px, 8vw, 88px); }
.pie .marco { display: flex; flex-direction: column; align-items: center; gap: var(--esc-space-4); text-align: center; }
.pie-logo { display: inline-flex; align-items: baseline; }
.pie-logo .logo-palabra { color: #FFF; font-size: 1.15rem; }
.pie-logo .horizonte { border-top-color: rgba(255, 255, 255, 0.7); width: 30px; margin-left: 6px; }
.pie-logo .horizonte-punto { margin-left: 3px; }
.pie-descriptor { color: rgba(255, 255, 255, 0.6); }
.pie-enlaces { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin-top: var(--esc-space-4); }
.pie-enlaces a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.pie-enlaces a:hover { color: #FFF; }
.pie .idiomas-pie button { color: rgba(255, 255, 255, 0.6); }
.pie .idiomas-pie button.activo { color: #FFF; }
.pie .idiomas-pie button:hover { color: #FFF; }
.pie-firma { margin-top: var(--esc-space-6); color: rgba(255, 255, 255, 0.6); }
.pie-dominio { font-family: var(--esc-font-logo); font-size: 1rem; letter-spacing: 0.06em; color: #FFF; text-transform: none; }
.pie-punto { display: inline-block; width: 0.22em; height: 0.22em; border-radius: 50%; background: var(--esc-arena); margin: 0 0.06em 0.02em; vertical-align: baseline; }

/* ============================================================
   Overlay de pieza
   ============================================================ */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; }
.overlay[hidden] { display: none; }
.overlay-fondo { position: absolute; inset: 0; background: rgba(16, 27, 38, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.overlay-panel {
  position: relative; z-index: 1;
  width: min(1080px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  background: var(--esc-superficie);
  border-radius: var(--esc-radius-md);
  box-shadow: var(--esc-sombra-lg);
  overflow: hidden auto;
  display: flex; flex-direction: column;
}
.overlay-cerrar {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--esc-perfil);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--esc-tinta);
  transition: background var(--esc-dur-corta) var(--esc-ease), color var(--esc-dur-corta) var(--esc-ease);
}
.overlay-cerrar:hover { background: var(--esc-tinta); color: #FFF; }

.overlay-cover { position: relative; background: var(--c0, var(--esc-mar)); min-height: 42vh; overflow: hidden; flex: none; }
.overlay-cover::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(120% 90% at 50% 0%, var(--c1, var(--esc-arena)) 0%, transparent 60%);
  opacity: 0.16;
}
.overlay-cover img { position: absolute; left: 0; top: 0; width: 100%; z-index: 2; }
.overlay-cover img.pan { animation: overlay-pan 16s ease-in-out infinite alternate; }
.overlay-video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; z-index: 3; }
@keyframes overlay-pan { from { transform: translateY(0); } to { transform: translateY(calc(-100% + 42vh)); } }
.overlay-ph b { font-size: clamp(1.8rem, 4vw, 2.8rem); }

.overlay-info { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: var(--esc-space-4); }
.overlay-titulo { font-size: clamp(1.9rem, 4vw, var(--esc-text-3xl)); color: var(--esc-mar); }
.overlay-resumen { max-width: 60ch; }
.overlay-acciones { display: flex; flex-wrap: wrap; gap: var(--esc-space-3); margin-top: var(--esc-space-4); }

body.overlay-abierto { overflow: hidden; }
body.menu-abierto { overflow: hidden; }

/* ============================================================
   Escritorio
   ============================================================ */
@media (min-width: 720px) {
  .nav-enlaces { display: flex; }
  .nav-cta { display: inline-block; }
  .burger { display: none; }

  .f-fila { grid-template-columns: 1fr 1fr; }

  .cuadricula { grid-template-columns: repeat(12, 1fr); }
  .contacto-nota { margin-top: var(--esc-space-12); }
  .pieza-card:nth-child(4n+1) { grid-column: 1 / span 7; }
  .pieza-card:nth-child(4n+2) { grid-column: 8 / span 5; margin-top: clamp(48px, 7vw, 96px); }
  .pieza-card:nth-child(4n+3) { grid-column: 1 / span 5; }
  .pieza-card:nth-child(4n+4) { grid-column: 6 / span 7; margin-top: clamp(48px, 7vw, 96px); }

  .contacto-alt { flex-direction: row; align-items: center; justify-content: space-between; }
}

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

  .hitos { flex-direction: row; gap: clamp(24px, 3vw, 48px); padding-top: 28px; }
  .hitos::before {
    content: ''; position: absolute; top: 9px; left: 0; right: 0;
    border-top: 1px solid var(--esc-perfil);
  }
  .hitos::after {
    content: ''; position: absolute; top: 8px; left: 0; right: 0; height: 2px;
    background: var(--esc-mar);
    transform: scaleX(var(--hitos-p, 0)); transform-origin: left center;
  }
  .hito { flex: 1; padding-left: 0; padding-top: 24px; }
  .hito-punto { top: -34px; left: 2px; }
}

/* ============================================================
   Páginas sobrias: legales y 404
   ============================================================ */
.pagina-legal { padding: 150px 0 100px; }
.pagina-legal .marco { max-width: 760px; }
.pagina-legal h1 { font-size: clamp(2rem, 5vw, var(--esc-text-4xl)); margin-bottom: var(--esc-space-8); }
.pagina-legal h2 { font-size: var(--esc-text-xl); margin: var(--esc-space-12) 0 var(--esc-space-3); max-width: none; }
.pagina-legal p, .pagina-legal li { color: var(--esc-tinta); margin-bottom: var(--esc-space-3); max-width: 70ch; }
.pagina-legal ul { list-style: disc; padding-left: 1.2em; }
.pagina-legal a { color: var(--esc-mar); }
.pagina-legal .etiqueta { margin-bottom: var(--esc-space-4); }
.legal-volver { display: inline-block; margin-top: var(--esc-space-12); }

.pagina-404 { min-height: 100vh; display: flex; align-items: center; text-align: center; }
.pagina-404 .marco { display: flex; flex-direction: column; align-items: center; gap: var(--esc-space-6); }
.pagina-404 h1 { font-size: clamp(2.2rem, 7vw, var(--esc-text-5xl)); max-width: 18ch; }

/* ============================================================
   Movimiento reducido — SOLO efectos intrusivos
   (gotcha Windows: jamás apagar la web entera)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .overlay-cover img.pan { animation: none; }
  html { scroll-behavior: auto; }
}
