/* ============================================================
   GEOMETRÍAS ALTA COSTURA · Sistema de diseño
   Todo el sistema deriva de φ = 1,618 (proporción áurea):
   escala tipográfica ×1,272 (√φ), espaciado Fibonacci,
   ratios de imagen 1:1,618 y retícula áurea 61,8/38,2.
   ============================================================ */

/* ---------- 1 · Tokens ---------- */
:root {
  /* Color */
  --noir: #0E0C09;
  --noir-2: #161310;
  --noir-3: #201B14;
  --marfil: #F1EAE0;
  --marfil-2: #E9E0D0;
  --oro: #C0A578;
  --oro-claro: #D8C29A;
  --oro-oscuro: #8C734B;
  --piedra: #A69C8C;
  --linea: color-mix(in srgb, var(--oro) 26%, transparent);
  --linea-marfil: color-mix(in srgb, var(--oro-oscuro) 32%, transparent);

  /* Tipografía — escala √φ = 1,272 fluida */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --fs--1: clamp(0.72rem, 0.70rem + 0.12vw, 0.79rem);
  --fs-0: clamp(0.94rem, 0.90rem + 0.18vw, 1.06rem);
  --fs-1: clamp(1.15rem, 1.09rem + 0.30vw, 1.35rem);
  --fs-2: clamp(1.42rem, 1.31rem + 0.55vw, 1.78rem);
  --fs-3: clamp(1.80rem, 1.60rem + 1.00vw, 2.44rem);
  --fs-4: clamp(2.28rem, 1.94rem + 1.70vw, 3.35rem);
  --fs-5: clamp(2.85rem, 2.30rem + 2.75vw, 4.60rem);
  --fs-6: clamp(3.50rem, 2.62rem + 4.40vw, 6.40rem);

  /* Espaciado Fibonacci (8·13·21·34·55·89·144) */
  --sp-1: 0.5rem;
  --sp-2: 0.8125rem;
  --sp-3: 1.3125rem;
  --sp-4: 2.125rem;
  --sp-5: 3.4375rem;
  --sp-6: 5.5625rem;
  --sp-7: 9rem;
  --sect: clamp(var(--sp-6), 12vw, var(--sp-7));

  /* Movimiento */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-luxe: cubic-bezier(0.65, 0.05, 0, 1);
  --d-1: 0.55s;
  --d-2: 0.9s;
  --d-3: 1.4s;

  --header-h: 84px;
  color-scheme: dark;
}

/* Ángulo animable del brillo de las líneas doradas */
@property --shine-x {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -20%;
}

/* ---------- 2 · Base ---------- */
* { box-sizing: border-box; }

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

/* Cuando Lenis controla el scroll, el smooth nativo debe apagarse:
   si no, compiten entre sí y teclado/barra de scroll dejan de responder.
   (CSS recomendado por Lenis; añade la clase .lenis al <html>.) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
html.lenis.lenis-stopped { overflow: hidden; }
html.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0;
  background: var(--noir);
  color: var(--marfil);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--fs-0);
  line-height: 1.65;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}

/* Grano sutil de tejido/papel sobre toda la página */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
}

::selection { background: var(--oro); color: var(--noir); }

:focus-visible {
  outline: 1.5px solid var(--oro);
  outline-offset: 4px;
  border-radius: 1px;
}

/* Scrollbar fina y sobria */
@supports (scrollbar-width: thin) {
  html { scrollbar-width: thin; scrollbar-color: var(--noir-3) var(--noir); }
}
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--noir); }
::-webkit-scrollbar-thumb { background: var(--noir-3); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--oro-oscuro); }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.005em;
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}

p { margin: 0 0 var(--sp-3); }

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

main { display: block; }

/* Transiciones de vista entre páginas (MPA, mejora progresiva) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.45s var(--ease-luxe) both; }
::view-transition-new(root) { animation: vt-in 0.55s var(--ease-luxe) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-13px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(13px); } }

/* ---------- 3 · Utilidades de composición ---------- */
.container {
  width: min(100% - clamp(var(--sp-3) * 2, 8vw, var(--sp-5) * 2), 1360px);
  margin-inline: auto;
}

