/* --- assets/home.css --- */

/* ==========================================================
   TEMA QUE SE INVIERTE CON EL SCROLL
   home.js actualiza estas variables mientras bajás:
   --inv        : 0 = fondo negro / letras blancas, 1 = fondo blanco / letras negras
   --bg-rgb     : color de fondo actual (r, g, b)
   --fg-rgb     : color de texto actual (r, g, b)
   --fg-invert  : 1 - --inv (para pasar los PNG de blanco a negro)
   Usalas así: color: rgb(var(--fg-rgb));  borde: rgba(var(--fg-rgb), 0.2)
   ========================================================== */
:root {
    --inv: 0;
    --bg-rgb: 0, 0, 0;
    --fg-rgb: 255, 255, 255;
    --fg-invert: 1;
}

html,
body {
    background-color: rgb(var(--bg-rgb));
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;          /* corta lo que sobresale sin crear scroll extra */
    }
}

body {
    color: rgb(var(--fg-rgb));
    transition: none; /* el color lo maneja el scroll, sin demoras */
}

:root {
    --nav-h: 66px;
    /* Navbar negro con logo y textos en blanco */
    --nav-bg: rgb(var(--bg-rgb));
    --nav-fg: rgb(var(--fg-rgb));

    /* Curva de la aparición: suave, sin arranque brusco */
    --reveal-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    /* Tiempo entre un elemento y el siguiente (se multiplica por --i) */
    --reveal-step: 150ms;

    /* Ancho del contenido */
    --content-w: 92%;
    --content-max: 1250px;
}

/* Sin intro (visitas siguientes en la misma pestaña): la entrada es más ágil */
html.skip-intro {
    --reveal-step: 60ms;
}

html {
    overflow-x: hidden;            /* iOS Safari ignora el overflow del body solo */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* Al ir a una sección (menú o botón de abajo) queda por debajo del navbar */
[data-label] {
    scroll-margin-top: calc(var(--nav-h) + 1rem);
}

[data-scroll-anchor] {
    scroll-margin-top: calc(var(--nav-h) + 28px);
}

/* Mientras corre la intro, o con el menú abierto, no se scrollea */
body.intro-active,
body.menu-open {
    overflow: hidden;
}

/* ==========================================================
   FONDO DE ESTRELLAS (canvas fijo que dibuja home.js)
   ========================================================== */
.stars {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2.4s ease;
}

body.home-ready .stars {
    opacity: 1;
}

/* ==========================================================
   APARICIÓN SUAVE (fade + deslizamiento)
   - .reveal      : estado inicial, invisible y apenas desplazado
   - .reveal.in   : lo agrega home.js cuando el elemento entra en pantalla
   - --i          : escalón entre hermanos (0, 1, 2...)
   ========================================================== */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 1.1s var(--reveal-ease),
                transform 1.1s var(--reveal-ease);
    transition-delay: calc(var(--i, 0) * var(--reveal-step, 150ms));
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* El navbar baja apenas desde arriba */
.navbar.reveal {
    transform: translateY(-14px);
}

.navbar.reveal.in {
    transform: none;
}

/* Pasada la entrada inicial, lo que aparece al scrollear no espera escalones */
body.home-settled .reveal {
    transition-delay: 0ms;
}

/* ==========================================================
   NAVBAR
   ========================================================== */
.navbar {
    --mark-size: 2.5rem;
    --mark-hole: calc(var(--mark-size) / 2 + 0.6rem);

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-h);
    background-color: var(--nav-bg);
    color: var(--nav-fg);
    z-index: 100;
}

/* Línea blanca suave que se desvanece hacia los extremos: va de punta a punta
   pero queda adentro (no toca los bordes del navegador). */
.navbar::after {
    content: '';
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: 0;
    height: 1px;
    z-index: 2;
    background: linear-gradient(90deg,
        rgba(var(--fg-rgb), 0) 0%,
        rgba(var(--fg-rgb), 0.45) 20%,
        rgba(var(--fg-rgb), 0.45) 80%,
        rgba(var(--fg-rgb), 0) 100%);
}

/* Sombra lineal muy sutil debajo de la línea */
.navbar::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 100%;
    height: 18px;
    background: radial-gradient(ellipse at top, rgba(var(--fg-rgb), 0.09), transparent 70%);
    pointer-events: none;
    transition: background 0.4s ease;
}

/* Al scrollear la sombra se intensifica apenas */
.navbar.scrolled::before {
    background: radial-gradient(ellipse at top, rgba(var(--fg-rgb), 0.15), transparent 70%);
}

.navbar-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* solo el logo recibe clicks; el resto queda libre */
}

/* ==========================================================
   MARCA CENTRAL: un solo símbolo (el asterisco) que alterna:
   asterisco -> otro PNG al azar -> asterisco -> otro al azar...
   Para afinar:
   --mark-size : tamaño del símbolo
   --mark-hole : radio del espacio circular libre alrededor de la marca
                 (el carrusel no entra ahí)
   Si querés que los PNG conserven sus colores originales, borrá la
   línea "filter" de .logo-mark.
   ========================================================== */
.logo {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--mark-size);
    height: var(--mark-size);
    pointer-events: auto;
    text-decoration: none;
    color: var(--nav-fg);
}

