/* ==========================================================================
   ENIGMA Detectives Privados · Landing
   Estructura de este archivo (cada bloque se corresponde con un template-part de WP):
   01 Fuentes · 02 Tokens · 03 Base · 04 Utilidades · 05 Componentes
   06 Header · 07 Hero · 08 Sobre · 09 Servicios · 10 Narrativa · 11 Proceso
   12 Confianza · 13 FAQ · 14 CTA final · 15 Contacto · 16 Footer · 17 Movimiento
   ========================================================================== */

/* 01 · FUENTES (autoalojadas: sin peticiones a terceros, mejor rendimiento y privacidad) */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
}

/* 02 · TOKENS ------------------------------------------------------------ */
:root {
  /* Color (identidad entregada por el cliente) */
  --color-bg: #101010;
  --color-surface: #202020;
  --color-surface-low: #171717;
  --color-gold: #d4af37;
  --color-gold-soft: rgba(212, 175, 55, 0.32);
  --color-gold-faint: rgba(212, 175, 55, 0.12);
  --color-text: #f5f3ee;
  --color-muted: #b8b8b8;
  --color-line: rgba(245, 243, 238, 0.12);
  --color-error: #ff9d8c;

  /* Tipografía */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.08rem + 0.25vw, 1.25rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.7vw, 1.9rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3rem);
  --step-4: clamp(2.4rem, 1.7rem + 3.2vw, 4.4rem);
  --step-hero: clamp(2.9rem, 1.4rem + 6.4vw, 6.8rem);

  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: clamp(4.5rem, 3rem + 7vw, 9rem);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 92px;

  /* Componentes */
  --radius-s: 3px;
  --radius-m: 8px;
  --radius-pill: 999px;
  --border: 1px solid var(--color-line);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --hero-media: url("../img/hero-lines.svg");
}

