/* ============================================================
   RUBI VFX · Portfolio
   Sistema de diseño: oscuro cinematográfico, acento cian cromo,
   tipografía Space Grotesk / Inter / JetBrains Mono.
   ============================================================ */

/* === Tokens === */
:root {
    --bg: #07090d;
    --bg-raise: #0b0e15;
    --surface: #0e121a;
    --surface-hover: #121724;

    --line: rgba(158, 178, 208, 0.12);
    --line-strong: rgba(158, 178, 208, 0.22);

    --text: #eaedf3;
    --text-2: #a7b0be;
    --text-3: #6d7684;

    --accent: #7fd6ea;
    --accent-soft: rgba(127, 214, 234, 0.12);
    --accent-ink: #04202a;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --container: min(100% - 3rem, 1160px);
    --section-pad: clamp(4.5rem, 10vw, 8rem) 0;
    --radius: 6px;

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t-fast: 0.25s var(--ease);
    --t-med: 0.5s var(--ease);

    --header-h: 72px;
}

/* === Reset === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    background: var(--bg);
    color: var(--text);
    overflow-x: clip;
    min-height: 100vh;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul { list-style: none; }

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

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

.container {
    width: var(--container);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 0.6rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    z-index: 2000;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

/* === Header === */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    transition: background var(--t-fast), border-color var(--t-fast);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: rgba(7, 9, 13, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--line);
}

.nav {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.nav__logo img {
    height: 26px;
    width: auto;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 3vw, 2.25rem);
}

.nav__link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
    padding: 0.35rem 0;
    position: relative;
    transition: color var(--t-fast);
}

.nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t-fast);
}

.nav__link:hover,
.nav__link.active {
    color: var(--text);
}

.nav__link:hover::after,
.nav__link.active::after {
    transform: scaleX(1);
}

.nav__cta {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    border: 1px solid rgba(127, 214, 234, 0.35);
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius);
    transition: background var(--t-fast), border-color var(--t-fast);
    white-space: nowrap;
}

.nav__cta:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* Hamburguesa */
.nav__toggle {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1100;
}

.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
    content: '';
    position: absolute;
    left: 8px;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: transform var(--t-fast), opacity var(--t-fast);
}

.nav__toggle span { top: 50%; }
.nav__toggle span::before { left: 0; transform: translateY(-7px); }
.nav__toggle span::after { left: 0; transform: translateY(7px); }

.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: rotate(45deg); background: var(--accent); }
.nav__toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); background: var(--accent); }

/* === Hero (home) === */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

/* imagen de fondo (timeline de edición) + resplandor cian muy sutil */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background: url('../assets/img/hero-bg.jpg') center 30% / cover no-repeat;
    opacity: 0.5;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 45% at 50% 42%, rgba(127, 214, 234, 0.10), transparent 70%),
        linear-gradient(180deg, rgba(7, 9, 13, 0.72) 0%, rgba(7, 9, 13, 0.55) 45%, var(--bg) 96%);
}

.hero__inner {
    padding: calc(var(--header-h) + 3rem) 0 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2rem;
}

.hero__brand {
    width: min(520px, 78vw);
    margin-bottom: 2.25rem;
    mix-blend-mode: screen; /* el logo cromo tiene fondo negro: se funde con la página */
    filter: drop-shadow(0 0 32px rgba(127, 214, 234, 0.18));
}

.hero__brand img { width: 100%; }

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.5vw, 3.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.hero__lead {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-2);
    max-width: 46ch;
    margin-bottom: 2.5rem;
}

.hero__lead strong {
    color: var(--text);
    font-weight: 500;
}

.hero__cta {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero__scroll {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 56px;
    background: linear-gradient(to bottom, transparent, var(--accent));
    opacity: 0.6;
}

/* === Botones === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius);
    transition: background var(--t-fast), color var(--t-fast),
                border-color var(--t-fast), transform var(--t-fast);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn--primary:hover {
    background: #9fe2f1;
}

.btn--ghost {
    border: 1px solid var(--line-strong);
    color: var(--text);
}

.btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.btn .arrow,
.link-more .arrow {
    transition: transform var(--t-fast);
}

.btn:hover .arrow,
.link-more:hover .arrow {
    transform: translateX(4px);
}

/* === Secciones genéricas === */
.section { padding: var(--section-pad); }

.section--raise { background: var(--bg-raise); }

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    flex-wrap: wrap;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.eyebrow::before {
    content: '';
    width: 2rem;
    height: 1px;
    background: var(--accent);
    opacity: 0.6;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section__sub {
    color: var(--text-2);
    max-width: 52ch;
    margin-top: 0.9rem;
}

.link-more {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--line);
    transition: color var(--t-fast), border-color var(--t-fast);
    white-space: nowrap;
}

.link-more:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* === Tarjetas de disciplina (home) === */
.disciplines {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.discipline {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--t-fast), background var(--t-fast),
                transform var(--t-med);
}

.discipline:hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
    transform: translateY(-4px);
}

