/* =========================================================================
   Cerrajero Bryan Pizarro · experiencia "Del bloqueo a la apertura"
   Mobile-first real: todo se compone a 390×844 y luego se abre a escritorio.
   ========================================================================= */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-wdth.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}

:root {
  --ink: #08080b;
  --ink-2: #101016;
  --ink-3: #1a1a22;
  --paper: #f2f0ec;
  --paper-2: #d9d5cd;
  --muted: rgba(242, 240, 236, .60);
  --brass: #e0b467;
  --brass-d: #a87f2e;
  --acid: #d6ff3c;
  --line: rgba(242, 240, 236, .14);

  /* Curvas fuertes compartidas. Las integradas de CSS son demasiado flojas. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 140ms;
  --dur-ui: 200ms;
  --dur-panel: 280ms;

  --f: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pad: clamp(1.15rem, 5.5vw, 4rem);
  --bar: 62px;
  --svh: 1svh;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: .94; letter-spacing: -.03em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

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

.skip {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--brass); color: var(--ink); padding: .8rem 1.2rem; font-weight: 700;
}
.skip:focus { left: 0; }

/* ------------------------------- Botones -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 1.5rem;
  font-family: var(--f); font-size: 1rem; font-weight: 700;
  font-stretch: 92%; letter-spacing: -.01em;
  border: 1px solid transparent; border-radius: 2px;
  text-decoration: none; cursor: pointer;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-ui) ease, color var(--dur-ui) ease, border-color var(--dur-ui) ease;
}
.btn:active { transform: scale(.97); }
.btn--key { background: var(--brass); color: #140f04; }
.btn--line { background: transparent; color: var(--paper); border-color: var(--line); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--big { min-height: 60px; font-size: 1.1rem; padding: 0 2rem; }

/* --------------------------------- HUD ---------------------------------- */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem var(--pad);
  padding-top: calc(.7rem + env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(8,8,11,.82), rgba(8,8,11,0));
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud__brand {
  font-size: .68rem; font-weight: 700; font-stretch: 78%;
  text-transform: uppercase; letter-spacing: .1em; line-height: 1.25;
  color: var(--muted);
}
.hud__brand span { display: block; color: var(--paper); }
.hud__right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.hud__tel {
  font-size: .82rem; font-weight: 700; letter-spacing: -.01em;
  color: var(--brass); text-decoration: none;
  padding: .45rem .7rem; border: 1px solid rgba(224,180,103,.35); border-radius: 2px;
}
.hud__menu {
  width: 44px; height: 40px; background: transparent;
  border: 1px solid var(--line); border-radius: 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hud__menu span { width: 16px; height: 1.5px; background: var(--paper); transition: transform .25s, opacity .2s; }
.hud__menu[aria-expanded="true"] span:first-child { transform: translateY(3.2px) rotate(45deg); }
.hud__menu[aria-expanded="true"] span:last-child { transform: translateY(-3.2px) rotate(-45deg); }
.hud__prog { position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: rgba(242,240,236,.1); }
.hud__prog i { display: block; height: 100%; width: 0; background: var(--brass); }

.menu {
  position: fixed; inset: 0; z-index: 70;
  background: var(--ink-2);
  padding: calc(4.5rem + env(safe-area-inset-top)) var(--pad) 2rem;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.menu li + li { border-top: 1px solid var(--line); }
.menu button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  color: var(--paper); font-family: var(--f); font-size: 1.5rem; font-weight: 800;
  font-stretch: 80%; letter-spacing: -.025em;
  padding: .85rem 0; display: flex; align-items: baseline; gap: .9rem;
}
.menu button b { font-size: .7rem; color: var(--brass); font-stretch: 100%; }
.menu__call {
  margin-top: auto; text-align: center; text-decoration: none;
  background: var(--brass); color: #140f04; font-weight: 700;
  padding: 1rem; border-radius: 2px;
}

/* ------------------------------- Escenas -------------------------------- */
.scene { position: relative; }
.stage {
  position: relative;
  height: 100vh; height: calc(var(--svh) * 100);
  overflow: hidden;
}

/* ============================== 1 · HERO ================================= */
.scene--hero { height: 210vh; }
.hero__bg, .hero__mid, .hero__glow, .hero__key, .hero__type { position: absolute; }

.hero__bg { inset: -6% -6% -6% -6%; z-index: 1; will-change: transform; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) contrast(1.05); }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,11,.94) 8%, rgba(8,8,11,.35) 52%, rgba(8,8,11,.7) 100%);
}

.hero__mid {
  z-index: 2; right: -8%; top: 8%;
  width: 62%; aspect-ratio: 4 / 5;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%);
  }
.hero__mid img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.1) brightness(.86); }

.hero__glow {
  z-index: 3; inset: auto -20% 12% -20%; height: 60%;
  background: radial-gradient(closest-side, rgba(224,180,103,.30), transparent 72%);
  }

.hero__key {
  z-index: 4; width: 118%; left: -34%; top: 46%;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.6));
  will-change: transform;
}