/* 03 · BASE -------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) - 8px);
  -webkit-text-size-adjust: 100%;
  background: var(--color-bg);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-muted);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { margin: 0; color: var(--color-text); font-weight: 500; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

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

::selection { background: var(--color-gold); color: var(--color-bg); }

/* 04 · UTILIDADES --------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: fixed;
  top: var(--space-3); left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-5);
  background: var(--color-gold);
  color: var(--color-bg);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.icon {
  width: 1.25rem; height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: 1.75rem; height: 1.75rem; color: var(--color-gold); }
.icon--xl { width: 2.25rem; height: 2.25rem; color: var(--color-gold); stroke-width: 1.25; }

/* 05 · COMPONENTES -------------------------------------------------------- */
.eyebrow {
  margin: 0 0 var(--space-5);
  color: var(--color-gold);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section { padding-block: var(--space-9); }
.section--alt { background: var(--color-surface-low); }

.section-head { max-width: 46rem; margin-bottom: var(--space-8); }
.section-head--narrow { max-width: 40rem; }
.section-title {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-lead { margin-top: var(--space-5); font-size: var(--step-1); max-width: 38rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 3.25rem;
  padding: 0.8rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn--primary { background: var(--color-gold); color: var(--color-bg); }
.btn--primary:hover { background: #e3c456; transform: translateY(-2px); }
.btn--primary:active { transform: none; }
.btn--ghost { border-color: var(--color-gold-soft); color: var(--color-text); }
.btn--ghost:hover { border-color: var(--color-gold); color: var(--color-gold); }
.btn--sm { min-height: 2.75rem; padding: 0.55rem 1.3rem; font-size: 0.875rem; }
.btn--lg { min-height: 3.75rem; padding-inline: 2.6rem; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.link-line {
  display: inline-block;
  padding-bottom: 2px;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(var(--color-gold), var(--color-gold)) left bottom / 100% 1px no-repeat;
  transition: color 0.3s var(--ease), background-size 0.4s var(--ease);
}
.link-line:hover { color: var(--color-gold); background-size: 40% 1px; }

/* 06 · HEADER ------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(16, 16, 16, 0.88);
  border-bottom-color: var(--color-line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: var(--header-h);
}
.site-header__logo { display: block; flex: none; }
.site-header__logo img { width: auto; height: 74px; transition: height 0.4s var(--ease); }
.site-header.is-scrolled .site-header__logo img { height: 60px; }

.site-nav { display: flex; align-items: center; gap: var(--space-7); }
.site-nav__list { display: flex; align-items: center; gap: var(--space-6); }
.site-nav__link {
  position: relative;
  padding-block: var(--space-2);
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--color-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.site-nav__link:hover,
.site-nav__link.is-active { color: var(--color-text); }
.site-nav__link:hover::after,
.site-nav__link.is-active::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  position: relative;
  width: 2.75rem; height: 2.75rem;
  padding: 0;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-s);
  cursor: pointer;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  position: absolute;
  left: 50%;
  width: 1.2rem; height: 1.5px;
  background: var(--color-text);
  transition: transform 0.35s var(--ease), background-color 0.2s;
}
.menu-toggle__bars { top: 50%; margin: -0.75px 0 0 -0.6rem; }
.menu-toggle__bars::before,
.menu-toggle__bars::after { content: ""; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 80px; pointer-events: none; }

@media (max-width: 62rem) {
  :root { --header-h: 76px; }
  /* El desenfoque (backdrop-filter) atrapa al menú fijo dentro de la barra: en móvil se usa fondo sólido */
  .site-header.is-scrolled {
    background: rgba(16, 16, 16, 0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.menu-open .site-header,
  body.menu-open .site-header.is-scrolled {
    background: var(--color-bg);
    border-bottom-color: transparent;
  }
  .site-header__logo img { height: 58px; }
  .site-header.is-scrolled .site-header__logo img { height: 50px; }
  .menu-toggle { display: block; position: relative; z-index: 2; }
  .site-header__logo { position: relative; z-index: 2; }

  .js .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-7);
    padding: calc(var(--header-h) + var(--space-5)) var(--gutter) var(--space-7);
    background: var(--color-bg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .js .site-nav__list { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  .js .site-nav__link { font-family: var(--font-display); font-size: 2.4rem; font-weight: 500; color: var(--color-text); }
  .js .site-nav__link::after { display: none; }
  .js .site-nav__link.is-active { color: var(--color-gold); }

  /* Sin JS el menú queda visible como una fila compacta */
  html:not(.js) .site-header__inner { flex-wrap: wrap; height: auto; padding-block: var(--space-3); }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: var(--space-4); }
  html:not(.js) .site-nav__list { flex-wrap: wrap; gap: var(--space-4); }
}

/* 07 · HERO --------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-h) + var(--space-7)) var(--space-8);
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: -4% -2%;
  z-index: -2;
  background: var(--hero-media) 70% 50% / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 18%, #000 62%);
  mask-image: linear-gradient(90deg, transparent 18%, #000 62%);
  opacity: 0;
  animation: hero-media-in 2.2s var(--ease) 0.2s forwards, hero-drift 28s ease-in-out 2.4s infinite alternate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 82% 40%, transparent 30%, var(--color-bg) 100%),
    linear-gradient(180deg, rgba(16, 16, 16, 0.55), transparent 22%, transparent 70%, var(--color-bg));
  pointer-events: none;
}

.hero__inner { position: relative; }
.hero__eyebrow { animation: rise 0.9s var(--ease) 0.1s both; }
.hero__title {
  font-family: var(--font-display);
  font-size: var(--step-hero);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.hero__line { display: block; animation: rise 1s var(--ease) both; }
.hero__line:nth-child(1) { animation-delay: 0.25s; }
.hero__line:nth-child(2) { animation-delay: 0.5s; }

.hero__reveal {
  position: relative;
  display: inline-block;
  padding-right: 0.04em;
  color: var(--color-gold);
  font-style: italic;
  font-weight: 400;
}
/* Momento memorable: la palabra aparece tachada, como un documento reservado, y se descubre. */
.hero__reveal::after {
  content: "";
  position: absolute;
  inset: 0.14em 0 0.08em -0.04em;
  background: var(--color-gold);
  transform-origin: right center;
  animation: unredact 1.1s cubic-bezier(0.77, 0, 0.18, 1) 1.5s forwards;
}

.hero__lead {
  max-width: 34rem;
  margin-top: var(--space-6);
  font-size: var(--step-1);
  animation: rise 1s var(--ease) 0.9s both;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
  animation: rise 1s var(--ease) 1.05s both;
}
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-7);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: var(--border);
  max-width: 44rem;
  font-size: 0.9rem;
  animation: rise 1s var(--ease) 1.2s both;
}
.hero__facts li { display: flex; align-items: center; gap: var(--space-3); }
.hero__facts .icon { color: var(--color-gold); }

.hero__scroll {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  display: flex;
  justify-content: center;
  width: 2.75rem; height: 3.5rem;
  margin-left: -1.375rem;
}
.hero__scroll-line {
  position: relative;
  width: 1px; height: 100%;
  background: var(--color-line);
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 40%;
  background: var(--color-gold);
  animation: scroll-hint 2.4s var(--ease) infinite;
}

@media (max-width: 62rem) {
  .hero { align-items: flex-end; padding-bottom: calc(var(--space-9) - 1rem); }
  .hero__media {
    background-position: 62% 24%;
    background-size: auto 62%;
    -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 85%);
    mask-image: linear-gradient(180deg, #000 20%, transparent 85%);
  }
  .hero__title { max-width: 11ch; }
  .hero__scroll { display: none; }
}
@media (max-width: 36rem) {
  .eyebrow { letter-spacing: 0.14em; }
  .hero__actions .btn { width: 100%; }
  .hero__facts { gap: var(--space-3); flex-direction: column; margin-top: var(--space-7); }
}

/* 08 · SOBRE ENIGMA ------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}
.about__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 28rem;
  margin-inline: auto;
  border: 1px solid var(--color-gold-soft);
  border-radius: 999px 999px var(--radius-s) var(--radius-s);
  background: var(--color-surface-low);
  overflow: hidden;
}
.about__frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 28% 50%;
  filter: saturate(0.85) brightness(0.92);
}
.about__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(16, 16, 16, 0.6));
  pointer-events: none;
}
.about__body > p { max-width: 36rem; }
.about__body .section-title { margin-bottom: var(--space-5); }

.pillars { display: grid; gap: var(--space-5); margin-top: var(--space-7); }
.pillars__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding-top: var(--space-5);
  border-top: var(--border);
}
.pillars__title { margin-bottom: var(--space-1); font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; }
.pillars__item p { font-size: 0.95rem; }

.mission {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: var(--space-9);
  padding-top: var(--space-7);
  border-top: var(--border);
}
.mission__title { margin-bottom: var(--space-4); font-family: var(--font-display); font-size: var(--step-2); color: var(--color-gold); font-weight: 500; }
.mission__item p { max-width: 34rem; }

@media (max-width: 62rem) {
  .about__grid { grid-template-columns: 1fr; }
  .about__frame { max-width: 22rem; }
  .mission { grid-template-columns: 1fr; margin-top: var(--space-8); }
}

/* 09 · SERVICIOS ---------------------------------------------------------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}
.service {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--color-bg);
  border: var(--border);
  border-radius: var(--radius-m);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.service:hover { border-color: var(--color-gold-soft); background-color: #141414; }
.service__icon { margin-bottom: var(--space-4); }
.service__title { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.15; }
.service__text { flex: 1; font-size: 0.97rem; }
.service .link-line { align-self: flex-start; margin-top: var(--space-3); font-size: 0.92rem; }

.service--featured {
  grid-column: span 2;
  justify-content: flex-end;
  min-height: 22rem;
  border-color: var(--color-gold-soft);
  background:
    linear-gradient(90deg, var(--color-bg) 30%, rgba(16, 16, 16, 0.2)),
    var(--hero-media) 85% 50% / cover no-repeat,
    var(--color-bg);
}
.service--featured .service__title { max-width: 18ch; font-size: var(--step-3); }
.service--featured .service__text { flex: 0 1 auto; max-width: 28rem; font-size: var(--step-0); }

.service--photo {
  justify-content: flex-end;
  min-height: 32rem;
  border-color: var(--color-gold-soft);
}
/* La foto ocupa la parte alta de la tarjeta (completa, sin recortar) y se funde con el fondo */
.service--photo::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  aspect-ratio: 16 / 9;
  background: var(--service-photo) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
}
.service--photo > * { position: relative; }
.service--devices { --service-photo: url("../img/servicio-dispositivos.webp"); }
.service--surveillance { --service-photo: url("../img/servicio-vigilancia.webp"); }
.service--evidence { --service-photo: url("../img/servicio-indicios.webp"); }
.service--consulting { --service-photo: url("../img/servicio-consultoria.webp"); }
.service--photo .service__text { flex: 0 1 auto; color: #cfcfcf; }
.services__note { margin-top: var(--space-5); font-size: var(--step--1); }

@media (max-width: 62rem) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service--featured { grid-column: 1 / -1; min-height: 18rem; }
}
@media (max-width: 40rem) {
  .services__grid { grid-template-columns: 1fr; }
}

/* 10 · NARRATIVA ---------------------------------------------------------- */
.story__list { display: grid; gap: var(--space-9); }
.moment {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
}
.moment--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.moment--flip .moment__media { order: 2; }

.moment__media {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--color-surface);
}
.moment__media--portrait { aspect-ratio: 4 / 5; max-width: 34rem; }
.moment__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.78) brightness(0.84) contrast(1.05);
}
.moment__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 50%, rgba(16, 16, 16, 0.55)),
    linear-gradient(0deg, var(--color-gold-faint), var(--color-gold-faint));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.moment__num {
  display: block;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1;
  color: transparent;
  font-variant-numeric: lining-nums;
  -webkit-text-stroke: 1px var(--color-gold);
}
.moment__title { margin-bottom: var(--space-4); font-family: var(--font-display); font-size: var(--step-3); line-height: 1.1; }
.moment__body p { max-width: 24rem; font-size: var(--step-1); }
.story__note { margin-top: var(--space-8); font-size: var(--step--1); text-align: center; }