.logo-mark {
    /* Fuerza el PNG a blanco puro (conserva la transparencia);
       con el fondo blanco pasa a negro (--fg-invert lo maneja home.js) */
    filter: brightness(0) invert(var(--fg-invert));
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: rotate(0deg);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo:hover .logo-mark {
    transform: rotate(180deg);
}

/* Cambio de símbolo: el actual se achica y gira, el nuevo entra girando */
.logo-mark.is-out {
    animation: markOut 0.4s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

.logo-mark.is-in {
    animation: markIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes markOut {
    to { opacity: 0; transform: scale(0.55) rotate(90deg); }
}

@keyframes markIn {
    from { opacity: 0; transform: scale(0.55) rotate(-90deg); }
    to   { opacity: 1; transform: none; }
}

/* ==========================================================
   CARRUSEL DE NOTICIAS / PROMOCIONES
   Recorre todo el ancho del navbar y pasa POR DETRÁS de la marca,
   dejando un espacio circular libre a su alrededor. No se pausa.
   ========================================================== */
.ticker {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4%;
    right: 4%;
    overflow: hidden;
    z-index: 1;
    /* Agujero circular centrado: transparente alrededor de la marca */
    -webkit-mask-image: radial-gradient(circle at 50% 50%,
        transparent var(--mark-hole),
        #000 calc(var(--mark-hole) + 18px));
            mask-image: radial-gradient(circle at 50% 50%,
        transparent var(--mark-hole),
        #000 calc(var(--mark-hole) + 18px));
}

/* Desvanecido en los extremos (no toca los bordes del navegador) */
.ticker-fade {
    height: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    height: 100%;
    /* --ticker-duration lo calcula home.js para mantener una velocidad constante */
    animation: tickerMove var(--ticker-duration, 60s) linear infinite;
}

.ticker-group {
    display: flex;
    align-items: center;
    flex: none;
}

.ticker-item {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding-left: 1.5rem;
    font-family: var(--font-body, sans-serif);
    font-size: 0.64rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    color: rgba(var(--fg-rgb), 0.72);
}

/* Separador entre noticias */
.ticker-item::after {
    content: '';
    width: 4px;
    height: 4px;
    margin-left: 1.5rem;
    border-radius: 50%;
    background-color: rgba(var(--fg-rgb), 0.35);
}

@keyframes tickerMove {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ==========================================================
   FLECHA EN HOVER (sin contenedor)
   Aparece sola entre el asterisco y la línea. Lleva un halo oscuro
   muy suave y una sombra para que se lea aunque el fondo tenga color.
   ========================================================== */
.nav-pull {
    position: absolute;
    left: 50%;
    top: calc(100% - 12px);       /* arranca justo debajo del asterisco */
    z-index: 3;
    width: min(440px, 70vw);
    height: 56px;
    padding-top: 12px;            /* la flecha empieza justo debajo de la línea */
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Brillo suave bajo la línea que acompaña a la flecha (el sombreado "se estira") */
.nav-pull::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 12px;
    width: 150px;
    height: 28px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at top, rgba(var(--fg-rgb), 0.14), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-pull:hover::before {
    opacity: 1;
}

.nav-handle {
    position: relative;
    isolation: isolate;
    width: 56px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--nav-fg);
    background: none;
    border: none;

    /* Siempre visible (antes solo aparecía con el mouse encima) */
    opacity: 0.85;
    transition: opacity 0.35s ease,
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-handle:hover {
    opacity: 1;
}

/* Halo oscuro difuso detrás de la flecha: invisible sobre negro,
   ayuda a destacarla cuando pasa por encima algo con color */
.nav-handle::before {
    content: '';
    position: absolute;
    inset: -4px -12px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--bg-rgb), 0.6), transparent);
}

/* Más presente con el mouse o el teclado */
.nav-pull:hover .nav-handle,
.nav-handle:focus-visible {
    opacity: 1;
}

.nav-handle:focus-visible {
    outline: none;
}

.nav-handle:focus-visible .nav-handle-chevron {
    filter: drop-shadow(0 0 6px rgba(var(--fg-rgb), 0.9));
}

.nav-handle-chevron {
    display: block;
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 1px 4px rgba(var(--bg-rgb), 0.9));
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* La flecha "invita" a apretar con un leve movimiento */
.nav-pull:hover .nav-handle[aria-expanded="false"] .nav-handle-chevron {
    animation: handleNudge 1.4s ease-in-out infinite;
}

.nav-handle[aria-expanded="true"] .nav-handle-chevron {
    transform: rotate(180deg);
}

@keyframes handleNudge {
    0%, 100% { transform: translateY(-1px); }
    50%      { transform: translateY(3px); }
}

/* "Menú": cartelito que aparece una sola vez al llegar (lo activa home.js) */
.nav-hint {
    position: absolute;
    left: 50%;
    top: 48px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(var(--fg-rgb), 0.35);
    border-radius: 999px;
    background: rgb(var(--bg-rgb));
    color: rgb(var(--fg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -6px);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Flechita del cartel apuntando a la flecha del menú */
.nav-hint::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -4px;
    width: 7px;
    height: 7px;
    background: inherit;
    border-left: 1px solid rgba(var(--fg-rgb), 0.35);
    border-top: 1px solid rgba(var(--fg-rgb), 0.35);
    transform: translateX(-50%) rotate(45deg);
}

body.show-menu-hint .nav-hint {
    opacity: 1;
    transform: translate(-50%, 0);
    animation: hintBob 1.6s ease-in-out 0.6s infinite;
}

body.show-menu-hint .nav-handle .nav-handle-chevron {
    animation: handleNudge 1.4s ease-in-out infinite;
}

@keyframes hintBob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 3px); }
}

/* ==========================================================
   MENÚ INFERIOR (sale desde abajo del navegador)
   ========================================================== */
.menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}

.menu-backdrop.open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0s;
}

.menu-panel {
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 210;
    width: min(560px, calc(100vw - 2rem));
    padding: 1rem 1.25rem 0.75rem;
    background-color: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    box-shadow: 0 -14px 50px rgba(255, 255, 255, 0.07),
                0 30px 80px rgba(0, 0, 0, 0.8);

    /* Cerrado: abajo del navegador, invisible */
    transform: translate(-50%, calc(100% + 48px));
    opacity: 0;
    visibility: hidden;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease,
                visibility 0s linear 0.65s;
}

.menu-panel.open {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.4s ease,
                visibility 0s;
}

/* Línea superior que se desvanece en los extremos (mismo estilo que el navbar) */
.menu-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%);
}

.menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
}

.menu-title {
    font-family: var(--font-display, sans-serif);
    font-size: 0.66rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.menu-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transition: background-color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.menu-list {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-display, sans-serif);
    font-size: 0.92rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background-color 0.3s ease,
                padding-left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-item:hover,
.menu-item:focus-visible {
    background-color: rgba(255, 255, 255, 0.06);
    padding-left: 1rem;
    outline: none;
}

.menu-num {
    font-size: 0.64rem;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
}

.menu-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}