.hero__type {
  z-index: 5; left: 0; right: 0; bottom: calc(var(--bar) + 1.4rem);
  padding: 0 var(--pad);
}
.hero__h1 { display: block; }
.hero__l {
  display: block;
  font-size: clamp(2.9rem, 15.5vw, 9rem);
  font-stretch: 74%; font-weight: 800;
  letter-spacing: -.035em; line-height: .86;
  text-transform: uppercase;
  will-change: transform;
}
.hero__l[data-h="l2"] { color: var(--brass); }
.hero__sub {
  display: block; margin-top: .9rem;
  font-size: .82rem; font-weight: 600; font-stretch: 100%;
  letter-spacing: .02em; line-height: 1.45; text-transform: none;
  color: var(--muted); max-width: 30ch;
}
.hero__cta { display: flex; gap: .6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.hero__cta .btn { flex: 1 1 auto; }

.hero__hint {
  position: absolute; z-index: 5; left: var(--pad); bottom: .5rem;
  font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: .5rem;
}
.hero__hint span { width: 26px; height: 1px; background: var(--brass); animation: slide 1.9s ease-in-out infinite; }
@keyframes slide { 0%,100% { transform: scaleX(.3); transform-origin: left; } 50% { transform: scaleX(1); transform-origin: left; } }

/* ============================ 2 · MECANISMO ============================== */
.scene--mech { height: 230vh; background: var(--ink); }
.keyhole { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.keyhole svg { width: 100%; height: 100%; }

.mech {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(4.5rem + env(safe-area-inset-top)) var(--pad) calc(var(--bar) + 1.5rem);
  background:
    radial-gradient(ellipse 80% 50% at 50% 45%, rgba(224,180,103,.10), transparent 70%),
    var(--ink);
}
.mech__h {
  font-size: clamp(2rem, 9.5vw, 4.4rem); font-stretch: 76%; text-transform: uppercase;
  will-change: transform;
}
.mech__view { position: relative; margin: 1.2rem 0; }
.mech__svg { width: 100%; height: auto; overflow: visible; }
.mech__svg .pz { }

.mech__labels { position: absolute; inset: 0; }
.mech__labels li {
  position: absolute; display: flex; align-items: center; gap: .4rem;
  font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass); opacity: 0; white-space: nowrap;
}
.mech__labels i { width: 18px; height: 1px; background: var(--brass); display: block; }
.mech__labels [data-lb="escudo"]   { left: 0;    top: 4%; }
.mech__labels [data-lb="cilindro"] { right: 0;   top: 22%; flex-direction: row-reverse; }
.mech__labels [data-lb="muelles"]  { left: 0;    top: 40%; }
.mech__labels [data-lb="pines"]    { right: 0;   top: 56%; flex-direction: row-reverse; }
.mech__labels [data-lb="rotor"]    { left: 0;    top: 74%; }
.mech__labels [data-lb="llave"]    { right: 0;   top: 90%; flex-direction: row-reverse; }

.mech__txt {
  font-size: .95rem; color: var(--muted); max-width: 34ch;
  border-left: 2px solid var(--brass); padding-left: .9rem;
}

/* ========================= 3 · CERRADURA INTERACTIVA ===================== */
.scene--lock {
  min-height: 100vh; min-height: calc(var(--svh) * 100);
  display: flex; align-items: center;
  padding: 4.5rem var(--pad) calc(var(--bar) + 2rem);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 55%, var(--ink) 100%);
}
.lock { width: 100%; }
.lock__h { font-size: clamp(2rem, 9.5vw, 4rem); font-stretch: 76%; text-transform: uppercase; }
.lock__sub { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

.lock__stage {
  position: relative; margin: 1.5rem 0 .6rem;
  border: 1px solid var(--line); border-radius: 3px;
  background: radial-gradient(ellipse at 50% 60%, rgba(224,180,103,.08), transparent 70%);
  padding: .6rem;
  touch-action: pan-y;
}
.lock__svg { width: 100%; height: auto; }



.lock__grab {
  position: absolute; left: 3%; top: 56%;
  width: 76px; height: 76px; margin: -38px 0 0 0;
  border-radius: 50%; border: 1px dashed rgba(224,180,103,.55);
  background: rgba(224,180,103,.08); cursor: grab;
  touch-action: none;
  display: grid; place-items: center;
}
.lock__grab:active { cursor: grabbing; }
.lock__grabDot { width: 10px; height: 10px; border-radius: 50%; background: var(--brass); }
.lock__grab::after {
  content: ''; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(224,180,103,.25);
  animation: ring 2.2s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.lock__grab.is-off::after { display: none; }

.lock__state {
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass);
}
.lock__done { margin-top: 1.2rem; display: grid; gap: .8rem; justify-items: start; }
.lock__done p { color: var(--paper); font-size: 1.05rem; font-weight: 600; max-width: 26ch; }

/* ============================= 4 · SERVICIOS ============================= */
.scene--svc { padding: 4rem 0 3rem; background: var(--ink); }
.svc__head { padding: 0 var(--pad) 1.2rem; }
.svc__head h2 { font-size: clamp(2rem, 9.5vw, 4.4rem); font-stretch: 76%; text-transform: uppercase; }
.svc__head p { color: var(--muted); font-size: .88rem; margin-top: .5rem; }

.svc__track {
  position: relative;
  display: flex; gap: .8rem;
  padding: 0 var(--pad) 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.svc__track::-webkit-scrollbar { display: none; }

.svc__panel {
  position: relative; flex: 0 0 78vw; max-width: 420px;
  aspect-ratio: 3 / 4.2; scroll-snap-align: center;
  overflow: hidden; border-radius: 2px; isolation: isolate;
}
.svc__img { position: absolute; inset: -8% -8%; z-index: 1; }
.svc__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--s, 1.06)) translateY(var(--ty, 0)); }
.svc__panel::after {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(to top, rgba(8,8,11,.9) 10%, rgba(8,8,11,.15) 60%);
}
.svc__n {
  position: absolute; z-index: 3; top: .9rem; left: 1rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .2em; color: var(--brass);
}
.svc__t {
  position: absolute; z-index: 3; left: 1rem; bottom: 3.6rem;
  font-size: clamp(1.6rem, 7.5vw, 2.6rem); font-stretch: 76%; text-transform: uppercase;
  transform: translateX(var(--tx, 0));
}
.svc__more {
  position: absolute; z-index: 3; left: 1rem; bottom: 1rem;
  min-height: 44px; padding: 0 1.1rem;
  background: rgba(242,240,236,.1); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 2px;
  color: var(--paper); font-family: var(--f); font-size: .82rem; font-weight: 700; cursor: pointer;
}
.svc__seo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* ============================ 5 · DIAGNÓSTICO =========================== */
.scene--diag {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: calc(var(--svh) * 100);
  display: flex; align-items: flex-end;
  padding: 4.5rem var(--pad) calc(var(--bar) + 2rem);
}
.diag { position: relative; z-index: 2; width: 100%; }
.diag__bgs { position: absolute; inset: 0; z-index: 0; }
.diag__bgs img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 280ms var(--ease-out), transform 420ms var(--ease-out);
  transform: scale(1.08);
}
.diag__bgs img.is-on { opacity: 1; transform: scale(1); }
.scene--diag::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(8,8,11,.96) 25%, rgba(8,8,11,.55) 70%, rgba(8,8,11,.8));
}
.diag__in { position: relative; z-index: 2; }
.diag h2 { font-size: clamp(2rem, 9.5vw, 4.4rem); font-stretch: 76%; text-transform: uppercase; }
.diag__opts { display: grid; gap: .5rem; margin: 1.2rem 0; }
.diag__opt {
  min-height: 56px; padding: 0 1.1rem; text-align: left;
  background: rgba(242,240,236,.06); border: 1px solid var(--line); border-radius: 2px;
  color: var(--paper); font-family: var(--f); font-size: 1rem; cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .15s;
}
.diag__opt b { font-weight: 700; font-stretch: 92%; }
.diag__opt:active { transform: scale(.98); }
.diag__opt.is-on { background: var(--brass); border-color: var(--brass); color: #140f04; }
.diag__out { display: grid; gap: .7rem; justify-items: start; }
.diag__lead { font-size: 1.15rem; font-weight: 700; font-stretch: 92%; }
.diag__sol { color: var(--muted); font-size: .92rem; max-width: 38ch; }

/* ============================ 6 · COMPARADOR ============================ */
.scene--comp {
  padding: 4rem var(--pad) calc(var(--bar) + 3rem);
  background: var(--ink-2);
}
.comp__h { font-size: clamp(2rem, 9.5vw, 4.4rem); font-stretch: 76%; text-transform: uppercase; }
.comp__sub { color: var(--muted); font-size: .88rem; margin-top: .5rem; }
.comp {
  position: relative; margin-top: 1.3rem;
  aspect-ratio: 1 / 1; overflow: hidden; border-radius: 2px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.comp__img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.comp__after {
  position: absolute; inset: 0;
  clip-path: inset(0 calc(100% - var(--p, 50) * 1%) 0 0);
}
.comp__bar {
  position: absolute; top: 0; bottom: 0; left: calc(var(--p, 50) * 1%);
  width: 2px; background: var(--paper); transform: translateX(-1px);
}
.comp__handle {
  position: absolute; top: 50%; left: 50%;
  width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; border: 2px solid var(--paper);
  background: rgba(8,8,11,.55); backdrop-filter: blur(4px);
  cursor: ew-resize; touch-action: none;
}
.comp__handle::before, .comp__handle::after {
  content: ''; position: absolute; top: 50%; width: 7px; height: 7px;
  border-top: 2px solid var(--paper); border-right: 2px solid var(--paper);
}
.comp__handle::before { left: 13px; transform: translateY(-50%) rotate(-135deg); }
.comp__handle::after { right: 13px; transform: translateY(-50%) rotate(45deg); }
.comp__tag {
  position: absolute; bottom: .8rem; z-index: 3;
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  background: rgba(8,8,11,.6); padding: .3rem .6rem;
}
.comp__tag--l { left: .8rem; }
.comp__tag--r { right: .8rem; color: var(--brass); }

/* ============================= 7 · BARCELONA ============================ */
.scene--geo { height: 200vh; }
.scene--geo .stage { background: var(--ink); }
.geo__photo {
  position: absolute; inset: -8%; width: 116%; height: 116%;
  object-fit: cover; opacity: .42; filter: grayscale(.4) contrast(1.1);
  will-change: transform;
}
.geo__in {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: center;
  padding: 4.5rem var(--pad) calc(var(--bar) + 2rem);
  background: linear-gradient(to top, rgba(8,8,11,.92), rgba(8,8,11,.3));
}
.geo__in h2 { font-size: clamp(2.2rem, 11vw, 5rem); font-stretch: 74%; text-transform: uppercase; }
.geo__coord { font-size: .62rem; letter-spacing: .2em; color: var(--brass); margin-top: .5rem; }
.geo__zones { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.4rem 0; }
.geo__zones button {
  min-height: 44px; padding: 0 .9rem;
  background: transparent; border: 1px solid var(--line); border-radius: 100px;
  color: var(--muted); font-family: var(--f); font-size: .85rem; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.geo__zones button.is-on { color: #140f04; background: var(--brass); border-color: var(--brass); font-weight: 700; }
.geo__info { font-size: .95rem; color: var(--paper); max-width: 36ch; min-height: 4.2em; }

/* ============================== 8 · 24 HORAS ============================ */
.scene--h24 { height: 190vh; }
.scene--h24 .stage { background: var(--acid); color: #0a0d02; }
.h24__light {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(220px circle at var(--lx, 50%) var(--ly, 40%), rgba(255,255,255,.75), transparent 70%);
  mix-blend-mode: overlay;
}
.h24__giant {
  position: absolute; z-index: 0; top: 8%; left: 0;
  white-space: nowrap; margin: 0;
  font-size: clamp(6rem, 34vw, 18rem); font-weight: 800; font-stretch: 70%;
  letter-spacing: -.05em; line-height: .8; color: #0a0d02; opacity: .14;
  will-change: transform;
}
.h24__spark { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.h24__spark i {
  position: absolute; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(10,13,2,.45);
  animation: float 7s ease-in-out infinite;
}
.h24__spark i:nth-child(1) { left: 12%; top: 22%; animation-delay: 0s; }
.h24__spark i:nth-child(2) { left: 78%; top: 18%; animation-delay: .9s; }
.h24__spark i:nth-child(3) { left: 34%; top: 68%; animation-delay: 1.8s; }
.h24__spark i:nth-child(4) { left: 88%; top: 58%; animation-delay: 2.6s; }
.h24__spark i:nth-child(5) { left: 55%; top: 34%; animation-delay: 3.4s; }
.h24__spark i:nth-child(6) { left: 22%; top: 82%; animation-delay: 4.2s; }
@keyframes float { 0%,100% { transform: translateY(0); opacity: .2; } 50% { transform: translateY(-18px); opacity: .55; } }

.h24__in {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 0 var(--pad) calc(var(--bar) + 2.5rem);
}
.h24__in h2 {
  font-size: clamp(2rem, 10vw, 4.6rem); font-stretch: 76%; text-transform: uppercase;
  max-width: 12ch;
}
.h24__in p { margin: 1rem 0 1.5rem; max-width: 36ch; font-size: .95rem; font-weight: 500; }

/* =============================== 9 · FAQ =============================== */
.scene--faq { background: var(--paper); color: var(--ink); padding: 4rem var(--pad) 4rem; }
.faq h2 { font-size: clamp(2rem, 9.5vw, 4.4rem); font-stretch: 76%; text-transform: uppercase; }
.faq__list { margin: 1.6rem 0 2.6rem; border-top: 1px solid rgba(8,8,11,.16); }
.faq details { border-bottom: 1px solid rgba(8,8,11,.16); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1.05rem 2rem 1.05rem 0;
  font-weight: 700; font-stretch: 92%; font-size: 1rem; letter-spacing: -.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: .3rem; top: 1.4rem;
  width: 9px; height: 9px;
  border-right: 2px solid var(--brass-d); border-bottom: 2px solid var(--brass-d);
  transform: rotate(45deg); transition: transform .22s;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding: 0 1.4rem 1.1rem 0; color: rgba(8,8,11,.72); font-size: .93rem; }
.faq__seo { border-top: 1px solid rgba(8,8,11,.16); padding-top: 1.6rem; }
.faq__seo h3 { font-size: 1.3rem; font-stretch: 88%; margin-bottom: .8rem; }
.faq__seo p { color: rgba(8,8,11,.7); font-size: .93rem; margin-bottom: .9rem; max-width: 62ch; }

/* ============================== 10 · FINAL ============================== */
.scene--end { height: 190vh; }
.scene--end .stage { background: var(--ink); }
.end__light {
  position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 50% 60% at 50% 55%, #fff6e4, #f0d9a8 40%, transparent 72%);
  opacity: 0; will-change: opacity;
}
.end__door {
  position: absolute; top: 0; bottom: 0; z-index: 2; width: 52%;
  background:
    linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,0) 30%),
    repeating-linear-gradient(0deg, #15161b 0 46px, #191a20 46px 92px);
  will-change: transform;
}
.end__door--l { left: 0; box-shadow: inset -14px 0 26px rgba(0,0,0,.7); }
.end__door--r { right: 0; box-shadow: inset 14px 0 26px rgba(0,0,0,.7); }

.end__in {
  position: absolute; inset: auto 0 0 0; z-index: 3;
  padding: 0 var(--pad) calc(var(--bar) + 3rem);
  display: grid; gap: .9rem; justify-items: start;
  will-change: transform, opacity;
}
.end__in h2 { font-size: clamp(2.6rem, 13vw, 6rem); font-stretch: 74%; text-transform: uppercase; }
.end__in > p { color: var(--muted); font-size: .95rem; }
.end__alt a { font-size: .85rem; color: var(--brass); }

/* =============================== Pie =================================== */
.ft { background: var(--ink); padding: 3rem var(--pad) calc(var(--bar) + 2rem); border-top: 1px solid var(--line); }
.ft__in { display: grid; gap: 1.6rem; }
.ft__name { font-weight: 800; font-stretch: 84%; font-size: 1.15rem; letter-spacing: -.02em; }
.ft__nap { color: var(--muted); font-size: .88rem; margin-top: .5rem; line-height: 1.7; }
.ft__nap a { color: var(--brass); }
.ft__warn { color: rgba(224,180,103,.75); font-size: .76rem; margin-top: .8rem; max-width: 34ch; }
.ft__legal { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.ft__legal a { font-size: .82rem; color: var(--muted); }
.ft__bottom { margin-top: 2rem; font-size: .72rem; color: rgba(242,240,236,.35); }

/* ============================ CTA persistente ========================== */
.callbar {
  position: fixed; inset: auto 0 0 0; z-index: 55;
  padding: .5rem var(--pad);
  padding-bottom: calc(.5rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--ink) 55%, rgba(8,8,11,0));
  transform: translateY(0); transition: transform .3s ease;
}
.callbar.is-hidden { transform: translateY(140%); }
.callbar__btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 52px; background: var(--brass); color: #140f04;
  font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em;
  text-decoration: none; border-radius: 2px;
}
.callbar__btn span {
  font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  opacity: .75; font-weight: 700;
}
body { padding-bottom: 0; }

/* =============================== Overlay =============================== */
.ov { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; }
.ov__back { position: absolute; inset: 0; background: rgba(4,4,6,.8); backdrop-filter: blur(6px); }
.ov__panel {
  position: relative; width: 100%; max-height: 88vh; overflow-y: auto;
  background: var(--ink-2); border-top: 2px solid var(--brass);
  padding: 1rem var(--pad) calc(1.6rem + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform var(--dur-panel) var(--ease-drawer);
}
.ov:not([hidden]) .ov__panel { transform: translateY(0); }
.ov__drag { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 1rem; }
.ov__x {
  position: absolute; top: .8rem; right: var(--pad);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(242,240,236,.1); border: 0; color: var(--paper); cursor: pointer;
}
.ov__panel h3 { font-size: 1.7rem; font-stretch: 82%; margin-bottom: .9rem; max-width: 18ch; }
.ov__body p { color: var(--muted); font-size: .93rem; margin-bottom: .8rem; }
.ov__body b { color: var(--paper); font-weight: 700; }
.ov__cta { margin-top: 1.2rem; }
.ov__cta .btn { width: 100%; }

/* =============================== Escritorio ============================= */
@media (min-width: 820px) {
  body { font-size: 17px; }
  .hud__brand { font-size: .74rem; }
  .hero__mid { width: 38%; right: 4%; top: 12%; }
  .hero__key { width: 62%; left: -6%; top: 52%; }
  .hero__type { bottom: 3.5rem; max-width: 60%; }
  .hero__cta .btn { flex: 0 0 auto; }
  .mech { padding-bottom: 3rem; }
  .mech__view { max-width: 760px; align-self: center; width: 100%; }
  .mech__labels li { font-size: .68rem; }
  .lock { max-width: 720px; margin: 0 auto; }
  .svc__panel { flex: 0 0 34vw; }
  .diag__opts { grid-template-columns: repeat(2, 1fr); }
  .comp { max-width: 760px; aspect-ratio: 16 / 10; }
  .geo__in { max-width: 52rem; }
  .h24__in { max-width: 44rem; }
  .faq__list { columns: 2; column-gap: 3rem; }
  .faq details { break-inside: avoid; }
  .ft__in { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .callbar { left: auto; right: 1.5rem; bottom: 1.5rem; width: auto; padding: 0; background: none; }
  .callbar__btn { padding: 0 1.4rem; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
  .ov { align-items: center; justify-content: center; padding: 2rem; }
  .ov__panel { max-width: 620px; border: 1px solid var(--line); border-top: 2px solid var(--brass); }
}

/* ========================== Movimiento reducido ========================= */
/* No se desactiva la experiencia: se quitan los desplazamientos largos y se
   mantienen contenido, fotografías, jerarquía e interacciones. */
@media (prefers-reduced-motion: reduce) {
  .scene--hero, .scene--mech, .scene--geo, .scene--h24, .scene--end { height: auto; }
  .stage { height: auto; min-height: calc(var(--svh) * 100); }
  .hero__hint, .h24__spark, .lock__grab::after { display: none; }
  .mech__labels li { opacity: 1; }
  .keyhole { display: none; }
  .end__door { display: none; }
  .end__light { opacity: .25; }
  .svc__img img { transition: none; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* =============================== Legales =============================== */
.legal { background: var(--paper); color: var(--ink); padding: calc(5.5rem + env(safe-area-inset-top)) var(--pad) 4rem; }
.legal__in { max-width: 760px; margin: 0 auto; }
.legal__crumb { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(8,8,11,.5); margin-bottom: 1.4rem; }
.legal__crumb a { color: var(--brass-d); }
.legal h1 { font-size: clamp(2rem, 8vw, 3.4rem); font-stretch: 78%; text-transform: uppercase; }
.legal__updated { font-size: .8rem; color: rgba(8,8,11,.5); margin: .8rem 0 2.4rem; }
.legal h2 { font-size: 1.3rem; font-stretch: 88%; margin: 2.4rem 0 .7rem; }
.legal p, .legal li { color: rgba(8,8,11,.74); font-size: .93rem; margin-bottom: .8rem; }
.legal ul, .legal ol { padding-left: 1.2rem; list-style: disc; }
.legal__data { list-style: none; padding: 1.2rem 1.3rem; border: 1px solid rgba(8,8,11,.18); margin-bottom: 1.5rem; }
.legal__data li { display: grid; grid-template-columns: 11rem 1fr; gap: .8rem; margin-bottom: .5rem; }
.legal__data b { color: var(--ink); }
.legal__table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: 1rem 0 1.6rem; }
.legal__table th, .legal__table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid rgba(8,8,11,.14); vertical-align: top; }
.legal__table td { color: rgba(8,8,11,.7); }
.legal__back { margin-top: 2.5rem; background: var(--ink); color: var(--paper); }
.legal .hud { background: none; position: absolute; }
.legal-page .hud__brand span, .legal-page .hud__brand { color: var(--ink); }
.legal-page .hud__menu span { background: var(--ink); }
@media (max-width: 620px) { .legal__data li { grid-template-columns: 1fr; gap: 0; } }

/* =========================================================================
   V2 · escena 3D, densidad móvil y microinteracciones
   Este bloque va al final a propósito: sobrescribe lo anterior sin tocarlo.
   ========================================================================= */

/* Alturas más cortas: menos vacío entre transformaciones */
.scene--hero { height: 175vh; }
.scene--mech { height: 265vh; background: transparent; }
.scene--geo  { height: 175vh; }
.scene--h24  { height: auto; }
.scene--end  { height: 200vh; background: var(--ink); }

/* ------------------------- Lienzo 3D y su HUD -------------------------- */
#lock3d {
  position: fixed; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 280ms var(--ease-out);
  pointer-events: none;
}
.l3d {
  position: fixed; inset: auto 0 0 0; z-index: 3;
  padding: 0 var(--pad) calc(var(--bar) + 1.4rem);
  opacity: 0; transition: opacity var(--dur-ui) var(--ease-out);
  pointer-events: none;
}
.l3d.is-on { opacity: 1; }
.l3d__state {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass); border: 1px solid rgba(224,180,103,.32);
  padding: .35rem .7rem; border-radius: 100px;
  background: rgba(8,8,11,.55);
}
.l3d__state::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass);
}
.l3d__info {
  margin-top: .8rem; max-width: 34ch;
  background: rgba(10,10,13,.78);
  border-left: 2px solid var(--brass);
  padding: .8rem .9rem;
}
.l3d__info h3 { font-size: 1rem; font-stretch: 92%; margin-bottom: .3rem; }
.l3d__info p { font-size: .86rem; color: var(--muted); }
.l3d__hint {
  margin-top: .8rem; font-size: .64rem; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(242,240,236,.42);
}

/* ------------------------ Sección del mecanismo ------------------------ */
.mech__intro {
  position: sticky; top: 0; z-index: 4;
  padding: calc(4.6rem + env(safe-area-inset-top)) var(--pad) 0;
  pointer-events: none;
}
.mech__intro h2 {
  font-size: clamp(2rem, 10vw, 4.6rem); font-stretch: 74%; text-transform: uppercase;
}
.mech__intro p { color: var(--muted); font-size: .88rem; margin-top: .5rem; max-width: 28ch; }

.mech__steps {
  position: sticky; top: 42vh; z-index: 4;
  margin-top: 12vh; padding: 0 var(--pad);
  display: grid; gap: .32rem; pointer-events: none;
}
.mech__steps li {
  display: flex; align-items: center; gap: .5rem;
  font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(242,240,236,.26); transition: color .3s ease;
}
.mech__steps li i {
  width: 14px; height: 1px; background: currentColor;
  transform-origin: left center;
  transition: transform var(--dur-ui) var(--ease-out), background-color var(--dur-ui) ease;
}
.mech__steps li.is-on { color: var(--brass); }
.mech__steps li.is-on i { transform: scaleX(2.1); }

.mech__fb { padding: 30vh var(--pad); }
.mech__fb p { color: var(--muted); font-size: .86rem; margin-top: 1rem; }

/* ------------------------------ Servicios ------------------------------ */
.scene--svc { padding: 3rem 0 2.4rem; position: relative; z-index: 4; background: var(--ink); }
.svc__head { padding: 0 var(--pad) 1rem; }
.svc__lead { color: var(--muted); font-size: .88rem; margin-top: .5rem; }
.svc__drag {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: .9rem;
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass);
}
.svc__drag i { width: 24px; height: 1px; background: var(--brass); animation: slide 1.9s ease-in-out infinite; }

.svc__panel { flex: 0 0 87vw; max-width: 520px; aspect-ratio: auto; height: 72svh; }
.svc__t { bottom: 5.6rem; font-size: clamp(1.9rem, 9vw, 3rem); }
.svc__x {
  position: absolute; z-index: 3; left: 1rem; right: 1rem; bottom: 3.5rem;
  font-size: .84rem; color: rgba(242,240,236,.72); max-width: 30ch;
}
.svc__hot {
  position: absolute; z-index: 4; left: 58%; top: 34%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border: 0; background: transparent; cursor: pointer; padding: 0;
  display: grid; place-items: center;
}
.svc__hot i {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brass); position: relative;
}
.svc__hot i::after {
  content: ''; position: absolute; inset: -5px;
  border-radius: 50%; background: rgba(224,180,103,.22);
  animation: hot 2.4s var(--ease-out) infinite;
}
@keyframes hot {
  0%, 100% { transform: scale(1);   opacity: .6; }
  50%      { transform: scale(2.4); opacity: 0;  }
}
.svc__dots { display: flex; gap: .4rem; padding: 0 var(--pad); }
.svc__dots i {
  width: 18px; height: 2px; background: rgba(242,240,236,.18);
  transition: background-color .3s ease;
}
.svc__dots i.is-on { background: var(--brass); }

/* ----------------------------- Diagnóstico ----------------------------- */
.scene--diag { position: relative; z-index: 4; background: var(--ink); padding-top: 3.4rem; }
.diag__mini {
  position: absolute; z-index: 2; right: var(--pad); top: 16%;
  width: 46%; max-width: 300px; height: auto; opacity: 0;
  transition: opacity var(--dur-ui) var(--ease-out);
}
.diag__mini.is-on { opacity: 1; }
.diag__mini .dm-shield, .diag__mini .dm-cyl, .diag__mini .dm-pins {
  transition: transform 260ms var(--ease-in-out);
}
.diag__mini.is-on .dm-shield { transform: translateX(-26px); }
.diag__mini.is-on .dm-cyl { transform: translateX(16px); }
.diag__mini.is-on .dm-pins { transform: translateY(-16px); }

.diag__24 {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: #7ce6a4;
}
.diag__24 i {
  width: 8px; height: 8px; border-radius: 50%; background: #7ce6a4;
  animation: beat 1.4s ease-in-out infinite;
}
@keyframes beat { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .5; } }
.scene--diag.is-urgent { background: #140a06; }
.scene--diag.is-urgent .diag__opt.is-on { background: #ff6a2b; border-color: #ff6a2b; color: #140a06; }
.scene--diag.is-urgent #diagCta { background: #ff6a2b; color: #1a0b04; }

/* ----------------------------- Comparador ------------------------------ */
.scene--comp { position: relative; z-index: 4; padding-top: 3.4rem; }
.comp__head { margin-bottom: 1.1rem; }
.comp__sub { color: var(--muted); font-size: .88rem; margin-top: .5rem; }
.comp { aspect-ratio: 4 / 3; }
.comp.is-grab { box-shadow: 0 0 0 1px rgba(224,180,103,.5); }
.comp.is-grab .comp__handle { transform: translate(-50%, -50%) scale(1.12); }
.comp__handle { transition: transform .16s ease; }
.comp__cue {
  position: absolute; z-index: 4; left: 50%; top: 50%;
  transform: translate(-50%, calc(-50% + 46px));
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  background: rgba(8,8,11,.62); padding: .35rem .7rem; white-space: nowrap;
  transition: opacity .3s ease;
}
.comp__cue.is-off { opacity: 0; }
.comp__foot { margin-top: .9rem; font-size: .78rem; color: rgba(242,240,236,.42); }

/* ----------------------------- Cobertura ------------------------------ */
.geo__map {
  position: absolute; z-index: 1; left: 50%; top: 42%;
  width: 92%; max-width: 520px; transform: translate(-50%, -50%);
  opacity: .9;
}
.geo__nodes circle {
  fill: rgba(224,180,103,.42);
  transition: fill .3s ease, r .3s ease;
}
.geo__nodes circle.is-on { fill: var(--brass); r: 10; }
.geo__links path {
  stroke-dasharray: 200; stroke-dashoffset: 200;
  transition: stroke-dashoffset 720ms var(--ease-out);
}
.geo__links.is-on path { stroke-dashoffset: 0; }
.geo__in { justify-content: flex-end; }
.geo__badge {
  display: inline-block; margin-bottom: .6rem;
  font-size: .6rem; letter-spacing: .2em; text-transform: uppercase;
  background: var(--brass); color: #140f04; padding: .3rem .7rem; font-weight: 700;
}
.geo__info { min-height: 5.2em; }

/* ------------------------------- 24 horas ------------------------------ */
.scene--h24 { position: relative; z-index: 4; }

/* -------------------------------- FAQ ---------------------------------- */
.scene--faq { position: relative; z-index: 4; }

/* -------------------------------- Final -------------------------------- */
.end__flash {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, #fff6e4, #f2ddb0 45%, transparent 78%);
  opacity: 0;
}
.end__in {
  position: sticky; top: 0; z-index: 4;
  height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  gap: .9rem; align-items: flex-start;
  padding: 0 var(--pad) calc(var(--bar) + 3rem);
  opacity: 0; transform: translateY(24px);
}
.end__in.is-on { opacity: 1; transform: none; transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out); }
.end__in h2 { font-size: clamp(2.6rem, 13vw, 6rem); font-stretch: 74%; text-transform: uppercase; }
.end__in > p { color: var(--muted); font-size: .95rem; }
.end__in.on-light h2 { color: #16120a; }
.end__in.on-light > p { color: rgba(22,18,10,.72); }
.end__in.on-light .end__alt a { color: #6b4c12; }

/* ------------------------------ Menú lleno ----------------------------- */
.menu__list { display: grid; }
.menu__list button {
  display: grid; grid-template-columns: 2.6rem 1fr; align-items: baseline;
  gap: 0; overflow: hidden;
}
.menu__list span { display: block; transform: translateY(110%); }
.menu.is-open .menu__list span { transform: none; transition: transform 240ms var(--ease-out); }
.menu.is-open .menu__list li:nth-child(1) span { transition-delay: .04s; }
.menu.is-open .menu__list li:nth-child(2) span { transition-delay: .08s; }
.menu.is-open .menu__list li:nth-child(3) span { transition-delay: .12s; }
.menu.is-open .menu__list li:nth-child(4) span { transition-delay: .16s; }
.menu.is-open .menu__list li:nth-child(5) span { transition-delay: .20s; }
.menu.is-open .menu__list li:nth-child(6) span { transition-delay: .24s; }
.menu.is-open .menu__list li:nth-child(7) span { transition-delay: .28s; }

/* --------------------------- Pulsación de botones ---------------------- */
.btn:active, .diag__opt:active, .svc__more:active, .geo__zones button:active { transform: scale(.96); }
.callbar__btn:active { transform: scale(.97); }

/* ------------------------------ Polvo del hero ------------------------- */
.hero__dust { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hero__dust i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(224,180,103,.5);
  animation: dust 9s ease-in-out infinite;
}
.hero__dust i:nth-child(1) { left: 14%; top: 28%; animation-delay: 0s; }
.hero__dust i:nth-child(2) { left: 72%; top: 18%; animation-delay: 1.1s; }
.hero__dust i:nth-child(3) { left: 38%; top: 62%; animation-delay: 2.2s; }
.hero__dust i:nth-child(4) { left: 86%; top: 48%; animation-delay: 3.3s; }
.hero__dust i:nth-child(5) { left: 24%; top: 78%; animation-delay: 4.4s; }
.hero__dust i:nth-child(6) { left: 58%; top: 36%; animation-delay: 5.5s; }
.hero__dust i:nth-child(7) { left: 8%;  top: 52%; animation-delay: 6.6s; }
.hero__dust i:nth-child(8) { left: 66%; top: 70%; animation-delay: 7.7s; }
@keyframes dust {
  0%, 100% { transform: translateY(0); opacity: 0; }
  20%, 80% { opacity: .8; }
  50% { transform: translateY(-40px); }
}

/* --------------------------- Cerradura del hero ------------------------ */
.hero__lock {
  position: absolute; z-index: 3;
  width: 52%; max-width: 330px;
  left: 50%; top: 44%;
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: transform, opacity;
}

@media (min-width: 820px) {
  .svc__panel { flex: 0 0 42vw; height: 76svh; }
  .l3d { padding-bottom: 2.5rem; }
  .l3d__info { max-width: 40ch; }
  .mech__steps { top: 38vh; }
  .comp { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  .scene--mech { height: 120vh; }
  .scene--end { height: auto; }
  .end__in { position: static; height: auto; opacity: 1; transform: none; padding-top: 5rem; }
  .hero__dust, .comp__shine, .svc__hot i { animation: none; }
  .hero__lock { opacity: .9; }
  .menu__list span { transform: none; }
}

/* =========================================================================
   V3 · hero autónomo, escena 3D contenida y comparador corregido
   Este bloque va al final a propósito: sobrescribe lo anterior sin tocarlo.
   ========================================================================= */

/* ========================== 1 · HERO (reescrito) ======================== */
/* El hero ya NO se estira ni se pinea: ocupa una pantalla y se puede hacer
   scroll desde el primer píxel. Su movimiento es autónomo, no por scroll. */
.scene--hero { height: auto; }

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  touch-action: pan-y;                 /* el scroll vertical siempre es del usuario */
  -webkit-user-select: none; user-select: none;
}

/* --- palabra grande de fondo: presente pero sin estorbar la lectura ----- */
.hero__word {
  position: absolute; z-index: 1;
  left: -.06em; top: 30%;
  margin: 0;
  font-size: 30vw;
  font-stretch: 68%; font-weight: 800;
  letter-spacing: -.05em; line-height: .8;
  text-transform: uppercase;
  color: var(--paper);
  opacity: .045;
  pointer-events: none; white-space: nowrap;
}

/* ------------------------- Planos con profundidad ----------------------- */
.hero__scene {
  position: absolute; inset: 0; z-index: 2;
  perspective: 1100px;
  transform-style: preserve-3d;
  will-change: transform;
  pointer-events: none;
}
.hl {
  position: absolute; inset: -14%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.hl--bg { inset: 0; transform: translateZ(-320px) scale(1.36); }
.hl--bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.62) contrast(1.08) brightness(.52); }

.hl--jamb {
  transform: translateZ(-170px) scale(1.18);
  background:
    linear-gradient(90deg, rgba(8,8,11,.96) 0 14%, transparent 26% 74%, rgba(8,8,11,.96) 88% 100%),
    linear-gradient(180deg, rgba(8,8,11,.9), transparent 40%);
}

.hl--door {
  transform: translateZ(-40px) scale(1.05);
  inset: -22% -6% -6% -6%;
}
.hl--door svg { width: 100%; height: 100%; }

/* rendija de luz que escapa por el canto de la puerta */
.hl--gap {
  transform: translateZ(10px);
  inset: -18% 0 -6% 0;
  background: linear-gradient(90deg,
    transparent 0 58%, rgba(255,200,120,.14) 62.4%,
    rgba(255,214,150,.85) 62.9% 63.6%, rgba(255,200,120,.12) 66%, transparent 74%);
  opacity: .7;
}

/* reflejo metálico recorriendo la escena */
.hl--sheen { transform: translateZ(40px); overflow: hidden; }
.hl--sheen span {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: 26%;
  background: linear-gradient(100deg, transparent, rgba(255,236,205,.22), transparent);
  will-change: transform;
}

/* la llave */
.hl--key {
  inset: auto 0 auto 0;
  top: 21%;
  transform: translateZ(120px);
}
.hl--key svg {
  width: 64%; max-width: 380px;
  margin-left: 3%;
  filter: drop-shadow(0 22px 26px rgba(0,0,0,.72));
  will-change: transform;
}

/* partículas */
.hl--dust { transform: translateZ(170px); }
.hl--dust i {
  position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%;
  background: rgba(240,215,170,.72);
  animation: hdust 11s ease-in-out infinite;
}
.hl--dust i:nth-child(1)  { left: 12%; top: 24%; animation-delay: 0s;    }
.hl--dust i:nth-child(2)  { left: 68%; top: 16%; animation-delay: 1.1s;  }
.hl--dust i:nth-child(3)  { left: 34%; top: 58%; animation-delay: 2.3s;  }
.hl--dust i:nth-child(4)  { left: 82%; top: 44%; animation-delay: 3.4s;  }
.hl--dust i:nth-child(5)  { left: 22%; top: 72%; animation-delay: 4.5s;  }
.hl--dust i:nth-child(6)  { left: 56%; top: 34%; animation-delay: 5.6s;  }
.hl--dust i:nth-child(7)  { left: 8%;  top: 48%; animation-delay: 6.7s;  }
.hl--dust i:nth-child(8)  { left: 74%; top: 66%; animation-delay: 7.8s;  }
.hl--dust i:nth-child(9)  { left: 44%; top: 20%; animation-delay: 8.9s;  }
.hl--dust i:nth-child(10) { left: 90%; top: 30%; animation-delay: 10s;   }
@keyframes hdust {
  0%, 100% { transform: translateY(6px); opacity: 0; }
  22%, 78% { opacity: .85; }
  50%      { transform: translateY(-46px); opacity: .5; }
}

.hero__glow {
  position: absolute; z-index: 3;
  inset: 8% -25% auto -25%; height: 74%;
  background: radial-gradient(closest-side, rgba(224,180,103,.34), transparent 72%);
  pointer-events: none;
  will-change: opacity;
}

/* velo que garantiza el contraste del texto sobre cualquier foto */
.hero__veil {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: linear-gradient(to top,
    rgba(8,8,11,.97) 0 26%,
    rgba(8,8,11,.82) 42%,
    rgba(8,8,11,.30) 66%,
    rgba(8,8,11,.62) 100%);
}

/* ------------------------ Tipografía editorial -------------------------- */
.hero__type {
  position: absolute; z-index: 5;
  left: 0; right: 0; bottom: calc(var(--bar) + 2.6rem);
  padding: 0 var(--pad);
}
.hero__eyebrow {
  font-size: .62rem; font-weight: 700; font-stretch: 100%;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--brass);
  margin-bottom: .85rem;
}
.hero__eyebrow::before {
  content: ''; display: inline-block; vertical-align: middle;
  width: 20px; height: 1px; background: var(--brass);
  margin-right: .6rem; transform: translateY(-1px);
}
.hero__h1 {
  font-size: clamp(2.05rem, 8.4vw, 3.9rem);
  font-stretch: 88%; font-weight: 700;
  letter-spacing: -.025em; line-height: 1.02;
  text-transform: none;
  text-wrap: balance;
}
.hero__h1 em { font-style: normal; color: var(--brass); }
.hero__lead {
  margin-top: .95rem;
  font-size: .92rem; font-weight: 400; line-height: 1.5;
  color: rgba(242,240,236,.74);
  max-width: 32ch;
}
.hero__cta { display: flex; gap: .55rem; margin-top: 1.5rem; flex-wrap: wrap; }
.hero__cta .btn { flex: 1 1 9.5rem; text-align: center; }

.hero__hint {
  position: absolute; z-index: 5; left: var(--pad); bottom: calc(var(--bar) + .7rem);
  font-size: .58rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(242,240,236,.38);
  display: flex; align-items: center; gap: .5rem;
  pointer-events: none;
}

/* la cerradura SVG del hero antiguo desaparece por completo */
.hero__lock, .hero__bg, .hero__mid, .hero__key, .hero__dust, .hero__sub, .hero__l { display: none !important; }

@media (min-width: 820px) {
  .hero__word { font-size: 20vw; top: 24%; }
  .hero__type { bottom: 4.5rem; max-width: 42rem; }
  .hero__cta .btn { flex: 0 0 auto; }
  .hl--key svg { width: 38%; margin-left: 6%; }
}

/* ==================== 2 · ESCENA 3D: raíl de fases ====================== */
.scene--mech { height: 210vh; }

.mech__intro { padding-top: calc(4.4rem + env(safe-area-inset-top)); }
.mech__intro h2 { font-size: clamp(1.8rem, 8.6vw, 3.6rem); }
.mech__intro p { max-width: 26ch; font-size: .84rem; }

/* Raíl de marcas en el borde izquierdo: indica avance sin ocupar la escena */
.mech__steps {
  position: sticky; top: 46vh;
  margin: 0; padding: 0 0 0 calc(var(--pad) - .55rem);
  display: grid; gap: .34rem;
  pointer-events: none; z-index: 4;
}
.mech__steps li {
  font-size: 0; line-height: 0; color: transparent;
  display: block;
}
.mech__steps li i {
  display: block; width: 26px; height: 2px;
  background: rgba(242,240,236,.22);
  transform: scaleX(.38); transform-origin: left center;
  transition: transform var(--dur-ui) var(--ease-out), background-color var(--dur-ui) ease;
}
.mech__steps li.is-on i { transform: scaleX(1); background: var(--brass); }
.mech__steps li.is-done i { background: rgba(224,180,103,.45); }

/* ------------------------------ HUD del 3D ----------------------------- */
.l3d { padding-bottom: calc(var(--bar) + 1rem); }
.l3d__phase {
  display: inline-block;
  font-size: .58rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brass);
  border: 1px solid rgba(224,180,103,.3);
  background: rgba(8,8,11,.62);
  padding: .34rem .72rem; border-radius: 100px;
  backdrop-filter: blur(6px);
}

