/* Portada pública del laboratorio (tsocial.site raíz). A propósito NO usa theme.css ni el
   interruptor claro/oscuro del resto del sitio: es una "portada" cinematográfica de entrada,
   como la página de producto de Apple, con su propia identidad oscura fija. El resto de las
   pantallas (subir.html, login, panel) sí siguen el sistema de temas normal. */

:root {
    --inicio-ink: #171b18;
    --inicio-paper: #f1f0e9;
    --inicio-signal: #2fd8d8;
    --inicio-muted: rgba(255, 255, 255, .72);
    --inicio-muted-soft: rgba(255, 255, 255, .5);

    /* Par tipográfico editorial: Playfair Display para títulos (la voz "display" de la
       portada), Inter para todo lo demás (rótulos, texto de apoyo, UI). Antes el body entero
       heredaba una fuente de sistema (Palatino/Segoe UI) que casi nadie fuera de Windows tiene
       instalada, así que la mayoría veía el fallback genérico en vez del look buscado. */
    --inicio-serif: "Playfair Display", Georgia, serif;
    --inicio-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Escala tipográfica modular (12/14/16/18/24/32...) en vez de tamaños sueltos: cada tamaño
       que aparece en la página referencia uno de estos pasos. */
    --step-label: .75rem;   /* 12px — eyebrows, rótulos, pie de página */
    --step-body: 1rem;      /* 16px — texto de apoyo */
    --step-body-lg: 1.125rem; /* 18px — copy del hero */
    --step-title: 1.5rem;   /* 24px — títulos de tarjeta */
    --step-heading: 2rem;   /* 32px — encabezado de la sección de acceso */

    /* Ritmo de espaciado en base 8px */
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
}

* { box-sizing: border-box; }

html { background: #101411; scroll-behavior: smooth; }

body {
    margin: 0;
    color: white;
    background: #101411;
    font-family: var(--inicio-sans);
}

.sequence {
    position: relative;
    height: 400vh;
    background: #101411;
}

.stage {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100svh;
    min-height: 34rem;
    overflow: hidden;
    isolation: isolate;
    background: #242b25;
}

.stage::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(9, 15, 11, .70) 0%, rgba(9, 15, 11, .26) 49%, transparent 78%),
                linear-gradient(0deg, rgba(9, 15, 11, .62), transparent 24%);
    pointer-events: none;
}

/* Halo muy sutil detrás del titular, en el acento de marca: le da profundidad al negro plano
   sin agregar ningún elemento nuevo al layout (es decorativo, va detrás de todo). */
.stage::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: clamp(1.25rem, 10vw, 10rem);
    top: 50%;
    width: 40rem;
    height: 40rem;
    max-width: 70vw;
    transform: translateY(-50%);
    background: radial-gradient(circle, rgba(47, 216, 216, .10), transparent 65%);
    pointer-events: none;
}

canvas {
    position: absolute;
    z-index: -2;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: #242b25;
}

.topbar {
    position: absolute;
    inset: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-6) clamp(1.25rem, 5vw, 5rem);
    border-bottom: 1px solid rgba(255, 255, 255, .22);
    font-family: var(--inicio-sans);
    font-size: var(--step-label);
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: white;
}

.wordmark { display: flex; align-items: center; gap: .7rem; }

.wordmark-mark {
    width: .65rem;
    aspect-ratio: 1;
    background: var(--inicio-signal);
    transform: rotate(45deg);
}

.frame-readout { display: none; }

.intro, .caption {
    position: absolute;
    left: clamp(1.25rem, 10vw, 10rem);
    max-width: 42rem;
    transition: opacity .35s ease, transform .35s ease;
}

.intro {
    top: 56%;
    width: min(74vw, 42rem);
    transform: translateY(-42%);
}

