:root {
    --bg: #f5f4f0;
    --text: #0d0d0d;
    --text-invert: #ffffff;
    --card: #ffffff;
    --gray: #666666;
    --red: #ff3131;
    --border: rgba(0, 0, 0, 0.12);
    --project-bg: #0d0d0d;
    --project-card: #1b1b1f;
}

body.dark {
    --bg: #0d0d0d;
    --text: #ffffff;
    --text-invert: #0d0d0d;
    --card: #171717;
    --gray: #b8b8b8;
    --border: rgba(255, 255, 255, 0.14);
    --project-bg: #f5f4f0;
    --project-card: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    font-family: "Inter", sans-serif;
    transition: background 0.45s ease, color 0.45s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1440px, calc(100% - 72px));
    margin: 0 auto;
}

/* HEADER */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 34px 0;
    pointer-events: none;
    animation: navDrop 0.9s ease forwards;
}

.header .container {
    pointer-events: auto;
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.brand-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--text);
    position: relative;
    transition: 0.35s ease;
}

.brand:hover .brand-icon {
    transform: rotate(8deg) scale(1.04);
}

.brand-icon::before {
    content: "";
    width: 34px;
    height: 26px;
    border: 3px dashed var(--text-invert);
    border-radius: 10px;
    position: absolute;
    left: 18px;
    top: 24px;
}

.brand-icon::after {
    content: "✦";
    color: var(--text-invert);
    position: absolute;
    top: 16px;
    right: 17px;
    font-size: 14px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.theme-toggle {
    width: 52px;
    height: 52px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 30px;
    cursor: pointer;
    transition: 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(-18deg) scale(1.1);
}

.quote-btn {
    height: 70px;
    padding: 0 42px;
    border: 2px solid var(--text);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.04em;
    transition: 0.25s ease;
}

.quote-btn:hover {
    background: var(--text);
    color: var(--text-invert);
    transform: translateY(-3px);
}

.menu {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    transition: 0.3s ease;
}

.menu:hover {
    transform: rotate(8deg) scale(1.05);
}

.menu span {
    width: 32px;
    height: 3px;
    border-radius: 999px;
    background: var(--text-invert);
}

.menu {
    border: 0;
    cursor: pointer;
    padding: 0;
    color: inherit;
    position: relative;
    z-index: 1002;
}

.menu.is-active span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.menu.is-active span:nth-child(2) {
    transform: translateY(-5.5px) rotate(-45deg);
}

.compact-menu {
    position: fixed;
    top: 112px;
    right: max(36px, calc((100vw - 1440px) / 2 + 36px));
    width: min(320px, calc(100vw - 40px));
    z-index: 1000;
    background: var(--text);
    color: var(--text-invert);
    border-radius: 34px;
    padding: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translate(16px, -24px) scale(0.15);
    transform-origin: top right;
    clip-path: circle(12% at 88% 0%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    transition:
        transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        clip-path 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

.compact-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
    clip-path: circle(150% at 88% 0%);
    border-radius: 34px;
}

.compact-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}

.compact-menu-link {
    font-family: "Space Grotesk", sans-serif;
    font-size: 38px;
    line-height: 0.92;
    letter-spacing: -0.075em;
    font-weight: 700;
    padding: 18px 18px;
    border-radius: 22px;
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.45s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.25s ease,
        color 0.25s ease;
}

.compact-menu.active .compact-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.compact-menu.active .compact-menu-link:nth-child(1) {
    transition-delay: 0.12s;
}

.compact-menu.active .compact-menu-link:nth-child(2) {
    transition-delay: 0.18s;
}

.compact-menu.active .compact-menu-link:nth-child(3) {
    transition-delay: 0.24s;
}

.compact-menu-link:hover {
    background: var(--red);
    color: #ffffff;
    transform: translateX(8px);
}

body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
    animation: menuBackdrop 0.35s ease both;
}

@keyframes menuBackdrop {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* HERO */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 150px 0 90px;
}

.hero-inner {
    position: relative;
    z-index: 5;
    text-align: center;
    width: 100%;
}

.hero-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(72px, 8.6vw, 158px);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.085em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

.hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    width: 100%;
}

.hero-row.top {
    animation: fadeRight 1s ease forwards;
}

.hero-row.bottom {
    opacity: 0;
    animation: fadeLeft 1s ease 0.2s forwards;
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(-70px);
    }

    to {
        opacity: 1;
        transform: translateX(-18px);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(70px);
    }

    to {
        opacity: 1;
        transform: translateX(14px);
    }
}

.word {
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.hero-star {
    font-size: clamp(68px, 7vw, 130px);
    line-height: 1;
    animation: starPulse 2.5s ease-in-out infinite;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.12) rotate(12deg);
    }
}

/* CÁPSULA ROJA */
.marquee-pill {
    width: clamp(560px, 50vw, 880px);
    height: clamp(82px, 6.9vw, 118px);
    border-radius: 999px;
    background: var(--red);
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 24px 70px rgba(255, 49, 49, 0.28);
    animation: pillPop 0.9s ease 0.25s both;
}

@keyframes pillPop {
    from {
        opacity: 0;
        transform: scale(0.86);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.marquee-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: moveText 11s linear infinite;
    will-change: transform;
}

.marquee-track span {
    font-family: "Space Grotesk", sans-serif;
    color: #ffffff;
    font-size: clamp(72px, 7.3vw, 128px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.085em;
    padding-right: 52px;
}

body.dark .marquee-track span {
    color: #0d0d0d;
}

@keyframes moveText {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.hero-text {
    max-width: 720px;
    margin: 58px auto 0;
    color: var(--gray);
    font-size: 25px;
    line-height: 1.45;
    letter-spacing: -0.04em;
    font-weight: 500;
    min-height: 110px;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--text);
    margin-left: 4px;
    vertical-align: -0.12em;
    animation: blink 0.8s infinite;
}

@keyframes blink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

.hero-actions {
    margin: 34px auto 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeUp 1s ease 0.7s both;
}

.btn {
    height: 58px;
    padding: 0 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    transition: 0.25s ease;
}

.btn-dark {
    background: var(--text);
    color: var(--text-invert);
    border: 2px solid var(--text);
}

.btn-outline {
    border: 2px solid var(--text);
    color: var(--text);
    background: transparent;
}

.btn:hover {
    transform: translateY(-4px);
}

.btn-outline:hover {
    background: var(--text);
    color: var(--text-invert);
}

/* DECORACIÓN */

.soft-blob {
    position: absolute;
    width: 300px;
    height: 230px;
    left: 12%;
    top: 50%;
    z-index: 1;
    border-radius: 46% 54% 49% 51%;
    background: radial-gradient(circle at 38% 35%, #ffffff 0%, #e5e3dd 45%, rgba(255, 255, 255, 0.14) 75%);
    opacity: 0.72;
    filter: blur(1px);
    animation: floatBlob 7s ease-in-out infinite;
}

body.dark .soft-blob {
    background: radial-gradient(circle at 38% 35%, #444 0%, #202020 45%, rgba(255, 255, 255, 0.08) 75%);
}

.mood-icon {
    position: absolute;
    right: 12%;
    top: 27%;
    z-index: 6;
    width: 190px;
    height: 190px;
    object-fit: contain;
    animation: floatMood 5.5s ease-in-out infinite;
    filter: drop-shadow(0 28px 45px rgba(0, 0, 0, 0.18));
}


@keyframes floatBlob {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

@keyframes floatMood {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-24px) rotate(3deg);
    }
}

/* GENERAL */

section {
    padding: 130px 0;
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: 0.9s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 58px;
}

.kicker {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gray);
    font-weight: 800;
    margin-bottom: 18px;
}

.section-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(52px, 7vw, 112px);
    line-height: 0.92;
    letter-spacing: -0.085em;
    font-weight: 700;
    max-width: 900px;
}

.section-desc {
    max-width: 440px;
    color: var(--gray);
    font-size: 18px;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: -0.03em;
}

/* SERVICIOS */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 34px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.35s ease;
}

.card:hover {
    transform: translateY(-12px) rotate(-1deg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.12);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-number {
    color: var(--gray);
    font-weight: 800;
    font-size: 18px;
}

.card-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--text);
    color: var(--text-invert);
    display: grid;
    place-items: center;
    font-size: 25px;
    transition: 0.3s ease;
}

.card:hover .card-icon {
    transform: rotate(16deg) scale(1.08);
}

.card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 38px;
    line-height: 0.95;
    letter-spacing: -0.075em;
    margin-bottom: 14px;
}

