/* --- 1. CSS Reset & Variables --- */
:root {
    /* Colors */
    --clr-dark-bg: #081F2D;
    /* Same as carousel */
    --clr-card-bg: #05141E;
    /* Deep dark for form */
    --clr-accent: #FE544A;
    /* Extracted Naranja Legger */
    --clr-accent-hover: #E64444;
    --clr-text-main: #FFFFFF;
    --clr-text-muted: #A0AEC0;
    --clr-white: #FFFFFF;
    --clr-border: #333333;

    /* Spacing (8px multiples) */
    --sp-8: 8px;
    --sp-16: 16px;
    --sp-24: 24px;
    --sp-32: 32px;
    --sp-40: 40px;
    --sp-48: 48px;
    --sp-64: 64px;
    --sp-80: 80px;
    --sp-120: 120px;

    /* Other */
    --radius-8: 8px;
    --radius-10: 10px;
    --radius-16: 16px;
    --radius-20: 20px;
    --radius-30: 30px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--clr-dark-bg);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* --- 2. Utilities --- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--sp-24);
}

.section {
    padding: var(--sp-120) 0;
}

.section--dark {
    background-color: #050A10;
}

.text--accent {
    color: var(--clr-accent);
}

.grid {
    display: grid;
    gap: var(--sp-32);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

.text-center {
    text-align: center;
}

/* --- 3. Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-16) var(--sp-32);
    border-radius: var(--radius-8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn--primary {
    background-color: var(--clr-accent);
    color: var(--clr-white);
    border-radius: var(--radius-10);
}

.btn--primary:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(254, 84, 74, 0.3);
}

.btn--outline {
    background-color: transparent;
    border: 1px solid var(--clr-accent);
    color: var(--clr-accent);
    border-radius: var(--radius-10);
}

.btn--outline:hover,
.navbar__links .btn--outline:hover {
    background-color: var(--clr-accent);
    color: var(--clr-white);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn--full {
    width: 100%;
}

/* --- 4. Navbar --- */
.navbar {
    padding: var(--sp-24) 0;
    position: relative;
    width: 100%;
    z-index: 1000;
    background-color: var(--clr-dark-bg);
}

.container--nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar__logo img {
    height: 1.875rem;
    /* 30px */
}

.navbar__links {
    display: flex;
    gap: var(--sp-40);
    align-items: center;
}

.navbar__links a {
    font-weight: 500;
    transition: var(--transition);
}

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

/* --- 5. Hero --- */
.hero {
    padding: 2rem 0 1.25rem;
    /* 32px 0 20px */
    background-color: var(--clr-dark-bg);
    position: relative;
    overflow: visible;
}

.container--hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6.625rem;
    /* 106px column gap */
    align-items: start;
    position: relative;
    z-index: 10;
}

.hero__content {
    position: relative;
    display: flex;
    flex-direction: column;
}

.hero__eyebrow {
    color: var(--clr-white);
    font-weight: 200;
    letter-spacing: 0.3em;
    margin-bottom: 1rem;
    /* 16px */
    font-size: 3.25rem;
    /* 52px */
    line-height: 3.75rem;
    /* 60px */
    text-transform: uppercase;
}

.hero__title {
    font-size: 6.625rem;
    /* 106px */
    font-weight: 800;
    line-height: 4.75rem;
    /* 76px */
    margin-bottom: 1rem;
    /* 16px */
    color: var(--clr-accent);
    text-transform: uppercase;
}

.hero__subtitle {
    font-size: 24px;
    font-weight: 400;
    line-height: 39px;
    margin-bottom: var(--sp-24);
    color: var(--clr-white);
    text-transform: uppercase;
}



.hero__image-wrapper {
    width: 100%;
    max-width: 43.75rem;
    /* 700px */
    margin-bottom: 0.75rem;
    /* 12px */
    position: relative;
    z-index: 5;
    pointer-events: none;
}

.hero__img {
    width: 100%;
    transform: rotate(-5deg);
}

/* --- 6. Form Card --- */
.card-form {
    background: var(--clr-card-bg);
    padding: 2.5rem;
    /* 40px */
    border-radius: var(--radius-30);
    width: 100%;
    max-width: 31.25rem;
    /* 500px */
    margin-left: auto;
}

.card-form__title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: var(--sp-16);
}

.form-group {
    margin-bottom: 1rem;
    /* 16px gap */
}