.l3d__chain {
  display: flex; align-items: center; gap: .45rem;
  margin-top: .6rem;
  font-size: .55rem; letter-spacing: .18em; text-transform: uppercase;
}
.l3d__chain span { color: rgba(242,240,236,.3); transition: color .25s ease; }
.l3d__chain span.is-on { color: var(--brass); }
.l3d__chain span.is-done { color: rgba(242,240,236,.6); }
.l3d__chain i { width: 14px; height: 1px; background: rgba(242,240,236,.22); }

.l3d__info {
  position: relative;
  margin-top: .7rem; max-width: 34ch;
  background: rgba(10,10,13,.86);
  border-left: 2px solid var(--brass);
  padding: .8rem 2.4rem .85rem .9rem;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
.l3d__x {
  position: absolute; top: .3rem; right: .3rem;
  width: 34px; height: 34px;
  background: none; border: 0; color: var(--muted);
  font-size: .8rem; cursor: pointer;
}
.l3d__hint {
  margin-top: .7rem;
  font-size: .58rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(242,240,236,.4);
  display: flex; align-items: center; gap: .5rem;
}
.l3d__hint::before {
  content: ''; width: 22px; height: 1px; background: rgba(224,180,103,.7);
  animation: l3dswipe 2.4s ease-in-out infinite;
}
@keyframes l3dswipe {
  0%, 100% { transform: translateX(-5px) scaleX(.6); }
  50%      { transform: translateX(5px)  scaleX(1); }
}

/* El lienzo sólo escucha el dedo cuando toca. pan-y garantiza el scroll. */
#lock3d { touch-action: pan-y; }

/* ==================== 5 · COMPARADOR (corregido) ======================= */
/* ANTES es la capa base (cerradura dañada, lado izquierdo).
   DESPUÉS es la capa recortada por la IZQUIERDA, así ocupa la derecha. */
.comp { aspect-ratio: 4 / 3; touch-action: pan-y; }
.comp__img {
  transform: scale(1.14);            /* acercamiento sutil a la zona del bombín */
  transform-origin: 52% 48%;
}
.comp__after {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 50%);
}