.card p {
    color: var(--gray);
    font-size: 17px;
    line-height: 1.55;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.marquee-big {
    padding: 54px 0;
    background: transparent;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-big-track {
    display: inline-flex;
    animation: bigMove 24s linear infinite;
}

.marquee-big span {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 7vw, 116px);
    color: var(--gray);
    opacity: 0.26;
    font-weight: 700;
    letter-spacing: -0.085em;
    padding-right: 70px;
}

body.dark .marquee-big span {
    color: #ffffff;
    opacity: 0.14;
}

@keyframes bigMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* PROYECTOS STICKY */

.projects {
    background: var(--project-bg);
    color: var(--text-invert);
    border-radius: 70px 70px 0 0;
    padding: 0;
}

body.dark .projects {
    color: #0d0d0d;
}

.projects-sticky-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 70px;
    align-items: flex-start;
    padding: 130px 0;
}

.projects-left {
    position: sticky;
    top: 140px;
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.projects-left h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(54px, 6vw, 112px);
    line-height: 0.9;
    letter-spacing: -0.09em;
    font-weight: 700;
    max-width: 650px;
    margin-bottom: 28px;
}

.projects-left p {
    color: rgba(255, 255, 255, 0.62);
    font-size: 20px;
    line-height: 1.55;
    letter-spacing: -0.04em;
    max-width: 480px;
    font-weight: 500;
    margin-bottom: 34px;
}

body.dark .projects-left p {
    color: rgba(0, 0, 0, 0.62);
}

.project-counter {
    width: fit-content;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

body.dark .project-counter {
    border-color: rgba(0, 0, 0, 0.18);
    color: rgba(0, 0, 0, 0.72);
}

.projects-right {
    display: flex;
    flex-direction: column;
    gap: 90px;
    padding-bottom: 30vh;
}

.scroll-card {
    min-height: 78vh;
    background: var(--project-card);
    border-radius: 48px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(80px) scale(0.94);
    opacity: 0.45;
    transition: 0.65s ease;
}

body.dark .scroll-card {
    border-color: rgba(0, 0, 0, 0.08);
}

.scroll-card.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
}

.scroll-card::after {
    content: "";
    width: 460px;
    height: 460px;
    border-radius: 50%;
    position: absolute;
    right: -160px;
    bottom: -190px;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.72), transparent 68%);
    transition: 0.7s ease;
}

.scroll-card.active::after {
    transform: scale(1.24);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 800;
    position: relative;
    z-index: 2;
}

body.dark .project-meta {
    color: rgba(0, 0, 0, 0.58);
}

.project-content {
    position: relative;
    z-index: 2;
}

.scroll-card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 6vw, 96px);
    line-height: 0.86;
    letter-spacing: -0.09em;
    margin-bottom: 24px;
    color: #ffffff;
}

body.dark .scroll-card h3 {
    color: #0d0d0d;
}

.scroll-card p {
    color: rgba(255, 255, 255, 0.62);
    font-size: 19px;
    line-height: 1.55;
    max-width: 500px;
    font-weight: 500;
    letter-spacing: -0.04em;
}

body.dark .scroll-card p {
    color: rgba(0, 0, 0, 0.62);
}

.project-link {
    display: inline-flex;
    margin-top: 34px;
    padding: 15px 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 800;
    transition: 0.3s ease;
}

body.dark .project-link {
    border-color: rgba(0, 0, 0, 0.16);
    color: #0d0d0d;
}

.project-link:hover {
    background: var(--red);
    color: #ffffff;
    transform: translateY(-4px);
}

.coming-soon-card {
    background:
        radial-gradient(circle at right bottom, rgba(255, 49, 49, 0.16), transparent 42%),
        var(--project-card);
}

.soon-badge {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 24px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.project-link.disabled {
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

body.dark .soon-badge {
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
}

/* CONTACTO */

.contact {
    text-align: center;
}

.contact h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(66px, 11vw, 176px);
    line-height: 0.85;
    letter-spacing: -0.095em;
    font-weight: 700;
    margin-bottom: 34px;
}

.contact p {
    max-width: 640px;
    margin: 0 auto 36px;
    color: var(--gray);
    font-size: 22px;
    line-height: 1.45;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--gray);
    font-size: 15px;
    font-weight: 600;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */

@media (max-width: 1100px) {

    .hero-row.top,
    .hero-row.bottom {
        transform: none;
        animation-name: fadeUp;
    }

    .mood-icon {
        display: none;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-left {
        position: relative;
        top: 0;
        min-height: auto;
    }

    .projects-right {
        gap: 28px;
        padding-bottom: 0;
    }

    .scroll-card {
        min-height: 520px;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 900px) {
    .container {
        width: min(100% - 36px, 1440px);
    }

    .quote-btn {
        display: none;
    }

    .brand {
        font-size: 22px;
    }

    .brand-icon,
    .menu {
        width: 58px;
        height: 58px;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 25px;
    }

    .hero {
        padding-top: 130px;
    }

    .hero-title {
        font-size: clamp(58px, 15vw, 100px);
        gap: 18px;
    }

    .hero-row {
        flex-wrap: wrap;
        gap: 18px;
    }

    .marquee-pill {
        width: 100%;
        max-width: 680px;
        height: 78px;
    }

    .marquee-track span {
        font-size: 68px;
    }

    .hero-text {
        font-size: 19px;
        margin-top: 42px;
    }

    .soft-blob {
        opacity: 0.45;
        right: -60px;
        left: auto;
        top: 38%;
    }
}


.compact-menu {
    top: 94px;
    right: 18px;
}

.compact-menu-link {
    font-size: 34px;
}

@media (max-width: 560px) {
    .header {
        padding: 22px 0;
    }

    .hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }

    .hero-title {
        font-size: 62px;
    }

    .marquee-pill {
        height: 66px;
    }

    .marquee-track span {
        font-size: 58px;
        padding-right: 36px;
    }

    .hero-star {
        font-size: 58px;
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    section {
        padding: 90px 0;
    }

    .card,
    .scroll-card {
        border-radius: 28px;
        padding: 26px;
    }

    .scroll-card {
        min-height: 420px;
    }

    .projects {
        border-radius: 42px 42px 0 0;
    }

    .projects-sticky-layout {
        padding: 90px 0;
    }
}


/* AJUSTES SOLICITADOS: proyectos más limpios + dark mode correcto */
body.dark {
    --project-bg: #0d0d0d;
    --project-card: #17171a;
}

body.dark .projects {
    background: #0d0d0d;
    color: #ffffff;
}

body.dark .projects-left .kicker,
body.dark .projects-left p,
body.dark .project-counter,
body.dark .project-meta,
body.dark .scroll-card p,
body.dark .project-link {
    color: rgba(255, 255, 255, 0.64);
}

body.dark .project-counter,
body.dark .project-link {
    border-color: rgba(255, 255, 255, 0.18);
}

body.dark .scroll-card {
    background: #17171a;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .scroll-card h3 {
    color: #ffffff;
}

.projects .container.projects-sticky-layout {
    width: min(1280px, calc(100% - 140px));
}

.projects-sticky-layout {
    grid-template-columns: minmax(320px, 0.78fr) minmax(460px, 0.95fr);
    gap: clamp(42px, 5vw, 74px);
    padding: 150px 0;
}

.projects-left {
    top: 128px;
    min-height: calc(100vh - 220px);
}

.projects-left h2 {
    font-size: clamp(48px, 5.4vw, 92px);
    max-width: 560px;
}

.projects-left p {
    font-size: 18px;
    max-width: 430px;
    color: rgba(255, 255, 255, 0.6);
}

.project-counter {
    padding: 12px 18px;
    font-size: 15px;
}

.projects-right {
    align-items: flex-end;
    gap: 72px;
    padding: 4vh 0 24vh;
}

.scroll-card {
    width: 100%;
    max-width: 760px;
    min-height: min(620px, 70vh);
    border-radius: 38px;
    padding: 36px;
}

.scroll-card.active {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.scroll-card::after {
    width: 330px;
    height: 330px;
    right: -130px;
    bottom: -135px;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.34), transparent 70%);
}

.scroll-card.active::after {
    transform: scale(1.08);
}

.scroll-card h3 {
    font-size: clamp(42px, 5vw, 78px);
    max-width: 540px;
}

.scroll-card p {
    font-size: 18px;
    max-width: 460px;
}

.project-link {
    margin-top: 28px;
    padding: 13px 19px;
}

.mood-icon {
    width: 112px;
    height: 112px;
    right: 7%;
    top: 32%;
    z-index: 2;
    opacity: 0.24;
    filter: grayscale(1) blur(0.2px) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.10));
}

.mood-icon:hover {
    opacity: 0.45;
    filter: grayscale(0.5) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.12));
}