.section { padding-block: var(--sect); position: relative; }
.section--marfil {
  background: var(--marfil);
  color: var(--noir);
  color-scheme: light;
}
.section--marfil ::selection { background: var(--noir); color: var(--marfil); }

/* Split áureo 61,8 / 38,2 */
.golden-split { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 900px) {
  .golden-split { grid-template-columns: 1.618fr 1fr; }
  .golden-split--inv { grid-template-columns: 1fr 1.618fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-size: var(--fs--1);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: var(--sp-3);
}
.section--marfil .eyebrow { color: var(--oro-oscuro); }
.eyebrow::before {
  content: "";
  width: var(--sp-4);
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.display-1 { font-size: var(--fs-6); }
.display-2 { font-size: var(--fs-5); }
.display-3 { font-size: var(--fs-4); }
.lead { font-size: var(--fs-1); font-weight: 200; line-height: 1.7; color: var(--piedra); }
.section--marfil .lead { color: color-mix(in srgb, var(--noir) 72%, var(--marfil)); }

.text-oro { color: var(--oro); }
.italic-display { font-family: var(--font-display); font-style: italic; font-weight: 300; }

/* Línea dorada con brillo que la recorre */
.hairline {
  height: 1px;
  border: 0;
  margin: 0;
  background:
    linear-gradient(90deg, transparent, var(--oro) var(--shine-x), transparent calc(var(--shine-x) + 18%)) ,
    var(--linea);
  transition: --shine-x 1.8s var(--ease-luxe);
}
.section:hover .hairline, .hairline:hover { --shine-x: 110%; }

/* ---------- 4 · Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--d-1) ease, box-shadow var(--d-1) ease, transform var(--d-1) var(--ease-expo);
}
.site-header::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--linea);
  transform: scaleX(0);
  transition: transform var(--d-3) var(--ease-expo);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--noir) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
}
.site-header.is-scrolled::after { transform: scaleX(1); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  line-height: 1;
}
.brand svg { width: 38px; height: 38px; flex-shrink: 0; color: var(--oro); transition: transform var(--d-3) var(--ease-expo); }
.brand:hover svg { transform: rotate(90deg); }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.18rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--marfil);
  white-space: nowrap;
}
.brand-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--oro);
  margin-top: 5px;
}

.main-nav { display: none; }
@media (min-width: 1080px) {
  .main-nav { display: flex; align-items: center; gap: var(--sp-3); }
}
@media (min-width: 1280px) {
  .main-nav { gap: var(--sp-4); }
}
.nav-link {
  position: relative;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--piedra);
  padding-block: var(--sp-1);
  transition: color var(--d-1) ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--oro);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--d-2) var(--ease-expo);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--marfil); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- 5 · Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 1.05em 2.4em;
  font-family: var(--font-sans);
  font-size: var(--fs--1);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  border: 1px solid var(--oro);
  color: var(--oro);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color var(--d-2) var(--ease-expo), border-color var(--d-2) ease;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--oro);
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--d-2) var(--ease-expo);
}
.btn:hover { color: var(--noir); }
.btn:hover::before { clip-path: inset(0 0 0 0); }

.btn--solid { background: var(--oro); color: var(--noir); }
.btn--solid::before { background: var(--marfil); }
.btn--solid:hover { border-color: var(--marfil); }

.section--marfil .btn { border-color: var(--oro-oscuro); color: var(--oro-oscuro); }
.section--marfil .btn::before { background: var(--noir); }
.section--marfil .btn:hover { color: var(--marfil); border-color: var(--noir); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs--1);
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--oro);
}
.link-arrow .arr { transition: transform var(--d-2) var(--ease-expo); }
.link-arrow:hover .arr { transform: translateX(9px); }
.section--marfil .link-arrow { color: var(--oro-oscuro); }

/* ---------- 6 · Menú móvil ---------- */
.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 46px;
  height: 46px;
  padding: 10px;
  background: none;
  border: 1px solid var(--linea);
  cursor: pointer;
}
@media (min-width: 1080px) { .menu-toggle { display: none; } }
.menu-toggle span {
  display: block;
  height: 1.5px;
  background: var(--marfil);
  transition: transform var(--d-2) var(--ease-expo), opacity var(--d-1) ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 890;
  background: var(--noir);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + var(--sp-4)) var(--sp-4) var(--sp-5);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path var(--d-3) var(--ease-luxe), visibility 0s var(--d-3);
}
.mobile-menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path var(--d-3) var(--ease-luxe), visibility 0s;
}
body:has(.mobile-menu.is-open) { overflow: hidden; }

