/* ================================================
   GENESIS HERNÁNDEZ — proyectos.css
   Portada cinematográfica → galería en grid que se abre
   ================================================ */

:root {
    --light:      #F2F2F2;
    --light-alt:  #E9E9E5;
    --dark:       #1a1612;
    --dark-mid:   #242018;
    --accent:     #C4A882;
    --accent-ink: #9a7b4d;          /* gold that stays readable on light bg */
    --text-mid:   #5c5855;
    --serif:      'Cormorant Garamond', Georgia, serif;
    --sans:       'Outfit', system-ui, -apple-system, sans-serif;
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; overflow-x: hidden; scroll-behavior: smooth; }
body {
    background: var(--dark); color: var(--dark);
    font-family: var(--sans); font-weight: 300; line-height: 1.6;
    overflow-x: hidden; cursor: none;
}
body.detail-open { overflow: hidden; }
a { color: inherit; text-decoration: none; cursor: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; border: none; background: none; cursor: none; color: inherit; }
*, *::before, *::after { cursor: none !important; }
em { font-style: italic; }

/* ── CURSOR — white with dark outline, visible on any background ── */
.cursor-dot {
    width: 8px; height: 8px; background: #fff; border-radius: 50%;
    position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
    transform: translate(-50%,-50%);
    box-shadow: 0 0 0 1.5px rgba(20,18,14,.55), 0 1px 5px rgba(0,0,0,.3);
    transition: opacity .2s;
}
.cursor-ring {
    width: 36px; height: 36px; border: 1.5px solid rgba(255,255,255,.95); border-radius: 50%;
    position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9998;
    transform: translate(-50%,-50%);
    box-shadow: 0 0 0 1px rgba(20,18,14,.3), 0 2px 10px rgba(0,0,0,.22);
    transition: opacity .2s;
}
.cursor-dot.is-hidden, .cursor-ring.is-hidden { opacity: 0; }

/* ── HEADER ─────────────────────────────────────── */
.pg-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 60;
    display: flex; align-items: center; justify-content: space-between;
    padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.5rem, 4vw, 3rem);
    mix-blend-mode: difference; color: #fff;
}
.pg-logo { font-family: var(--serif); font-size: 1rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: #fff; transition: opacity .25s; }
.pg-logo:hover { opacity: .7; }
.pg-back { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: #fff; display: inline-flex; align-items: center; gap: .5rem; transition: opacity .25s; }
.pg-back:hover { opacity: .7; }
.pg-back:hover .pg-back-arrow { transform: translateX(-4px); }
.pg-back-arrow { display: inline-block; transition: transform .3s var(--ease-out); }

main#pg-main { position: relative; z-index: 1; }

/* ══════════════════════════════════════════════════
   HERO — mockup de navegador (1:1 con el video)
   Ventana flotante sobre fondo claro · imagen que se funde
   + caja editorial · pausa/play + barra (sin sonido).
══════════════════════════════════════════════════ */
.hc {
    position: fixed; top: 0; left: 0; width: 100%;
    height: 100svh; height: 100dvh;
    z-index: 0; overflow: hidden; background: var(--dark);
}
.hc .hc-img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transform: scale(1.04);
    /* La imagen se revela de ARRIBA hacia ABAJO al cargar, + Ken Burns lento */
    animation: hc-reveal 1.2s var(--ease-out) both, hc-kenburns 16s ease-out .2s forwards;
}
@keyframes hc-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0% 0); } }
@keyframes hc-kenburns { from { transform: scale(1.04); } to { transform: scale(1.12); } }
.hc-scrim {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(to bottom, rgba(20,18,14,.30) 0%, rgba(20,18,14,.26) 45%, rgba(20,18,14,.68) 100%),
        linear-gradient(to right, rgba(20,18,14,.26) 0%, transparent 60%);
}
/* CUADRITO = semilla de la página blanca. Anclado al borde inferior, crece
   (ancho + alto) con el scroll hasta llenar la pantalla → la página "sale" de
   él. El título escala y sube hasta volverse el título de la sección.
   JS controla width/height/transform en vivo según el scroll. */