@media (max-width: 1100px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 60px, 980px);
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        padding: 110px 0;
    }

    .projects-right {
        align-items: stretch;
        gap: 28px;
        padding-bottom: 0;
    }

    .scroll-card {
        max-width: 100%;
        min-height: 460px;
    }
}

@media (max-width: 560px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 34px, 980px);
    }

    .projects-left h2 {
        font-size: 50px;
    }

    .scroll-card {
        min-height: 390px;
        padding: 24px;
        border-radius: 26px;
    }

    .scroll-card h3 {
        font-size: 44px;
    }
}



/* =========================
       AJUSTES MOBILE FINALES
       Optimizado para iPhone / Android
    ========================= */

@media (max-width: 1180px) {
    .container {
        width: min(100% - 40px, 1120px);
    }

    .header {
        padding: 22px 0;
    }

    .quote-btn {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 128px 0 76px;
    }

    .hero-row.top,
    .hero-row.bottom {
        animation-name: fadeUp;
        transform: none !important;
    }

    .hero-row {
        flex-wrap: wrap;
        gap: 18px;
    }

    .mood-icon {
        opacity: 0.12;
        width: 120px;
        height: 120px;
        right: 2%;
        top: 23%;
        pointer-events: none;
    }

    .soft-blob {
        opacity: 0.32;
        width: 210px;
        height: 170px;
        left: auto;
        right: -70px;
        top: 42%;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .projects-left {
        position: relative;
        top: auto;
        min-height: auto;
        padding-bottom: 10px;
    }

    .projects-right {
        gap: 24px;
        padding-bottom: 0;
    }

    .scroll-card {
        min-height: auto;
        transform: none;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .container {
        width: min(100% - 28px, 720px);
    }

    .brand {
        gap: 10px;
        font-size: 18px;
        line-height: 0.95;
    }

    .brand-icon,
    .menu {
        width: 50px;
        height: 50px;
    }

    .brand-icon::before {
        width: 25px;
        height: 20px;
        border-width: 2px;
        left: 12px;
        top: 18px;
    }

    .brand-icon::after {
        top: 12px;
        right: 12px;
        font-size: 11px;
    }

    .nav-actions {
        gap: 10px;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
        font-size: 23px;
    }

    .menu span {
        width: 23px;
        height: 2px;
    }

    .compact-menu {
        top: 78px;
        right: 14px;
        width: min(260px, calc(100vw - 28px));
        border-radius: 24px;
    }

    .compact-menu-inner {
        padding: 16px;
    }

    .compact-menu-link {
        font-size: 24px;
        padding: 16px 18px;
        border-radius: 17px;
    }

    .hero {
        padding-top: 112px;
        padding-bottom: 64px;
    }

    .hero-title {
        font-size: clamp(56px, 16vw, 92px);
        line-height: 0.92;
        letter-spacing: -0.075em;
        gap: 16px;
    }

    .hero-row {
        gap: 14px;
    }

    .marquee-pill {
        width: 100%;
        max-width: 100%;
        height: clamp(58px, 15vw, 76px);
    }

    .marquee-track span {
        font-size: clamp(54px, 15vw, 72px);
        padding-right: 34px;
        letter-spacing: -0.075em;
    }

    .hero-star {
        font-size: clamp(52px, 15vw, 74px);
    }

    .hero-text {
        max-width: 92%;
        min-height: 90px;
        margin-top: 34px;
        font-size: 18px;
        line-height: 1.45;
        letter-spacing: -0.03em;
    }

    .hero-actions,
    .contact-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        height: 54px;
        font-size: 16px;
    }

    section {
        padding: 76px 0;
    }

    .section-head {
        gap: 16px;
        margin-bottom: 28px;
    }

    .kicker {
        font-size: 12px;
        letter-spacing: 0.16em;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: clamp(42px, 13vw, 68px);
        line-height: 0.95;
        letter-spacing: -0.075em;
    }

    .section-desc {
        font-size: 16px;
        line-height: 1.55;
    }

    .cards {
        gap: 14px;
    }

    .card {
        min-height: 250px;
        padding: 24px;
        border-radius: 26px;
    }

    .card h3 {
        font-size: 32px;
    }

    .card p {
        font-size: 15.5px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .marquee-big {
        padding: 28px 0;
        background: transparent;
    }

    .marquee-big span {
        font-size: clamp(40px, 13vw, 68px);
        color: rgba(120, 120, 120, 0.22);
        padding-right: 42px;
    }

    body.dark .marquee-big span {
        color: rgba(255, 255, 255, 0.12);
    }

    .projects {
        border-radius: 34px 34px 0 0;
    }

    .projects-sticky-layout {
        padding: 76px 0;
    }

    .projects-left h2 {
        font-size: clamp(42px, 13vw, 70px);
        line-height: 0.92;
        letter-spacing: -0.075em;
        margin-bottom: 18px;
    }

    .projects-left p {
        font-size: 16.5px;
        line-height: 1.55;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .project-counter {
        padding: 11px 16px;
        font-size: 14px;
    }

    .scroll-card {
        min-height: 360px;
        padding: 24px;
        border-radius: 28px;
    }

    .scroll-card::after {
        width: 260px;
        height: 260px;
        right: -120px;
        bottom: -120px;
        opacity: 0.52;
    }

    .project-meta {
        font-size: 14px;
    }

    .scroll-card h3 {
        font-size: clamp(38px, 12vw, 62px);
        line-height: 0.9;
        letter-spacing: -0.075em;
        margin-bottom: 16px;
    }

    .scroll-card p {
        font-size: 15.5px;
        line-height: 1.55;
        max-width: 100%;
    }

    .project-link {
        margin-top: 22px;
        padding: 12px 17px;
        font-size: 14px;
    }

    .contact h2 {
        font-size: clamp(56px, 18vw, 90px);
        letter-spacing: -0.085em;
    }

    .contact p {
        font-size: 17px;
        max-width: 94%;
    }

    .footer {
        padding: 28px 0;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 22px, 420px);
    }

    .brand span:last-child {
        display: none;
    }

    .hero-title {
        font-size: 54px;
    }

    .marquee-pill {
        height: 58px;
    }

    .marquee-track span {
        font-size: 52px;
    }

    .hero-text {
        font-size: 16.5px;
    }

    .section-title,
    .projects-left h2 {
        font-size: 42px;
    }

    .scroll-card {
        min-height: 330px;
    }
}

/* Oculta/elimina el logo del header y deja los botones alineados a la derecha */
.nav {
    justify-content: flex-end;
}


/* =========================
       PROYECTOS EN CARRUSEL
       lado izquierdo + card interactiva
    ========================= */

.projects {
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 49, 49, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34));
    color: var(--text);
    border-radius: 70px 70px 0 0;
    padding: 0;
    border-top: 1px solid var(--border);
}

body.dark .projects {
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 49, 49, 0.15), transparent 34%),
        linear-gradient(180deg, #111111, #0d0d0d);
    color: #ffffff;
}

.projects .container.projects-sticky-layout {
    width: min(1280px, calc(100% - 120px));
}

.projects-sticky-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(500px, 1fr);
    gap: clamp(44px, 6vw, 92px);
    align-items: center;
    padding: clamp(110px, 10vw, 160px) 0;
    min-height: 100vh;
}

.projects-left {
    position: sticky;
    top: 120px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: start;
    padding-top: 60px;
}

.projects-left .kicker {
    color: var(--gray);
}

.projects-left h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 5.3vw, 92px);
    line-height: 0.9;
    letter-spacing: -0.085em;
    font-weight: 700;
    max-width: 620px;
    margin-bottom: 28px;
    color: var(--text);
}

body.dark .projects-left h2 {
    color: #ffffff;
}

.projects-left p {
    color: var(--gray);
    font-size: 19px;
    line-height: 1.6;
    letter-spacing: -0.035em;
    max-width: 465px;
    font-weight: 500;
    margin-bottom: 34px;
}

body.dark .projects-left p {
    color: rgba(255, 255, 255, 0.64);
}

.project-counter {
    width: fit-content;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--gray);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(14px);
}

body.dark .project-counter {
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
}

.projects-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 0;
    min-width: 0;
}

.project-carousel {
    width: 100%;
    overflow: hidden;
    border-radius: 42px;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.10);
}

.project-carousel:active {
    cursor: grabbing;
}

body.dark .project-carousel {
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.project-track {
    display: flex;
    width: 100%;
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.scroll-card {
    flex: 0 0 100%;
    min-height: clamp(460px, 62vh, 620px);
    background:
        radial-gradient(circle at 100% 100%, rgba(255, 49, 49, 0.22), transparent 42%),
        var(--card);
    color: var(--text);
    border-radius: 42px;
    padding: clamp(30px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    transform: none;
    opacity: 1;
    transition: background 0.45s ease, color 0.45s ease;
}

body.dark .scroll-card {
    background:
        radial-gradient(circle at 100% 100%, rgba(255, 49, 49, 0.26), transparent 42%),
        #17171a;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.09);
}

.scroll-card.active {
    transform: none;
    opacity: 1;
    box-shadow: none;
}

.scroll-card::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: -130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.24), transparent 70%);
    pointer-events: none;
}