.comp__bar {
  position: absolute; top: 0; bottom: 0; left: -1px;
  width: 2px; background: var(--paper);
  box-shadow: 0 0 18px rgba(0,0,0,.55);
  z-index: 3;
  will-change: transform;
}
.comp__handle {
  position: absolute; top: 50%; left: 50%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: rgba(8,8,11,.62);
  backdrop-filter: blur(5px);
  cursor: ew-resize; touch-action: none;
  display: grid; place-items: center; grid-auto-flow: column; gap: 9px;
  padding: 0;
}
.comp__handle::before, .comp__handle::after { content: none; }
.comp__arrow { width: 9px; height: 9px; border-top: 2px solid var(--paper); }
.comp__arrow--l { border-left: 2px solid var(--paper); transform: rotate(-45deg); }
.comp__arrow--r { border-right: 2px solid var(--paper); transform: rotate(45deg); }

/* animación inicial: se nota que se puede arrastrar */
.comp.is-cue .comp__bar { animation: compcue 2.6s var(--ease-in-out) 2; }
.comp.is-cue .comp__handle { animation: compcueh 2.6s ease-in-out 2; }
@keyframes compcue { 0%,100% { translate: 0; } 28% { translate: -26px; } 62% { translate: 24px; } }
@keyframes compcueh { 0%,100% { transform: translate(-50%,-50%) scale(1); } 28%,62% { transform: translate(-50%,-50%) scale(1.1); } }