.mobile-menu nav { display: grid; gap: var(--sp-3); }
.mobile-link {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-4);
  color: var(--marfil);
  opacity: 0;
  transform: translateY(34px);
  transition: opacity var(--d-2) ease, transform var(--d-2) var(--ease-expo), color var(--d-1) ease;
}
.mobile-link .idx {
  font-family: var(--font-sans);
  font-size: var(--fs--1);
  letter-spacing: 0.3em;
  color: var(--oro);
}
.mobile-link:hover { color: var(--oro-claro); }
.mobile-menu.is-open .mobile-link { opacity: 1; transform: none; }
.mobile-menu.is-open .mobile-link:nth-child(1) { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-link:nth-child(2) { transition-delay: 0.24s; }
.mobile-menu.is-open .mobile-link:nth-child(3) { transition-delay: 0.30s; }
.mobile-menu.is-open .mobile-link:nth-child(4) { transition-delay: 0.36s; }
.mobile-menu.is-open .mobile-link:nth-child(5) { transition-delay: 0.42s; }
.mobile-menu.is-open .mobile-link:nth-child(6) { transition-delay: 0.48s; }
.mobile-menu-footer {
  margin-top: var(--sp-5);
  font-size: var(--fs--1);
  letter-spacing: 0.18em;
  color: var(--piedra);
  line-height: 2;
}

/* ---------- 7 · Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: clip;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 22%;
  animation: kenburns 22s var(--ease-luxe) infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.09) translateY(-1.8%); }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--noir) 55%, transparent) 0%, transparent 30%),
    linear-gradient(0deg, var(--noir) 6%, color-mix(in srgb, var(--noir) 70%, transparent) 40%, transparent 76%);
}
.hero-content {
  padding-block: calc(var(--header-h) + var(--sp-4)) var(--sp-6);
}
.hero .eyebrow { margin-bottom: var(--sp-4); }
.hero-title {
  font-size: var(--fs-6);
  max-width: 14ch;
  margin-bottom: var(--sp-4);
}
.hero-lead { max-width: 56ch; margin-bottom: var(--sp-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* Título por líneas enmascaradas (padding compensado para no cortar
   descendentes ni el trazo saliente de las itálicas) */
.line-mask {
  display: block;
  overflow: clip;
  padding: 0 0.14em 0.16em;
  margin: 0 -0.14em -0.16em;
}
.line-mask > span { display: block; }

.scroll-hint {
  position: absolute;
  right: clamp(var(--sp-3), 4vw, var(--sp-5));
  bottom: var(--sp-6);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--piedra);
  writing-mode: vertical-rl;
}
@media (min-width: 900px) { .scroll-hint { display: flex; } }
.scroll-hint::after {
  content: "";
  width: 1px;
  height: var(--sp-6);
  background: linear-gradient(var(--oro), transparent);
  animation: scrollline 2.6s var(--ease-luxe) infinite;
  transform-origin: top;
}
@keyframes scrollline {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(30%); opacity: 0; }
}

/* ---------- 8 · Marquee ---------- */
.marquee {
  --gap: var(--sp-5);
  position: relative;
  display: flex;
  gap: var(--gap);
  overflow: clip;
  padding-block: var(--sp-3);
  border-block: 1px solid var(--linea);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: var(--gap);
  min-width: 100%;
  align-items: center;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  font-family: var(--font-display);
  font-size: var(--fs-2);
  font-style: italic;
  white-space: nowrap;
  color: var(--piedra);
}
.marquee-item::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid var(--oro);
  rotate: 45deg;
  flex-shrink: 0;
}