.scroll-card.active::after {
    transform: none;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--gray);
    font-weight: 800;
    position: relative;
    z-index: 2;
}

body.dark .project-meta {
    color: rgba(255, 255, 255, 0.62);
}

.project-content {
    position: relative;
    z-index: 2;
}

.scroll-card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(46px, 6vw, 86px);
    line-height: 0.88;
    letter-spacing: -0.085em;
    margin-bottom: 24px;
    color: var(--text);
    max-width: 620px;
}

body.dark .scroll-card h3 {
    color: #ffffff;
}

.scroll-card p {
    color: var(--gray);
    font-size: 18px;
    line-height: 1.58;
    max-width: 520px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

body.dark .scroll-card p {
    color: rgba(255, 255, 255, 0.66);
}

.project-link {
    display: inline-flex;
    margin-top: 30px;
    padding: 14px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
    transition: 0.3s ease;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(14px);
}

body.dark .project-link {
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.project-link:hover {
    background: var(--red);
    color: #ffffff;
    transform: translateY(-4px);
    border-color: var(--red);
}

.project-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.project-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--gray);
    opacity: 0.28;
    cursor: pointer;
    transition: 0.28s ease;
}

.project-dot.active {
    width: 34px;
    background: var(--red);
    opacity: 1;
}

.project-help {
    color: var(--gray);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    opacity: 0.72;
}

body.dark .project-help {
    color: rgba(255, 255, 255, 0.54);
}

@media (max-width: 1100px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 60px, 980px);
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 110px 0;
    }

    .projects-left {
        position: relative;
        top: auto;
        padding-top: 0;
    }

    .project-carousel {
        border-radius: 32px;
    }

    .scroll-card {
        min-height: 460px;
        border-radius: 32px;
    }
}

@media (max-width: 768px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 28px, 720px);
    }

    .projects {
        border-radius: 34px 34px 0 0;
    }

    .projects-sticky-layout {
        padding: 76px 0;
        gap: 28px;
    }

    .projects-left h2 {
        font-size: clamp(42px, 13vw, 70px);
        line-height: 0.92;
        letter-spacing: -0.075em;
    }

    .projects-left p {
        font-size: 16.5px;
        max-width: 100%;
    }

    .project-carousel {
        border-radius: 28px;
    }

    .scroll-card {
        min-height: 380px;
        padding: 24px;
        border-radius: 28px;
    }

    .scroll-card h3 {
        font-size: clamp(38px, 12vw, 62px);
        line-height: 0.9;
        letter-spacing: -0.075em;
    }

    .scroll-card p {
        font-size: 15.5px;
        max-width: 100%;
    }

    .project-help {
        display: none;
    }
}



/* =========================
       SERVICIOS · MARCA VISUAL
       Fondo camuflado + cards más suaves
    ========================= */

#servicios {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

#servicios::before {
    content: "Marca Visual";
    position: absolute;
    left: 50%;
    top: 52%;
    transform: translate(-50%, -50%) rotate(-4deg);
    z-index: -1;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(90px, 18vw, 310px);
    line-height: 0.85;
    letter-spacing: -0.11em;
    font-weight: 700;
    color: var(--text);
    opacity: 0.035;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

body.dark #servicios::before {
    color: #ffffff;
    opacity: 0.045;
}

#servicios .section-head {
    position: relative;
    z-index: 2;
    margin-bottom: 72px;
}

#servicios .section-title {
    max-width: 980px;
}

#servicios .cards {
    position: relative;
    z-index: 2;
    gap: 28px;
}

#servicios .card {
    position: relative;
    min-height: 380px;
    padding: 38px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.035);
    transition:
        transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.42s ease,
        border-color 0.42s ease,
        background 0.42s ease;
}

body.dark #servicios .card {
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

#servicios .card::before {
    content: "";
    position: absolute;
    left: 32px;
    right: 32px;
    top: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--red);
    opacity: 0;
    transform: scaleX(0.55);
    transition: 0.42s ease;
}

#servicios .card::after {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: -90px;
    bottom: -95px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.18), transparent 68%);
    opacity: 0;
    transform: scale(0.8);
    transition: 0.5s ease;
    pointer-events: none;
}

#servicios .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.075);
    border-color: rgba(255, 49, 49, 0.22);
}

body.dark #servicios .card:hover {
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.32);
}

#servicios .card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

#servicios .card:hover::after {
    opacity: 1;
    transform: scale(1);
}

#servicios .card:hover .card-icon {
    transform: translateY(-3px) scale(1.04);
}

#servicios .card.reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
    clip-path: inset(18% 0 0 0 round 40px);
    transition:
        opacity 0.75s ease,
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        clip-path 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.42s ease,
        border-color 0.42s ease;
}

#servicios .card.reveal.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0 0 0 0 round 40px);
}

#servicios .card:nth-child(2).reveal.show {
    transition-delay: 0.08s;
}

#servicios .card:nth-child(3).reveal.show {
    transition-delay: 0.16s;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.service-tags span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--gray);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: rgba(255, 255, 255, 0.42);
}

body.dark .service-tags span {
    background: rgba(255, 255, 255, 0.055);
}

@media (max-width: 768px) {
    #servicios::before {
        top: 46%;
        font-size: clamp(82px, 26vw, 150px);
        opacity: 0.04;
    }

    #servicios .section-head {
        margin-bottom: 34px;
    }

    #servicios .cards {
        gap: 16px;
    }

    #servicios .card {
        min-height: 280px;
        padding: 26px;
    }

    #servicios .card::before {
        left: 24px;
        right: 24px;
    }
}

/* 404 PAGE */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 70px;
    position: relative;
    overflow: hidden;
}

.error-page::before {
    content: "404";
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(150px, 26vw, 430px);
    font-weight: 700;
    letter-spacing: -0.12em;
    color: var(--text);
    opacity: 0.035;
    pointer-events: none;
}

.error-card {
    position: relative;
    z-index: 2;
    width: min(880px, 100%);
    margin: 0 auto;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 42px;
    padding: clamp(34px, 6vw, 78px);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.08);
}

.error-kicker {
    display: inline-flex;
    margin-bottom: 20px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 49, 49, 0.10);
    color: var(--red);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
}

.error-card h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(54px, 9vw, 120px);
    line-height: 0.9;
    letter-spacing: -0.09em;
    margin-bottom: 24px;
}

.error-card p {
    max-width: 560px;
    margin: 0 auto 30px;
    color: var(--gray);
    font-size: 19px;
    line-height: 1.55;
    letter-spacing: -0.03em;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 560px) {
    .error-page {
        padding-top: 95px;
    }

    .error-card {
        border-radius: 28px;
    }

    .error-actions {
        flex-direction: column;
    }
}

:root {
    --bg: #f5f4f0;
    --text: #0d0d0d;
    --text-invert: #ffffff;
    --card: #ffffff;
    --gray: #666666;
    --red: #ff3131;
    --border: rgba(0, 0, 0, 0.12);
    --project-bg: #0d0d0d;
    --project-card: #1b1b1f;
}

body.dark {
    --bg: #0d0d0d;
    --text: #ffffff;
    --text-invert: #0d0d0d;
    --card: #171717;
    --gray: #b8b8b8;
    --border: rgba(255, 255, 255, 0.14);
    --project-bg: #f5f4f0;
    --project-card: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    font-family: "Inter", sans-serif;
    transition: background 0.45s ease, color 0.45s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1440px, calc(100% - 72px));
    margin: 0 auto;
}

/* HEADER */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    padding: 34px 0;
    pointer-events: none;
    animation: navDrop 0.9s ease forwards;
}

.header .container {
    pointer-events: auto;
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.06em;
}

.brand-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--text);
    position: relative;
    transition: 0.35s ease;
}

.brand:hover .brand-icon {
    transform: rotate(8deg) scale(1.04);
}

.brand-icon::before {
    content: "";
    width: 34px;
    height: 26px;
    border: 3px dashed var(--text-invert);
    border-radius: 10px;
    position: absolute;
    left: 18px;
    top: 24px;
}