@media (max-width: 62rem) {
  .story__list { gap: var(--space-8); }
  .moment,
  .moment--flip { grid-template-columns: 1fr; gap: var(--space-6); }
  .moment--flip .moment__media { order: 0; }
  .moment__media--portrait { max-width: 100%; aspect-ratio: 4 / 4.4; }
  .moment__media--portrait img { object-position: 50% 30%; }
}

/* 11 · PROCESO ------------------------------------------------------------ */
.process__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}
.step {
  position: relative;
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-gold-soft);
}
.step::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-gold);
}
.step__num {
  display: block;
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  color: transparent;
  font-variant-numeric: lining-nums;
  -webkit-text-stroke: 1px var(--color-gold-soft);
}
.step__title { margin-bottom: var(--space-3); font-family: var(--font-display); font-size: var(--step-2); line-height: 1.15; }
.step p { font-size: 0.97rem; }

@media (max-width: 62rem) {
  .process__steps { grid-template-columns: 1fr; gap: 0; }
  .step {
    padding: 0 0 var(--space-7) var(--space-6);
    border-top: 0;
    border-left: 1px solid var(--color-gold-soft);
  }
  .step:last-child { padding-bottom: 0; }
  .step::before { top: 0.6rem; left: -5px; }
  .step__num { font-size: 3.4rem; }
}