/* ---------- 9 · Sistema de reveals (CSS fallback vía .is-inview) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--sp-4));
  transition: opacity var(--d-3) ease, transform var(--d-3) var(--ease-expo);
  transition-delay: calc(var(--reveal-delay, 0) * 90ms);
}
[data-reveal].is-inview { opacity: 1; transform: none; }

/* Reveal "cortina": el marco nunca se oculta (así IntersectionObserver
   y el lazy-load funcionan); una lámina opaca se retira hacia abajo
   mientras la imagen des-escala. */
[data-reveal="clip"] {
  opacity: 1;
  transform: none;
  position: relative;
}
[data-reveal="clip"]::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  background: var(--noir-2);
  transform-origin: bottom;
  transition: transform var(--d-3) var(--ease-luxe);
}
.section--marfil [data-reveal="clip"]::before { background: var(--marfil-2); }
[data-reveal="clip"] > img,
[data-reveal="clip"] > video {
  transform: scale(1.16);
  transition: transform 1.7s var(--ease-luxe);
}
[data-reveal="clip"].is-inview::before { transform: scaleY(0); }
[data-reveal="clip"].is-inview > img,
[data-reveal="clip"].is-inview > video { transform: none; }

.media-frame {
  position: relative;
  overflow: clip;
}
.media-frame > img, .media-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--d-3) var(--ease-luxe), filter var(--d-3) ease;
}
.media-frame--phi { aspect-ratio: 1 / 1.618; }
.media-frame--phi-h { aspect-ratio: 1.618 / 1; }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--linea);
  pointer-events: none;
}

/* ---------- 10 · Métricas / contadores ---------- */
.stats-row {
  display: grid;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}
@media (min-width: 720px) { .stats-row { grid-template-columns: repeat(3, 1fr); } }
.stat {
  border-top: 1px solid var(--linea-marfil);
  padding-top: var(--sp-3);
}
.section:not(.section--marfil) .stat { border-color: var(--linea); }
.stat-num {
  font-family: var(--font-display);
  font-size: var(--fs-5);
  line-height: 1;
  color: var(--oro-oscuro);
  font-variant-numeric: tabular-nums lining-nums;
}
.section:not(.section--marfil) .stat-num { color: var(--oro); }
.stat-label {
  font-size: var(--fs--1);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.72;
  margin-top: var(--sp-2);
}

/* ---------- 11 · Espiral áurea (sección método) ---------- */
.spiral-wrap { position: relative; }
.spiral-svg { width: 100%; height: auto; color: var(--oro); overflow: visible; }
.spiral-svg .spiral-path {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.1;
  stroke-linecap: round;
}
.spiral-svg .spiral-grid {
  stroke: color-mix(in srgb, var(--oro) 20%, transparent);
  fill: none;
  stroke-width: 0.35;
}
.phi-badge {
  position: absolute;
  inset-inline-end: 6%;
  bottom: 8%;
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-3);
  color: var(--oro);
  opacity: 0.85;
}

.method-list { display: grid; gap: var(--sp-4); counter-reset: metodo; }
.method-item {
  border-top: 1px solid var(--linea);
  padding-top: var(--sp-3);
  counter-increment: metodo;
}
.method-item h3 {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  font-size: var(--fs-2);
  margin-bottom: var(--sp-2);
}
.method-item h3::before {
  content: "0" counter(metodo);
  font-family: var(--font-sans);
  font-size: var(--fs--1);
  letter-spacing: 0.3em;
  color: var(--oro);
}
.method-item p { color: var(--piedra); margin: 0; }

/* ---------- 12 · Pull quote ---------- */
.pull-quote {
  position: relative;
  max-width: 30ch;
  margin-inline: auto;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: var(--fs-3);
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}
.pull-quote::before {
  content: "«";
  display: block;
  font-size: var(--fs-5);
  line-height: 0.6;
  color: var(--oro);
  margin-bottom: var(--sp-3);
}
.pull-quote cite {
  display: block;
  margin-top: var(--sp-3);
  font-family: var(--font-sans);
  font-style: normal;
  font-size: var(--fs--1);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--oro);
}