.menu-arrow {
    opacity: 0.5;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.menu-item:hover .menu-arrow,
.menu-item:focus-visible .menu-arrow {
    opacity: 1;
    transform: translate(3px, -3px);
}

/* Las opciones entran una tras otra cuando abre el menú */
.menu-panel.open .menu-item {
    animation: menuItemIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: calc(0.12s + var(--n, 0) * 0.06s);
}

@keyframes menuItemIn {
    0%   { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   LAYOUT GENERAL
   ========================================================== */
.main-content {
    position: relative;
    z-index: 1;
    width: var(--content-w);
    max-width: var(--content-max);
    margin: 0 auto;
    padding-top: var(--nav-h);
}

/* ==========================================================
   HERO: texto a la izquierda + posters 3D volando
   ========================================================== */
.hero {
    position: relative;
    container-type: inline-size;   /* permite medir el recorrido de los posters en % del hero */
    display: flex;
    align-items: center;
    min-height: max(440px, calc(100vh - var(--nav-h)));
    min-height: max(440px, calc(100svh - var(--nav-h)));
    padding-block: clamp(1.5rem, 4vh, 3rem);
}

.hero-text {
    position: relative;
    z-index: 1;
    flex: 0 1 min(560px, 50%);
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.4vh, 1.6rem);
}

.hero-title {
    /* Misma letra que el carrusel de arriba (la original de la página) */
    font-family: var(--font-body, sans-serif);
    font-size: clamp(1.75rem, 4.5vw, 3.9rem);
    font-weight: normal;
    line-height: 1.55;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: rgb(var(--fg-rgb));
    text-wrap: balance;
}

/* El asterisco de la marca dentro del título, girando lento */
.hero-star {
    display: inline-block;
    height: 0.95em;
    width: auto;
    margin: 0 0.04em;
    vertical-align: 0.1em;
    filter: brightness(0) invert(var(--fg-invert));
    animation: heroStar 10s linear infinite;
}

@keyframes heroStar {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-star { animation: none; }
}

.hero-sub {
    max-width: 36ch;
    font-family: var(--font-display, sans-serif);
    font-size: clamp(0.74rem, 0.95vw, 0.9rem);
    text-transform: uppercase;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.08em;
    color: rgba(var(--fg-rgb), 0.62);
}

/* --- ESCENARIO 3D ---
   .hero-art agrupa dos capas sin crear su propio "apilado", así cada capa
   se ordena respecto del texto (z-index 1):
     .is-back  (z 0) -> pasa por DETRÁS del texto
     .is-front (z 2) -> pasa por DELANTE del texto */
.hero-art {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    perspective: 1300px;
    perspective-origin: 62% 45%;

    /* Recorrido: entra por la derecha, cruza por encima del texto y sale arriba a la izquierda */
    --x0: 58vw;  --xm: 14vw;  --x1: -46vw;
    --y0: 16svh; --ym: -2svh; --y1: -28svh;
    --pw: clamp(150px, 18vw, 290px);   /* ancho del poster principal */
}

.hero-stage.is-back {
    z-index: 0;
}

/* Si el navegador entiende cqw, el recorrido se mide sobre el ancho del hero */
@supports (width: 1cqw) {
    .hero-stage {
        --x0: 58cqw;
        --xm: 14cqw;
        --x1: -46cqw;
    }
}

.poster {
    --w: calc(var(--pw) * var(--sz, 1));

    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--w);
    aspect-ratio: 4 / 5;
    margin: calc(var(--w) * -0.625) 0 0 calc(var(--w) * -0.5);
    opacity: 0;
    transform-style: preserve-3d;
    animation: posterFly var(--dur, 22s) linear infinite;
    animation-delay: var(--delay, 0s);
}

/* ADELANTE: dos posters grandes, uno detrás del otro */
.poster-a { --sz: 1;    --z: 90px;   --dy: 0px;   --delay: 0s;   --dur: 22s; --sx: 22vw; --sy: 0svh; }
.poster-b { --sz: 0.9;  --z: 40px;   --dy: -9svh; --delay: -11s; --dur: 22s; --sx: 36vw; --sy: -12svh; }

/* ATRÁS: tres más chicos, más lentos y más oscuros (se ven lejos) */
.poster-c { --sz: 0.56; --z: -280px; --dy: 12svh;  --delay: 0s;   --dur: 32s; --sx: 6vw;  --sy: 16svh; }
.poster-d { --sz: 0.5;  --z: -340px; --dy: -16svh; --delay: -11s; --dur: 32s; --sx: 30vw; --sy: -20svh; }
.poster-e { --sz: 0.6;  --z: -240px; --dy: 4svh;   --delay: -22s; --dur: 32s; --sx: 44vw; --sy: 8svh; }

.is-back .poster-face {
    filter: brightness(0.6) saturate(0.85);
}

.is-back .poster-face::after {
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.06) 0%, transparent 38%);
}

@keyframes posterFly {
    0% {
        opacity: 0;
        transform: translate3d(var(--x0), calc(var(--y0) + var(--dy)), var(--z))
                   rotateY(-18deg) rotateX(6deg) rotateZ(-5deg);
    }
    8% {
        opacity: 1;
    }
    50% {
        transform: translate3d(var(--xm), calc(var(--ym) + var(--dy)), var(--z))
                   rotateY(8deg) rotateX(-3deg) rotateZ(-2deg);
    }
    92% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--x1), calc(var(--y1) + var(--dy)), var(--z))
                   rotateY(20deg) rotateX(4deg) rotateZ(4deg);
    }
}

/* Cara del poster: se balancea apenas sobre su eje mientras vuela */
.poster-face {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65),
                0 0 50px rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
    animation: posterSway 7s ease-in-out infinite alternate;
}

/* Reflejo diagonal */
.poster-face::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, transparent 38%);
    pointer-events: none;
}

.poster-b .poster-face { animation-duration: 8.5s; animation-delay: -2s; }
.poster-c .poster-face { animation-duration: 9.5s; animation-delay: -4s; }

@keyframes posterSway {
    from { transform: rotateY(-5deg) translateY(-4px); }
    to   { transform: rotateY(5deg)  translateY(6px); }
}

/* Cuando pongas fotos: <img> adentro de .poster-face */
.poster-face img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sin animaciones: los posters quedan quietos, a la derecha */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .navbar.reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .ticker-track {
        animation: none;
    }

    .poster {
        animation: none;
        opacity: 1;
        transform: translate3d(var(--sx), var(--sy), var(--z)) rotateY(-12deg) rotateZ(-3deg);
    }

    .poster-d,
    .poster-e {
        display: none;   /* quietos, con tres alcanza */
    }

    .poster-face {
        animation: none;
    }

    .footer-watermark {
        animation: none;
    }
}

/* ==========================================================
   GALERÍA: carrusel de imágenes
   La imagen activa va al centro y grande; las de los costados
   se achican y se difuminan. Se adapta a fotos verticales u horizontales.
   ========================================================== */
.gallery {
    --g-h: clamp(300px, 62svh, 640px);          /* alto máximo del carrusel */
    --slide-maxw: min(78vw, 900px);             /* ancho máximo de una imagen */
    --g-ease: cubic-bezier(0.22, 0.8, 0.24, 1);

    position: relative;
    margin-top: clamp(3rem, 9vw, 8rem);
}

.gallery-stage {
    position: relative;
    height: var(--g-h);
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
            user-select: none;
    outline: none;
    /* Los extremos se desvanecen */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
}

.slide {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 0;
    opacity: 0;
    will-change: transform, opacity;   /* cada imagen en su propia capa: se mueve sin redibujar */
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: transform 0.8s var(--g-ease),
                opacity 0.8s ease,
                filter 0.8s ease;
}

.slide.is-active {
    cursor: default;
}

/* --r (proporción ancho/alto) lo calcula home.js al cargar cada imagen:
   la imagen ocupa todo el alto disponible, o todo el ancho máximo si es muy apaisada */
/* El ancho y alto exactos los pone home.js (sizeSlides) según la proporción real */
.slide img {
    display: block;
    max-width: none;
    object-fit: cover;
    background: rgba(var(--fg-rgb), 0.06);
    border-radius: 14px;
    border: 1px solid rgba(var(--fg-rgb), 0.14);
    box-shadow: 0 18px 50px rgba(0, 0, 0, calc(0.6 - var(--inv) * 0.4));
    pointer-events: none;
    -webkit-user-drag: none;
}

.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    margin-top: 1.4rem;
}