.comp__tag {
  position: absolute; top: .7rem; bottom: auto; z-index: 4;
  max-width: 43%;
  font-size: .54rem; font-weight: 700;
  letter-spacing: .12em; line-height: 1.35; text-transform: uppercase;
  background: rgba(8,8,11,.72); padding: .34rem .5rem;
  backdrop-filter: blur(4px);
}
.comp__tag--l { left: .6rem; color: rgba(242,240,236,.9); border-left: 2px solid #b4544a; }
.comp__tag--r { right: .6rem; text-align: right; color: var(--brass); border-right: 2px solid var(--brass); }

.comp__cue {
  left: 50%; top: auto; bottom: 1rem;
  transform: translateX(-50%);
  font-size: .56rem; letter-spacing: .22em;
}
.comp__foot {
  margin-top: 1rem; font-size: .82rem; line-height: 1.55;
  color: rgba(242,240,236,.6); max-width: 46ch;
}
.comp__foot b { color: var(--paper); font-weight: 700; }

@media (min-width: 820px) {
  .comp { aspect-ratio: 16 / 10; }
  .comp__tag { font-size: .6rem; max-width: 36%; }
}

/* ======================== Movimiento reducido ========================== */
@media (prefers-reduced-motion: reduce) {
  .hero__scene { transform: none !important; }
  .hl--dust i, .hl--sheen span, .comp.is-cue .comp__bar, .comp.is-cue .comp__handle,
  .l3d__hint::before { animation: none !important; }
  .scene--mech { height: 180vh; }
}


/* =========================================================================
   V4 · auditoría de animación aplicada
   ========================================================================= */

/* ---- Las animaciones en bucle no corren fuera de pantalla ---------------
   Son baratas por fotograma, pero once capas animándose a la vez en un
   iPhone con un canvas WebGL activo sí se nota. Solo corren si se ven. */
.hl--dust i,
.hero__hint span,
.svc__drag i,
.svc__hot i::after,
.diag__24 i,
.l3d__hint::before { animation-play-state: paused; }

.is-vis .hl--dust i,
.is-vis .hero__hint span,
.is-vis .svc__drag i,
.is-vis .svc__hot i::after,
.is-vis .diag__24 i,
.l3d.is-on .l3d__hint::before { animation-play-state: running; }

/* ---- Panel de explicación de la pieza: entraba de golpe (display:none) --
   Ahora entra desde la posición en la que vive, sin teleportar. */
.l3d__info {
  display: block;
  opacity: 0; visibility: hidden;
  transform: translateY(10px) scale(.97);
  transform-origin: left bottom;
  transition: opacity var(--dur-ui) var(--ease-out),
              transform var(--dur-ui) var(--ease-out),
              visibility 0s linear var(--dur-ui);
  pointer-events: none;
}
.l3d__info.is-on {
  opacity: 1; visibility: visible;
  transform: none;
  transition-delay: 0s;
  pointer-events: auto;
}

/* ---- Textos que antes se sustituían de golpe --------------------------- */
.diag__lead, .diag__sol, #geoInfo {
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.is-swap { opacity: 0; transform: translateY(6px); }

/* ---- Corte de montaje hero → cerradura ---------------------------------
   El escudo de la puerta del hero crece hacia cámara justo cuando entra el
   cilindro 3D. Evita el salto entre dos escenas sin relación. */
.hero__scene [data-hl="plate"] { transform-origin: 296px 292px; }

/* ---- Barra del comparador: sin transición durante el arrastre ----------- */
/* El divisor lo mueve un muelle en JS: sin transición que pelee con él. */
.comp__bar, .comp__after { transition: none; }

/* ---- Feedback de pulsación coherente en todo lo pulsable ---------------- */
.btn, .diag__opt, .svc__more, .geo__zones button, .callbar__btn, .comp__handle, .l3d__x {
  transition: transform var(--dur-press) var(--ease-out),
              background-color var(--dur-ui) ease,
              border-color var(--dur-ui) ease,
              color var(--dur-ui) ease;
}
.comp__handle:active { transform: translate(-50%, -50%) scale(.94); }

/* ---- Movimiento reducido: menos y más suave, nunca cero ---------------- */
@media (prefers-reduced-motion: reduce) {
  .hl--dust i, .hero__hint span, .svc__drag i, .svc__hot i::after,
  .diag__24 i, .l3d__hint::before { animation: none !important; }
  .l3d__info { transform: none; }
  .l3d__info.is-on { transform: none; }
  .is-swap { transform: none; }
}

/* La sección de 24 h ya no se pinea: su recorrido es el de su contenido. */
.scene--h24 { height: auto; }
.scene--h24 .stage { height: 100svh; }

/* El lienzo 3D solo cubre la franja donde vive el modelo. A pantalla completa
   sombreaba ~740 000 px de metal por fotograma para usar el 60 % centralbb. */
#lock3d {
  inset: auto 0 auto 0;
  top: calc(var(--svh) * 6);
  height: calc(var(--svh) * 82);
}