.form-group label {
    display: block;
    font-size: 1rem;
    /* 16px */
    font-weight: 400;
    line-height: 1.375rem;
    /* 22px */
    color: #ffffff;
    margin-bottom: 0.1875rem;
    /* 3px gap */
}

.form-group input {
    width: 100%;
    height: 3.375rem;
    /* 54px */
    padding: 1rem 1.125rem;
    /* 16px 18px */
    background: #FFFFFF;
    border: 1px solid #9FBCCC;
    border-radius: 0.375rem;
    /* 6px */
    color: #081F2D;
    font-size: 1rem;
    /* 16px */
    font-weight: 400;
    line-height: 1.375rem;
    /* 22px */
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.form-group input::placeholder {
    color: #71828C;
    /* Exact Figma placeholder color */
}

.form-group input:focus {
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 4px rgba(254, 84, 74, 0.1);
    /* Subtle brand glow */
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    /* 8px */
    margin-bottom: 2rem;
    /* 32px */
    font-size: 0.90rem;
    color: var(--clr-text-muted);
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    /* 20px */
    height: 1.25rem;
    /* 20px */
    background: #081D2B;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    /* 4px */
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
}

.form-checkbox input[type="checkbox"]:checked {
    background-color: var(--clr-accent);
    /* Orange Legger */
    border-color: var(--clr-accent);
}

.form-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 9px;
    background-image: url('Sources/Path.svg');
    /* Exact Figma checkmark */
    background-size: contain;
    background-repeat: no-repeat;
}

.form-checkbox label {
    cursor: pointer;
    line-height: 1.4;
}

/* --- 7. Carousel --- */
.carousel {
    background-color: var(--clr-dark-bg);
    padding: 1.25rem 0 2.5rem; /* Reduced from 5rem to bring next section closer */
    /* 20px 0 80px */
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.container.container--carousel {
    max-width: 100%;
    padding: 0;
}

.carousel__description {
    text-align: center;
    max-width: 50rem;
    /* 800px */
    margin: 0 auto 3.75rem;
    /* 60px bottom margin */
    font-size: 1.25rem;
    color: #FFFFFF;
    font-weight: 300;
    line-height: 1.6;
}

.carousel__viewport {
    overflow: hidden;
    width: 100%;
}

.carousel__track {
    display: flex;
    gap: 1.5rem;
    /* 24px */
    width: max-content;
    animation: scroll 40s linear infinite;
    padding-bottom: 2.5rem;
    /* 40px */
}

.carousel__card {
    width: 224px;
    height: 140px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    transition: var(--transition);
}

.carousel__card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.carousel__card img {
    max-width: 160px;
    max-height: 60px;
    filter: grayscale(1) brightness(0) invert(1) opacity(0.7);
    transition: var(--transition);
}

.carousel__card:hover img {
    opacity: 1;
}

/* Carousel Navigation */
.carousel__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3.75rem;
    /* 60px */
    margin-top: 1.25rem;
    /* 20px */
}

.carousel__dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: #FFFFFF;
    transform: scale(1.2);
}

.carousel__arrows {
    display: flex;
    gap: 1rem;
    /* 16px */
}

.arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.arrow--prev {
    background: rgba(255, 255, 255, 0.1);
}

.arrow--next {
    background: #FFFFFF;
}

.arrow img {
    width: 24px;
    height: 24px;
}

@keyframes scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 12px));
    }

    /* Half of track + half of gap */
}

/* --- 8. Section Headers --- */
.section-header {
    margin-bottom: var(--sp-32);
    text-align: center;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--sp-16);
}