/* 12 · CONFIANZA ---------------------------------------------------------- */
.trust {
  background:
    radial-gradient(60% 80% at 100% 0%, var(--color-gold-faint), transparent 60%),
    var(--color-surface);
}
.trust__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
}
.trust__list { border-top: var(--border); }
.attribute {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-bottom: var(--border);
}
.attribute__title { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.15; }

@media (max-width: 62rem) {
  .trust__grid { grid-template-columns: 1fr; }
}

/* 13 · PREGUNTAS FRECUENTES ---------------------------------------------- */
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.faq__intro { position: sticky; top: calc(var(--header-h) + var(--space-6)); }
.faq__list { border-top: var(--border); }
.faq__item { border-bottom: var(--border); }
.faq__question {
  position: relative;
  display: block;
  padding: var(--space-5) 3rem var(--space-5) 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
  transition: color 0.3s var(--ease);
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover { color: var(--color-gold); }
.faq__question::before,
.faq__question::after {
  content: "";
  position: absolute;
  top: 50%; right: 0.25rem;
  width: 1rem; height: 1px;
  background: var(--color-gold);
  transition: transform 0.35s var(--ease);
}
.faq__question::after { transform: rotate(90deg); }
.faq__item[open] .faq__question::after { transform: rotate(0deg); }
.faq__item[open] .faq__question { color: var(--color-gold); }
.faq__answer { padding: 0 3rem var(--space-6) 0; max-width: 40rem; }
.faq__item[open] .faq__answer { animation: fade-down 0.45s var(--ease); }

@media (max-width: 62rem) {
  .faq__grid { grid-template-columns: 1fr; }
  .faq__intro { position: static; }
}

/* 14 · CTA FINAL ---------------------------------------------------------- */
.cta {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34rem;
  padding-block: var(--space-9);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  border-block: 1px solid var(--color-gold-faint);
}
.cta__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 90% at 50% 50%, rgba(16, 16, 16, 0.55), var(--color-bg) 95%),
    var(--hero-media) 20% 50% / cover no-repeat;
  opacity: 0.9;
}
.cta__inner { display: grid; justify-items: center; gap: var(--space-5); max-width: 52rem; }
.cta__title {
  font-family: var(--font-display);
  font-size: var(--step-4);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.cta__text { max-width: 34rem; font-size: var(--step-1); margin-bottom: var(--space-3); }

/* 15 · CONTACTO ----------------------------------------------------------- */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start;
}
.contact__list { display: grid; gap: var(--space-5); margin-top: var(--space-7); }
.contact__row {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding-top: var(--space-5);
  border-top: var(--border);
}
.contact__label { margin-bottom: var(--space-1); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: var(--color-muted); }
.contact__row a,
.contact__row p { color: var(--color-text); overflow-wrap: anywhere; }