.brand-icon::after {
    content: "✦";
    color: var(--text-invert);
    position: absolute;
    top: 16px;
    right: 17px;
    font-size: 14px;
    animation: spin 3s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.theme-toggle {
    width: 52px;
    height: 52px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 30px;
    cursor: pointer;
    transition: 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(-18deg) scale(1.1);
}

.quote-btn {
    height: 70px;
    padding: 0 42px;
    border: 2px solid var(--text);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.04em;
    transition: 0.25s ease;
}

.quote-btn:hover {
    background: var(--text);
    color: var(--text-invert);
    transform: translateY(-3px);
}

.menu {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    transition: 0.3s ease;
}

.menu:hover {
    transform: rotate(8deg) scale(1.05);
}

.menu span {
    width: 30px;
    height: 3px;
    border-radius: 999px;
    background: var(--text-invert);
}

.menu {
    border: 0;
    cursor: pointer;
    padding: 0;
    color: inherit;
    position: relative;
    z-index: 1002;
}

.menu.is-active span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

.menu.is-active span:nth-child(2) {
    transform: translateY(-5.5px) rotate(-45deg);
}

.compact-menu {
    position: fixed;
    top: 112px;
    right: max(36px, calc((100vw - 1440px) / 2 + 36px));
    width: min(320px, calc(100vw - 40px));
    z-index: 1000;
    background: var(--text);
    color: var(--text-invert);
    border-radius: 34px;
    padding: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translate(16px, -24px) scale(0.15);
    transform-origin: top right;
    clip-path: circle(12% at 88% 0%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    transition:
        transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        clip-path 0.62s cubic-bezier(0.22, 1, 0.36, 1),
        border-radius 0.62s cubic-bezier(0.22, 1, 0.36, 1);
}

.compact-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0) scale(1);
    clip-path: circle(150% at 88% 0%);
    border-radius: 34px;
}

.compact-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
}

.compact-menu-link {
    font-family: "Space Grotesk", sans-serif;
    font-size: 38px;
    line-height: 0.92;
    letter-spacing: -0.075em;
    font-weight: 700;
    padding: 18px 18px;
    border-radius: 22px;
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.45s ease,
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.25s ease,
        color 0.25s ease;
}

.compact-menu.active .compact-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.compact-menu.active .compact-menu-link:nth-child(1) {
    transition-delay: 0.12s;
}

.compact-menu.active .compact-menu-link:nth-child(2) {
    transition-delay: 0.18s;
}

.compact-menu.active .compact-menu-link:nth-child(3) {
    transition-delay: 0.24s;
}

.compact-menu-link:hover {
    background: var(--red);
    color: #ffffff;
    transform: translateX(8px);
}

body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
    animation: menuBackdrop 0.35s ease both;
}

@keyframes menuBackdrop {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* HERO */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 150px 0 90px;
}

.hero-inner {
    position: relative;
    z-index: 5;
    text-align: center;
    width: 100%;
}

.hero-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(72px, 8.6vw, 158px);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.085em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
}

.hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    width: 100%;
}

.hero-row.top {
    animation: fadeRight 1s ease forwards;
}

.hero-row.bottom {
    opacity: 0;
    animation: fadeLeft 1s ease 0.2s forwards;
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(-70px);
    }

    to {
        opacity: 1;
        transform: translateX(-18px);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(70px);
    }

    to {
        opacity: 1;
        transform: translateX(14px);
    }
}

.word {
    white-space: nowrap;
    position: relative;
    z-index: 3;
}

.hero-star {
    font-size: clamp(68px, 7vw, 130px);
    line-height: 1;
    animation: starPulse 2.5s ease-in-out infinite;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.12) rotate(12deg);
    }
}

/* CÁPSULA ROJA */
.marquee-pill {
    width: clamp(560px, 50vw, 880px);
    height: clamp(82px, 6.9vw, 118px);
    border-radius: 999px;
    background: var(--red);
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 24px 70px rgba(255, 49, 49, 0.28);
    animation: pillPop 0.9s ease 0.25s both;
}

@keyframes pillPop {
    from {
        opacity: 0;
        transform: scale(0.86);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.marquee-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: moveText 11s linear infinite;
    will-change: transform;
}

.marquee-track span {
    font-family: "Space Grotesk", sans-serif;
    color: #ffffff;
    font-size: clamp(72px, 7.3vw, 128px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.085em;
    padding-right: 52px;
}

body.dark .marquee-track span {
    color: #0d0d0d;
}

@keyframes moveText {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.hero-text {
    max-width: 720px;
    margin: 58px auto 0;
    color: var(--gray);
    font-size: 25px;
    line-height: 1.45;
    letter-spacing: -0.04em;
    font-weight: 500;
    min-height: 110px;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--text);
    margin-left: 4px;
    vertical-align: -0.12em;
    animation: blink 0.8s infinite;
}

@keyframes blink {

    0%,
    45% {
        opacity: 1;
    }

    46%,
    100% {
        opacity: 0;
    }
}

.hero-actions {
    margin: 34px auto 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeUp 1s ease 0.7s both;
}

.btn {
    height: 58px;
    padding: 0 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    transition: 0.25s ease;
}

.btn-dark {
    background: var(--text);
    color: var(--text-invert);
    border: 2px solid var(--text);
}

.btn-outline {
    border: 2px solid var(--text);
    color: var(--text);
    background: transparent;
}

.btn:hover {
    transform: translateY(-4px);
}

.btn-outline:hover {
    background: var(--text);
    color: var(--text-invert);
}

/* DECORACIÓN */

.soft-blob {
    position: absolute;
    width: 300px;
    height: 230px;
    left: 12%;
    top: 50%;
    z-index: 1;
    border-radius: 46% 54% 49% 51%;
    background: radial-gradient(circle at 38% 35%, #ffffff 0%, #e5e3dd 45%, rgba(255, 255, 255, 0.14) 75%);
    opacity: 0.72;
    filter: blur(1px);
    animation: floatBlob 7s ease-in-out infinite;
}

body.dark .soft-blob {
    background: radial-gradient(circle at 38% 35%, #444 0%, #202020 45%, rgba(255, 255, 255, 0.08) 75%);
}

.mood-icon {
    position: absolute;
    right: 12%;
    top: 27%;
    z-index: 6;
    width: 190px;
    height: 190px;
    object-fit: contain;
    animation: floatMood 5.5s ease-in-out infinite;
    filter: drop-shadow(0 28px 45px rgba(0, 0, 0, 0.18));
}


@keyframes floatBlob {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

@keyframes floatMood {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-24px) rotate(3deg);
    }
}

/* GENERAL */

section {
    padding: 130px 0;
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: 0.9s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 58px;
}

.kicker {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gray);
    font-weight: 800;
    margin-bottom: 18px;
}

.section-title {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(52px, 7vw, 112px);
    line-height: 0.92;
    letter-spacing: -0.085em;
    font-weight: 700;
    max-width: 900px;
}

.section-desc {
    max-width: 440px;
    color: var(--gray);
    font-size: 18px;
    line-height: 1.6;
    font-weight: 500;
    letter-spacing: -0.03em;
}

/* SERVICIOS */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 34px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.35s ease;
}

.card:hover {
    transform: translateY(-12px) rotate(-1deg);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.12);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-number {
    color: var(--gray);
    font-weight: 800;
    font-size: 18px;
}

.card-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--text);
    color: var(--text-invert);
    display: grid;
    place-items: center;
    font-size: 25px;
    transition: 0.3s ease;
}

.card:hover .card-icon {
    transform: rotate(16deg) scale(1.08);
}

.card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 38px;
    line-height: 0.95;
    letter-spacing: -0.075em;
    margin-bottom: 14px;
}

.card p {
    color: var(--gray);
    font-size: 17px;
    line-height: 1.55;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.marquee-big {
    padding: 54px 0;
    background: transparent;
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-big-track {
    display: inline-flex;
    animation: bigMove 24s linear infinite;
}

.marquee-big span {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 7vw, 116px);
    color: var(--gray);
    opacity: 0.26;
    font-weight: 700;
    letter-spacing: -0.085em;
    padding-right: 70px;
}

body.dark .marquee-big span {
    color: #ffffff;
    opacity: 0.14;
}

@keyframes bigMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* PROYECTOS STICKY */

.projects {
    background: var(--project-bg);
    color: var(--text-invert);
    border-radius: 70px 70px 0 0;
    padding: 0;
}

body.dark .projects {
    color: #0d0d0d;
}

.projects-sticky-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 70px;
    align-items: flex-start;
    padding: 130px 0;
}

.projects-left {
    position: sticky;
    top: 140px;
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.projects-left h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(54px, 6vw, 112px);
    line-height: 0.9;
    letter-spacing: -0.09em;
    font-weight: 700;
    max-width: 650px;
    margin-bottom: 28px;
}

.projects-left p {
    color: rgba(255, 255, 255, 0.62);
    font-size: 20px;
    line-height: 1.55;
    letter-spacing: -0.04em;
    max-width: 480px;
    font-weight: 500;
    margin-bottom: 34px;
}

