/* ── Capa de movimiento ─────────────────────────────────────────────────────
   Todo hecho a mano, sin librerías: cero peso extra y control total.
   Cada efecto se apaga solo si el sistema pide menos movimiento. */

/* Aparición al entrar en pantalla.
   Solo se ocultan si el JS está vivo (clase .js): si algo falla, el contenido
   se ve igual. Nunca dejar contenido dependiendo de que un script funcione. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .85s cubic-bezier(.22,.7,.25,1), transform .85s cubic-bezier(.22,.7,.25,1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* El clip va en el HIJO, nunca en el elemento observado: si se recorta el
   propio elemento, IntersectionObserver lo calcula como invisible y no dispara. */
.js [data-reveal="mask"] { opacity: 1; transform: none; }
.js [data-reveal="mask"] > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.22,.7,.25,1); transition-delay: var(--d, 0ms); }
.js [data-reveal="mask"] img { transform: scale(1.14); transition: transform 1.5s cubic-bezier(.16,.84,.28,1); transition-delay: var(--d, 0ms); }
.js [data-reveal="mask"].in > * { clip-path: inset(0 0 0 0); }
.js [data-reveal="mask"].in img { transform: none; }

.js [data-reveal="scale"] { opacity: 0; transform: scale(1.06); }
.js [data-reveal="scale"].in { opacity: 1; transform: none; }

/* ── Hero: tres fotos en fundido con zoom lento ─────────────────────────── */

.hero .slides { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero .slides .ph {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.6s ease;
}
.hero .slides .ph.on { opacity: 1; }
.hero .slides img { animation: kenburns 26s ease-in-out infinite alternate; transform-origin: 50% 45%; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }

/* Parallax del hero al bajar */
.hero .slides { transform: translate3d(0, var(--py, 0px), 0); }

/* Bajada del titular por líneas */
.hero h1 { overflow: hidden; }
.js .hero h1 span { display: inline-block; transform: translateY(105%); transition: transform 1.1s cubic-bezier(.19,1,.22,1) .15s; }
.is-ready .hero h1 span { transform: none; }
.js .hero .sub, .js .hero .btns, .js .hero .kicker { opacity: 0; transform: translateY(18px); transition: opacity .9s ease .6s, transform .9s cubic-bezier(.22,.7,.25,1) .6s; }
.is-ready .hero .sub { transition-delay: .55s; }
.is-ready .hero .btns { transition-delay: .7s; }
.is-ready .hero .sub, .is-ready .hero .btns, .is-ready .hero .kicker { opacity: 1; transform: none; }

/* Indicador de scroll */
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 3; transform: translateX(-50%);
  font-family: var(--mono); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255,255,255,.65); display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(rgba(255,255,255,.8), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .3; } 50% { transform: scaleY(1); opacity: 1; } }
@media (max-width: 700px) { .scroll-cue { display: none; } }

/* ── Carril horizontal ──────────────────────────────────────────────────── */

.rail-wrap { position: relative; }
.rail-wrap { position: relative; }



/* ── A sangre completa ──────────────────────────────────────────────────── */

.bleed { width: 100%; }
.bleed .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.bleed .duo .ph { aspect-ratio: 1 / 1; }
@media (max-width: 800px) { .bleed .duo { grid-template-columns: 1fr; } }

/* ── Texto que se queda fijo mientras pasan las fotos ───────────────────── */

.sticky-col { position: sticky; top: calc(var(--head-h) + 4vh); align-self: start; }
@media (max-width: 860px) { .sticky-col { position: static; } }

/* ── Cifras que cuentan ─────────────────────────────────────────────────── */

.stat .n { font-variant-numeric: tabular-nums; }

/* ── Barra de pedido fija en celular ────────────────────────────────────── */

.order-bar { display: none; }
@media (max-width: 700px) {
  .order-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    gap: .6rem; padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(17,17,16,.97); backdrop-filter: blur(12px);
    transform: translateY(110%); transition: transform .4s cubic-bezier(.22,.7,.25,1);
  }
  .order-bar.show { transform: none; }
  .order-bar a { flex: 1; justify-content: center; padding-block: .8rem; font-size: .85rem; }
  /* La barra flota sobre el contenido: sin este espacio tapa el pie de página. */
  .site-foot { padding-bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
}

/* ── Detalles de interacción ────────────────────────────────────────────── */




.btn { position: relative; overflow: hidden; }
.btn > * { position: relative; z-index: 1; }

/* Barra de progreso de lectura */
.progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--persimmon); z-index: 60; width: 0; transition: width .1s linear; border-radius: 0 999px 999px 0; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].in, .js [data-reveal], .js [data-reveal] > *, .js [data-reveal] img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .hero .slides img { animation: none; }
  
  .hero h1 span, .hero .sub, .hero .btns, .hero .kicker { transform: none !important; opacity: 1 !important; }
  .scroll-cue::after { animation: none; }
}
