@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    /* Cambio de fuente a Inter */
    font-weight: 400;
    /* Establecer peso de fuente delgada */
}


:root {
    --bg-color: white;
    /* Color de fondo principal */
    --second-bg-color: #eeeeeeb6;
    /* Segundo color de fondo */
    --text-color: #495057;
    /* Color de texto principal */
    --main-color: #007bff;
    /* Color principal (azul) */
    --btn-text-color: #ffffff;
    /* texto botón modo claro */
}

body.dark-mode {
    --bg-color: #333738;
    --second-bg-color: #1a1a1a;
    --text-color: #fff;
    --main-color: #0ef;
    --btn-text-color: #032830;
    /* contraste AA sobre #0ef (mejor legibilidad) */
}


html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header.sticky {
    border-bottom: .1rem solid rgba(0, 0, 0, .2);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    cursor: default;
    opacity: 0;
    animation: slideRigth 1s ease forwards;
}

.navbar a {
    display: inline-block;
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 2.2rem;
    text-decoration: none;
    transition: .3s;
    font-weight: 600;
    opacity: 0;
    animation: slideTop .5s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}


/*Home Styles*/
.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img {
    width: 35vw;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2.4rem);
    }

    100% {
        transform: translateY(0);
    }
}

/* WHY US */
.why-us {
    background: var(--second-bg-color);
    padding-top: 8rem;
}

.why-grid {
    list-style: none;
    display: grid;
    gap: 2.4rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin: 4rem 0 3rem;
    padding: 0;
}

.why-item {
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 2.4rem 2rem 2rem;
    border-radius: 1.6rem;
    position: relative;
    overflow: hidden;
    transition: .35s;
}

.why-item:hover {
    border-color: var(--main-color);
    transform: translateY(-4px);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .12);
}

.why-item i {
    font-size: 3.2rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    display: block;
}

.why-item h3 {
    font-size: 1.9rem;
    margin-bottom: .8rem;
}

.why-item p {
    font-size: 1.4rem;
    line-height: 1.45;
    margin: 0;
}

.why-proof {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin: 1rem 0 3.5rem;
}