.hc-cap {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
    z-index: 1; pointer-events: none;
    width: 340px; height: 92px;              /* JS sobre-escribe en vivo */
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -14px 55px rgba(20,18,14,.22);
    opacity: 0; animation: hc-cap-fade .9s var(--ease-out) .85s forwards;
    will-change: width, height, border-radius;
}
.hc-cap-t {
    position: fixed; left: 50%; top: 0; z-index: 3; transform-origin: 50% 50%;
    width: min(760px, 88vw); text-align: center;
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.06; color: var(--dark);
    pointer-events: none; will-change: transform, opacity;
    opacity: 0; animation: hc-cap-fade .9s var(--ease-out) .95s forwards;
}
.hc-cap-t em { font-style: italic; color: var(--accent-ink); }
@keyframes hc-cap-fade { to { opacity: 1; } }
.hc-scroll {
    position: absolute; left: 50%; bottom: 2.25rem; transform: translateX(-50%);
    width: 1px; height: 48px; background: rgba(255,255,255,.28); overflow: hidden; z-index: 2;
}
.hc-scroll::after {
    content: ''; position: absolute; top: -48px; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,.9); animation: hc-scrolldrop 1.9s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes hc-scrolldrop { 0% { transform: translateY(0); } 100% { transform: translateY(96px); } }

/* Viewport a sangre */
.hc-viewport { position: absolute; inset: 0; overflow: hidden; }
.hc-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.hc-slide.active { opacity: 1; }
.hc-img { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.04); }
.hc-slide.active .hc-img { animation: hc-zoom 7.5s ease-out both; }
@keyframes hc-zoom { from { transform: scale(1.04); } to { transform: scale(1.12); } }
.hc.is-paused .hc-slide.active .hc-img { animation-play-state: paused; }

/* Scrim por slide — legibilidad del texto y del header */
.hc-slide-scrim {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(to bottom, rgba(20,18,14,.34) 0%, rgba(20,18,14,.30) 45%, rgba(20,18,14,.72) 100%),
        linear-gradient(to right, rgba(20,18,14,.30) 0%, transparent 60%);
}

/* Caja de texto editorial — centrada, tercio inferior */
.hc-caption {
    position: absolute; left: 50%; bottom: clamp(6rem, 17vh, 10rem);
    transform: translateX(-50%) translateY(16px); z-index: 2;
    width: max-content; max-width: min(90vw, 640px);
    opacity: 0; transition: opacity .5s ease, transform .5s ease;
}
.hc-caption figcaption {
    background: rgba(255,255,255,.96); color: var(--dark);
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(1.3rem, 3.2vw, 2.6rem); line-height: 1.18; text-align: center;
    padding: clamp(1rem, 2vw, 1.5rem) clamp(1.6rem, 3.5vw, 2.8rem);
    border-radius: 2px; box-shadow: 0 22px 60px rgba(20,18,14,.28);
}
.hc-caption figcaption em { font-style: italic; color: var(--accent-ink); }
.hc-slide.active .hc-caption {
    opacity: 1; transform: translateX(-50%) translateY(0);
    transition: opacity .9s ease .45s, transform .9s var(--ease-out) .45s;
}

/* Controles — abajo, pausa + barra (claro sobre el hero oscuro) */
.hc-controls {
    position: absolute; z-index: 3; left: 0; right: 0; bottom: clamp(1.5rem, 4vh, 2.75rem);
    display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 1.5rem);
    padding: 0 clamp(1.5rem, 5vw, 3.5rem);
}
.hc-playpause {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
    background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.4);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; cursor: none;
    transition: background .25s, border-color .25s, transform .2s var(--ease-out);
}
.hc-playpause:hover { background: rgba(255,255,255,.24); border-color: #fff; transform: scale(1.06); }
.hc-playpause:active { transform: scale(.94); }
.hc-ico { display: none; }
.hc-playpause[data-state="playing"] .hc-ico-pause { display: block; }
.hc-playpause[data-state="paused"]  .hc-ico-play  { display: block; }
.hc-progress { flex: 1; height: 2px; background: rgba(255,255,255,.28); position: relative; overflow: hidden; border-radius: 2px; }
#hc-fill { display: block; height: 100%; width: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hc-slide { transition: none; }
    .hc-slide.active .hc-img { animation: none; transform: scale(1.04); }
    .hc-caption { transition: opacity .3s ease; transform: translateX(-50%); }
}

