/* ============================================================
   NANO VISUALS — Motion Graphic Designer
   Estilos principales
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --color-white: #ffffff;
    --color-black: #0a0a0a;
    --color-dark: #111111;
    --color-dark-2: #1a1a1a;
    --color-gray-900: #161616;
    --color-gray-800: #1f1f1f;
    --color-gray-700: #2a2a2a;
    --color-gray-600: #3a3a3a;
    --color-gray-500: #555555;
    --color-gray-400: #777777;
    --color-gray-300: #999999;
    --color-gray-200: #bbbbbb;
    --color-gray-100: #dddddd;
    --color-gray-50: #f5f5f5;
    --accent: #6c5ce7;
    --accent-light: #8b7cf7;
    --accent-dark: #4a3db5;
    --accent-rgb: 108, 92, 231;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --header-height: 76px;
    --container-max: 1280px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 999px;

    --transition-fast: 0.2s;
    --transition-base: 0.35s;
    --transition-slow: 0.6s;

    --ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray-100);
    background-color: var(--color-black);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection {
    background: rgba(var(--accent-rgb), 0.3);
    color: var(--color-white);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* ---------- Utilidades ---------- */
.accent-text {
    color: var(--accent);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.header.is-scrolled {
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--color-white);
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: opacity var(--transition-fast);
}

.header__logo:hover {
    opacity: 0.85;
}

.header__logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
}

.header__logo-text {
    font-size: 0.95rem;
    letter-spacing: 0.14em;
}

.header__nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header__nav-link {
    position: relative;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-gray-300);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.header__nav-link:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.06);
}

.header__nav-link--active {
    color: var(--color-white);
    background: rgba(var(--accent-rgb), 0.12);
}

.header__nav-link--active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.header__location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-gray-400);
    white-space: nowrap;
}

.header__location-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5);
    animation: pulse-dot 2.4s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
}

.header__burger {
    display: none;
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.header__burger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.header__burger:active {
    transform: scale(0.95);
}

.header__burger span {
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: transform var(--transition-base) var(--ease-premium), opacity var(--transition-base), margin-top var(--transition-base) var(--ease-premium);
}

.header__burger span:nth-child(1) {
    margin-top: -7px;
}

.header__burger span:nth-child(2) {
    margin-top: 0;
}

.header__burger span:nth-child(3) {
    margin-top: 7px;
}

.header__burger.is-open span:nth-child(1) {
    margin-top: 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.header__burger.is-open span:nth-child(2) {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0);
}

.header__burger.is-open span:nth-child(3) {
    margin-top: 0;
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: var(--radius-full);
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform var(--transition-base) var(--ease-premium),
                background var(--transition-base),
                color var(--transition-base),
                box-shadow var(--transition-base),
                border-color var(--transition-base);
    will-change: transform;
}

.btn--primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.5);
}

.btn--primary:active {
    transform: translateY(0) scale(0.98);
}

.btn--secondary {
    background: transparent;
    color: var(--color-white);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.btn--full {
    width: 100%;
}

.btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
}

.btn__arrow {
    font-size: 1.1rem;
    transition: transform var(--transition-base);
}

.btn:hover .btn__arrow {
    transform: translateX(4px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 40px) 24px 80px;
    background: radial-gradient(ellipse at 20% 20%, rgba(var(--accent-rgb), 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
                linear-gradient(180deg, var(--color-black) 0%, var(--color-dark) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    opacity: 0.4;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gray-400);
}

.hero__eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.hero__title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero__title-line {
    display: block;
    opacity: 0;
    transform: translateY(40px);
}

.hero__title-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero__description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-gray-300);
    max-width: 520px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__visual {
    position: relative;
}

.hero__visual-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--color-dark);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero__visual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.05) brightness(0.95);
    transform: scale(1.02);
    transition: transform 1.2s var(--ease-premium);
}

.hero__visual-frame:hover .hero__visual-img {
    transform: scale(1.06);
}

.hero__visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.25) 0%, rgba(10, 10, 10, 0.1) 40%, rgba(10, 10, 10, 0.55) 100%);
    pointer-events: none;
}