.discipline__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.discipline__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease), filter 0.8s var(--ease);
    filter: saturate(0.92);
}

.discipline:hover .discipline__media img {
    transform: scale(1.04);
    filter: saturate(1);
}

.discipline__body {
    padding: 1.5rem 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
}

.discipline__num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: var(--text-3);
}

.discipline__title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.discipline__text {
    font-size: 0.92rem;
    color: var(--text-2);
    flex: 1;
}

.discipline__link {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

/* === Proyecto destacado (split) === */
.split {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.split--reverse > .split__media { order: 2; }

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0 1.5rem;
}

.tag-list li {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 0.35rem 0.85rem;
}

.split__text p { color: var(--text-2); }
.split__text p + p { margin-top: 0.8rem; }

.split__text strong {
    color: var(--text);
    font-weight: 500;
}

/* Cita (sobre mí) */
.about-quote {
    margin-top: 1.75rem;
    padding-left: 1.25rem;
    border-left: 2px solid var(--accent);
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text);
}

.split__actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

/* === Fachada de video (click-to-play) === */
.video {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #000;
}

.video__facade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    text-align: left;
}

.video__facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease), opacity var(--t-fast);
    opacity: 0.85;
}

.video__facade:hover img { transform: scale(1.03); opacity: 1; }

.video__facade::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
}

.video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(7, 9, 13, 0.55);
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
    z-index: 1;
}

.video__facade:hover .video__play {
    border-color: var(--accent);
    background: rgba(127, 214, 234, 0.15);
    transform: translate(-50%, -50%) scale(1.06);
}

.video__play svg {
    width: 22px;
    height: 22px;
    fill: #fff;
    margin-left: 3px;
}

.video__caption {
    position: absolute;
    left: 1.1rem;
    bottom: 0.95rem;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* === Tira de fotografía (home) === */
.photostrip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 130px;
    gap: 0.75rem;
}

.photostrip a {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    display: block;
}

.photostrip a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.photostrip a:nth-child(4) { grid-row: span 2; }
.photostrip a:nth-child(6) { grid-column: span 2; }

.photostrip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.photostrip a:hover img {
    transform: scale(1.05);
}

/* === Sobre mí (teaser home + página) === */
.portrait {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
}

.portrait img { width: 100%; }

.facts {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}

.fact__value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    display: block;
}

.fact__label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
}

/* === Contacto === */
.contact { text-align: left; }

.contact__email {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4.5vw, 3.25rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left calc(100% - 2px);
    transition: background-size 0.5s var(--ease), color var(--t-fast);
    display: inline-block;
    word-break: break-all;
}

.contact__email:hover {
    color: var(--accent);
    background-size: 100% 2px;
}

.socials {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2.25rem;
}

.socials a {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-2);
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 0.55rem 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.socials a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

/* === Footer === */
.footer {
    border-top: 1px solid var(--line);
    padding: 2.25rem 0;
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer__logo img { height: 20px; width: auto; opacity: 0.9; }

.footer__note {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.footer__socials { display: flex; gap: 1.25rem; }

.footer__socials a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
    transition: color var(--t-fast);
}

.footer__socials a:hover { color: var(--accent); }

/* === Cabecera de subpágina === */
.pagehead {
    padding: calc(var(--header-h) + clamp(3.5rem, 8vw, 6rem)) 0 clamp(2.5rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
}

.pagehead::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 55% 60% at 20% 0%, rgba(127, 214, 234, 0.07), transparent 70%);
    pointer-events: none;
}

.pagehead__title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.pagehead__lead {
    color: var(--text-2);
    max-width: 56ch;
    margin-top: 1.1rem;
    font-size: 1.05rem;
}