.contact__form-wrap {
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--color-surface);
  border: var(--border);
  border-radius: var(--radius-m);
}
.form { display: grid; gap: var(--space-5); }
.form__title { font-family: var(--font-display); font-size: var(--step-2); }

.field { display: grid; gap: var(--space-2); }
.field__label { color: var(--color-text); font-size: 0.9rem; font-weight: 600; }
.field__optional { color: var(--color-muted); font-weight: 400; }
.field__control {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  background: var(--color-bg);
  border: 1px solid rgba(245, 243, 238, 0.22);
  border-radius: var(--radius-s);
  color: var(--color-text);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field__control--area { min-height: 9rem; resize: vertical; }
.field__control:hover { border-color: var(--color-gold-soft); }
.field__control:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px var(--color-gold-faint); }
.field__control[aria-invalid="true"],
.field__check[aria-invalid="true"] { border-color: var(--color-error); }
.field__error { min-height: 0; margin: 0; color: var(--color-error); font-size: 0.85rem; line-height: 1.4; }
.field__error:empty { display: none; }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: var(--space-3);
}
.field--check .field__error { grid-column: 1 / -1; }
.field__check { width: 1.15rem; height: 1.15rem; margin-top: 0.3rem; accent-color: var(--color-gold); }
.field__check-label { font-size: 0.88rem; line-height: 1.55; }
.field__check-label a { color: var(--color-text); text-underline-offset: 3px; }
.field__check-label a:hover { color: var(--color-gold); }

.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { min-height: 1.5rem; margin: 0; font-size: 0.95rem; }
.form__status[data-state="ok"] { color: var(--color-gold); }
.form__status[data-state="error"] { color: var(--color-error); }
.form__status a { color: inherit; font-weight: 700; }