.gallery-btn {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: rgb(var(--fg-rgb));
    background: rgba(var(--fg-rgb), 0.04);
    border: 1px solid rgba(var(--fg-rgb), 0.28);
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.gallery-btn:hover {
    background-color: rgb(var(--fg-rgb));
    color: rgb(var(--bg-rgb));
}

.gallery-btn:active {
    transform: scale(0.94);
}

.gallery-btn:focus-visible {
    outline: 1px solid rgb(var(--fg-rgb));
    outline-offset: 3px;
}

.gallery-count {
    min-width: 7ch;
    text-align: center;
    font-family: var(--font-body, sans-serif);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    font-variant-numeric: tabular-nums;
    color: rgba(var(--fg-rgb), 0.65);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: clamp(4rem, 10vw, 9rem);
    padding: clamp(3rem, 6vw, 5rem) max(4%, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom, 0px)) max(4%, env(safe-area-inset-left));
}

/* Línea superior que se desvanece en los extremos (mismo estilo que el navbar) */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 4%;
    right: 4%;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(var(--fg-rgb), 0) 0%,
        rgba(var(--fg-rgb), 0.3) 20%,
        rgba(var(--fg-rgb), 0.3) 80%,
        rgba(var(--fg-rgb), 0) 100%);
}

/* Asterisco como marca de agua */
.footer-watermark {
    position: absolute;
    right: -6%;
    bottom: -32%;
    width: clamp(260px, 38vw, 560px);
    height: auto;
    opacity: 0.05;
    filter: brightness(0) invert(var(--fg-invert));
    animation: slowSpin 90s linear infinite;
    /* Al pasar el mouse da media vuelta extra (se suma al giro lento) */
    rotate: 0deg;
    transition: rotate 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.footer-watermark:hover {
    rotate: 180deg;
    opacity: 0.09;
}


@keyframes slowSpin {
    to { transform: rotate(360deg); }
}

.footer-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-mark {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: brightness(0) invert(var(--fg-invert));
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Igual que el logo del navbar: gira al pasar el mouse */
.footer-mark:hover {
    transform: rotate(180deg);
}

.footer-tag {
    max-width: 30ch;
    font-family: var(--font-display, sans-serif);
    font-size: 0.78rem;
    line-height: 1.6;
    letter-spacing: 0.06em;
    color: rgba(var(--fg-rgb), 0.6);
}

.footer-title {
    margin-bottom: 1.1rem;
    font-family: var(--font-display, sans-serif);
    font-size: 0.66rem;
    font-weight: normal;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.5);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.footer-link {
    position: relative;
    display: inline-block;
    padding: 0.15rem 0;
    line-height: 1.5;
    font-family: var(--font-display, sans-serif);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(var(--fg-rgb), 0.78);
    transition: color 0.3s ease;
}

/* Subrayado que crece desde la izquierda */
.footer-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: rgb(var(--fg-rgb));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-link:hover,
.footer-link:focus-visible {
    color: rgb(var(--fg-rgb));
    outline: none;
}

.footer-link:hover::after,
.footer-link:focus-visible::after {
    transform: scaleX(1);
}

.footer-bottom {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--content-max);
    margin: clamp(2rem, 4vw, 3rem) auto 0;
    padding-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem 1.5rem;
    border-top: 1px solid rgba(var(--fg-rgb), 0.1);
    font-family: var(--font-display, sans-serif);
    font-size: 0.66rem;
    line-height: 1.6;
    letter-spacing: 0.08em;
    color: rgba(var(--fg-rgb), 0.45);
}

.footer-bottom .footer-link {
    font-size: 0.66rem;
    color: rgba(var(--fg-rgb), 0.55);
}

/* ==========================================================
   BOTÓN DE ABAJO: "Deslizar" / "Ir a <sección>"
   Mismo lenguaje que la flecha del navbar: sin caja, chevron
   con halo suave. Cambia de color junto con el fondo.
   ========================================================== */
.scroll-cue {
    position: fixed;
    left: 50%;
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 90;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 1.2rem 0.2rem;
    cursor: pointer;
    color: rgb(var(--fg-rgb));
    background: none;
    border: none;
    font: inherit;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0s linear 0.6s,
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Halo difuso (mismo truco que .nav-handle) para que se lea sobre cualquier cosa */
.scroll-cue::before {
    content: '';
    position: absolute;
    inset: -6px -10px;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--bg-rgb), 0.75), transparent);
}

body.home-ready .scroll-cue.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0s,
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.menu-open .scroll-cue,
body.home-ready .scroll-cue.is-visible.is-blocked {
    opacity: 0;
    visibility: hidden;
}

/* Encima de las tarjetas: píldora con fondo para que se lea y no se mezcle */
.scroll-cue::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 999px;
    background: rgba(var(--bg-rgb), 0.88);
    box-shadow: 0 0 0 1px rgba(var(--fg-rgb), 0.14), 0 8px 24px rgba(0, 0, 0, 0.22);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.scroll-cue.is-over::after {
    opacity: 1;
}

.scroll-cue-label {
    font-family: var(--font-body, sans-serif);
    font-size: 0.66rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.75;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Cambio de texto: sale, se reemplaza y entra */
.scroll-cue.is-swapping .scroll-cue-label {
    opacity: 0;
    transform: translateY(4px);
}

.scroll-cue-chevron {
    display: block;
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 1px 4px rgba(var(--bg-rgb), 0.9));
    animation: handleNudge 1.6s ease-in-out infinite;
}

.scroll-cue:hover .scroll-cue-label,
.scroll-cue:focus-visible .scroll-cue-label {
    opacity: 1;
}

.scroll-cue:focus-visible {
    outline: none;
}

.scroll-cue:focus-visible .scroll-cue-chevron {
    filter: drop-shadow(0 0 6px rgba(var(--fg-rgb), 0.9));
}

/* ==========================================================
   SERVICIOS: tarjetas "bento"
   - Al pasar el mouse, la tarjeta se llena desde el puntero con el
     color del texto (en blanco -> se vuelve negra) y se inclina en 3D.
   - En celulares se "encienden" solas al pasar por el centro de la pantalla.
   ========================================================== */
.services {
    position: relative;
    /* "Cielo vacío" antes de Servicios: acá se ve el pasaje de estrellas a nubes */
    padding-top: clamp(10rem, 48svh, 28rem);
}

.services-head {
    display: grid;
    gap: clamp(0.8rem, 1.6vw, 1.2rem);
    max-width: 900px;
    margin-bottom: clamp(2.2rem, 5vw, 4rem);
}

.services-kicker {
    font-family: var(--font-body, sans-serif);
    font-size: 0.66rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.55);
}

.services-title {
    font-family: var(--font-title, sans-serif);
    font-size: clamp(1.7rem, 3.9vw, 3.5rem);
    font-weight: normal;
    line-height: 1.02;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-wrap: balance;
}

