
/* ==========================================
   YEANMIT STUDIOS
   Creative, playful & a little unusual.
   ========================================== */

:root {
    --cream: #fff8e9;
    --paper: #fffdf7;
    --ink: #25233a;
    --muted: #716c7e;

    --purple: #8060dc;
    --purple-light: #e8ddff;
    --coral: #ff806f;
    --yellow: #ffcf57;
    --blue: #8dd8f2;
    --green: #bde9bb;

    --border: #29263a;
    --shadow: 5px 5px 0 var(--border);

    --container: 1120px;
    --radius: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 95px;
}

body {
    background: var(--cream);
    color: var(--ink);

    font-family:
        "Trebuchet MS",
        "Segoe UI",
        sans-serif;

    font-size: 15px;
    line-height: 1.7;

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--yellow);
    color: var(--ink);
}

.container {
    width: min(var(--container), calc(100% - 44px));
    margin-inline: auto;
}

.section-space {
    padding-block: 90px;
}


/* ==========================================
   CABECERA
   ========================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 248, 233, 0.94);
    border-bottom: 2px solid var(--border);

    backdrop-filter: blur(12px);
}

.header-content {
    min-height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    flex-shrink: 0;
}

.brand-logo {
    width: 43px;
    height: 43px;

    object-fit: contain;

    transition: transform 250ms ease;
}

.brand:hover .brand-logo {
    transform: rotate(-7deg) scale(1.07);
}

.brand-name {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.6px;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 7px;
}

.nav-link {
    padding: 9px 12px;

    border: 2px solid transparent;
    border-radius: 10px;

    font-size: 12px;
    font-weight: 800;

    transition:
        background 180ms ease,
        transform 180ms ease,
        border-color 180ms ease;
}

.nav-link:hover {
    background: white;
    border-color: var(--border);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--yellow);
    border-color: var(--border);
}

.nav-link.active::after {
    display: none;
}

.nav-contact {
    background: var(--purple);
    color: white;
    border-color: var(--border);
}

.nav-contact:hover {
    background: var(--coral);
    color: var(--ink);
}

.nav-contact span {
    font-size: 15px;
}


/* Menú móvil */

.menu-toggle {
    display: none;

    width: 43px;
    height: 43px;

    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;

    background: var(--yellow);
    border: 2px solid var(--border);
    border-radius: 12px;

    box-shadow: 3px 3px 0 var(--border);
    cursor: pointer;
}

.menu-toggle span {
    width: 18px;
    height: 2px;

    background: var(--ink);
    border-radius: 4px;

    transition: transform 180ms ease;
}

.menu-toggle.open span:first-child {
    transform: translateY(4px) rotate(45deg);
}

.menu-toggle.open span:last-child {
    transform: translateY(-4px) rotate(-45deg);
}


/* ==========================================
   BANNER PRINCIPAL
   ========================================== */

.hero {
    position: relative;
    isolation: isolate;

    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 35px;

    min-height: 430px;

    margin-top: 35px;
    margin-bottom: 40px;
    padding: 55px 50px;

    overflow: hidden;

    background: var(--purple-light);
    border: 2px solid var(--border);
    border-radius: 28px;

    box-shadow: 7px 7px 0 var(--border);
}

/* Formas decorativas del banner */

.hero::before {
    content: "";

    position: absolute;
    z-index: -1;

    width: 260px;
    height: 260px;

    top: -145px;
    right: 150px;

    border-radius: 43% 57% 62% 38%;
    background: var(--yellow);

    transform: rotate(25deg);
}