body.dark .projects-left p {
    color: rgba(0, 0, 0, 0.62);
}

.project-counter {
    width: fit-content;
    padding: 14px 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

body.dark .project-counter {
    border-color: rgba(0, 0, 0, 0.18);
    color: rgba(0, 0, 0, 0.72);
}

.projects-right {
    display: flex;
    flex-direction: column;
    gap: 90px;
    padding-bottom: 30vh;
}

.scroll-card {
    min-height: 78vh;
    background: var(--project-card);
    border-radius: 48px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(80px) scale(0.94);
    opacity: 0.45;
    transition: 0.65s ease;
}

body.dark .scroll-card {
    border-color: rgba(0, 0, 0, 0.08);
}

.scroll-card.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
}

.scroll-card::after {
    content: "";
    width: 460px;
    height: 460px;
    border-radius: 50%;
    position: absolute;
    right: -160px;
    bottom: -190px;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.72), transparent 68%);
    transition: 0.7s ease;
}

.scroll-card.active::after {
    transform: scale(1.24);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 800;
    position: relative;
    z-index: 2;
}

body.dark .project-meta {
    color: rgba(0, 0, 0, 0.58);
}

.project-content {
    position: relative;
    z-index: 2;
}

.scroll-card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 6vw, 96px);
    line-height: 0.86;
    letter-spacing: -0.09em;
    margin-bottom: 24px;
    color: #ffffff;
}

body.dark .scroll-card h3 {
    color: #0d0d0d;
}

.scroll-card p {
    color: rgba(255, 255, 255, 0.62);
    font-size: 19px;
    line-height: 1.55;
    max-width: 500px;
    font-weight: 500;
    letter-spacing: -0.04em;
}

body.dark .scroll-card p {
    color: rgba(0, 0, 0, 0.62);
}

.project-link {
    display: inline-flex;
    margin-top: 34px;
    padding: 15px 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 800;
    transition: 0.3s ease;
}

body.dark .project-link {
    border-color: rgba(0, 0, 0, 0.16);
    color: #0d0d0d;
}

.project-link:hover {
    background: var(--red);
    color: #ffffff;
    transform: translateY(-4px);
}

.coming-soon-card {
    background:
        radial-gradient(circle at right bottom, rgba(255, 49, 49, 0.16), transparent 42%),
        var(--project-card);
}

.soon-badge {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 24px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.project-link.disabled {
    cursor: default;
    opacity: 0.7;
    pointer-events: none;
}

body.dark .soon-badge {
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.72);
}

/* CONTACTO */

.contact {
    text-align: center;
}

.contact h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(66px, 11vw, 176px);
    line-height: 0.85;
    letter-spacing: -0.095em;
    font-weight: 700;
    margin-bottom: 34px;
}

.contact p {
    max-width: 640px;
    margin: 0 auto 36px;
    color: var(--gray);
    font-size: 22px;
    line-height: 1.45;
    font-weight: 500;
    letter-spacing: -0.04em;
}

.contact-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--gray);
    font-size: 15px;
    font-weight: 600;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */

@media (max-width: 1100px) {

    .hero-row.top,
    .hero-row.bottom {
        transform: none;
        animation-name: fadeUp;
    }

    .mood-icon {
        display: none;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .projects-left {
        position: relative;
        top: 0;
        min-height: auto;
    }

    .projects-right {
        gap: 28px;
        padding-bottom: 0;
    }

    .scroll-card {
        min-height: 520px;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 900px) {
    .container {
        width: min(100% - 36px, 1440px);
    }

    .quote-btn {
        display: none;
    }

    .brand {
        font-size: 22px;
    }

    .brand-icon,
    .menu {
        width: 58px;
        height: 58px;
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
        font-size: 25px;
    }

    .hero {
        padding-top: 130px;
    }

    .hero-title {
        font-size: clamp(58px, 15vw, 100px);
        gap: 18px;
    }

    .hero-row {
        flex-wrap: wrap;
        gap: 18px;
    }

    .marquee-pill {
        width: 100%;
        max-width: 680px;
        height: 78px;
    }

    .marquee-track span {
        font-size: 68px;
    }

    .hero-text {
        font-size: 19px;
        margin-top: 42px;
    }

    .soft-blob {
        opacity: 0.45;
        right: -60px;
        left: auto;
        top: 38%;
    }
}


.compact-menu {
    top: 94px;
    right: 18px;
}

.compact-menu-link {
    font-size: 34px;
}

@media (max-width: 560px) {
    .header {
        padding: 22px 0;
    }

    .hero {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 80px;
    }

    .hero-title {
        font-size: 62px;
    }

    .marquee-pill {
        height: 66px;
    }

    .marquee-track span {
        font-size: 58px;
        padding-right: 36px;
    }

    .hero-star {
        font-size: 58px;
    }

    .hero-actions,
    .contact-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    section {
        padding: 90px 0;
    }

    .card,
    .scroll-card {
        border-radius: 28px;
        padding: 26px;
    }

    .scroll-card {
        min-height: 420px;
    }

    .projects {
        border-radius: 42px 42px 0 0;
    }

    .projects-sticky-layout {
        padding: 90px 0;
    }
}


/* AJUSTES SOLICITADOS: proyectos más limpios + dark mode correcto */
body.dark {
    --project-bg: #0d0d0d;
    --project-card: #17171a;
}

body.dark .projects {
    background: #0d0d0d;
    color: #ffffff;
}

body.dark .projects-left .kicker,
body.dark .projects-left p,
body.dark .project-counter,
body.dark .project-meta,
body.dark .scroll-card p,
body.dark .project-link {
    color: rgba(255, 255, 255, 0.64);
}

body.dark .project-counter,
body.dark .project-link {
    border-color: rgba(255, 255, 255, 0.18);
}

body.dark .scroll-card {
    background: #17171a;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark .scroll-card h3 {
    color: #ffffff;
}

.projects .container.projects-sticky-layout {
    width: min(1280px, calc(100% - 140px));
}

.projects-sticky-layout {
    grid-template-columns: minmax(320px, 0.78fr) minmax(460px, 0.95fr);
    gap: clamp(42px, 5vw, 74px);
    padding: 150px 0;
}

.projects-left {
    top: 128px;
    min-height: calc(100vh - 220px);
}

.projects-left h2 {
    font-size: clamp(48px, 5.4vw, 92px);
    max-width: 560px;
}

.projects-left p {
    font-size: 18px;
    max-width: 430px;
    color: rgba(255, 255, 255, 0.6);
}

.project-counter {
    padding: 12px 18px;
    font-size: 15px;
}

.projects-right {
    align-items: flex-end;
    gap: 72px;
    padding: 4vh 0 24vh;
}

.scroll-card {
    width: 100%;
    max-width: 760px;
    min-height: min(620px, 70vh);
    border-radius: 38px;
    padding: 36px;
}

.scroll-card.active {
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.scroll-card::after {
    width: 330px;
    height: 330px;
    right: -130px;
    bottom: -135px;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.34), transparent 70%);
}

.scroll-card.active::after {
    transform: scale(1.08);
}

.scroll-card h3 {
    font-size: clamp(42px, 5vw, 78px);
    max-width: 540px;
}

.scroll-card p {
    font-size: 18px;
    max-width: 460px;
}

.project-link {
    margin-top: 28px;
    padding: 13px 19px;
}

.mood-icon {
    width: 112px;
    height: 112px;
    right: 7%;
    top: 32%;
    z-index: 2;
    opacity: 0.24;
    filter: grayscale(1) blur(0.2px) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.10));
}

.mood-icon:hover {
    opacity: 0.45;
    filter: grayscale(0.5) drop-shadow(0 18px 28px rgba(0, 0, 0, 0.12));
}

@media (max-width: 1100px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 60px, 980px);
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        padding: 110px 0;
    }

    .projects-right {
        align-items: stretch;
        gap: 28px;
        padding-bottom: 0;
    }

    .scroll-card {
        max-width: 100%;
        min-height: 460px;
    }
}

@media (max-width: 560px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 34px, 980px);
    }

    .projects-left h2 {
        font-size: 50px;
    }

    .scroll-card {
        min-height: 390px;
        padding: 24px;
        border-radius: 26px;
    }

    .scroll-card h3 {
        font-size: 44px;
    }
}



/* =========================
       AJUSTES MOBILE FINALES
       Optimizado para iPhone / Android
    ========================= */