.why-proof .metric {
    background: var(--bg-color);
    text-align: center;
    padding: 1.4rem 1rem 1.2rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.why-proof .metric strong {
    display: block;
    font-size: 2.2rem;
    line-height: 1.2;
    color: var(--main-color);
}

.why-proof .metric span {
    font-size: 1.1rem;
    letter-spacing: .3px;
    color: var(--text-color);
}

.why-process {
    max-width: 70rem;
    margin: 0 auto 3rem;
}

.why-process ol {
    counter-reset: steps;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    padding: 0;
    list-style: none;
}

.why-process li {
    flex: 1 1 160px;
    background: var(--bg-color);
    padding: 1.2rem 1rem 1.2rem 3.4rem;
    border-radius: 1rem;
    position: relative;
    font-size: 1.3rem;
    line-height: 1.35;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.why-process li span {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background: var(--main-color);
    color: var(--second-bg-color);
    font-size: 1.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.why-cta {
    text-align: center;
    margin-top: .5rem;
}

.why-cta .mini-trust {
    margin-top: 1.4rem;
    font-size: 1.2rem;
    letter-spacing: .5px;
    opacity: .8;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--main-color);
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-content p {
    font-size: 1.6rem;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.home.home--ai {
    min-height: clamp(560px, 92vh, 820px);
    padding: 7rem 9% 3.2rem;
    display: flex;
    align-items: center;
}

/* --- HERO SPACING REFINEMENTS --- */
.home.home--ai {
    /* Más respiro arriba; evita solaparse con header fijo en distintos altos de viewport */
    padding-top: clamp(9rem, 14vh, 15rem);
}

/* Limita ancho para que no se expanda demasiado y cause sensación de bloques pegados */
.home.home--ai .home-content {
    max-width: 1180px;
    width: 100%;
}

/* Flujo vertical consistente: espacio base entre hermanos directos */
.home.home--ai .home-content>*+* {
    margin-top: 1.2rem;
}

/* Ajustes finos sobre clases existentes (override sin tocar definiciones originales) */
.hero-brand {
    margin-bottom: 2rem;
    /* +0.8rem */
}

.hero-positioning {
    margin: 0 0 2.6rem !important;
    /* separa del subtítulo dinámico */
}

.hero-sub {
    margin-top: .2rem !important;
    margin-bottom: 2.1rem !important;
    line-height: 1.25;
}

.hero-lead {
    margin-top: 0 !important;
    margin-bottom: 2.4rem !important;
}

.proof-points {
    margin-top: .2rem !important;
    margin-bottom: 2.4rem !important;
}

.trust-badges {
    margin-top: 2.2rem !important;
    margin-bottom: 2.6rem !important;
}

.cta-group {
    margin-top: .4rem !important;
    margin-bottom: 1.2rem;
}

.enterprise-logos {
    margin-top: 2.6rem !important;
    margin-bottom: .4rem;
}

/* Evitar desbordes horizontales de chips/listas largas */
.proof-points,
.enterprise-logos {
    word-break: break-word;
}

/* Mejor legibilidad del título grande */
.hero-title {
    line-height: 1.15;
    letter-spacing: -.5px;
}

/* Responsive fine-tuning */
@media (max-width: 820px) {
    .hero-title {
        font-size: 3.4rem;
    }

    .hero-lead,
    .hero-positioning {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .home.home--ai {
        padding-top: clamp(11rem, 18vh, 14rem);
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-lead,
    .hero-positioning {
        font-size: 1.42rem;
        line-height: 1.45;
    }

    .proof-points li,
    .logo-chip {
        font-size: 1.05rem;
        padding: .55rem .8rem;
    }

    .trust-badges {
        gap: 1rem .9rem;
    }
}

/* Reduce densidad en pantallas muy pequeñas */
@media (max-width: 420px) {
    .hero-title {
        font-size: 2.7rem;
    }

    .home.home--ai .home-content>*+* {
        margin-top: 1rem;
    }

    .hero-lead {
        margin-bottom: 2rem !important;
    }

    .proof-points {
        margin-bottom: 2rem !important;
    }

    .trust-badges {
        margin-top: 1.8rem !important;
        margin-bottom: 2.2rem !important;
    }
}

/* Dark mode subtle contrast tweaks (solo si necesario para separar bloques) */
.dark-mode .home.home--ai .home-content>* {
    /* ligera separación visual vertical usando sombra suave opcional
       (descomentar si se requiere más separación perceptiva) */
    /* box-shadow: 0 1px 0 rgba(255,255,255,.04); */
}

.hero-brand h1 {
    font-size: 4.0rem;
    max-width: 22ch;
}

@media (max-width:768px) {
    .hero-brand h1 {
        font-size: 3.2rem;
    }

    .home.home--ai {
        padding: 7rem 6% 3.5rem;
    }
}

.hero-positioning {
    font-size: 1.55rem;
    line-height: 1.45;
    max-width: 78ch;
    margin: 0 0 2.4rem;
    /* más separación del subtítulo */
    font-weight: 500;
}

/* Add visual separation for hero-sub if preceding paragraph spacing collapses */
.hero-sub {
    margin-top: .4rem;
    margin-bottom: 1.6rem;
}

.proof-points {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .8rem .9rem;
    padding: 0;
    margin: 1rem 0 1.6rem;
    max-width: 82ch;
}

.proof-points li {
    font-size: 1.15rem;
    background: var(--second-bg-color);
    padding: .55rem .9rem;
    border-radius: 1rem;
    line-height: 1.15;
    border: 1px solid rgba(0, 0, 0, .04);
}

.enterprise-logos {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    margin: 2.2rem 0 1.2rem;
}

.logo-chip {
    font-size: 1.05rem;
    background: var(--second-bg-color);
    padding: .55rem .9rem;
    border-radius: 1.2rem;
    letter-spacing: .4px;
    border: 1px solid rgba(0, 0, 0, .05);
}

.ai-matrix {
    background: var(--second-bg-color);
    padding-top: 8rem;
}

.matrix-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 4rem 0 2rem;
}

.matrix-grid .cap {
    background: var(--bg-color);
    padding: 1.8rem 1.6rem 1.4rem;
    border-radius: 1.4rem;
    border: 1px solid rgba(0, 0, 0, .06);
    transition: .35s;
}

.matrix-grid .cap:hover {
    border-color: var(--main-color);
    transform: translateY(-4px);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .12);
}

.matrix-grid .cap h3 {
    font-size: 1.6rem;
    margin: 0 0 .6rem;
}

.matrix-grid .cap p {
    font-size: 1.25rem;
    line-height: 1.4;
    margin: 0;
}

/* Removed duplicate preliminary hero-lead / trust-badges / btn typography definitions (consolidated below) */

.dark-mode .matrix-grid .cap {
    background: var(--second-bg-color);
    border-color: rgba(255, 255, 255, .08);
}

.dark-mode .proof-points li,
.dark-mode .logo-chip {
    background: var(--bg-color);
    border-color: rgba(255, 255, 255, .08);
}


.hero-lead {
    font-size: 1.7rem;
    margin: .8rem 0 1.2rem;
    max-width: 78ch;
}

.trust-badges {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    padding: 0;
    margin: 1.4rem 0 2.2rem;
}

.trust-badges li {
    background: var(--second-bg-color);
    border: 1px solid rgba(0, 0, 0, .06);
    padding: .9rem 1.2rem .8rem;
    border-radius: 1.2rem;
    font-size: 1.2rem;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    min-width: 88px;
    text-align: center;
}

.trust-badges li strong {
    font-size: 1.5rem;
    color: var(--main-color);
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    align-items: center;
}

.btn-alt {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
    border: .2rem solid var(--main-color);
}

.btn-alt:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.dark-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
}

.dark-toggle-btn:focus-visible {
    outline: 2px solid var(--main-color);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Adjust hero on small screens */
@media (max-width:768px) {
    .hero-brand h1 {
        font-size: 3.4rem;
    }

    .trust-badges {
        justify-content: flex-start;
    }
}



.ai-operating-model {
    background: var(--second-bg-color);
    padding-top: 8rem;
}

.ai-matrix-table {
    display: grid;
    gap: .8rem;
    margin: 4rem 0 2.5rem;
}

.ai-matrix-row {
    display: grid;
    gap: 1.2rem;
    background: var(--bg-color);
    padding: 1.2rem 1.4rem;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 1rem;
    grid-template-columns: 170px 170px 1fr 170px;
    align-items: start;
}

.ai-matrix-head {
    background: var(--main-color);
    color: var(--second-bg-color);
    font-weight: 600;
    border-color: var(--main-color);
}

.ai-matrix-head span {
    font-size: 1.25rem;
    letter-spacing: .5px;
}

.ai-matrix-row span {
    font-size: 1.25rem;
    line-height: 1.35;
}

.ai-col--stage {
    font-weight: 600;
    color: var(--main-color);
}

.dark-mode .ai-matrix-row {
    background: var(--second-bg-color);
    border-color: rgba(255, 255, 255, .08);
}

.dark-mode .ai-matrix-head {
    background: var(--main-color);
    color: #000;
}

@media (max-width: 980px) {
    .ai-matrix-row {
        grid-template-columns: 140px 140px 1fr 140px;
    }
}

@media (max-width: 760px) {

    .ai-matrix-row,
    .ai-matrix-head {
        grid-template-columns: 1fr;
    }

    .ai-matrix-row span+span {
        border-top: 1px dashed rgba(0, 0, 0, .08);
        padding-top: .6rem;
    }

    .dark-mode .ai-matrix-row span+span {
        border-color: rgba(255, 255, 255, .15);
    }
}

/* Portfolio (cards) */
.showcase {
    background: var(--bg-color);
    padding-top: 8rem;
}

.section-intro {
    max-width: 70ch;
    margin: -2rem auto 3rem;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.45;
}

.portfolio-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 3rem;
}

.work-card {
    background: var(--second-bg-color);
    padding: 2rem 1.8rem 1.6rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(0, 0, 0, .05);
    transition: .35s;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.work-card h3 {
    font-size: 1.8rem;
    margin: 0;
}

.work-card p {
    font-size: 1.35rem;
    line-height: 1.4;
    margin: 0;
}

.work-card ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    padding: 0;
    margin: .6rem 0 0;
}

.work-card ul li {
    font-size: 1.05rem;
    background: var(--bg-color);
    padding: .4rem .7rem;
    border-radius: .7rem;
    border: 1px solid rgba(0, 0, 0, .06);
    letter-spacing: .3px;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: var(--main-color);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .12);
}

.dark-mode .work-card {
    background: var(--second-bg-color);
    border-color: rgba(255, 255, 255, .08);
}

.dark-mode .work-card ul li {
    background: var(--bg-color);
    border-color: rgba(255, 255, 255, .08);
}

/* Blog */
.blog {
    background: var(--second-bg-color);
    padding-top: 8rem;
}

.blog-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin: 4rem 0 2rem;
}

.post-card {
    background: var(--bg-color);
    padding: 2rem 1.8rem 1.6rem;
    border-radius: 1.4rem;
    border: 1px solid rgba(0, 0, 0, .06);
    transition: .35s;
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.post-card h3 {
    font-size: 1.7rem;
    margin: 0;
    line-height: 1.25;
}

.post-card a {
    color: var(--text-color);
    text-decoration: none;
}

.post-card a:hover {
    color: var(--main-color);
}

.post-card p {
    font-size: 1.35rem;
    line-height: 1.45;
    margin: 0;
}

.post-card .meta {
    font-size: 1.05rem;
    letter-spacing: .4px;
    opacity: .75;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--main-color);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .12);
}