.hero::after {
    content: "";

    position: absolute;
    z-index: -1;

    width: 175px;
    height: 175px;

    bottom: -115px;
    left: 35%;

    border-radius: 50%;
    background: var(--coral);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    max-width: 600px;

    font-size: clamp(39px, 5vw, 59px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -2.7px;
}

.hero h1 span {
    display: block;

    width: fit-content;
    margin-top: 7px;
    padding: 2px 8px 7px;

    background: var(--yellow);
    border: 2px solid var(--border);
    border-radius: 9px;

    transform: rotate(-1.5deg);
}

.hero-description {
    max-width: 440px;

    margin-top: 23px;

    color: #504a65;

    font-size: 14px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 28px;
}


/* Botones con aspecto de pegatina */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 46px;
    padding: 10px 17px;

    border: 2px solid var(--border);
    border-radius: 11px;

    font-size: 12px;
    font-weight: 900;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.button:hover {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.button-primary {
    background: var(--coral);
    box-shadow: 4px 4px 0 var(--border);
}

.button-primary:hover {
    background: var(--yellow);
}

.button-primary span {
    font-size: 16px;
}

.button-secondary {
    background: var(--paper);
    box-shadow: 4px 4px 0 var(--border);
}

.button-secondary:hover {
    background: var(--blue);
}


/* Logo en el banner */

.hero-visual {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 270px;
}

/* Tarjeta ligeramente inclinada */

.hero-logo-frame {
    position: relative;

    display: grid;
    place-items: center;

    width: min(100%, 285px);
    aspect-ratio: 1;

    padding: 25px;

    background: var(--paper);
    border: 2px solid var(--border);
    border-radius: 48% 44% 46% 43%;

    box-shadow: 7px 7px 0 var(--border);

    transform: rotate(3deg);
    transition: transform 250ms ease;
}

.hero-logo-frame:hover {
    transform: rotate(0deg) scale(1.035);
}

.hero-logo {
    width: 85%;
    height: 85%;

    object-fit: contain;
}

/* Etiqueta debajo del logo */

.visual-caption {
    margin-top: 25px;
    padding: 7px 13px;

    background: var(--yellow);
    border: 2px solid var(--border);
    border-radius: 8px;

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;

    transform: rotate(-2deg);
}


/* ==========================================
   TÍTULOS DE SECCIÓN
   ========================================== */

.section-number {
    display: inline-block;

    margin-bottom: 13px;

    color: var(--purple);

    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.section-intro h2,
.section-heading h2 {
    font-size: clamp(28px, 4vw, 39px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -1.6px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;

    margin-bottom: 35px;
}

.section-heading > p {
    max-width: 365px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.9;
}


/* ==========================================
   ACERCA DE
   ========================================== */

.about {
    position: relative;

    background: var(--paper);
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.about-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 70px;
}

.about-text p {
    margin-bottom: 18px;

    color: #575166;

    font-size: 14px;
    line-height: 2;
}

.about-text .placeholder-note {
    margin-top: 25px;
    margin-bottom: 0;
    padding: 17px 19px;

    background: var(--green);
    border: 2px solid var(--border);
    border-radius: 12px;

    color: var(--ink);
    font-weight: 800;

    box-shadow: 4px 4px 0 var(--border);

    transform: rotate(-0.7deg);
}


/* ==========================================
   ÁREAS DE TRABAJO
   ========================================== */

.work {
    background: var(--cream);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.work-card {
    position: relative;

    min-width: 0;
    min-height: 290px;

    padding: 25px 22px;

    border: 2px solid var(--border);
    border-radius: 19px;

    box-shadow: 5px 5px 0 var(--border);

    transition:
        transform 200ms ease,
        box-shadow 200ms ease;
}

/* Cada tarjeta tiene su propia personalidad */

.work-card:nth-child(1) {
    background: var(--blue);
    transform: rotate(-1deg);
}

.work-card:nth-child(2) {
    background: var(--coral);
    transform: rotate(1deg);
}

.work-card:nth-child(3) {
    background: var(--yellow);
    transform: rotate(-0.5deg);
}

.work-card:hover {
    z-index: 2;

    transform: translateY(-7px) rotate(0deg);
    box-shadow: 8px 10px 0 var(--border);
}

.work-index {
    position: absolute;
    top: 17px;
    right: 18px;

    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    background: var(--paper);
    border: 2px solid var(--border);
    border-radius: 50%;

    font-size: 10px;
    font-weight: 900;
}

.work-icon {
    display: grid;
    place-items: center;

    width: 49px;
    height: 49px;

    margin-bottom: 25px;

    background: var(--paper);
    border: 2px solid var(--border);
    border-radius: 14px;

    font-size: 20px;
    font-weight: 900;

    box-shadow: 3px 3px 0 var(--border);

    transform: rotate(-4deg);
}

.work-card h3 {
    margin-bottom: 10px;

    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.work-card p {
    font-size: 12px;
    line-height: 1.9;
}

.work-footer {
    display: block;

    margin-top: 20px;
    padding-top: 13px;

    border-top: 2px dashed rgba(37, 35, 58, 0.35);

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.7px;
}


/* ==========================================
   PROYECTOS
   ========================================== */

.projects {
    background: var(--purple-light);
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
}

.project-list {
    display: grid;
    gap: 17px;
}

.project-item {
    display: grid;
    grid-template-columns: 145px 1fr 45px;
    align-items: center;
    gap: 25px;

    padding: 24px;

    background: var(--paper);
    border: 2px solid var(--border);
    border-radius: 15px;

    box-shadow: 4px 4px 0 var(--border);

    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.project-item:hover {
    transform: translate(-2px, -3px);
    box-shadow: 7px 7px 0 var(--border);
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;

    font-size: 9px;
    font-weight: 900;
}

.project-meta span:last-child {
    color: var(--purple);
}

.project-info h3 {
    margin-bottom: 7px;

    font-size: 17px;
    font-weight: 900;
}

.project-info p {
    color: var(--muted);

    font-size: 12px;
    line-height: 1.9;
}

.project-link {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    background: var(--yellow);
    border: 2px solid var(--border);
    border-radius: 12px;

    box-shadow: 3px 3px 0 var(--border);

    font-size: 18px;
    font-weight: 900;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.project-link:hover {
    transform: translate(2px, 2px) rotate(5deg);
    box-shadow: none;
}

.projects-note {
    margin-top: 27px;

    color: #625879;

    font-size: 12px;
    font-weight: 700;
}


/* ==========================================
   CONTACTO
   ========================================== */

.contact {
    background: var(--cream);
}

.contact-panel {
    position: relative;
    isolation: isolate;

    padding: 50px;

    overflow: hidden;

    background: var(--yellow);
    border: 2px solid var(--border);
    border-radius: 24px;

    box-shadow: 6px 6px 0 var(--border);
}

.contact-panel::after {
    content: "✳";

    position: absolute;
    z-index: -1;

    top: -45px;
    right: 30px;

    color: rgba(255, 255, 255, 0.55);

    font-size: 190px;
    line-height: 1;

    transform: rotate(15deg);
}

.contact-panel .section-number {
    color: #6650ad;
}

.contact-panel h2 {
    max-width: 650px;

    font-size: clamp(30px, 4vw, 45px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -1.7px;
}

.contact-panel > p {
    max-width: 570px;

    margin-block: 20px 27px;

    color: #51482f;

    font-size: 13px;
    line-height: 1.9;
}

.contact-panel .button-primary {
    background: var(--coral);
}


/* ==========================================
   PIE DE PÁGINA
   ========================================== */

.site-footer {
    background: var(--ink);
    color: var(--paper);
    border-top: 2px solid var(--border);
}

.footer-content {
    min-height: 95px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;

    padding-block: 20px;
}

.footer-brand .brand-name {
    color: white;
}

.footer-brand .brand-logo {
    width: 35px;
    height: 35px;
}

.copyright {
    color: #d2ccdf;
    font-size: 11px;
    font-weight: 700;
}


/* ==========================================
   ANIMACIONES SUAVES
   ========================================== */

@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: appear 500ms ease both;
    }

    .hero-visual {
        animation: appear 650ms 100ms ease both;
    }

    @keyframes appear {
        from {
            opacity: 0;
            transform: translateY(12px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}


/* ==========================================
   TABLETAS
   ========================================== */

@media (max-width: 900px) {
    .header-content {
        gap: 12px;
    }

    .brand-name {
        font-size: 14px;
    }

    .navigation {
        gap: 2px;
    }

    .nav-link {
        padding-inline: 8px;
        font-size: 10px;
    }

    .hero {
        gap: 20px;
        padding: 40px 30px;
    }

    .hero h1 {
        font-size: clamp(37px, 5vw, 48px);
    }

    .hero-logo-frame {
        width: min(100%, 240px);
    }

    .about-layout {
        gap: 35px;
    }

    .work-grid {
        gap: 14px;
    }

    .work-card {
        padding-inline: 17px;
    }

    .project-item {
        grid-template-columns: 115px 1fr 42px;
        gap: 16px;
    }
}


/* ==========================================
   MÓVILES
   ========================================== */

@media (max-width: 680px) {
    .container {
        width: calc(100% - 32px);
    }

    .section-space {
        padding-block: 65px;
    }

    /* Cabecera */

    .header-content {
        min-height: 70px;
    }

    .brand-logo {
        width: 37px;
        height: 37px;
    }

    .brand-name {
        font-size: 14px;
    }

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .navigation {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px;
        right: 16px;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;

        padding: 12px;

        background: var(--paper);
        border: 2px solid var(--border);
        border-radius: 16px;

        box-shadow: 5px 5px 0 var(--border);

        visibility: hidden;
        opacity: 0;
        pointer-events: none;

        transform: translateY(-6px);

        transition:
            opacity 180ms ease,
            transform 180ms ease,
            visibility 180ms ease;
    }

    .navigation.open {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-link {
        padding: 12px;
        font-size: 12px;
    }

    .nav-link.active::after {
        display: none;
    }

    /* Banner */

    .hero {
        grid-template-columns: 1fr;
        gap: 25px;

        min-height: auto;

        margin-top: 20px;
        margin-bottom: 30px;
        padding: 35px 23px 30px;

        border-radius: 22px;
        box-shadow: 5px 5px 0 var(--border);
    }

    .hero::before {
        width: 180px;
        height: 180px;
        right: -60px;
        top: -100px;
    }

    .hero::after {
        width: 110px;
        height: 110px;
        left: 65%;
        bottom: -75px;
    }

    .hero h1 {
        font-size: clamp(37px, 9.5vw, 49px);
        letter-spacing: -2px;
    }

    .hero h1 span {
        max-width: 100%;
        margin-top: 9px;
    }

    .hero-description {
        font-size: 13px;
    }

    .hero-actions {
        gap: 12px;
        margin-top: 23px;
    }

    .button {
        font-size: 11px;
        padding-inline: 12px;
    }

    .hero-visual {
        min-height: auto;
        padding-top: 8px;
    }

    .hero-logo-frame {
        width: min(75%, 220px);
    }

    .visual-caption {
        margin-top: 19px;
        font-size: 9px;
    }

    /* Títulos */

    .section-intro h2,
    .section-heading h2 {
        font-size: 30px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 27px;
    }

    .section-heading > p {
        font-size: 12px;
    }

    /* Acerca de */

    .about-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-text p {
        font-size: 13px;
    }

    /* Tarjetas */

    .work-grid {
        grid-template-columns: 1fr;
        gap: 19px;
    }

    .work-card {
        min-height: auto;
        padding: 23px;
    }

    .work-card:nth-child(1) {
        margin-right: 8px;
    }

    .work-card:nth-child(2) {
        margin-left: 8px;
    }

    .work-card:nth-child(3) {
        margin-right: 5px;
    }

    .work-card h3 {
        font-size: 19px;
    }

    .work-card p {
        max-width: 400px;
        font-size: 13px;
    }

    /* Proyectos */

    .project-item {
        grid-template-columns: 1fr 40px;
        gap: 13px;
        padding: 20px;
    }

    .project-meta {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .project-info h3 {
        font-size: 16px;
    }

    .project-info p {
        font-size: 12px;
    }

    .project-link {
        grid-column: 2;
        grid-row: 2;
        width: 38px;
        height: 38px;
    }

    /* Contacto */

    .contact-panel {
        padding: 32px 23px;
    }

    .contact-panel h2 {
        font-size: 31px;
    }

    .contact-panel::after {
        top: -20px;
        right: -30px;
        font-size: 130px;
    }

    /* Pie */

    .footer-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        padding-block: 24px;
    }
}


/* ==========================================
   MÓVILES PEQUEÑOS
   ========================================== */

@media (max-width: 380px) {
    .container {
        width: calc(100% - 26px);
    }

    .brand-name {
        font-size: 13px;
    }

    .hero {
        padding-inline: 18px;
    }

    .hero h1 {
        font-size: 35px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        justify-content: space-between;
    }

    .contact-panel {
        padding-inline: 18px;
    }

    .contact-panel h2 {
        font-size: 27px;
    }
}


/* ==========================================
   ACCESIBILIDAD
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
}


/* =========================================
   ANIMACIONES: LOGO Y MENÚ
   Yeanmit Studios
   ========================================= */

/* 1. LOGO DEL ENCABEZADO
   Flota suavemente sin perder su identidad. */

.brand img {
    transform-origin: center;
    animation: logoEntrada 900ms cubic-bezier(.2, 1.5, .5, 1) both,
               logoFlotante 4s ease-in-out 900ms infinite;
    transition: filter 250ms ease;
}

@keyframes logoEntrada {
    from {
        opacity: 0;
        transform: translateY(-24px) rotate(-12deg) scale(.65);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(0) scale(1);
    }
}

@keyframes logoFlotante {
    0%, 100% {
        translate: 0 0;
        rotate: 0deg;
    }
    50% {
        translate: 0 -4px;
        rotate: 1.5deg;
    }
}

.brand:hover img {
    animation: logoSalto 550ms cubic-bezier(.2, 1.8, .5, 1);
    filter: saturate(1.2);
}

@keyframes logoSalto {
    0%   { transform: scale(1) rotate(0); }
    35%  { transform: scale(1.18) rotate(-9deg); }
    65%  { transform: scale(.94) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}


/* 2. LOGO PRINCIPAL DEL BANNER
   Una entrada con rebote y flotación posterior. */

.hero-logo {
    transform-origin: center;
    animation: logoBannerEntrada 1.1s cubic-bezier(.16, 1.4, .4, 1) both,
               logoBannerFlotante 5s ease-in-out 1.1s infinite;
}

@keyframes logoBannerEntrada {
    0% {
        opacity: 0;
        transform: translateY(45px) rotate(12deg) scale(.55);
    }
    70% {
        opacity: 1;
        transform: translateY(-8px) rotate(-3deg) scale(1.06);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0) scale(1);
    }
}

@keyframes logoBannerFlotante {
    0%, 100% {
        translate: 0 0;
        rotate: 0deg;
    }
    50% {
        translate: 0 -9px;
        rotate: -2deg;
    }
}

.hero-logo-frame {
    animation: marcoEntrada 800ms ease-out both;
    transition: box-shadow 250ms ease, rotate 250ms ease;
}

@keyframes marcoEntrada {
    from {
        opacity: 0;
        scale: .85;
    }
    to {
        opacity: 1;
        scale: 1;
    }
}

.hero-logo-frame:hover {
    rotate: 2deg;
    box-shadow: 10px 12px 0 #25233a;
}


/* 3. MENÚ DE NAVEGACIÓN
   Los enlaces entran uno tras otro. */

.navigation a {
    position: relative;
    display: inline-block;
    transform-origin: center bottom;
    transition:
        color 200ms ease,
        background-color 200ms ease,
        transform 250ms cubic-bezier(.2, 1.5, .5, 1),
        box-shadow 250ms ease;
    animation: enlaceEntrada 650ms cubic-bezier(.2, 1.3, .4, 1) both;
}

.navigation a:nth-child(1) { animation-delay: 100ms; }
.navigation a:nth-child(2) { animation-delay: 180ms; }
.navigation a:nth-child(3) { animation-delay: 260ms; }
.navigation a:nth-child(4) { animation-delay: 340ms; }
.navigation a:nth-child(5) { animation-delay: 420ms; }

@keyframes enlaceEntrada {
    from {
        opacity: 0;
        translate: 0 -12px;
        rotate: -4deg;
    }
    to {
        opacity: 1;
        translate: 0 0;
        rotate: 0;
    }
}

.navigation a:hover {
    transform: translateY(-4px) rotate(-2deg) scale(1.04);
}

.navigation a:active {
    transform: translateY(1px) scale(.96);
    transition-duration: 100ms;
}


/* 4. BOTÓN DEL MENÚ MÓVIL
   Un pequeño rebote al pulsarlo. */

#menuToggle {
    transition:
        transform 250ms cubic-bezier(.2, 1.6, .5, 1),
        background-color 200ms ease,
        box-shadow 200ms ease;
}

#menuToggle:hover {
    transform: rotate(-5deg) scale(1.08);
}

#menuToggle:active {
    transform: rotate(5deg) scale(.92);
}

#menuToggle.open {
    transform: rotate(90deg);
}


/* 5. MENÚ DESPLEGABLE EN MÓVILES
   Compatible con la clase .open del JavaScript actual. */

@media (max-width: 760px) {
    .navigation {
        transform-origin: top right;
    }

    .navigation.open {
        animation: menuDesplegar 350ms cubic-bezier(.2, 1.3, .4, 1) both;
    }

    .navigation.open a {
        animation: enlaceMovil 400ms cubic-bezier(.2, 1.3, .4, 1) both;
    }

    .navigation.open a:nth-child(1) { animation-delay: 30ms; }
    .navigation.open a:nth-child(2) { animation-delay: 80ms; }
    .navigation.open a:nth-child(3) { animation-delay: 130ms; }
    .navigation.open a:nth-child(4) { animation-delay: 180ms; }
    .navigation.open a:nth-child(5) { animation-delay: 230ms; }

    @keyframes menuDesplegar {
        from {
            opacity: 0;
            transform: translateY(-10px) scaleY(.85);
        }
        to {
            opacity: 1;
            transform: translateY(0) scaleY(1);
        }
    }

    @keyframes enlaceMovil {
        from {
            opacity: 0;
            translate: 12px 0;
        }
        to {
            opacity: 1;
            translate: 0 0;
        }
    }
}


/* 6. ACCESIBILIDAD
   Respetamos la preferencia de movimiento reducido. */

@media (prefers-reduced-motion: reduce) {
    .brand img,
    .hero-logo,
    .hero-logo-frame,
    .navigation a,
    #menuToggle,
    .navigation.open,
    .navigation.open a {
        animation: none !important;
        transition: none !important;
    }
}