@media (max-width: 1180px) {
    .container {
        width: min(100% - 40px, 1120px);
    }

    .header {
        padding: 22px 0;
    }

    .quote-btn {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 128px 0 76px;
    }

    .hero-row.top,
    .hero-row.bottom {
        animation-name: fadeUp;
        transform: none !important;
    }

    .hero-row {
        flex-wrap: wrap;
        gap: 18px;
    }

    .mood-icon {
        opacity: 0.12;
        width: 120px;
        height: 120px;
        right: 2%;
        top: 23%;
        pointer-events: none;
    }

    .soft-blob {
        opacity: 0.32;
        width: 210px;
        height: 170px;
        left: auto;
        right: -70px;
        top: 42%;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .projects-left {
        position: relative;
        top: auto;
        min-height: auto;
        padding-bottom: 10px;
    }

    .projects-right {
        gap: 24px;
        padding-bottom: 0;
    }

    .scroll-card {
        min-height: auto;
        transform: none;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .container {
        width: min(100% - 28px, 720px);
    }

    .brand {
        gap: 10px;
        font-size: 18px;
        line-height: 0.95;
    }

    .brand-icon,
    .menu {
        width: 50px;
        height: 50px;
    }

    .brand-icon::before {
        width: 25px;
        height: 20px;
        border-width: 2px;
        left: 12px;
        top: 18px;
    }

    .brand-icon::after {
        top: 12px;
        right: 12px;
        font-size: 11px;
    }

    .nav-actions {
        gap: 10px;
    }

    .theme-toggle {
        width: 42px;
        height: 42px;
        font-size: 23px;
    }

    .menu span {
        width: 23px;
        height: 2px;
    }

    .compact-menu {
        top: 78px;
        right: 14px;
        width: min(260px, calc(100vw - 28px));
        border-radius: 24px;
    }

    .compact-menu-inner {
        padding: 16px;
    }

    .compact-menu-link {
        font-size: 24px;
        padding: 16px 18px;
        border-radius: 17px;
    }

    .hero {
        padding-top: 112px;
        padding-bottom: 64px;
    }

    .hero-title {
        font-size: clamp(56px, 16vw, 92px);
        line-height: 0.92;
        letter-spacing: -0.075em;
        gap: 16px;
    }

    .hero-row {
        gap: 14px;
    }

    .marquee-pill {
        width: 100%;
        max-width: 100%;
        height: clamp(58px, 15vw, 76px);
    }

    .marquee-track span {
        font-size: clamp(54px, 15vw, 72px);
        padding-right: 34px;
        letter-spacing: -0.075em;
    }

    .hero-star {
        font-size: clamp(52px, 15vw, 74px);
    }

    .hero-text {
        max-width: 92%;
        min-height: 90px;
        margin-top: 34px;
        font-size: 18px;
        line-height: 1.45;
        letter-spacing: -0.03em;
    }

    .hero-actions,
    .contact-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        height: 54px;
        font-size: 16px;
    }

    section {
        padding: 76px 0;
    }

    .section-head {
        gap: 16px;
        margin-bottom: 28px;
    }

    .kicker {
        font-size: 12px;
        letter-spacing: 0.16em;
        margin-bottom: 12px;
    }

    .section-title {
        font-size: clamp(42px, 13vw, 68px);
        line-height: 0.95;
        letter-spacing: -0.075em;
    }

    .section-desc {
        font-size: 16px;
        line-height: 1.55;
    }

    .cards {
        gap: 14px;
    }

    .card {
        min-height: 250px;
        padding: 24px;
        border-radius: 26px;
    }

    .card h3 {
        font-size: 32px;
    }

    .card p {
        font-size: 15.5px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .marquee-big {
        padding: 28px 0;
        background: transparent;
    }

    .marquee-big span {
        font-size: clamp(40px, 13vw, 68px);
        color: rgba(120, 120, 120, 0.22);
        padding-right: 42px;
    }

    body.dark .marquee-big span {
        color: rgba(255, 255, 255, 0.12);
    }

    .projects {
        border-radius: 34px 34px 0 0;
    }

    .projects-sticky-layout {
        padding: 76px 0;
    }

    .projects-left h2 {
        font-size: clamp(42px, 13vw, 70px);
        line-height: 0.92;
        letter-spacing: -0.075em;
        margin-bottom: 18px;
    }

    .projects-left p {
        font-size: 16.5px;
        line-height: 1.55;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .project-counter {
        padding: 11px 16px;
        font-size: 14px;
    }

    .scroll-card {
        min-height: 360px;
        padding: 24px;
        border-radius: 28px;
    }

    .scroll-card::after {
        width: 260px;
        height: 260px;
        right: -120px;
        bottom: -120px;
        opacity: 0.52;
    }

    .project-meta {
        font-size: 14px;
    }

    .scroll-card h3 {
        font-size: clamp(38px, 12vw, 62px);
        line-height: 0.9;
        letter-spacing: -0.075em;
        margin-bottom: 16px;
    }

    .scroll-card p {
        font-size: 15.5px;
        line-height: 1.55;
        max-width: 100%;
    }

    .project-link {
        margin-top: 22px;
        padding: 12px 17px;
        font-size: 14px;
    }

    .contact h2 {
        font-size: clamp(56px, 18vw, 90px);
        letter-spacing: -0.085em;
    }

    .contact p {
        font-size: 17px;
        max-width: 94%;
    }

    .footer {
        padding: 28px 0;
    }

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 22px, 420px);
    }

    .brand span:last-child {
        display: none;
    }

    .hero-title {
        font-size: 54px;
    }

    .marquee-pill {
        height: 58px;
    }

    .marquee-track span {
        font-size: 52px;
    }

    .hero-text {
        font-size: 16.5px;
    }

    .section-title,
    .projects-left h2 {
        font-size: 42px;
    }

    .scroll-card {
        min-height: 330px;
    }
}

/* Oculta/elimina el logo del header y deja los botones alineados a la derecha */
.nav {
    justify-content: flex-end;
}


/* =========================
       PROYECTOS EN CARRUSEL
       lado izquierdo + card interactiva
    ========================= */

.projects {
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 49, 49, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34));
    color: var(--text);
    border-radius: 70px 70px 0 0;
    padding: 0;
    border-top: 1px solid var(--border);
}

body.dark .projects {
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 49, 49, 0.15), transparent 34%),
        linear-gradient(180deg, #111111, #0d0d0d);
    color: #ffffff;
}

.projects .container.projects-sticky-layout {
    width: min(1280px, calc(100% - 120px));
}

.projects-sticky-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(500px, 1fr);
    gap: clamp(44px, 6vw, 92px);
    align-items: center;
    padding: clamp(110px, 10vw, 160px) 0;
    min-height: 100vh;
}

.projects-left {
    position: sticky;
    top: 120px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: start;
    padding-top: 60px;
}

.projects-left .kicker {
    color: var(--gray);
}

.projects-left h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(48px, 5.3vw, 92px);
    line-height: 0.9;
    letter-spacing: -0.085em;
    font-weight: 700;
    max-width: 620px;
    margin-bottom: 28px;
    color: var(--text);
}

body.dark .projects-left h2 {
    color: #ffffff;
}

.projects-left p {
    color: var(--gray);
    font-size: 19px;
    line-height: 1.6;
    letter-spacing: -0.035em;
    max-width: 465px;
    font-weight: 500;
    margin-bottom: 34px;
}

body.dark .projects-left p {
    color: rgba(255, 255, 255, 0.64);
}

.project-counter {
    width: fit-content;
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--gray);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: rgba(255, 255, 255, 0.36);
    backdrop-filter: blur(14px);
}

body.dark .project-counter {
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
}

.projects-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 0;
    min-width: 0;
}

.project-carousel {
    width: 100%;
    overflow: hidden;
    border-radius: 42px;
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.10);
}

.project-carousel:active {
    cursor: grabbing;
}

body.dark .project-carousel {
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.project-track {
    display: flex;
    width: 100%;
    transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.scroll-card {
    flex: 0 0 100%;
    min-height: clamp(460px, 62vh, 620px);
    background:
        radial-gradient(circle at 100% 100%, rgba(255, 49, 49, 0.22), transparent 42%),
        var(--card);
    color: var(--text);
    border-radius: 42px;
    padding: clamp(30px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    transform: none;
    opacity: 1;
    transition: background 0.45s ease, color 0.45s ease;
}

body.dark .scroll-card {
    background:
        radial-gradient(circle at 100% 100%, rgba(255, 49, 49, 0.26), transparent 42%),
        #17171a;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.09);
}

.scroll-card.active {
    transform: none;
    opacity: 1;
    box-shadow: none;
}

.scroll-card::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: -130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 49, 49, 0.24), transparent 70%);
    pointer-events: none;
}

.scroll-card.active::after {
    transform: none;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--gray);
    font-weight: 800;
    position: relative;
    z-index: 2;
}