.hero__visual-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.12) 0%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    z-index: -1;
}

.hero__visual-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-gray-200);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__visual-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

.hero__scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gray-500);
    opacity: 0;
    animation: fade-in 1s var(--ease-out) 1.4s forwards;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--color-gray-500) 0%, transparent 100%);
    animation: scroll-line 2s infinite;
}

@keyframes scroll-line {
    0% { transform: translateY(-10px); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(20px); opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   SECCIÓN TRABAJOS
   ============================================================ */
.works {
    padding: 120px 24px;
    background: linear-gradient(180deg, var(--color-dark) 0%, var(--color-black) 100%);
}

.works__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}

.works__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gray-500);
}

.works__eyebrow::before,
.works__eyebrow::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.works__title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-white);
    margin-top: 16px;
}

.works__subtitle {
    font-size: 1rem;
    color: var(--color-gray-400);
    line-height: 1.7;
    margin-top: 16px;
}

.works__actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.works__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.work-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-dark-2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: transform var(--transition-base) var(--ease-premium),
                box-shadow var(--transition-base),
                border-color var(--transition-base);
    will-change: transform;
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(var(--accent-rgb), 0.4);
}

.work-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.work-card__thumb {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #111 0%, #222 100%);
    background-size: cover;
    background-position: center;
    transition: transform 0.8s var(--ease-premium);
}

.work-card__thumb.has-thumb {
    background-size: cover;
    background-position: center;
}

.work-card__video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    z-index: 1;
}

.work-card__video-thumb:focus {
    outline: none;
}

.work-card:hover .work-card__thumb {
    transform: scale(1.05);
}

.work-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 3;
    transition: opacity var(--transition-base), transform var(--transition-base), background var(--transition-base);
}

.work-card:hover .work-card__play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
    background: rgba(var(--accent-rgb), 0.85);
}

.work-card__play-icon {
    font-size: 1.1rem;
    color: var(--color-white);
    transform: translateX(2px);
}

.work-card__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.15) 0%, transparent 35%, rgba(10, 10, 10, 0.85) 100%);
    pointer-events: none;
    z-index: 2;
}

.work-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    z-index: 2;
}

.work-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: -0.01em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.work-card__category {
    font-size: 0.8rem;
    color: var(--color-gray-200);
    margin-top: 4px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--color-black);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 64px 24px 32px;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-white);
}

.footer__tagline {
    font-size: 0.9rem;
    color: var(--color-gray-400);
}

.footer__location {
    font-size: 0.85rem;
    color: var(--color-gray-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer__location::before {
    content: '📍';
    font-size: 0.8rem;
}

.footer__social {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer__social-label {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gray-500);
}

.footer__social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer__social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-gray-300);
    text-decoration: none;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.footer__social-link:hover {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.5);
    color: var(--color-white);
    transform: translateY(-2px);
}

.footer__social-link svg {
    flex-shrink: 0;
}

.footer__copyright {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-gray-600);
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    max-width: var(--container-max);
    margin: 0 auto;
}

/* ============================================================
   MODALES
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: visibility 0s 0.4s, opacity 0.4s var(--ease-out);
}

.modal.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: visibility 0s 0s, opacity 0.4s var(--ease-out);
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal__content {
    position: relative;
    z-index: 1;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.5s var(--ease-premium), opacity 0.4s var(--ease-out);
}

.modal.is-open .modal__content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.modal__close:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.5);
    transform: rotate(90deg) scale(1.05);
}

.modal__close span {
    position: relative;
    width: 18px;
    height: 18px;
}

.modal__close span::before,
.modal__close span::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1.5px;
    background: var(--color-white);
    transform-origin: center;
}

.modal__close span::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close span::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* --- Modal Showreel --- */
.modal__content--showreel {
    width: min(92vw, 1280px);
    height: min(90vh, calc(92vw * 9 / 16));
    max-height: 90vh;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

.modal__content--showreel.is-vertical {
    width: min(80vw, 480px);
    height: min(90vh, calc(80vw * 16 / 9));
    max-height: 90vh;
}

.modal__content--showreel.is-square {
    width: min(80vw, 720px);
    height: min(90vh, 80vw);
    max-height: 90vh;
}

.showreel__player {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.showreel__video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.showreel__loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #000;
    z-index: 3;
}

.showreel__loading-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.showreel__loading p {
    font-size: 0.85rem;
    color: var(--color-gray-400);
    letter-spacing: 0.08em;
}

.showreel__error {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #000;
    z-index: 3;
    text-align: center;
    padding: 24px;
}

.showreel__error p {
    font-size: 1rem;
    color: var(--color-gray-300);
}

.showreel__error-hint {
    font-size: 0.85rem;
    color: var(--color-gray-500);
}

.showreel__error code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent-light);
}