.dark-mode .post-card {
    background: var(--bg-color);
    border-color: rgba(255, 255, 255, .08);
}


.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    text-decoration: none;
    transition: .5s ease;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
    animation-delay: calc(.2s * var(--i));
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}



.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--btn-text-color);
    /* antes: #fff fijo */
    /* ensure strong contrast for button text */
    letter-spacing: .1rem;
    text-decoration: none;
    font-weight: 600;
}

/* asegurar visibilidad del texto interno del botón */
.btn .btn-label {
    color: inherit;
}

.btn:hover {
    box-shadow: none;
}


/*About Styles*/
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: var(--second-bg-color);
}

.about-img img {
    width: 35vw;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;

}


/*Services Styles*/
.services h2 {
    margin-bottom: 5rem;
}

.services-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.services-container .services-box {
    flex: 1 1 30rem;
    background: var(--second-bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    transition: .5s ease;
}

.services-container .services-box:hover {
    border-color: var(--main-color);
    transform: scale(1.02);
}

.services-box i {
    font-size: 7rem;
    color: var(--main-color);
}

.services-box h3 {
    font-size: 2.6rem;
}

.services-box p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}


/*Portfolio Styles*/
.portfolio {
    background: var(--bg-color);
}

.portfolio h2 {
    margin-bottom: 4rem;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
}