/* ---------- 13 · Cards de servicio ---------- */
.service-grid {
  display: grid;
  gap: var(--sp-4);
}
@media (min-width: 880px) { .service-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.45;
  overflow: clip;
  isolation: isolate;
  border: 1px solid var(--linea);
  transition: border-color var(--d-2) ease, transform var(--d-2) var(--ease-expo);
}
@media (min-width: 880px) {
  .service-card { aspect-ratio: 1 / 1.618; }
  .service-card:nth-child(2) { transform: translateY(var(--sp-4)); }
  .service-card:nth-child(2):hover { transform: translateY(calc(var(--sp-4) - 8px)); }
}
.service-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) brightness(0.82);
  transition: transform 1.6s var(--ease-luxe), filter var(--d-3) ease;
}
.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(8deg, color-mix(in srgb, var(--noir) 88%, transparent) 8%, transparent 55%);
  transition: opacity var(--d-2) ease;
}
.service-card:hover { border-color: var(--oro); transform: translateY(-8px); }
.service-card:hover img { transform: scale(1.07); filter: grayscale(0) brightness(0.9); }
.service-card-body {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: var(--sp-4);
}
.service-card .kicker {
  font-size: var(--fs--1);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: var(--sp-2);
}
.service-card h3 {
  font-size: var(--fs-3);
  margin-bottom: var(--sp-2);
}
.service-card p {
  color: var(--piedra);
  font-size: var(--fs-0);
  margin-bottom: var(--sp-3);
  max-width: 34ch;
}
.service-card .link-arrow .arr { transform: none; }
.service-card:hover .link-arrow .arr { transform: translateX(9px); }

/* ---------- 14 · Galería horizontal (pinned en desktop) ---------- */
.hgallery { position: relative; overflow: clip; }
.hgallery-track {
  display: grid;
  gap: var(--sp-4);
  grid-auto-flow: row;
}
/* En pantallas sin pin (móvil/tablet): carrusel nativo con scroll-snap */
@media (max-width: 1079.98px) {
  .hgallery-track {
    grid-auto-flow: column;
    grid-auto-columns: min(74vw, 420px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: var(--sp-2);
    -webkit-overflow-scrolling: touch;
  }
  .hgallery-track::-webkit-scrollbar { display: none; }
  .hgallery-track figure { scroll-snap-align: center; }
}
@media (min-width: 1080px) {
  .hgallery-track {
    grid-auto-flow: column;
    grid-auto-columns: minmax(clamp(300px, 26vw, 430px), 1fr);
    width: max-content;
    align-items: end;
  }
  .hgallery-track figure:nth-child(even) { margin-bottom: var(--sp-6); }
}
.hgallery-track figure { margin: 0; }
.hgallery-track figcaption {
  margin-top: var(--sp-2);
  font-size: var(--fs--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--piedra);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
}

/* ---------- 15 · Proceso (pasos numerados) ---------- */
.process { position: relative; counter-reset: paso; display: grid; gap: var(--sp-5); }
.process::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--linea);
}
.process-line {
  position: absolute;
  left: 7px;
  top: 8px;
  width: 1px;
  height: 100%;
  background: var(--oro);
  transform-origin: top;
  transform: scaleY(0);
}
.process-step {
  position: relative;
  counter-increment: paso;
  padding-left: var(--sp-5);
  max-width: 62ch;
}
.process-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 15px;
  height: 15px;
  rotate: 45deg;
  border: 1px solid var(--oro);
  background: var(--noir);
}
.process-step .num {
  font-family: var(--font-sans);
  font-size: var(--fs--1);
  letter-spacing: 0.34em;
  color: var(--oro);
}
.process-step .num::after { content: " · Paso 0" counter(paso); color: var(--piedra); letter-spacing: 0.2em; }
.process-step h3 { font-size: var(--fs-3); margin: var(--sp-2) 0; }
.process-step p { color: var(--piedra); margin: 0; }