.showreel__counter {
    position: absolute;
    bottom: 16px;
    right: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-gray-400);
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    z-index: 4;
}

/* --- Controles de sonido del Showreel --- */
.showreel__controls {
    position: absolute;
    bottom: 16px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 4;
}

.showreel__mute-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-gray-200);
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.showreel__mute-btn:hover {
    background: rgba(var(--accent-rgb), 0.3);
    border-color: rgba(var(--accent-rgb), 0.6);
    color: var(--color-white);
    transform: scale(1.05);
}

.showreel__mute-icon {
    display: none;
}

.showreel__mute-btn:not(.is-muted) .showreel__mute-icon--on {
    display: block;
}

.showreel__mute-btn.is-muted .showreel__mute-icon--off {
    display: block;
}

.showreel__volume-wrap {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    padding: 6px 12px;
    transition: border-color var(--transition-base), background var(--transition-base);
}

.showreel__volume-wrap:hover {
    border-color: rgba(var(--accent-rgb), 0.5);
    background: rgba(0, 0, 0, 0.75);
}

.showreel__volume {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    transition: background var(--transition-base);
}

.showreel__volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-light);
    border: 2px solid var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.showreel__volume::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--accent);
}

.showreel__volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-light);
    border: 2px solid var(--color-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.showreel__volume::-moz-range-track {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

/* --- Modal Proyecto --- */
.modal__content--project {
    width: min(92vw, 1100px);
    max-height: 90vh;
    background: var(--color-black);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

.modal__content--project.is-vertical {
    width: min(80vw, 480px);
    max-height: 90vh;
}

.modal__content--project.is-square {
    width: min(80vw, 720px);
    max-height: 90vh;
}

.project__player {
    position: relative;
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0;
}

.project__video {
    width: 100%;
    height: 100%;
    max-height: calc(90vh - 100px);
    object-fit: contain;
    background: #000;
}

.project__loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: #000;
    z-index: 3;
}

.project__loading p {
    font-size: 0.85rem;
    color: var(--color-gray-400);
}

.project__error {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #000;
    z-index: 3;
    text-align: center;
    padding: 24px;
}

.project__error p {
    font-size: 1rem;
    color: var(--color-gray-300);
}

.project__info {
    padding: 20px 24px;
    background: var(--color-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.project__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-white);
}

.project__category {
    font-size: 0.85rem;
    color: var(--color-gray-400);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ============================================================
   PÁGINA SOBRE MÍ
   ============================================================ */
.about {
    padding: calc(var(--header-height) + 60px) 24px 100px;
    background: radial-gradient(ellipse at 80% 20%, rgba(var(--accent-rgb), 0.06) 0%, transparent 50%),
                linear-gradient(180deg, var(--color-black) 0%, var(--color-dark) 100%);
}

.about__grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
    align-items: start;
    max-width: var(--container-max);
    margin: 0 auto;
}

.about__visual {
    position: sticky;
    top: calc(var(--header-height) + 40px);
}

.about__visual-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--color-dark);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.about__visual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.05) brightness(0.95);
}

.about__visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.2) 0%, rgba(10, 10, 10, 0.1) 40%, rgba(10, 10, 10, 0.5) 100%);
    pointer-events: none;
}

.about__visual-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.1) 0%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    z-index: -1;
}

.about__content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.about__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gray-500);
}

.about__eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.about__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.about__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--color-gray-300);
}

.about__text strong {
    color: var(--color-white);
    font-weight: 600;
}