.section-subtitle {
    color: var(--clr-text-muted);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.problems {
    padding-top: 40px !important; /* Overriding general .section padding to reduce gap with carousel */
}

.problems .section-title {
    color: var(--clr-accent);
}

.problems .section-subtitle {
    color: #FFFFFF;
    margin-bottom: 5.5rem;
    /* 88px */
}

.problems .grid {
    display: grid;
    grid-template-columns: repeat(3, 16.5rem);
    /* Reduced width to force 2-line titles */
    justify-content: center;
    gap: 5.5rem;
    /* 88px spacing */
}

/* --- 9. Cards --- */
.card {
    padding: 2.5rem;
    /* 40px */
    border-radius: 1.875rem;
    /* 30px */
    background-color: var(--clr-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

/* Specific styling for Problem Section "Cards" */
.problems .card {
    padding: 0.625rem;
    /* 10px internal spacing */
    background-color: transparent;
    border: none;
    transition: none;
}

.problems .card:hover {
    transform: none;
    /* No interaction */
    box-shadow: none;
    /* No interaction */
}

.card__icon {
    height: 2.25rem;
    /* 36px */
    width: auto;
    margin-bottom: 2rem;
    /* 32px */
}

.card__icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--clr-accent);
    /* Titles in Orange */
}

.card__text {
    color: #FFFFFF;
    /* White descriptions */
    font-size: 1rem;
    line-height: 1.6;
}

/* --- 10. Tech Stack --- */
.tech-stack {
    background-image: url('Sources/Group 10243.webp'), url('Sources/textura.webp');
    background-position: center calc(50% - 6.5rem), center center;
    background-repeat: no-repeat, repeat;
    background-size: 90rem 36rem, cover;
    /* 1440px x 710px */
    padding: 5rem 0 25rem;
    /* Increased padding bottom to separate the title from the image */
    position: relative;
    z-index: 1;
}

.tech-stack .container {
    max-width: 75rem;
    /* ~1200px to stay inside the 1440px Group frame */
    margin: 0 auto;
}

.tech-stack .section-title,
.tech-stack .section-subtitle,
.tech-stack .tech-card__title,
.tech-stack .tech-card__text {
    color: #081F2D;
    /* Corporate Blue */
}

.tech-card {
    padding: 0.2rem;
    width: 16rem;
    margin: 0 auto;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tech-card__icon {
    height: 4rem;
    width: auto;
    margin-bottom: 1.5rem;
}

.tech-card__icon img {
    height: 100%;
    width: auto;
    filter: invert(48%) sepia(85%) saturate(2284%) hue-rotate(331deg) brightness(101%) contrast(100%);
}

.tech-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.tech-card__text {
    font-size: 1rem;
    line-height: 1.6;
}

/* Tech Stack Success Header (Caso de Exito snippet) */
.tech-stack__success-header {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.ts-success-text {
    text-align: center;
}

.ts-success-eyebrow {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 3rem;
    /* 48px */
    color: #081F2D;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.ts-success-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 3.375rem;
    /* 54px */
    color: #081F2D;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.ts-success-desc-wrapper {
    display: inline-block;
    border-top: 1px solid #9FBCCC;
    padding-top: 0.75rem;
}

.ts-success-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    /* 24px */
    color: #081F2D;
    line-height: 1.1;
}

.ts-success-image {
    position: absolute;
    right: 0;
    bottom: 3.5rem;
    /* Alineado con la base del título BMW Colombia */
    width: 22rem;
    /* 352px - encogida un poco */
    max-width: 35%;
}

/* --- 11. Success Case --- */
.success-case {
    background: linear-gradient(to right, #f9feff, #EBF8FF);
    color: #081F2D;
    padding-top: 3rem;
}

.success-case__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    /* 80px */
    align-items: center;
}

.success-case__title-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
    /* 32px */
}

.success-case__main-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    /* 32px */
}

.success-case__stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.stat-number {
    font-size: 5.5rem;
    font-weight: 900;
    color: #081F2D;
    line-height: 1;
}

.stat-desc {
    font-size: 1.25rem;
    font-weight: 700;
    color: #081F2D;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.check-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0;
    color: #081F2D;
    font-size: 1rem;
    line-height: 1.5;
}

.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--clr-accent);
}

.btn--pill {
    border-radius: 50px;
    text-transform: none;
    letter-spacing: normal;
}

.success-case__image img {
    border-radius: 1.25rem;
    /* 20px */
    width: 100%;
}

/* --- 12. WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: var(--sp-40);
    right: var(--sp-40);
    width: 120px;
    height: 120px;
    z-index: 2000;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.wa-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: spin 8s linear infinite; /* slow and constant spin */
}

.wa-logo {
    position: absolute;
    width: 45%; /* Adjust as needed so it fits perfectly inside the spinner */
    z-index: 2;
}

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

/* --- 13. Responsive --- */

@media (max-width: 87.5rem) {

    /* 1400px */
    .hero__title {
        font-size: 5rem;
        /* 80px */
        line-height: 3.75rem;
        /* 60px */
    }

    .hero__eyebrow {
        font-size: 2.5rem;
        /* 40px */
    }

    .hero__image-wrapper {
        max-width: 37.5rem;
        /* 600px */
        margin: 0 auto 2rem;
    }
}