.portfolio-container .portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
}

.portfolio-box img {
    width: 100%;
    transition: .5s ease;
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    /* Ajusta este valor según sea necesario */
    transition: .5s ease;
}


.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 3rem;
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin: .3rem 0 1rem;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5erm;
    background: var(--text-color);
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: var(--second-bg-color);
}


/*Contact Section*/
.contact h2 {
    margin-bottom: 3rem;
}

.contact form {
    max-width: 70rem;
    margin: 1rem auto;
    text-align: center;
    margin-bottom: 3rem;
}

.contact form .input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;

}

.contact form .input-box input,
.contact form textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background: var(--second-bg-color);
    border-radius: .8rem;
    margin: .7rem 0;
    border: solid .2px var(--main-color);
}

.contact form .input-box input {
    width: 49%;
}

.contact form textarea {
    resize: none;
}

.contact form .btn {
    margin-top: 2rem;
    cursor: pointer;
}

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--second-bg-color);
}

.footer-text p {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}


.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

/*Breakpoints*/
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width:991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .services {
        padding-bottom: 7rem;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .contact {
        min-height: auto;
    }

    .footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        padding: 2rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
        /* Ocultar el menú en pantallas más pequeñas por defecto */
    }

    .navbar.active {
        display: block;
        /* Mostrar el menú cuando está activo */
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    #menu-icon {
        display: block;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column-reverse;
    }

    .about-img {
        width: 70vw;
        margin-top: 4rem;
    }

    .services h2 {
        margin-bottom: 3rem;
    }

    .portfolio h2 {
        margin-bottom: 3rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 671px) {
    .portfolio-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    .contact form .input-box input {
        width: 100%;
    }
}

@media (max-width: 365px) {
    .home-img img {
        width: 90vw;
    }

    .about-img img {
        width: 90vw;
    }

    .footer {
        flex-direction: column-reverse;
    }

    .footer p {
        text-align: center;
        margin-top: 2rem;
    }
}




@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideBottom {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideTop {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideRigth {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }

}



/* .home-content h1{
    animation: slideBottom 2s ease forwards;
}
.home-content h3{
    animation: slideRigth 2s ease forwards;
}
.home-content p{
    animation: slideLeft 2s ease forwards;
}
.home-content a.btn {
    opacity: 0;
    animation: slideTop 2s ease forwards;
}


.home-content h1{
    animation: slideBottom 1s ease forwards;
}
.home-content h3{
    animation: slideRigth 1s ease forwards;
}
.home-content p{
    animation: slideLeft 1s ease forwards;
}
.home-content a.btn {
    opacity: 0;
    animation: slideTop 1s ease forwards;
}

.services .heading{
    animation:slideBottom 1s ease forwards ;
}

.services .services-container{
    animation:slideTop 1s ease forwards ;
} */



.anim-fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.4, .0, .2, 1), transform .7s cubic-bezier(.4, .0, .2, 1);
}