body.dark .project-meta {
    color: rgba(255, 255, 255, 0.62);
}

.project-content {
    position: relative;
    z-index: 2;
}

.scroll-card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(46px, 6vw, 86px);
    line-height: 0.88;
    letter-spacing: -0.085em;
    margin-bottom: 24px;
    color: var(--text);
    max-width: 620px;
}

body.dark .scroll-card h3 {
    color: #ffffff;
}

.scroll-card p {
    color: var(--gray);
    font-size: 18px;
    line-height: 1.58;
    max-width: 520px;
    font-weight: 500;
    letter-spacing: -0.035em;
}

body.dark .scroll-card p {
    color: rgba(255, 255, 255, 0.66);
}

.project-link {
    display: inline-flex;
    margin-top: 30px;
    padding: 14px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 800;
    transition: 0.3s ease;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(14px);
}

body.dark .project-link {
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.project-link:hover {
    background: var(--red);
    color: #ffffff;
    transform: translateY(-4px);
    border-color: var(--red);
}

.project-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.project-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: var(--gray);
    opacity: 0.28;
    cursor: pointer;
    transition: 0.28s ease;
}

.project-dot.active {
    width: 34px;
    background: var(--red);
    opacity: 1;
}

.project-help {
    color: var(--gray);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    opacity: 0.72;
}

body.dark .project-help {
    color: rgba(255, 255, 255, 0.54);
}

@media (max-width: 1100px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 60px, 980px);
    }

    .projects-sticky-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 110px 0;
    }

    .projects-left {
        position: relative;
        top: auto;
        padding-top: 0;
    }

    .project-carousel {
        border-radius: 32px;
    }

    .scroll-card {
        min-height: 460px;
        border-radius: 32px;
    }
}

@media (max-width: 768px) {
    .projects .container.projects-sticky-layout {
        width: min(100% - 28px, 720px);
    }

    .projects {
        border-radius: 34px 34px 0 0;
    }

    .projects-sticky-layout {
        padding: 76px 0;
        gap: 28px;
    }

    .projects-left h2 {
        font-size: clamp(42px, 13vw, 70px);
        line-height: 0.92;
        letter-spacing: -0.075em;
    }

    .projects-left p {
        font-size: 16.5px;
        max-width: 100%;
    }

    .project-carousel {
        border-radius: 28px;
    }

    .scroll-card {
        min-height: 380px;
        padding: 24px;
        border-radius: 28px;
    }

    .scroll-card h3 {
        font-size: clamp(38px, 12vw, 62px);
        line-height: 0.9;
        letter-spacing: -0.075em;
    }

    .scroll-card p {
        font-size: 15.5px;
        max-width: 100%;
    }

    .project-help {
        display: none;
    }
}


.project-link {
    position: relative;
    z-index: 30;
    pointer-events: auto;
    cursor: pointer;
}


/* RESPONSIVE MOBILE FIX - solo ajustes para celular */
@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .container {
        width: min(100% - 28px, 100%) !important;
        margin-inline: auto !important;
    }

    .header {
        padding: 16px 0 !important;
    }

    .nav {
        justify-content: flex-end !important;
    }

    .nav-actions {
        gap: 10px !important;
    }

    .theme-toggle {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
    }

    .quote-btn {
        display: none !important;
    }

    .menu {
        width: 54px !important;
        height: 54px !important;
        min-width: 54px !important;
    }

    .menu span {
        width: 25px !important;
    }

    .compact-menu {
        top: 82px !important;
        right: 14px !important;
        width: min(280px, calc(100vw - 28px)) !important;
        border-radius: 28px !important;
    }

    .compact-menu-link {
        font-size: 30px !important;
        padding: 16px !important;
    }

    .hero {
        min-height: auto !important;
        padding: 118px 0 70px !important;
        overflow: hidden !important;
    }

    .hero-inner {
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
        gap: 24px !important;
    }

    .hero-title {
        width: 100% !important;
        font-size: clamp(54px, 17vw, 92px) !important;
        line-height: 0.86 !important;
        letter-spacing: -0.09em !important;
    }

    .hero-row {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .hero-row.top {
        flex-wrap: wrap !important;
    }

    .hero-row.bottom {
        margin-top: 8px !important;
    }

    .word {
        max-width: 100% !important;
    }

    .marquee-pill {
        width: 100% !important;
        max-width: 100% !important;
        height: 58px !important;
        border-radius: 999px !important;
        overflow: hidden !important;
    }

    .marquee-track span {
        font-size: 42px !important;
        line-height: 58px !important;
    }

    .hero-star {
        font-size: 44px !important;
        flex-shrink: 0 !important;
    }

    .hero-text {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 18px !important;
        line-height: 1.55 !important;
        margin-top: 10px !important;
    }

    .hero-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .btn {
        width: 100% !important;
        min-height: 56px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .soft-blob,
    .mood-icon {
        display: none !important;
    }

    section {
        padding: 64px 0 !important;
    }

    .section-head {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 18px !important;
        margin-bottom: 28px !important;
    }

    .section-title,
    .contact h2,
    .projects-left h2 {
        font-size: clamp(46px, 14vw, 76px) !important;
        line-height: 0.88 !important;
        letter-spacing: -0.085em !important;
    }

    .section-desc,
    .projects-left p,
    .contact p {
        max-width: 100% !important;
        font-size: 17px !important;
        line-height: 1.55 !important;
    }

    .cards {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .card {
        min-height: auto !important;
        padding: 24px !important;
        border-radius: 28px !important;
    }

    .card h3 {
        font-size: 34px !important;
        line-height: 0.95 !important;
    }

    .card p {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    .service-tags {
        flex-wrap: wrap !important;
    }

    .marquee-big {
        padding: 26px 0 !important;
        overflow: hidden !important;
    }

    .marquee-big-track span {
        font-size: 44px !important;
        white-space: nowrap !important;
    }

    .projects {
        padding: 64px 0 !important;
    }

    .projects-sticky-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .projects-left {
        position: relative !important;
        top: auto !important;
        min-height: auto !important;
        padding: 0 !important;
    }

    .project-counter {
        margin-top: 22px !important;
    }

    .projects-right {
        display: grid !important;
        gap: 18px !important;
    }

    .project-carousel {
        width: 100% !important;
        overflow: hidden !important;
    }

    .project-track {
        width: 100% !important;
    }

    .scroll-card,
    .project-card-item {
        width: 100% !important;
        min-width: 100% !important;
        min-height: 390px !important;
        border-radius: 32px !important;
        padding: 26px !important;
    }

    .scroll-card h3,
    .project-card-item h3 {
        font-size: clamp(42px, 13vw, 70px) !important;
        line-height: 0.88 !important;
        letter-spacing: -0.085em !important;
    }

    .scroll-card p,
    .project-card-item p {
        font-size: 16px !important;
        line-height: 1.5 !important;
        max-width: 100% !important;
    }

    .project-meta {
        gap: 12px !important;
        font-size: 14px !important;
    }

    .project-link {
        margin-top: 24px !important;
        width: fit-content !important;
        min-height: 52px !important;
        padding: 0 20px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        z-index: 30 !important;
        pointer-events: auto !important;
    }

    .project-controls {
        justify-content: center !important;
        margin-top: 18px !important;
    }

    .project-help {
        text-align: center !important;
        font-size: 14px !important;
    }

    .contact {
        padding: 70px 0 !important;
    }

    .contact-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .footer-inner {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }
}

@media (max-width: 420px) {
    .hero-title {
        font-size: clamp(48px, 16vw, 68px) !important;
    }

    .marquee-pill {
        height: 52px !important;
    }

    .marquee-track span {
        font-size: 36px !important;
        line-height: 52px !important;
    }

    .scroll-card,
    .project-card-item {
        min-height: 360px !important;
        padding: 22px !important;
    }
}

/* FIX MOBILE MARQUEE PILL */
@media (max-width: 768px) {
    .hero-row.top {
        justify-content: center !important;
        text-align: center !important;
    }

    .marquee-pill {
        width: min(82vw, 360px) !important;
        max-width: 360px !important;
        height: 72px !important;
        border-radius: 999px !important;
        margin: 10px auto 0 !important;
        overflow: hidden !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }

    .marquee-track {
        height: 72px !important;
        display: flex !important;
        align-items: center !important;
    }

    .marquee-track span {
        font-size: 48px !important;
        line-height: 72px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 420px) {
    .marquee-pill {
        width: min(78vw, 320px) !important;
        max-width: 320px !important;
        height: 66px !important;
    }

    .marquee-track {
        height: 66px !important;
    }

    .marquee-track span {
        font-size: 42px !important;
        line-height: 66px !important;
    }
}