/* ══════════════════════════════════════════════════
   GALLERY — white grid that opens up over the cover
══════════════════════════════════════════════════ */
/* (Estilos base del catálogo — el posicionamiento real está en el bloque HERO sticky de más abajo) */
.pg-gallery-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1.06; color: var(--dark); margin-bottom: 1.5rem; }
.pg-gallery-title em { font-style: italic; color: var(--accent-ink); }
.pg-gallery-desc { font-size: clamp(.92rem, 1.2vw, 1.05rem); color: var(--text-mid); line-height: 1.8; max-width: 60ch; margin: 0 auto; }

/* ── CAROUSEL — horizontal, drag + arrows + scroll ── */
.pg-carousel { max-width: 1320px; margin: 0 auto; }
.pg-carousel-track {
    display: flex; gap: clamp(1.25rem, 2.5vw, 2rem);
    justify-content: safe center;   /* center when few cards, scroll when many */
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x proximity; scroll-behavior: smooth;
    padding: .5rem clamp(1rem, 3vw, 2rem) 1.5rem;
    cursor: grab; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.pg-carousel-track::-webkit-scrollbar { display: none; }
.pg-carousel-track.grabbing { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }

.pg-pcard {
    flex: 0 0 auto; width: clamp(270px, 31vw, 400px);
    scroll-snap-align: start; display: flex; flex-direction: column;
}
.pg-pcard-media {
    position: relative; display: block; width: 100%;
    aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px;
    background: var(--light-alt);
}
.pg-pcard-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 1s var(--ease-out); }
.pg-pcard:hover .pg-pcard-media img { transform: scale(1.06); }
/* Etiqueta "Ver proyecto" — CLÁSICA: banda blanca que crece de DENTRO hacia
   AFUERA (scaleX desde el centro). Visible en imágenes claras Y oscuras porque
   al hover la foto se oscurece (::after) y la banda blanca siempre resalta. */
.pg-pcard-view {
    position: absolute; left: 50%; top: 50%;
    display: flex; align-items: center; justify-content: center; gap: .55rem;
    width: 78%; white-space: nowrap;
    background: #fff; color: var(--dark);
    font-size: .62rem; letter-spacing: .22em; text-transform: uppercase;
    padding: .95rem 1rem;
    box-shadow: 0 8px 26px rgba(20,18,14,.22);
    opacity: 0; transform: translate(-50%, -50%) scaleX(.2);
    transform-origin: center;
    transition: opacity .35s var(--ease-out), transform .55s var(--ease-out);
}
.pg-pcard:hover .pg-pcard-view { opacity: 1; transform: translate(-50%, -50%) scaleX(1); }
/* Velo oscuro al hover → la banda blanca resalta en cualquier foto */
.pg-pcard-media::after {
    content: ''; position: absolute; inset: 0; background: rgba(20,18,14,.28);
    opacity: 0; transition: opacity .5s var(--ease-out); pointer-events: none;
}
.pg-pcard:hover .pg-pcard-media::after { opacity: 1; }
.pg-pcard-arrow { display: inline-block; transition: transform .45s var(--ease-out); }
.pg-pcard:hover .pg-pcard-arrow { transform: translate(3px, -3px); }

.pg-pcard-info { padding-top: 1.1rem; }
.pg-pcard-meta { display: flex; justify-content: space-between; font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; }
.pg-pcard-meta span:first-child { color: var(--accent-ink); }
.pg-pcard-meta span:last-child { color: var(--text-mid); }
.pg-pcard-title {
    font-family: var(--serif); font-weight: 400; font-size: clamp(1.4rem, 2vw, 1.9rem);
    line-height: 1.22; color: var(--dark); margin-top: .65rem;
}