/* ---------- 16 · FAQ (details con animación real de altura) ---------- */
.faq { display: grid; }
.faq-item { border-bottom: 1px solid var(--linea); }
.section--marfil .faq-item { border-color: var(--linea-marfil); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-2);
  line-height: 1.25;
  transition: color var(--d-1) ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--oro); }
.section--marfil .faq-item summary:hover { color: var(--oro-oscuro); }
.faq-marker {
  position: relative;
  flex: 0 0 15px;
  height: 15px;
  translate: 0 -2px;
}
.faq-marker::before, .faq-marker::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: var(--oro);
  transition: rotate var(--d-2) var(--ease-expo);
}
.faq-marker::after { rotate: 90deg; }
.faq-item[open] .faq-marker::after { rotate: 0deg; }
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--d-2) var(--ease-expo);
}
.faq-item[open] .faq-body { grid-template-rows: 1fr; }
.faq-body > div { overflow: clip; }
.faq-body p {
  color: var(--piedra);
  max-width: 68ch;
  padding-bottom: var(--sp-3);
  margin: 0;
}
.section--marfil .faq-body p { color: color-mix(in srgb, var(--noir) 70%, var(--marfil)); }

/* ---------- 17 · Galería colección + lightbox ---------- */
.collection-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
.collection-grid figure { margin: 0; }
@media (min-width: 900px) {
  .collection-grid { grid-template-columns: repeat(3, 1fr); }
  .collection-grid figure:nth-child(6n + 1),
  .collection-grid figure:nth-child(6n + 5) { translate: 0 var(--sp-4); }
}
.collection-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  text-align: left;
  color: inherit;
  font: inherit;
}
.collection-item .media-frame--phi img { filter: brightness(0.92); }
.collection-item:hover .media-frame img { transform: scale(1.06); filter: brightness(1); }
.collection-item figcaption {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
  font-size: var(--fs--1);
  letter-spacing: 0.14em;
  color: var(--piedra);
}
.collection-item figcaption .cat {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--oro);
  flex-shrink: 0;
}

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 1100px);
  width: auto;
}
.lightbox::backdrop {
  background: color-mix(in srgb, var(--noir) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.lightbox img {
  max-height: 82svh;
  width: auto;
  max-width: 100%;
  margin-inline: auto;
  border: 1px solid var(--linea);
}
.lightbox figcaption {
  color: var(--marfil);
  font-size: var(--fs--1);
  letter-spacing: 0.2em;
  text-align: center;
  padding-top: var(--sp-3);
}
.lightbox-close {
  position: fixed;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 48px;
  height: 48px;
  border: 1px solid var(--linea);
  background: var(--noir);
  color: var(--marfil);
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color var(--d-1) ease, color var(--d-1) ease;
}
.lightbox-close:hover { border-color: var(--oro); color: var(--oro); }

/* ---------- 18 · Formulario ---------- */
.form-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 720px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
}
.field { position: relative; display: grid; gap: var(--sp-1); }
.field label {
  font-size: var(--fs--1);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--piedra);
}
.field :is(input, textarea, select) {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--linea);
  color: var(--marfil);
  font: inherit;
  letter-spacing: 0.02em;
  padding: var(--sp-2) 2px;
  border-radius: 0;
  transition: border-color var(--d-1) ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; cursor: pointer; }
.field select option { background: var(--noir-2); color: var(--marfil); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--oro);
  border-bottom: 1px solid var(--oro);
  translate: 0 -70%;
  rotate: 45deg;
  pointer-events: none;
}
.field :is(input, textarea, select):focus {
  outline: none;
  border-color: var(--oro);
}
.field :is(input, textarea):user-invalid { border-color: #B4574B; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--piedra) 55%, transparent); }

.check {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  font-size: var(--fs--1);
  letter-spacing: 0.06em;
  color: var(--piedra);
  cursor: pointer;
}
.check a { color: var(--oro); text-decoration: underline; text-underline-offset: 3px; }
.check input {
  appearance: none;
  flex: 0 0 17px;
  height: 17px;
  margin-top: 2px;
  border: 1px solid var(--linea);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: border-color var(--d-1) ease, background var(--d-1) ease;
}
.check input::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 1.6px solid var(--noir);
  border-bottom: 1.6px solid var(--noir);
  rotate: -45deg;
  translate: 0 -1px;
  opacity: 0;
  transition: opacity var(--d-1) ease;
}
.check input:checked { background: var(--oro); border-color: var(--oro); }
.check input:checked::before { opacity: 1; }