.anim-fade-up.in-view {
    opacity: 1;
    transform: none;
}

.anim-stagger>* {
    opacity: 0;
    transform: translateY(18px);
}

.anim-stagger.in-view>* {
    animation: staggerUp .55s forwards;
    animation-delay: calc(var(--i, 0)*70ms);
}

.anim-stagger.in-view>*:nth-child(1) {
    --i: 0;
}

.anim-stagger.in-view>*:nth-child(2) {
    --i: 1;
}

.anim-stagger.in-view>*:nth-child(3) {
    --i: 2;
}

.anim-stagger.in-view>*:nth-child(4) {
    --i: 3;
}

.anim-stagger.in-view>*:nth-child(5) {
    --i: 4;
}

.anim-stagger.in-view>*:nth-child(6) {
    --i: 5;
}

.delay-1 {
    transition-delay: .08s;
}

.delay-2 {
    transition-delay: .16s;
}

.delay-3 {
    transition-delay: .24s;
}

.delay-4 {
    transition-delay: .32s;
}

.delay-5 {
    transition-delay: .40s;
}

.delay-6 {
    transition-delay: .48s;
}

@keyframes staggerUp {
    to {
        opacity: 1;
        transform: none;
    }
}

/* Gradient animated headline */
.gradient-pulse {
    background: linear-gradient(90deg, #007bff, #6a5bff, #00c4ff);
    -webkit-background-clip: text;
    background-clip: text;
    /* standard property for compatibility */
    color: transparent;
    background-size: 200% 100%;
    animation: gradShift 6s linear infinite;
}

@keyframes gradShift {
    0% {
        background-position: 0% 50%
    }

    100% {
        background-position: 200% 50%
    }
}

/* Nav active underline animated */
.navbar a {
    position: relative;
    transition: color .35s;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--main-color);
    transition: width .35s;
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

/* Counters styling */
.count {
    display: inline-block;
    min-width: 3ch;
    font-variant-numeric: tabular-nums;
}

/* Form enhancements */
.contact-form {
    position: relative;
    --border: rgba(0, 0, 0, .12);
    --focus: #007bff;
}

.contact-form .input-box input,
.contact-form textarea {
    background: var(--second-bg-color);
    border: 1.4px solid var(--border);
    border-radius: 1.1rem;
    padding: 1.4rem 1.6rem;
    font-size: 1.4rem;
    line-height: 1.4;
    transition: border-color .3s, background .4s, box-shadow .4s;
    resize: vertical;
}

.contact-form .input-box {
    gap: 1.2rem;
}

.contact-form .input-box input:focus,
.contact-form textarea:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 35%, transparent);
    background: var(--bg-color);
}

.contact-form .input-box input:valid,
.contact-form textarea:valid {
    border-color: color-mix(in srgb, var(--focus) 65%, #fff);
}

.contact-form .input-box input.error,
.contact-form textarea.error {
    border-color: #ff3d3d;
    animation: fieldShake .4s;
}

@keyframes fieldShake {

    0%,
    100% {
        transform: translateX(0)
    }

    20%,
    60% {
        transform: translateX(-6px)
    }

    40%,
    80% {
        transform: translateX(6px)
    }
}

/* Send button micro-interaction */
.btn-send {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: .8rem;
}

.btn-send .btn-progress,
.btn-send .btn-check {
    position: absolute;
    right: 1.4rem;
    width: 1.2rem;
    height: 1.2rem;
    opacity: 0;
    transform: scale(.4);
    transition: .4s;
}

.btn-send.submitting .btn-label {
    opacity: .4;
}

.btn-send.submitting .btn-progress {
    opacity: 1;
    animation: spin 1s linear infinite;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    transform: scale(1);
}

.btn-send.success {
    background: #10b981;
}

.btn-send.success .btn-progress {
    display: none;
}

.btn-send.success .btn-check {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chips & cards hover subtle lift refinement */
.logo-chip,
.proof-points li,
.work-card,
.post-card,
.services-box {
    will-change: transform;
}

.logo-chip:hover,
.proof-points li:hover {
    transform: translateY(-4px);
    transition: .4s;
}

/* Reduce motion respect */
@media (prefers-reduced-motion:reduce) {

    .anim-fade-up,
    .anim-stagger>* {
        transition: none;
        animation: none;
        opacity: 1 !important;
        transform: none !important;
    }

    .gradient-pulse {
        animation: none;
    }

    .btn-send .btn-progress {
        animation: none;
    }
}