.services-sub {
    max-width: 44ch;
    font-family: var(--font-title, sans-serif);
    font-size: clamp(0.76rem, 0.95vw, 0.9rem);
    line-height: 1.6;
    letter-spacing: 0.06em;
    color: rgba(var(--fg-rgb), 0.62);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.4vw, 1.1rem);
}

.service-card {
    perspective: 1000px;
}

.service-card.is-wide { grid-column: span 2; }
.service-card.is-full { grid-column: 1 / -1; }

.service-body {
    --mx: 50%;
    --my: 50%;
    --rx: 0deg;
    --ry: 0deg;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    height: 100%;
    min-height: clamp(250px, 24vw, 330px);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: clamp(1.3rem, 2.2vw, 2rem);
    border: 1px solid rgba(var(--fg-rgb), 0.16);
    border-radius: 22px;
    /* fondo sólido para que las nubes no se vean a través de la tarjeta */
    background: linear-gradient(rgba(var(--fg-rgb), 0.025), rgba(var(--fg-rgb), 0.025)), rgb(var(--bg-rgb));
    color: rgb(var(--fg-rgb));
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.45s ease,
                border-color 0.45s ease,
                box-shadow 0.6s ease;
}

/* Relleno circular que nace donde está el puntero */
.service-body::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgb(var(--fg-rgb));
    clip-path: circle(0% at var(--mx) var(--my));
    transition: clip-path 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Brillo que sigue al puntero */
.service-body::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(var(--bg-rgb), 0.16), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover .service-body,
.service-card.is-lit .service-body {
    color: rgb(var(--bg-rgb));
    border-color: rgb(var(--fg-rgb));
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.45);
}

.service-card:hover .service-body::before,
.service-card.is-lit .service-body::before {
    clip-path: circle(150% at var(--mx) var(--my));
}

.service-card:hover .service-body::after {
    opacity: 1;
}

.service-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: auto;            /* empuja el texto hacia abajo */
    padding-bottom: 1.2rem;
}

.service-num {
    font-family: var(--font-body, sans-serif);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    opacity: 0.55;
}

.service-icon {
    width: clamp(44px, 4.4vw, 62px);
    height: clamp(44px, 4.4vw, 62px);
    object-fit: contain;
    filter: brightness(0) invert(var(--fg-invert));
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
}

.service-card:hover .service-icon,
.service-card.is-lit .service-icon {
    filter: brightness(0) invert(var(--inv));
    transform: rotate(-14deg) scale(1.18);
}

.service-name {
    font-family: var(--font-title, sans-serif);
    font-size: clamp(1.15rem, 1.7vw, 1.6rem);
    font-weight: normal;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.service-card.is-wide .service-name,
.service-card.is-full .service-name {
    font-size: clamp(1.4rem, 2.5vw, 2.3rem);
}

.service-text {
    max-width: 42ch;
    font-family: var(--font-title, sans-serif);
    font-size: clamp(0.76rem, 0.85vw, 0.86rem);
    line-height: 1.55;
    letter-spacing: 0.04em;
    opacity: 0.72;
}

.service-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.service-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem 1rem;
    margin-top: 0.6rem;
    padding-top: 0.8rem;
    border-top: 1px solid currentColor;
    border-top-color: color-mix(in srgb, currentColor 18%, transparent);
}

.service-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    font-family: var(--font-display, sans-serif);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.service-link svg {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-link:hover,
.service-link:focus-visible {
    background: rgba(128, 128, 128, 0.18);   /* sirve igual sobre fondo claro u oscuro */
    outline: none;
}

.service-link:hover svg,
.service-link:focus-visible svg {
    transform: translate(2px, -2px);
}

.service-tags li {
    padding: 0.38rem 0.75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-family: var(--font-body, sans-serif);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.7;
}

/* La tarjeta de ancho completo acomoda el texto en fila en pantallas grandes */
@media (min-width: 821px) {
    .service-card.is-full .service-body {
        min-height: 0;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "top  name tags"
            "top  text tags";
        align-items: center;
        column-gap: clamp(1.5rem, 3vw, 3rem);
    }

    .service-card.is-full .service-top {
        grid-area: top;
        flex-direction: column-reverse;
        align-items: center;
        gap: 0.8rem;
        margin: 0;
        padding: 0;
    }

    .service-card.is-full .service-name { grid-area: name; align-self: end; }
    .service-card.is-full .service-text { grid-area: text; align-self: start; }
    .service-card.is-full .service-tags { grid-area: tags; justify-content: flex-end; max-width: 280px; }
}

@media (prefers-reduced-motion: reduce) {
    .service-body,
    .service-body::before,
    .service-icon {
        transition: none;
    }

    .scroll-cue-chevron {
        animation: none;
    }
}

/* ==========================================================
   RENDIMIENTO: animaciones en pausa cuando no se ven
   (home.js agrega .is-paused a lo que sale de pantalla)
   ========================================================== */
.hero-stage.is-paused .poster,
.hero-stage.is-paused .poster-face,
.footer.is-paused .footer-watermark {
    animation-play-state: paused;
}

[hidden] {
    display: none !important;
}

/* ==========================================================
   CAMBIO DE VISTA (home <-> páginas internas)
   Lo que se ve se desvanece apenas y lo nuevo entra con las .reveal
   ========================================================== */
.main-content,
.page-view,
.footer {
    transition: opacity 0.28s ease, transform 0.28s ease;
}

body.view-leaving .main-content,
body.view-leaving .page-view,
body.view-leaving .footer {
    opacity: 0;
    transform: translateY(10px);
}

/* En las páginas el escalonado de las .reveal se mantiene siempre */
body.home-settled .page-view .reveal {
    transition-delay: calc(var(--i, 0) * 90ms);
}

/* ==========================================================
   BOTONES Y CHIPS (se usan en contacto y en las páginas)
   ========================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.5rem;
    border: 1px solid rgb(var(--fg-rgb));
    border-radius: 999px;
    background: rgb(var(--fg-rgb));
    color: rgb(var(--bg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.btn-primary svg {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: transparent;
    color: rgb(var(--fg-rgb));
    outline: none;
}

.btn-primary:hover svg,
.btn-primary:focus-visible svg {
    transform: translate(3px, -3px);
}

.btn-primary:active {
    transform: scale(0.97);
}

.chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(var(--fg-rgb), 0.3);
    border-radius: 999px;
    background: transparent;
    color: rgb(var(--fg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.chip:hover,
.chip:focus-visible {
    border-color: rgb(var(--fg-rgb));
    outline: none;
}

.chip.is-current {
    background: rgb(var(--fg-rgb));
    border-color: rgb(var(--fg-rgb));
    color: rgb(var(--bg-rgb));
}

/* ==========================================================
   CONTACTO
   ========================================================== */
.contact {
    position: relative;
    padding-top: clamp(5rem, 12vw, 9rem);
}

.contact-title {
    font-family: var(--font-display, sans-serif);   /* Milker no tiene "¿" */
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
    align-items: start;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: clamp(1.2rem, 2.4vw, 2rem);
    border: 1px solid rgba(var(--fg-rgb), 0.16);
    border-radius: 22px;
    background: rgb(var(--bg-rgb));
}

.field {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-family: var(--font-display, sans-serif);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.6);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-width: 0;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(var(--fg-rgb), 0.22);
    border-radius: 12px;
    background: rgba(var(--fg-rgb), 0.03);
    color: rgb(var(--fg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 16px;   /* 16px evita que iPhone haga zoom al tocar el campo */
    letter-spacing: 0.02em;
    transition: border-color 0.25s ease, background-color 0.25s ease;
    -webkit-appearance: none;
            appearance: none;
}

.field select {
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                      linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2.4rem;
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(var(--fg-rgb), 0.38);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgb(var(--fg-rgb));
    background: rgba(var(--fg-rgb), 0.05);
}

.form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.3rem;
}

.form-status {
    flex: 1 1 200px;
    font-family: var(--font-display, sans-serif);
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(var(--fg-rgb), 0.7);
}

.form-status.is-error {
    color: #c62828;
}

.contact-channels {
    list-style: none;
    display: grid;
    border-top: 1px solid rgba(var(--fg-rgb), 0.16);
}

.channel {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label arrow" "value arrow";
    align-items: center;
    gap: 0.2rem 1rem;
    padding: 1.2rem 0.2rem;
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.16);
    color: rgb(var(--fg-rgb));
    text-decoration: none;
    transition: padding-left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel-label {
    grid-area: label;
    font-family: var(--font-display, sans-serif);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.55);
}