/* Tablet (992px) */
@media (max-width: 62rem) {

    /* 992px */
    .container--hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        /* 48px */
    }

    .hero {
        padding-top: 5rem;
        /* 80px */
        text-align: center;
    }

    .hero__image-wrapper {
        position: relative;
        width: 100%;
        max-width: 100%;
        margin-bottom: 3rem;
        /* 48px */
        order: 1;
        /* Move image back to top in mobile */
    }

    .hero__content {
        order: 2;
    }

    .hero__form-wrapper {
        order: 3;
    }

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

    .success-case__wrapper {
        grid-template-columns: 1fr;
    }
}

/* Mobile (600px) */
@media (max-width: 37.5rem) {

    /* 600px */
    .navbar__links {
        display: none;
    }

    .hero__title {
        font-size: 3.25rem;
        /* 52px */
        line-height: 3rem;
        /* 48px */
    }

    .hero__eyebrow {
        font-size: 1.75rem;
        /* 28px */
        line-height: 2rem;
        /* 32px */
    }

    .hero__subtitle {
        font-size: 1.125rem;
        /* 18px */
    }

    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .success-case__title {
        font-size: 2.8rem;
    }

    .success-case__stat {
        flex-direction: column;
        text-align: center;
    }

    .whatsapp-float {
        width: 6rem;
        height: 6rem;
        bottom: 1rem;
        right: 1rem;
    }
}

/* --- 14. Reveal Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 15. Mobile Adjustments --- */
@media (max-width: 992px) {
    :root {
        --sp-120: 60px; /* Reduce section padding on mobile */
    }

    .container {
        padding: 0 var(--sp-16);
    }

    /* Navbar */
    .navbar {
        padding: 1.125rem 0; /* 18px */
    }

    .navbar__links {
        display: none; /* Hide desktop links */
    }

    .container--nav {
        justify-content: center;
    }

    .navbar__logo img {
        height: 18px;
    }

    /* Hero */
    .hero {
        padding: 1.5rem 0 3.5rem;
    }

    .container--hero {
        grid-template-columns: 1fr;
        gap: 1.5rem; /* 24px */
        text-align: center;
    }

    .hero__content {
        order: 1;
    }

    .hero__image-wrapper {
        order: 0;
        margin-bottom: 1.5rem;
    }

    .hero__form-wrapper {
        order: 2;
        width: 100%;
    }

    .hero__eyebrow {
        font-size: 2.625rem; /* 42px */
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }

    .hero__title {
        font-size: 3rem;
        line-height: 1;
        margin-bottom: 1rem;
    }

    @media (max-width: 400px) {
        .hero__title {
            font-size: 2.5rem;
        }
        .hero__eyebrow {
            font-size: 2rem;
        }
    }

    .hero__subtitle {
        font-size: 1.375rem; /* 22px */
        line-height: 1.1;
        text-align: center;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .card-form {
        padding: 4.5rem 2rem; /* 72px 32px */
        margin: 0 auto;
    }

    /* Carousel */
    .carousel {
        padding: 1.25rem 0 3.5rem;
    }

    .carousel__description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Problems */
    .problems .grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .problems .section-header {
        text-align: center;
    }

    .problems .section-subtitle {
        margin-bottom: 3.5rem;
    }

    .card--problem {
        align-items: center;
        text-align: center;
    }

    .card--problem .card__title {
        text-align: center;
    }

    /* Tech Stack */
    .tech-stack {
        background-image: none; 
        background-color: #FFFFFF;
        padding: 3.5rem 0 2.5rem; /* Reduced another 50% as requested */
    }

    .tech-stack .grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1rem;
    }

    .tech-card {
        width: 100%;
    }

    .tech-card__title {
        font-size: 1.25rem;
    }

    .tech-stack .section-title {
        font-size: 2rem;
    }

    .tech-stack__success-header {
        position: static;
        margin-top: 4rem;
    }

    .tech-stack__success-header .container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .ts-success-eyebrow {
        font-size: 2rem;
    }

    .ts-success-title {
        font-size: 2.5rem;
    }

    .ts-success-desc {
        font-size: 1.25rem;
    }

    .ts-success-image {
        display: none;
    }

    .success-case {
        padding-top: 1.5rem; /* Reduced 50% to bring the image closer to the previous section */
    }

    .success-case__wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .stat-number {
        font-size: 4rem;
    }

    .success-case .btn {
        width: 100%;
        display: flex;
    }

    .success-case__image {
        order: -1;
        margin-bottom: 0; /* Ensure no extra space below image if needed */
    }
}