/* Carousel controls: progress line + arrows */
.pg-carousel-bar {
    max-width: 1320px; margin: 1.5rem auto 0;
    padding: 0 clamp(1rem, 3vw, 2rem);
    display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.pg-carousel-progress { flex: 1; max-width: 260px; height: 3px; background: rgba(26,22,18,.18); position: relative; overflow: hidden; border-radius: 3px; }
#pg-carousel-fill { display: block; height: 100%; width: 100%; background: var(--accent-ink); transform: scaleX(.08); transform-origin: left; transition: transform .25s var(--ease-out); }
.pg-carousel-nav { display: flex; gap: .75rem; flex-shrink: 0; }
.pg-arrow {
    width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid rgba(26,22,18,.22); color: var(--dark);
    display: flex; align-items: center; justify-content: center;
    transition: background .25s, color .25s, border-color .25s, transform .2s var(--ease-out);
}
.pg-arrow:hover { background: var(--dark); color: var(--light); border-color: var(--dark); }
.pg-arrow:active { transform: scale(.92); }

/* ── OUTRO ──────────────────────────────────────── */
.pg-outro { text-align: center; padding: clamp(5rem, 10vw, 9rem) 1rem clamp(3rem, 6vw, 5rem); }
.pg-eyebrow { font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1.5rem; }
.pg-outro-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5.5vw, 4.5rem); line-height: 1.05; color: var(--dark); margin-bottom: 2.5rem; }
.pg-outro-title em { font-style: italic; color: var(--accent-ink); }
.pg-cta {
    display: inline-block; background: var(--dark); color: var(--light);
    font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 500;
    padding: 1rem 2.5rem; border-radius: 2px;
    transition: background .3s, transform .25s var(--ease-out), box-shadow .25s;
}
.pg-cta:hover { background: var(--accent-ink); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(154,123,77,.3); }
.pg-cta:active { transform: scale(.97); }
/* Revelado robusto: JS añade .is-pre (oculta) e IntersectionObserver añade .is-in (revela).
   Sin JS o con reduce-motion, todo queda visible por defecto — nunca un catálogo en blanco. */
.is-pre { opacity: 0; transform: translateY(28px); }
.is-pre.is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.pg-pcard.is-pre { transform: translateY(42px); }
#pg-track .pg-pcard.is-pre:nth-child(2) { transition-delay: .1s; }
#pg-track .pg-pcard.is-pre:nth-child(3) { transition-delay: .2s; }
#pg-track .pg-pcard.is-pre:nth-child(4) { transition-delay: .3s; }

/* ══════════════════════════════════════════════════
   PROJECT DETAIL — full-screen overlay
══════════════════════════════════════════════════ */
.pg-detail {
    position: fixed; inset: 0; z-index: 200; background: var(--dark);
    opacity: 0; pointer-events: none;
    transition: opacity .4s var(--ease); overflow: hidden;
}
.pg-detail.open { opacity: 1; pointer-events: auto; }
.pg-detail-close {
    position: fixed; top: clamp(1.25rem, 2.5vw, 1.75rem); right: clamp(1.5rem, 4vw, 3rem); z-index: 310;
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--light);
    background: rgba(20,18,14,.4); border: 1px solid rgba(242,242,242,.3);
    padding: .6rem 1rem; border-radius: 2px;
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: background .25s, border-color .25s;
}
.pg-detail-close:hover { background: rgba(20,18,14,.65); border-color: rgba(242,242,242,.55); }
.pg-detail-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; }

/* Banner — la imagen de la tarjeta se EXPANDE hasta aquí (FLIP) */
.pg-detail-hero { position: relative; width: 100%; height: clamp(58vh, 64vh, 72vh); overflow: hidden; background: var(--dark-mid); }
/* Imagen del proyecto NO estática: Ken Burns lento (zoom/drift continuo) */
.pg-detail-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 50% 40%; }
.pg-detail.open .pg-detail-hero-img { animation: pg-detail-kb 14s ease-out forwards; }
@keyframes pg-detail-kb { from { transform: scale(1.02); } to { transform: scale(1.12); } }
.pg-detail-hero-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(20,18,14,.12) 0%, rgba(20,18,14,.22) 52%, rgba(20,18,14,.78) 100%); }
.pg-detail-hero-cap { position: absolute; left: 0; right: 0; bottom: clamp(2rem, 5vw, 3.75rem); z-index: 2; text-align: center; padding: 0 1.5rem; }
.pg-detail-cat { font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.pg-detail-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 6.5vw, 5.5rem); line-height: 1.03; color: var(--light); margin-top: .9rem; perspective: 700px; }
/* Letras que CAEN desde arriba al abrir el proyecto */
.pg-ltr { display: inline-block; transform-origin: 50% 0; will-change: transform, opacity; }