.channel-value {
    grid-area: value;
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1rem, 1.6vw, 1.3rem);
    overflow-wrap: anywhere;
}

.channel-arrow {
    grid-area: arrow;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.channel:hover,
.channel:focus-visible {
    padding-left: 0.8rem;
    outline: none;
}

.channel:hover .channel-arrow,
.channel:focus-visible .channel-arrow {
    transform: translate(3px, -3px);
}

/* ==========================================================
   PÁGINAS INTERNAS (Proyectos, Experiencias, legales)
   ========================================================== */
.page-view {
    position: relative;
    z-index: 1;
    width: var(--content-w);
    max-width: var(--content-max);
    margin: 0 auto;
    padding-top: calc(var(--nav-h) + clamp(2rem, 6vw, 4.5rem));
    color: rgb(var(--fg-rgb));
}

.page-hero {
    display: grid;
    justify-items: start;
    gap: clamp(0.7rem, 1.4vw, 1rem);
    max-width: 860px;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.page-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: clamp(0.6rem, 2vw, 1.4rem);
    padding: 0.5rem 0.9rem 0.5rem 0.7rem;
    border: 1px solid rgba(var(--fg-rgb), 0.25);
    border-radius: 999px;
    background: transparent;
    color: rgb(var(--fg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.page-back svg {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-back:hover,
.page-back:focus-visible {
    border-color: rgb(var(--fg-rgb));
    outline: none;
}

.page-back:hover svg,
.page-back:focus-visible svg {
    transform: translateX(-3px);
}

.page-kicker {
    font-family: var(--font-body, sans-serif);
    font-size: 0.66rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.55);
}

.page-title {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1.8rem, 4.6vw, 3.8rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-wrap: balance;
}

.page-title:focus {
    outline: none;
}

.page-lead {
    max-width: 52ch;
    font-family: var(--font-display, sans-serif);
    font-size: clamp(0.82rem, 1.05vw, 0.98rem);
    line-height: 1.6;
    color: rgba(var(--fg-rgb), 0.68);
}

.page-meta {
    font-family: var(--font-display, sans-serif);
    font-size: 0.64rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.45);
}

/* --- Legales: columna de lectura cómoda --- */
.page-legal .page-body {
    max-width: 760px;
    display: grid;
    gap: clamp(1.6rem, 3vw, 2.2rem);
}

.legal-note {
    padding: 0.9rem 1.1rem;
    border: 1px dashed rgba(var(--fg-rgb), 0.35);
    border-radius: 14px;
    font-family: var(--font-display, sans-serif);
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(var(--fg-rgb), 0.7);
}

.legal-block h2 {
    margin-bottom: 0.7rem;
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.legal-block p,
.legal-block li {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(0.84rem, 0.95vw, 0.95rem);
    font-weight: 800;
    line-height: 1.7;
    color: rgba(var(--fg-rgb), 0.78);
}

.legal-block p + p,
.legal-block ul + p,
.legal-block p + ul {
    margin-top: 0.7rem;
}

.legal-block ul {
    display: grid;
    gap: 0.4rem;
    padding-left: 1.2rem;
}

.legal-block li::marker {
    content: "✱  ";
    font-family: sans-serif;
    font-size: 0.7em;
}

.page-body > * {
    min-width: 0;
}

.legal-block {
    overflow-wrap: anywhere;
}

.legal-block a {
    color: inherit;
    text-underline-offset: 3px;
}

.page-more {
    max-width: 760px;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(var(--fg-rgb), 0.14);
}

.page-more-title {
    margin-bottom: 0.9rem;
    font-family: var(--font-display, sans-serif);
    font-size: 0.64rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.55);
}

/* ==========================================================
   PORTFOLIOS
   ========================================================== */
.pf-hero {
    max-width: 900px;
    margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
}

.pf-name {
    font-size: clamp(2.1rem, 6.2vw, 5.2rem);
    line-height: 0.95;
}

.pf-role {
    font-family: var(--font-body, sans-serif);
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.75);
}

.pf-skills {
    margin-top: 0.4rem;
}

.chip-static {
    cursor: default;
}

.chip-static:hover {
    border-color: rgba(var(--fg-rgb), 0.3);
}

.pf-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pf-links .chip {
    gap: 0.4rem;
}

.pf-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1rem, 2.4vw, 1.6rem);
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.16);
}

.pf-section-title {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 800;
    text-transform: uppercase;
}

.pf-count {
    font-family: var(--font-body, sans-serif);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: rgba(var(--fg-rgb), 0.5);
}

.pf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.6rem, 3.4vw, 3rem) clamp(1rem, 2.4vw, 2rem);
    align-items: start;
}

/* La segunda columna arranca más abajo: grilla "desfasada" */
@media (min-width: 821px) {
    .pf-grid > .pf-card:nth-child(2n) {
        margin-top: clamp(3rem, 8vw, 7rem);
    }
}

.pf-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
    min-width: 0;
}

/* El recuadro del proyecto: de acá "sale" la ventana del visor */
.pf-frame {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: var(--ratio, 4 / 3);
    overflow: hidden;
    border: 1px solid rgba(var(--fg-rgb), 0.16);
    border-radius: 14px;
    background: rgba(var(--fg-rgb), 0.04);
    cursor: pointer;
    isolation: isolate;
}

.pf-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}

.pf-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.12) 0%, transparent 40%);
    pointer-events: none;
}

.pf-card:hover .pf-frame img {
    transform: scale(1.04);
}