/* El raíl de fases pasa al borde derecho: el HUD vive abajo a la izquierda. */
.mech__steps {
  padding: 0 calc(var(--pad) - .55rem) 0 0;
  justify-items: end;
  top: 40vh;
}

/* =============== L'Escala · mapa de núcleos del término =============== */
.geo__map {
  position: absolute; z-index: 1; left: 50%; top: 40%;
  width: 94%; max-width: 480px; height: auto;
  transform: translate(-50%, -50%);
  transition: transform 420ms var(--ease-in-out);
  opacity: 1;
  will-change: transform;
}
.geo__zones-map path {
  fill: #171b22;
  stroke: #2f3641;
  stroke-width: 1;
  transition: fill 260ms var(--ease-out), stroke 260ms var(--ease-out);
}
.geo__zones-map path.is-mute { fill: #111419; stroke: #23282f; }
.geo__zones-map path.is-on { fill: #2b2415; stroke: var(--brass); stroke-width: 1.6; }
.geo__eix { fill: #1c212a; }

.geo__names text {
  fill: rgba(242,240,236,.44);
  font-family: var(--f);
  font-size: 9px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  transition: fill 260ms var(--ease-out);
}
.geo__base { fill: var(--brass); }
.geo__ping { fill: none; stroke: var(--brass); stroke-width: 1.2; transform-origin: 183px 196px; }
.is-vis .geo__ping { animation: geoping 2.8s var(--ease-out) infinite; }
@keyframes geoping {
  0%   { transform: scale(1);   opacity: .85; }
  70%  { transform: scale(3.6); opacity: 0; }
  100% { transform: scale(3.6); opacity: 0; }
}

/* La lista pasa a ser el acceso accesible, no el control principal. */
.geo__zones {
  display: flex; flex-wrap: wrap; gap: .3rem;
  margin-top: .9rem;
}
.geo__zones button {
  font-size: .58rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .55rem;
  background: transparent; color: rgba(242,240,236,.5);
  border: 1px solid var(--line); border-radius: 100px;
}
.geo__zones button.is-on { color: var(--ink); background: var(--brass); border-color: var(--brass); }

@media (prefers-reduced-motion: reduce) {
  .geo__map { transition: none; }
  .is-vis .geo__ping { animation: none; }
}

/* ===================== Servicios · composición completa ================= */
/* Cada trabajo ocupa casi una pantalla: fotografía grande, no un título flotando. */
.svc__panel { flex: 0 0 88vw; height: 86svh; }
.svc__panel::after {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(to top, rgba(8,8,11,.96) 0 24%, rgba(8,8,11,.45) 52%, rgba(8,8,11,.12) 100%);
}
.svc__n, .svc__t, .svc__x, .svc__more, .svc__hot { z-index: 3; }
.svc__t { bottom: 6.4rem; font-size: clamp(2.1rem, 10vw, 3.2rem); }
.svc__x { bottom: 4.2rem; font-size: .88rem; }

@media (min-width: 820px) {
  .svc__panel { flex: 0 0 42vw; height: 80svh; }
  .geo__map { width: 70%; }
  .geo__names text { font-size: 7.5px; }
}

/* El mapa vive en la mitad superior; el texto y los distritos, debajo. */
.geo__map { top: 25%; width: 84%; max-width: 400px; }
.geo__in { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(var(--bar) + 1.2rem); padding: 0 var(--pad); }
.geo__in h2 { font-size: clamp(1.8rem, 8.4vw, 3.4rem); }
.geo__info { font-size: .86rem; margin-top: .8rem; max-width: 32ch; }
.geo__badge { margin-top: .7rem; }
.scene--geo .stage { overflow: hidden; }
@media (min-width: 820px) {
  .geo__map { top: 46%; left: 68%; width: 46%; }
  .geo__in { max-width: 32rem; }
}

.geo__map { top: 23%; width: 78%; }
@media (min-width: 820px) { .geo__map { top: 46%; width: 44%; } }

/* El núcleo del puerto es la base: se marca aunque no esté seleccionado. */
.geo__core { fill: #1c212a; }
.geo__sealbl {
  fill: rgba(224,180,103,.4); font-family: var(--f);
  font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.geo__names text { font-size: 8.5px; }

/* El mapa baja para no quedar bajo la cabecera fija. */
.geo__map { top: 30%; }
@media (min-width: 820px) { .geo__map { top: 46%; } }