.eyebrow, .caption-index {
    margin: 0 0 var(--space-4);
    color: var(--inicio-signal);
    font-family: var(--inicio-sans);
    font-size: var(--step-label);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.intro h1, .caption h2 {
    margin: 0;
    font-family: var(--inicio-serif);
    font-size: clamp(3.5rem, 8.2vw, 8rem);
    font-weight: 400;
    line-height: .91;
    text-wrap: balance;
}

.intro h1 span { display: block; font-style: italic; }

.intro-copy, .caption p:last-child {
    max-width: 30rem;
    margin: var(--space-6) 0 0;
    color: var(--inicio-muted);
    font-size: var(--step-body-lg);
    line-height: 1.55;
}

.caption {
    bottom: clamp(4rem, 12vh, 8rem);
    width: min(74vw, 40rem);
    opacity: 0;
    visibility: hidden;
    transform: translateY(1rem);
    outline: none;
}

.caption.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.caption h2 { font-size: clamp(2.6rem, 5.7vw, 5.2rem); }

.caption p:last-child { margin-top: var(--space-4); }

.bottomline {
    position: absolute;
    right: clamp(1.25rem, 5vw, 5rem);
    bottom: 1.55rem;
    left: clamp(1.25rem, 5vw, 5rem);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: var(--space-4);
    font-family: var(--inicio-sans);
    font-size: var(--step-label);
}

.load-wrap { max-width: 15rem; }

.load-label {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: .45rem;
    color: var(--inicio-muted);
}

.progress-track { height: 2px; background: rgba(255, 255, 255, .32); }

.progress-fill {
    width: 0;
    height: 100%;
    background: var(--inicio-signal);
    transition: width .15s linear;
}

.scroll-cue { color: var(--inicio-muted); text-align: right; }
.scroll-cue span { color: var(--inicio-signal); }

.endnote {
    display: flex;
    min-height: 42vh;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-8);
    padding: var(--space-8) clamp(1.25rem, 10vw, 10rem);
    color: white;
    background: linear-gradient(115deg, #14282c 0%, #142c3b 52%, #1f4d5e 100%);
    border-top: 1px solid rgba(47, 216, 216, .2);
}

.endnote p { max-width: 36rem; margin: 0; font-family: var(--inicio-serif); font-size: clamp(1.6rem, 3.5vw, 3rem); line-height: 1.15; text-wrap: balance; }
.endnote small { display: block; margin-top: var(--space-4); font-family: var(--inicio-sans); font-size: var(--step-label); letter-spacing: .06em; color: var(--inicio-muted); text-transform: uppercase; }

/* -- Selector de acceso (alumno / funcionario) --
   Sigue la misma paleta oscura de la secuencia (no la superficie clara "--inicio-paper" que
   traía el diseño original): el degradado retoma el negro-oliva de la portada y va cerrando
   hacia el mismo tono con el que arranca el "endnote" de abajo, para que no haya un salto brusco
   de oscuro a claro al bajar. */
.audience-options {
    padding: var(--space-8) clamp(1.25rem, 10vw, 10rem);
    color: white;
    background: linear-gradient(180deg, #101411 0%, #16241f 55%, #14282c 100%);
}

.options-inner { max-width: 1280px; margin: 0 auto; }
.options-heading { margin-bottom: var(--space-8); }
.options-heading .eyebrow-dark { color: var(--inicio-signal); }
.options-heading h2 {
    margin: 0;
    font-family: var(--inicio-serif);
    font-size: clamp(var(--step-heading), 3vw, 2.5rem);
    font-weight: 400;
    color: white;
    text-wrap: balance;
}
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
}
.audience-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
    min-height: 190px;
    padding: var(--space-8);
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.audience-option::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 85% 0%, rgba(47, 216, 216, .16), transparent 55%);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.audience-option:hover, .audience-option:focus-visible {
    color: inherit;
    transform: translateY(-4px);
    border-color: rgba(47, 216, 216, .55);
    background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
    box-shadow: 0 18px 34px rgba(0, 0, 0, .35);
}
.audience-option:hover::after, .audience-option:focus-visible::after { opacity: 1; }
.audience-option:hover .option-arrow, .audience-option:focus-visible .option-arrow {
    background: var(--inicio-signal);
    color: #0d2323;
    transform: translateX(3px);
}