.pf-type {
    position: absolute;
    left: 0.8rem;
    top: 0.8rem;
    z-index: 1;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-family: var(--font-display, sans-serif);
    font-size: 0.56rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
}

.pf-info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.pf-text {
    min-width: 0;
}

.pf-title {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.pf-meta {
    margin-top: 0.3rem;
    font-family: var(--font-display, sans-serif);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: rgba(var(--fg-rgb), 0.55);
}

.pf-view {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.95rem;
    border: 1px solid rgb(var(--fg-rgb));
    border-radius: 999px;
    background: transparent;
    color: rgb(var(--fg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.pf-view:hover,
.pf-view:focus-visible,
.pf-card:hover .pf-view {
    background: rgb(var(--fg-rgb));
    color: rgb(var(--bg-rgb));
    outline: none;
}

.pf-view:active {
    transform: scale(0.96);
}

.pf-summary {
    max-width: 48ch;
    font-family: var(--font-display, sans-serif);
    font-size: clamp(0.78rem, 0.9vw, 0.88rem);
    line-height: 1.55;
    color: rgba(var(--fg-rgb), 0.68);
}

.pf-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pf-tags li {
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(var(--fg-rgb), 0.25);
    border-radius: 999px;
    font-family: var(--font-body, sans-serif);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.75);
}

/* Herramientas: discretas, al final (lo importante son los proyectos) */
.pf-tools {
    display: grid;
    gap: 0.8rem;
    margin-top: clamp(3rem, 7vw, 5rem);
    padding-top: 1.4rem;
    border-top: 1px solid rgba(var(--fg-rgb), 0.14);
}

.pf-tools-title {
    font-family: var(--font-display, sans-serif);
    font-size: 0.64rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(var(--fg-rgb), 0.55);
}

.pf-tools .chip {
    font-size: 0.58rem;
    padding: 0.4rem 0.75rem;
}

.pf-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    margin-top: clamp(3.5rem, 8vw, 6rem);
    padding: clamp(1.4rem, 3vw, 2.4rem);
    border: 1px solid rgba(var(--fg-rgb), 0.16);
    border-radius: 22px;
}

.pf-cta-text {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1.15rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

/* ==========================================================
   VISOR DE PROYECTOS (la "ventana")
   - .is-shown  : visible (ventana con margen)
   - .is-ready  : terminó de abrirse, muestra "Scrolleá para entrar"
   - .is-inside : la ventana ocupa toda la pantalla y se scrollea adentro
   ========================================================== */
html.viewer-open,
html.viewer-open body {
    overflow: hidden;
}

.viewer {
    --v-gap: clamp(12px, 4vw, 56px);
    position: fixed;
    inset: 0;
    z-index: 400;
    color: rgb(var(--fg-rgb));
}

.viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(var(--bg-rgb), 0.86);   /* sin desenfoque: en celulares es muy pesado */
}

.viewer-window {
    position: absolute;
    top: calc(var(--v-gap) + 8px);
    right: var(--v-gap);
    bottom: var(--v-gap);
    left: var(--v-gap);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(var(--fg-rgb), 0.22);
    border-radius: 18px;
    background: rgb(var(--bg-rgb));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    visibility: hidden;
    contain: layout paint;          /* lo de adentro no hace recalcular la página */
    will-change: clip-path;
    transition: top 0.6s cubic-bezier(0.7, 0, 0.2, 1),
                right 0.6s cubic-bezier(0.7, 0, 0.2, 1),
                bottom 0.6s cubic-bezier(0.7, 0, 0.2, 1),
                left 0.6s cubic-bezier(0.7, 0, 0.2, 1),
                border-radius 0.6s ease;
}

.viewer.is-shown .viewer-window {
    visibility: visible;
}

/* Pantalla completa: "entramos" a la tarjeta */
.viewer.is-inside .viewer-window {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 0;
    border-color: transparent;
}

.viewer-bar {
    position: relative;
    z-index: 3;
    flex: none;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 52px;
    padding: 0 0.6rem 0 1rem;
    border-bottom: 1px solid rgba(var(--fg-rgb), 0.12);
    background: rgb(var(--bg-rgb));
}

.viewer-dots {
    display: flex;
    gap: 6px;
}

.viewer-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid rgba(var(--fg-rgb), 0.35);
}

.viewer-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-family: var(--font-display, sans-serif);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.viewer-ext {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(var(--fg-rgb), 0.3);
    border-radius: 999px;
    color: rgb(var(--fg-rgb));
    font-family: var(--font-display, sans-serif);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.viewer-ext:hover,
.viewer-ext:focus-visible {
    border-color: rgb(var(--fg-rgb));
    outline: none;
}

.viewer-close {
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(var(--fg-rgb), 0.3);
    border-radius: 50%;
    background: transparent;
    color: rgb(var(--fg-rgb));
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.viewer-close:hover,
.viewer-close:focus-visible {
    background: rgb(var(--fg-rgb));
    color: rgb(var(--bg-rgb));
    transform: rotate(90deg);
    outline: none;
}

.viewer-body {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;              /* no scrollea hasta "entrar" */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    outline: none;
}

.viewer.is-inside .viewer-body {
    overflow-y: auto;
}

.viewer-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #ffffff;
    pointer-events: none;          /* hasta entrar, la rueda la toma el visor */
}

.viewer.is-inside .viewer-frame {
    pointer-events: auto;
}

/* Portada que acompaña el "zoom" de apertura y se desvanece */
.viewer-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease 0.15s;
}

.viewer-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viewer.is-ready .viewer-cover,
.viewer.is-inside .viewer-cover,
.viewer.is-closing .viewer-cover {
    opacity: 0;
}

.viewer.is-closing .viewer-cover {
    opacity: 1;
    transition-delay: 0s;
}

/* "Escudo" transparente: toma el primer scroll/toque para entrar */
.viewer-shield {
    position: absolute;
    inset: 52px 0 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: clamp(1.2rem, 4vh, 2.4rem);
    border: 0;
    background: linear-gradient(to top, rgba(var(--bg-rgb), 0.85), transparent 45%);
    color: rgb(var(--fg-rgb));
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.45s ease;
    touch-action: none;
}

.viewer.is-ready .viewer-shield {
    opacity: 1;
}

.viewer.is-inside .viewer-shield {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.viewer-shield:focus-visible {
    outline: none;
}

.viewer-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display, sans-serif);
    font-size: 0.66rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.viewer-shield:focus-visible .viewer-hint-text {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Mouse dibujado con la ruedita bajando */
.viewer-mouse {
    position: relative;
    width: 22px;
    height: 34px;
    border: 1.5px solid currentColor;
    border-radius: 12px;
}

.viewer-mouse span {
    position: absolute;
    left: 50%;
    top: 7px;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: currentColor;
    animation: mouseWheel 1.4s ease-in-out infinite;
}

@keyframes mouseWheel {
    0%   { transform: translateY(0); opacity: 1; }
    70%  { transform: translateY(9px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* --- Caso de estudio (proyectos "gallery") --- */
.case {
    width: min(1100px, 92%);
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(3rem, 8vw, 6rem);
}

.case-head {
    display: grid;
    gap: 0.8rem;
    max-width: 760px;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.case-title {
    font-family: var(--font-display, sans-serif);
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.case-text {
    max-width: 60ch;
    font-family: var(--font-display, sans-serif);
    font-size: clamp(0.84rem, 1vw, 0.98rem);
    line-height: 1.7;
    color: rgba(var(--fg-rgb), 0.75);
}

.case-images {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.75rem, 1.6vw, 1.25rem);
}

.case-fig {
    grid-column: span 1;
    margin: 0;
    aspect-ratio: var(--ratio, 4 / 3);
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(var(--fg-rgb), 0.12);
}

/* Las imágenes apaisadas van a todo el ancho */
.case-fig.is-wide {
    grid-column: 1 / -1;
}

/* Video de Drive: miniatura + botón de play (carga el video al tocar) */
.case-fig.is-video {
    background: #000;
}

.case-play {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: #111;
    cursor: pointer;
}

.case-play img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.case-play:hover img,
.case-play:focus-visible img {
    opacity: 1;
    transform: scale(1.03);
}

.case-play:focus-visible {
    outline: 2px solid rgb(var(--fg-rgb));
    outline-offset: -2px;
}

.case-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.case-play-icon::after {
    content: '';
    position: absolute;
    left: 26px;
    top: 21px;
    border-left: 16px solid #000;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

.case-play:hover .case-play-icon {
    transform: scale(1.08);
}

.case-play-label {
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0.7rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-family: var(--font-display, sans-serif);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-video {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.case-fig img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-head .btn-primary {
    justify-self: start;
    margin-top: 0.4rem;
}

.case-images + .case-end,
.case-shot + .case-end {
    margin-top: clamp(2rem, 5vw, 3rem);
}

.case-end {
    display: grid;
    justify-items: center;
    gap: 1rem;
    margin-top: clamp(2.5rem, 6vw, 4rem);
    text-align: center;
}

@media (max-width: 820px) {
    .pf-grid { gap: 2.2rem 1rem; }
    .case-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .pf-grid { grid-template-columns: 1fr; }
    .pf-info { flex-direction: column; align-items: stretch; }
    .pf-view { justify-content: center; }
    .case-images { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .case-fig { border-radius: 10px; }
    .case-play-icon { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
    .case-play-icon::after { left: 19px; top: 15px; border-left-width: 13px; border-top-width: 9px; border-bottom-width: 9px; }
    .viewer-bar { height: 48px; gap: 0.6rem; }
    .viewer-shield { inset: 48px 0 0; }
    .viewer-dots { display: none; }
    .viewer-ext { padding: 0.45rem 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
    .viewer-window,
    .viewer-cover,
    .viewer-shield { transition: none; }
    .viewer-mouse span { animation: none; }
}

/* ==========================================================
   RESPONSIVE
   Pantallas grandes -> tablet -> celulares grandes -> chicos
   ========================================================== */

/* Computadoras grandes */
@media (min-width: 1600px) {
    :root { --content-max: 1400px; }
}

@media (min-width: 2200px) {
    :root { --content-max: 1700px; }

    .hero-title { font-size: 4.6rem; }
    .hero-sub { font-size: 1rem; }
    .hero-stage { --pw: 340px; }
    .gallery { --g-h: 720px; --slide-maxw: 1100px; }
}

/* Tablet horizontal / notebooks chicas */
@media (max-width: 1024px) {
    .hero-text { flex-basis: 52%; }
    .hero-stage { --pw: clamp(140px, 22vw, 240px); }
}

/* Tablet vertical: el hero se apila (texto arriba, posters abajo) */
@media (max-width: 820px) {
    :root { --content-w: 90%; }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 1.5rem;
        min-height: max(520px, calc(100vh - var(--nav-h)));
        min-height: max(520px, calc(100svh - var(--nav-h)));
        padding-top: 2rem;
    }

    .hero-text { flex-basis: auto; max-width: 100%; }

    .hero-art {
        position: relative;
        inset: auto;
        flex: none;
        width: 100%;
        height: clamp(250px, 42svh, 400px);
    }

    .hero-stage {
        perspective-origin: 50% 50%;

        --x0: 70vw;  --xm: 0vw;  --x1: -70vw;
        --y0: 4svh;  --ym: 0svh; --y1: -4svh;
        --pw: clamp(110px, 30vw, 190px);
    }

    .poster-a { --dy: 0px; }
    .poster-b { --dy: -5svh; }
    .poster-c { --dy: 7svh; }
    .poster-d { --dy: -9svh; }
    .poster-e { --dy: 3svh; }

    .gallery {
        --g-h: clamp(260px, 50svh, 520px);
        --slide-maxw: min(80vw, 760px);
    }

    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }

    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .service-card.is-wide { grid-column: 1 / -1; }

    .contact-grid { grid-template-columns: 1fr; }
}

/* Celulares (y tablets muy angostas) */
@media (max-width: 768px) {
    :root { --nav-h: 58px; }

    .navbar { --mark-size: 2.2rem; }

    .ticker-item { font-size: 0.6rem; letter-spacing: 0.14em; }

    .menu-item { font-size: 0.86rem; }
}

/* Celulares grandes y medianos */
@media (max-width: 560px) {
    .hero-title { font-size: clamp(1.6rem, 7.6vw, 2.2rem); }
    .hero-sub { font-size: 0.74rem; }

    .gallery {
        --g-h: clamp(240px, 46svh, 420px);
        --slide-maxw: 82vw;
    }

    .gallery-controls { gap: 1rem; }

    .services-grid { grid-template-columns: 1fr; }
    .service-card.is-wide,
    .service-card.is-full { grid-column: auto; }
    .service-body { min-height: 200px; border-radius: 18px; }

    .contact-form { grid-template-columns: 1fr; border-radius: 18px; }
    .form-foot .btn-primary { width: 100%; }

    .gallery-btn { width: 42px; height: 42px; }

    .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* Celulares chicos */
@media (max-width: 380px) {
    :root { --nav-h: 54px; --content-w: 92%; }

    .navbar { --mark-size: 2rem; }

    .ticker-item { font-size: 0.56rem; }

    .menu-panel { padding: 0.9rem 1rem 0.5rem; }
    .menu-item { font-size: 0.8rem; gap: 0.75rem; }

    .footer-link { font-size: 0.7rem; }
}

/* Celulares en horizontal (poco alto) */
@media (max-height: 520px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-block: 1.5rem;
    }

    .gallery { --g-h: 70svh; }

    /* Posters más chicos y corridos a la derecha para no tapar el título */
    .hero-stage { --pw: clamp(80px, 24svh, 150px); --xm: 22cqw; }
    .hero-text { flex-basis: 56%; }
}