.form-status {
  border: 1px solid var(--linea);
  padding: var(--sp-3);
  font-size: var(--fs-0);
  letter-spacing: 0.04em;
  display: none;
}
.form-status.is-ok { display: block; border-color: color-mix(in srgb, var(--oro) 60%, transparent); color: var(--oro-claro); }
.form-status.is-error { display: block; border-color: #B4574B; color: #D69A92; }

/* Honeypot fuera de vista (no display:none para engañar a bots) */
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 19 · Footer ---------- */
.site-footer {
  background: var(--noir);
  border-top: 1px solid var(--linea);
  padding-block: var(--sp-6) var(--sp-4);
  position: relative;
  overflow: clip;
}
.site-footer::before {
  content: "φ";
  position: absolute;
  right: -0.08em;
  bottom: -0.34em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(12rem, 26vw, 24rem);
  line-height: 1;
  color: color-mix(in srgb, var(--oro) 5%, transparent);
  pointer-events: none;
}
.footer-grid {
  display: grid;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}
@media (min-width: 880px) { .footer-grid { grid-template-columns: 1.618fr 1fr 1fr 1fr; } }
.footer-brand svg { width: 55px; height: 55px; color: var(--oro); margin-bottom: var(--sp-3); }
.footer-lema {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-2);
  color: var(--marfil);
  max-width: 16ch;
  line-height: 1.3;
}
.footer-col h2 {
  font-family: var(--font-sans);
  font-size: var(--fs--1);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--oro);
  margin-bottom: var(--sp-3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.footer-col a, .footer-col li { color: var(--piedra); font-size: var(--fs-0); font-weight: 300; }
.footer-col a { transition: color var(--d-1) ease; }
.footer-col a:hover { color: var(--oro-claro); }
address { font-style: normal; }
.footer-bottom {
  border-top: 1px solid var(--linea);
  padding-top: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  justify-content: space-between;
  font-size: var(--fs--1);
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--piedra) 75%, transparent);
}
.footer-bottom a { transition: color var(--d-1) ease; }
.footer-bottom a:hover { color: var(--oro-claro); }
.footer-legal { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------- 20 · Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--sp-4);
  background: var(--noir);
  transition: transform 1s var(--ease-luxe), visibility 0s 1s;
}
.preloader .spiral-svg { width: min(34vw, 190px); }
.preloader .spiral-path {
  stroke-dasharray: 222;
  stroke-dashoffset: 222;
  animation: spiraldraw 1.5s var(--ease-luxe) 0.1s forwards;
}
@keyframes spiraldraw { to { stroke-dashoffset: 0; } }
.preloader-word {
  font-family: var(--font-display);
  font-size: var(--fs-1);
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  text-transform: uppercase;
  color: var(--marfil);
  opacity: 0;
  animation: fadeword 1s ease 0.5s forwards;
}
@keyframes fadeword { to { opacity: 1; } }
html.is-loaded .preloader { transform: translateY(-100%); visibility: hidden; }
html.no-preloader .preloader { display: none; }