.about__tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.about__tool {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-gray-300);
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.about__tool:hover {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--color-white);
    transform: translateY(-2px);
}

.about__cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================================
   PÁGINA CONTACTO
   ============================================================ */
.contact {
    padding: calc(var(--header-height) + 60px) 24px 100px;
    background: radial-gradient(ellipse at 20% 20%, rgba(var(--accent-rgb), 0.06) 0%, transparent 50%),
                linear-gradient(180deg, var(--color-black) 0%, var(--color-dark) 100%);
}

.contact__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}

.contact__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gray-500);
}

.contact__eyebrow::before,
.contact__eyebrow::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.contact__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-white);
    margin-top: 16px;
}

.contact__subtitle {
    font-size: 1rem;
    color: var(--color-gray-400);
    line-height: 1.7;
    margin-top: 16px;
}

.contact__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: start;
    max-width: var(--container-max);
    margin: 0 auto;
}

.contact__form-wrap {
    background: var(--color-dark-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact__label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-gray-400);
}

.contact__input,
.contact__textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-white);
    font-size: 0.95rem;
    transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.contact__input::placeholder,
.contact__textarea::placeholder {
    color: var(--color-gray-500);
}

.contact__input:focus,
.contact__textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.06);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.contact__textarea {
    resize: vertical;
    min-height: 120px;
}

.contact__submit {
    margin-top: 8px;
}

.contact__form-status {
    font-size: 0.9rem;
    color: var(--color-gray-400);
    text-align: center;
    min-height: 20px;
}

.contact__form-status.is-success {
    color: #4ade80;
}

.contact__form-status.is-error {
    color: #f87171;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact__info-label {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-gray-500);
}

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    transition: background var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.contact__info-item:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.35);
    transform: translateX(4px);
}

.contact__info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    color: var(--color-gray-300);
    transition: background var(--transition-base), color var(--transition-base);
}

.contact__info-item:hover .contact__info-icon {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-light);
}

.contact__info-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.contact__info-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gray-200);
}

.contact__info-value {
    font-size: 0.95rem;
    color: var(--color-white);
}

/* ============================================================
   ANIMACIONES GSAP (estado inicial)
   ============================================================ */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.hero__reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- Pantallas grandes (1440px+) --- */
@media (min-width: 1440px) {
    :root {
        --container-max: 1400px;
    }

    .hero__grid {
        gap: 80px;
    }

    .works__grid {
        gap: 32px;
    }

    .hero__title {
        font-size: clamp(4rem, 6vw, 6rem);
    }
}

/* --- Tablet / Desktop pequeño (max 1024px) --- */
@media (max-width: 1024px) {
    .header__nav {
        display: none;
    }

    .header__location {
        display: none;
    }

    .header__burger {
        display: flex;
        z-index: 1001;
    }

    /* Menú móvil fullscreen independiente */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background: rgba(10, 10, 10, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.4s var(--ease-out), visibility 0s 0.4s;
    }

    .mobile-menu.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity 0.4s var(--ease-out), visibility 0s 0s;
    }

    .mobile-menu__nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
        max-width: 400px;
        padding: 24px;
    }

    .mobile-menu__link {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--color-gray-300);
        text-decoration: none;
        padding: 14px 28px;
        width: 100%;
        text-align: center;
        border-radius: var(--radius-sm);
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-premium), color var(--transition-fast), background var(--transition-fast);
    }

    .mobile-menu.is-open .mobile-menu__link {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-menu.is-open .mobile-menu__link:nth-child(1) {
        transition-delay: 0.08s;
    }

    .mobile-menu.is-open .mobile-menu__link:nth-child(2) {
        transition-delay: 0.14s;
    }

    .mobile-menu.is-open .mobile-menu__link:nth-child(3) {
        transition-delay: 0.2s;
    }

    .mobile-menu.is-open .mobile-menu__link:nth-child(4) {
        transition-delay: 0.26s;
    }

    .mobile-menu__link:hover {
        color: var(--color-white);
        background: rgba(255, 255, 255, 0.06);
    }

    .hero__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero__content {
        text-align: left;
    }

    .hero__visual {
        max-width: 480px;
        margin: 0 auto;
    }

    .works__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about__visual {
        position: static;
        max-width: 420px;
        margin: 0 auto;
    }

    .contact__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer__container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .modal__content--showreel {
        width: min(94vw, 1100px);
    }

    .modal__content--project {
        width: min(94vw, 900px);
    }
}