/* Cuerpo editorial */
.pg-detail-body { padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 3rem) clamp(4rem, 8vw, 7rem); }
.pg-detail-copy { max-width: 720px; margin: 0 auto; text-align: center; }
.pg-detail-desc { font-size: clamp(.95rem, 1.25vw, 1.1rem); color: rgba(242,242,242,.6); line-height: 1.8; max-width: 60ch; margin: 0 auto 1.75rem; }
.pg-detail-link { display: inline-block; font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid rgba(196,168,130,.4); padding-bottom: .25rem; transition: border-color .25s; }
.pg-detail-link:hover { border-color: var(--accent); }

.pg-detail-scope { max-width: 560px; margin: 2.5rem auto .5rem; }
.pg-scope-label { display: block; text-align: center; font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(242,242,242,.4); margin-bottom: 1.4rem; }
.pg-scope-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.25rem; }
.pg-scope-list li { display: flex; align-items: baseline; gap: .85rem; padding: .95rem 0; border-bottom: 1px solid rgba(242,242,242,.1); text-align: left; }
.pg-scope-n { font-family: var(--serif); font-size: 1.05rem; color: var(--accent); line-height: 1; flex-shrink: 0; }
.pg-scope-t { font-size: .9rem; color: rgba(242,242,242,.78); line-height: 1.4; }

.pg-detail-fig { max-width: 1100px; margin: clamp(1.5rem, 3vw, 2.5rem) auto 0; overflow: hidden; }
.pg-detail-fig img { width: 100%; border-radius: 4px; display: block; box-shadow: 0 30px 70px rgba(0,0,0,.4); }

/* Clon volador del FLIP */
.pg-fly { box-shadow: 0 40px 90px rgba(0,0,0,.45); will-change: left, top, width, height; pointer-events: none; }

/* ══════════════════════════════════════════════════
   HERO EXPAND — el CUADRITO es la página y crece (pin por JS).
   .hc-stage lo pinea ScrollTrigger; .hc-box crece (width/height por JS).
══════════════════════════════════════════════════ */
.hc-stage {
    position: relative; z-index: 0;
    width: 100%; height: 100svh; height: 100dvh;
    overflow: hidden; background: var(--dark);
}
.hc-stage .hc-img {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transform: scale(1.04);
    /* la imagen BAJA desde arriba al cargar + Ken Burns lento */
    animation: hc-reveal 1.3s var(--ease-out) both, hc-kenburns 22s ease-out .3s forwards;
}