/* 16 · FOOTER ------------------------------------------------------------- */
.site-footer {
  padding-top: var(--space-8);
  border-top: var(--border);
  font-size: 0.93rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: var(--space-7);
  padding-bottom: var(--space-8);
}
.site-footer__brand img { width: 150px; height: auto; margin-bottom: var(--space-4); }
.site-footer__slogan { font-family: var(--font-display); font-size: var(--step-2); color: var(--color-text); line-height: 1.2; max-width: 16rem; }
.site-footer__heading { margin-bottom: var(--space-4); font-family: var(--font-body); font-size: 0.85rem; font-weight: 600; color: var(--color-gold); }
.site-footer__col ul { display: grid; gap: var(--space-3); }
.site-footer__col a { text-decoration: none; transition: color 0.3s var(--ease); overflow-wrap: anywhere; }
.site-footer__col a:hover { color: var(--color-gold); }
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  padding-block: var(--space-5);
  border-top: var(--border);
  font-size: 0.85rem;
}
.site-footer__legal a { text-underline-offset: 3px; }
.site-footer__legal a:hover { color: var(--color-gold); }

@media (max-width: 62rem) {
  .contact__grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* 17 · MOVIMIENTO ---------------------------------------------------------
   Los elementos .reveal solo se ocultan cuando JS está activo (html.js),
   de modo que sin JavaScript todo el contenido sigue visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: 0.12s; }
.js .reveal[data-delay="2"] { transition-delay: 0.24s; }
.js .reveal[data-delay="3"] { transition-delay: 0.36s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes unredact {
  to { transform: scaleX(0); }
}
@keyframes hero-media-in {
  to { opacity: 1; }
}
@keyframes hero-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-1.5%, 1%, 0) scale(1.04); }
}
@keyframes scroll-hint {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(260%); }
}
@keyframes fade-down {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .hero__reveal::after { display: none; }
  .hero__media { opacity: 1; }
  .js .reveal { opacity: 1; transform: none; }
}

/* 18 · PÁGINA LEGAL (privacidad.html) ------------------------------------- */
.legal-header { border-bottom: var(--border); }
.legal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: var(--header-h);
}
.legal-header .site-header__logo img { height: 56px; }
.legal__inner { max-width: 46rem; }
.legal__updated { margin-top: var(--space-4); font-size: var(--step--1); }
.legal h2 {
  margin: var(--space-7) 0 var(--space-3);
  font-family: var(--font-display);
  font-size: var(--step-2);
}
.legal a { color: var(--color-text); text-underline-offset: 3px; }
.legal a:hover { color: var(--color-gold); }
.legal-footer { border-top: var(--border); font-size: 0.85rem; }
.legal-footer a { text-underline-offset: 3px; }

/* 19 · WORDPRESS (barra de administración y páginas internas) ------------- */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
.site-header ~ .legal { padding-top: calc(var(--header-h) + var(--space-8)); }
.legal__inner > :first-child { margin-top: 0; }
.legal__inner ul { margin: 0 0 var(--space-4); padding-left: 1.2rem; list-style: disc; }

/* 20 · WHATSAPP FLOTANTE -------------------------------------------------- */
.wa-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  background: var(--color-gold);
  color: var(--color-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
  animation: wa-in 0.7s var(--ease) 2.4s both;
}
.wa-float:hover { background: #e3c456; transform: translateY(-3px); }
.wa-float .icon { width: 2rem; height: 2rem; fill: currentColor; stroke: none; }
.wa-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--color-gold-soft);
  animation: wa-ring 2.6s ease-out 3.4s 3;
  pointer-events: none;
}
body.menu-open .wa-float { display: none; }

@keyframes wa-in {
  from { opacity: 0; transform: translateY(14px) scale(0.9); }
  to { opacity: 1; transform: none; }
}
@keyframes wa-ring {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.45); }
  100% { box-shadow: 0 0 0 20px rgba(212, 175, 55, 0); }
}