.option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: rgba(47, 216, 216, .14);
    box-shadow: inset 0 0 0 1px rgba(47, 216, 216, .25);
    color: var(--inicio-signal);
    font-size: 1.35rem;
    flex-shrink: 0;
}

.option-texto { flex: 1; }
.audience-option h3 { margin: 0 0 .4rem; font-family: var(--inicio-serif); font-size: var(--step-title); font-weight: 400; color: white; }
.audience-option p { max-width: 25rem; margin: 0; color: var(--inicio-muted); font-size: .85rem; line-height: 1.55; }

.option-arrow {
    position: absolute;
    right: var(--space-6);
    bottom: var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: white;
    font-size: 1rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

@media (max-width: 600px) {
    .stage { min-height: 30rem; }
    .stage::after {
        background: linear-gradient(90deg, rgba(9, 15, 11, .7), rgba(9, 15, 11, .18)),
                    linear-gradient(0deg, rgba(9, 15, 11, .72), transparent 38%);
    }
    .topbar { padding-block: 1.15rem; font-size: .65rem; }
    .intro, .caption { left: 1.5rem; width: calc(100% - 3rem); }
    .intro { top: 49%; }
    .intro h1 { font-size: clamp(3.4rem, 16vw, 5rem); }
    .intro-copy, .caption p:last-child { max-width: 25rem; font-size: 1rem; }
    .caption { bottom: 5.5rem; }
    .caption h2 { font-size: clamp(2.65rem, 12vw, 4rem); }
    .bottomline { bottom: 1.1rem; font-size: .65rem; }
    .endnote { min-height: 34vh; align-items: flex-start; flex-direction: column; justify-content: center; }
    .audience-options { padding: 3.5rem 1.25rem; }
    .options-grid { grid-template-columns: 1fr; }
    .audience-option { min-height: 130px; padding: 1.25rem; }
    .audience-option h3 { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .sequence { height: auto; }
    .stage {
        position: relative;
        top: auto;
        display: grid;
        grid-template-rows: minmax(24rem, 58svh) auto auto auto;
        row-gap: 1rem;
        height: auto;
        min-height: 0;
        overflow: visible;
    }
    .stage::after { z-index: 0; height: min(58svh, 42rem); }
    canvas { z-index: -1; height: min(58svh, 42rem); }
    .topbar { position: absolute; z-index: 1; }
    .intro {
        position: relative;
        top: auto;
        left: clamp(1.25rem, 10vw, 10rem);
        z-index: 1;
        grid-row: 1;
        align-self: center;
        width: min(74vw, 42rem);
        max-width: 42rem;
        margin: 0;
        transform: none;
    }
    .intro h1 { font-size: 5rem; }
    .caption, .caption.is-active {
        position: relative;
        inset: auto;
        z-index: 1;
        display: block;
        width: auto;
        max-width: none;
        padding: 2rem clamp(1.25rem, 10vw, 10rem);
        color: var(--inicio-ink);
        background: var(--inicio-paper);
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    #caption-one { grid-row: 2; }
    #caption-two { grid-row: 3; }
    .caption-index { color: #4c6415; }
    .caption p:last-child { color: #41473f; }
    .bottomline { position: relative; inset: auto; z-index: 1; grid-row: 4; padding: 1rem 1.25rem; background: #101411; }
    .scroll-cue { display: none; }
    .endnote { min-height: 30vh; }
}

@media (max-width: 600px) and (prefers-reduced-motion: reduce) {
    .intro { left: 1.5rem; width: calc(100% - 3rem); }
    .intro h1 { font-size: clamp(3.4rem, 16vw, 5rem); }
}