/* === Galería masonry (fotografía) === */
/* Nota: sin opacity/transform dentro de las columnas — los disparadores
   de composición sobre contenido fragmentado causan teselas negras en Chromium */
.gallery {
    columns: 3;
    column-gap: 0.9rem;
}

.gallery__item {
    break-inside: avoid;
    margin-bottom: 0.9rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    display: block;
    cursor: zoom-in;
    transition: border-color var(--t-fast);
}

.gallery__item:hover {
    border-color: var(--line-strong);
}

.gallery__item img {
    width: 100%;
}

/* === Lightbox === */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(4, 5, 8, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-fast), visibility var(--t-fast);
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: min(92vw, 1400px);
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox__btn {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    color: var(--text);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    transition: border-color var(--t-fast), color var(--t-fast);
    background: rgba(7, 9, 13, 0.6);
}

.lightbox__btn:hover { border-color: var(--accent); color: var(--accent); }

.lightbox__close { top: 1.25rem; right: 1.25rem; }
.lightbox__prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

.lightbox__count {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    color: var(--text-3);
}

/* === Listado de trabajos (subpáginas de video/proyectos) === */
.section .container:has(> .work) { counter-reset: work; }

.work {
    counter-increment: work;
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(1.75rem, 4vw, 3rem);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-raise);
    overflow: hidden;
}

.work + .work { margin-top: 1.5rem; }

/* número fantasma editorial */
.work::after {
    content: "0" counter(work);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-family: var(--font-mono);
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    letter-spacing: 0.05em;
    line-height: 1;
    color: rgba(158, 178, 208, 0.08);
    pointer-events: none;
}

/* contraste alterno: paneles pares con tinte cian visible pero elegante */
.work:nth-of-type(even) {
    background: linear-gradient(rgba(127, 214, 234, 0.04), rgba(127, 214, 234, 0.04)), var(--surface);
    border-color: rgba(127, 214, 234, 0.20);
}

.work:nth-of-type(even)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 45% 70% at 100% 0%, rgba(127, 214, 234, 0.07), transparent 65%);
    pointer-events: none;
}

.work__media,
.work__text {
    position: relative;
    z-index: 1;
}

.work__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}

.work__meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.1rem;
}

.work__text p { color: var(--text-2); font-size: 0.95rem; }
.work__text p + p { margin-top: 0.7rem; }

.work__actions {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Tarjeta con imagen (proyectos tipo EHP) */
.work__card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    display: grid;
    place-items: center;
}

.work__card img { max-height: 220px; width: auto; }

/* === CTA final de página === */
.cta {
    text-align: center;
    padding: var(--section-pad);
    border-top: 1px solid var(--line);
}

.cta .section__title { margin-bottom: 1rem; }
.cta p { color: var(--text-2); max-width: 46ch; margin: 0 auto 2rem; }

/* === Animaciones de entrada (solo si hay JS) === */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
}

html.js [data-reveal].visible {
    opacity: 1;
    transform: none;
}

/* === Responsive === */
@media (max-width: 960px) {
    .disciplines { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
    .split,
    .split--reverse,
    .work,
    .work--reverse { grid-template-columns: 1fr; }
    .split--reverse > .split__media,
    .work--reverse > .work__media { order: 0; }
    .gallery { columns: 2; }
    .photostrip { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 110px; }
    .photostrip a:nth-child(1) { grid-column: span 2; }
    .photostrip a:nth-child(6) { grid-column: span 1; }
}

@media (max-width: 760px) {
    .nav__toggle { display: block; }

    .nav__menu {
        position: fixed;
        inset: 0;
        background: rgba(7, 9, 13, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        display: none; /* cerrado: sin caja fuera de pantalla (evita overflow horizontal) */
    }

    .nav__menu.open {
        display: flex;
        animation: menu-in 0.35s var(--ease);
    }

    @keyframes menu-in {
        from { opacity: 0; transform: translateX(2rem); }
        to { opacity: 1; transform: none; }
    }
    .nav__menu .nav__link { font-size: 0.95rem; }

    .nav__cta { display: none; }

    .section__head { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
    .gallery { columns: 1; }
    .facts { gap: 1.75rem; }
}

/* === Movimiento reducido === */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    [data-reveal] { opacity: 1; transform: none; }
}