/* Palabras kinéticas — grandes; se desvanecen al expandir (JS) */
.hc-kinetic { position: absolute; left: 0; right: 0; top: 38%; transform: translateY(-50%); z-index: 2; text-align: center; color: #fff; pointer-events: none; }
.hc-kinetic-pre { display: block; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(242,242,242,.78); margin-bottom: 1rem; }
.hc-kinetic-mask { display: inline-block; font-size: clamp(2.4rem, 5.5vw, 4.6rem); height: 1.5em; overflow: hidden; vertical-align: -.4em; }
.hc-kinetic-list { display: block; animation: hc-rot 11s cubic-bezier(.76,0,.24,1) infinite; }
.hc-kinetic-list b { display: block; height: 1.5em; line-height: 1.5em; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1em; color: #fff; }
@keyframes hc-rot {
    0%,17% { transform: translateY(0); }
    23%,40% { transform: translateY(-1.5em); }
    46%,63% { transform: translateY(-3em); }
    69%,86% { transform: translateY(-4.5em); }
    92%,100% { transform: translateY(-6em); }
}

/* CUADRITO blanco — pegado al borde inferior; JS le da width/height al crecer.
   Empieza pequeño (entra de abajo) y termina llenando la pantalla. */
.hc-box {
    position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
    z-index: 3; background: #fff; overflow: hidden;
    width: min(86vw, 620px); height: 150px;
    border-radius: 16px 16px 0 0; box-shadow: 0 -18px 60px rgba(20,18,14,.26);
    opacity: 0; animation: hc-box-in .9s var(--ease-out) .9s forwards;
}
.hc-box.is-full { overflow: visible; }   /* al llenar: catálogo interactivo */
@keyframes hc-box-in { from { opacity: 0; transform: translate(-50%, 40px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Contenido dentro del cuadrito: anclado arriba, centrado */
.hc-box-content {
    position: absolute; left: 50%; top: clamp(2.5rem, 7vh, 6rem); transform: translateX(-50%);
    width: min(1320px, 92vw); text-align: center; padding: 0 clamp(1rem, 4vw, 3rem);
}
.hc-box-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.9rem); line-height: 1.14; color: var(--dark); margin: 0; }
.hc-box-title em { font-style: italic; color: var(--accent-ink); }
.hc-box-desc { margin: .9rem auto 0; max-width: 54ch; font-size: clamp(.88rem, 1.1vw, 1rem); line-height: 1.65; color: var(--text-mid); }
.hc-box-content .pg-carousel { margin-top: clamp(1.75rem, 3.5vw, 3rem); }

/* OUTRO en flujo normal, debajo del hero ya expandido */
.pg-outro-wrap { position: relative; z-index: 1; background: #fff; }

/* RESPONSIVE — móvil: todo fluido sin deformarse */
@media (max-width: 768px) {
    .hc-kinetic { top: 34%; }
    .hc-box-content { top: clamp(1.5rem, 5vh, 3rem); padding: 0 1rem; }
    .hc-box-title { font-size: clamp(1.4rem, 6vw, 2rem); }
    .hc-box-desc { font-size: .9rem; }
    .hc-box-content .pg-carousel { margin-top: 1.5rem; }
    .pg-pcard { width: 78vw; }
}

@media (prefers-reduced-motion: reduce) {
    .hc-kinetic-list { animation: none; }
    .hc-box-desc, .hc-box-inner .pg-carousel { opacity: 1 !important; }
}

@media (max-width: 640px) {
    .pg-scope-list { grid-template-columns: 1fr; }
    .pg-detail-hero { height: 52vh; }
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 820px) {
    .pg-pcard { width: clamp(240px, 70vw, 340px); }
}
@media (max-width: 768px) {
    *, *::before, *::after { cursor: auto !important; }
    .cursor-dot, .cursor-ring { display: none; }
    .pg-back-txt { display: none; }
    .pg-scope-list { grid-template-columns: 1fr; }
}

/* ── REDUCED MOTION ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .reveal-up { opacity: 1 !important; transform: none !important; }
}

/* ══════════════════════════════════════════════════
   OUTRO — banner estético a sangre + lema (llena el blanco, da impacto).
   Imagen aplicada al final → gana en cascada sobre el .pg-outro base.
   ▸ Para cambiar la imagen: edita la url de .pg-outro de abajo.
══════════════════════════════════════════════════ */
.pg-outro {
    position: relative; isolation: isolate;
    min-height: clamp(360px, 56vh, 560px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: clamp(3.5rem, 8vw, 6.5rem) 1.5rem;
    /* Foto EN COLOR (como estaba): velo mínimo, solo abajo para que el botón se lea */
    background:
        linear-gradient(rgba(20,18,14,.10) 0%, rgba(20,18,14,.04) 40%, rgba(20,18,14,.42) 100%),
        url('/images/hero-genesis.webp') center 26% / cover no-repeat;
}
.pg-outro .pg-eyebrow { color: var(--accent); text-shadow: 0 1px 10px rgba(20,18,14,.4); }
.pg-outro .pg-outro-title { color: #fff; margin-bottom: 2rem; text-shadow: 0 2px 22px rgba(20,18,14,.4); }
.pg-outro .pg-outro-title em { font-style: italic; color: var(--accent); }
.pg-outro .pg-cta { background: #fff; color: var(--dark); box-shadow: 0 14px 40px rgba(0,0,0,.3); }
.pg-outro .pg-cta:hover { background: var(--accent); color: var(--dark); transform: translateY(-2px); }