/* --- Mobile / Tablet (max 768px) --- */
@media (max-width: 768px) {
    .mobile-menu__link {
        font-size: 1.15rem;
        padding: 12px 20px;
    }

    .hero {
        padding: calc(var(--header-height) + 24px) 20px 60px;
    }

    .hero__title {
        font-size: clamp(2.4rem, 9vw, 3.6rem);
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
    }

    .works {
        padding: 80px 20px;
    }

    .works__grid {
        grid-template-columns: 1fr;
    }

    .work-card__play {
        opacity: 1;
    }

    .about {
        padding: calc(var(--header-height) + 40px) 20px 80px;
    }

    .contact {
        padding: calc(var(--header-height) + 40px) 20px 80px;
    }

    .contact__form-wrap {
        padding: 28px;
    }

    .footer {
        padding: 48px 20px 24px;
    }

    .footer__social-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer__social-link {
        width: 100%;
        justify-content: flex-start;
    }

    /* Modales en tablet */
    .modal__content--showreel,
    .modal__content--project {
        width: 96vw;
        max-height: 85vh;
    }

    .modal__content--showreel {
        height: min(85vh, calc(96vw * 9 / 16));
    }

    .modal__content--showreel.is-vertical,
    .modal__content--project.is-vertical {
        width: min(70vw, 420px);
    }

    .modal__content--showreel.is-vertical {
        height: min(85vh, calc(70vw * 16 / 9));
    }

    .modal__content--showreel.is-square,
    .modal__content--project.is-square {
        width: min(80vw, 600px);
    }

    .modal__content--showreel.is-square {
        height: min(85vh, 80vw);
    }

    .showreel__controls {
        bottom: 12px;
        left: 12px;
    }

    .showreel__counter {
        bottom: 12px;
        right: 12px;
    }

    /* Separar claramente la X de cierre de los controles en móviles */
    .modal__close {
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }

    .showreel__controls {
        bottom: 16px;
        left: 16px;
        gap: 8px;
    }

    .showreel__counter {
        bottom: 16px;
        right: 16px;
    }
}

/* --- Mobile pequeño (max 480px) --- */
@media (max-width: 480px) {
    .hero__title {
        font-size: 2.2rem;
    }

    .hero__description {
        font-size: 0.95rem;
    }

    .works__title {
        font-size: 1.8rem;
    }

    .contact__title {
        font-size: 1.8rem;
    }

    .about__title {
        font-size: 1.4rem;
    }

    .modal__close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }

    .showreel__counter {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .showreel__volume {
        width: 60px;
    }

    .showreel__mute-btn {
        width: 36px;
        height: 36px;
    }

    .showreel__controls {
        gap: 6px;
    }

    .works__actions .btn {
        width: 100%;
        max-width: 320px;
    }

    /* Ajuste fino para pantallas pequeñas: más separación entre X y controles */
    .modal__close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }

    .showreel__controls {
        bottom: 14px;
        left: 14px;
    }

    .showreel__counter {
        bottom: 14px;
        right: 14px;
    }
}

/* --- Mobile muy pequeño (max 360px) --- */
@media (max-width: 360px) {
    .hero__title {
        font-size: 1.9rem;
    }

    .hero__description {
        font-size: 0.9rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.82rem;
    }

    .works__title {
        font-size: 1.6rem;
    }

    .work-card__title {
        font-size: 1rem;
    }

    .work-card__category {
        font-size: 0.72rem;
    }

    .modal__content--showreel.is-vertical,
    .modal__content--project.is-vertical {
        width: 88vw;
    }

    .modal__content--showreel.is-square,
    .modal__content--project.is-square {
        width: 92vw;
    }

    .showreel__volume-wrap {
        padding: 4px 8px;
    }

    .showreel__volume {
        width: 48px;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}