/* ---------- 21 · Cursor personalizado (solo puntero fino) ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9995;
  pointer-events: none;
  border-radius: 50%;
  translate: -50% -50%;
  display: none;
}
@media (pointer: fine) {
  .cursor-dot, .cursor-ring { display: block; }
}
.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--oro);
}
.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid color-mix(in srgb, var(--oro) 60%, transparent);
  transition: width 0.35s var(--ease-expo), height 0.35s var(--ease-expo),
    border-color 0.35s ease, background-color 0.35s ease;
}
.cursor-ring.is-link {
  width: 62px;
  height: 62px;
  background: color-mix(in srgb, var(--oro) 12%, transparent);
  border-color: var(--oro);
}
.cursor-ring.is-media {
  width: 84px;
  height: 84px;
  background: color-mix(in srgb, var(--noir) 55%, transparent);
  border-color: var(--oro);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.cursor-ring .cursor-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  font-size: 0.55rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-indent: 0.32em;
  color: var(--oro);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cursor-ring.is-media .cursor-label { opacity: 1; }

/* ---------- 22 · Página interior: hero corto ---------- */
.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + var(--sect));
  padding-bottom: var(--sect);
  overflow: clip;
}
.page-hero--media { min-height: 78svh; display: grid; align-items: end; }
.page-hero--media .hero-media img { object-position: 50% 30%; animation: none; }
.page-hero--media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, var(--noir) 4%, color-mix(in srgb, var(--noir) 64%, transparent) 44%, color-mix(in srgb, var(--noir) 40%, transparent) 100%);
}
.page-hero--media :is(.breadcrumb, .eyebrow, .hero-title, .hero-lead),
.hero :is(.breadcrumb, .eyebrow) {
  text-shadow: 0 1px 22px rgba(8, 6, 4, 0.45);
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--fs--1);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--piedra);
  margin-bottom: var(--sp-4);
}
.breadcrumb a:hover { color: var(--oro-claro); }
.breadcrumb .sep { color: var(--oro); }

/* Número gigante decorativo de sección */
.giant-index {
  position: absolute;
  top: 0.1em;
  right: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(7rem, 18vw, 16rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--oro) 22%, transparent);
  pointer-events: none;
  user-select: none;
}

/* ---------- 23 · Bloque CTA final ---------- */
.cta-final { text-align: center; }
.cta-final .display-2 { max-width: 18ch; margin-inline: auto; }
.cta-final .lead { max-width: 52ch; margin-inline: auto; }
.cta-nap {
  margin-top: var(--sp-4);
  font-size: var(--fs--1);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--piedra);
}

/* ---------- 24 · Vídeo con marco ---------- */
.video-frame { position: relative; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
.video-frame .tag {
  position: absolute;
  left: var(--sp-3);
  bottom: var(--sp-3);
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--marfil);
  background: color-mix(in srgb, var(--noir) 55%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--linea);
  padding: var(--sp-1) var(--sp-2);
}

/* ---------- 24b · Entrada del hero (coreografía de carga) ---------- */
html.js .hero .line-mask > span {
  transform: translateY(118%);
  transition: transform 1.15s var(--ease-luxe);
}
html.js .hero .line-mask:nth-child(2) > span { transition-delay: 0.09s; }
html.js .hero .line-mask:nth-child(3) > span { transition-delay: 0.18s; }
html.js .hero :is(.eyebrow, .hero-lead, .hero-actions, .scroll-hint) {
  opacity: 0;
  transform: translateY(21px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease-expo);
}
html.js .hero .eyebrow { transition-delay: 0.42s; }
html.js .hero .hero-lead { transition-delay: 0.55s; }
html.js .hero .hero-actions { transition-delay: 0.68s; }
html.js .hero .scroll-hint { transition-delay: 0.9s; }
html.js .hero-media { opacity: 0; transition: opacity 1.4s ease 0.1s; }
html.js.is-loaded .hero .line-mask > span { transform: none; }
html.js.is-loaded .hero :is(.eyebrow, .hero-lead, .hero-actions, .scroll-hint) { opacity: 1; transform: none; }
html.js.is-loaded .hero-media { opacity: 1; }

/* ---------- 25 · Accesibilidad / movimiento reducido ---------- */
.skip-link {
  position: fixed;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 10000;
  background: var(--oro);
  color: var(--noir);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  translate: 0 calc(-100% - var(--sp-3));
  transition: translate 0.3s ease;
}
.skip-link:focus { translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .preloader { display: none !important; }
  .cursor-dot, .cursor-ring { display: none !important; }
  .hero-media img { animation: none !important; }
  .marquee-track { animation: none !important; }
}
