:root {
    --brand-red: #7F0000;
    --accent-red: #F71C27;
    --bg-light: #e5e5e5;
    --card-gray: #d9d9d9;
    --text-dark: #1f1f1f;
    --text-muted: #3f3f3f;
    --white: #ffffff;
    --max: 1280px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Montserrat", sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.15;
}

.container {
    width: min(85%);
    /* width: min(100%, var(--max)); */
    margin: 0 auto;
}

.title-band {
    background: var(--brand-red);
    color: var(--white);
    text-align: center;
    padding: 18px 12px;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 999px;
    background: var(--accent-red);
    color: var(--white);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    min-width: 210px;
    height: 54px;
    transition: transform .2s ease, filter .2s ease;
}

.cta-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

.top-nav {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 7;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2.4rem;
    padding: 1.25rem 1.8rem;
    font-family: "League Spartan", sans-serif;
    font-size: clamp(1.15rem, 1.7vw, 2rem);
    text-transform: uppercase;
}

.top-nav a {
    color: #131313;
    text-decoration: none;
    letter-spacing: .5px;
    position: relative;
}

.top-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: var(--accent-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}

.top-nav a:hover::after {
    transform: scaleX(1);
}

#hero {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    border-bottom: 2px solid #d0d0d0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .8s ease;
    transform: scale(1.05);
    animation: slowZoom 10s linear infinite;
}

.hero-slide.active {
    opacity: 1;
}

@keyframes slowZoom {
    from { transform: scale(1.02); }
    to { transform: scale(1.1); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(238, 238, 238, .88) 34.5%, rgba(238, 238, 238, .0) 60%);
    z-index: 2;
}

.hero-left {
    position: relative;
    z-index: 4;
    max-width: 35%;
    min-height: 100svh;
    padding: 2rem 2rem 2.2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
}

.logo-box {
    margin-bottom: 1.2rem;
    width: min(360px, 100%);
    animation: fadeInUp .65s ease both;
}

.logo-box img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-title {
    font-family: "League Spartan", sans-serif;
    font-size: clamp(2.1rem, 4vw, 4.5rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: .3px;
    max-width: 520px;
    animation: fadeInUp .9s ease both;
}

.hero-p {
    font-size: clamp(1.2rem, 1.45vw, 2rem);
    color: #252525;
    max-width: 530px;
    font-weight: 400;
    animation: fadeInUp 1.05s ease both;
}

.hero-left .cta-btn {
    margin-top: .3rem;
    animation: fadeInUp 1.15s ease both;
}

.slider-mark {
    position: absolute;
    right: clamp(1.2rem, 3vw, 3.2rem);
    bottom: clamp(1rem, 2.2vw, 2.3rem);
    z-index: 4;
    background: #fff200;
    padding: .2rem .45rem;
    font-size: clamp(1.4rem, 2vw, 2.4rem);
}

#nosotros {
    background: var(--bg-light);
}

.about-grid,
.about-cta-grid,
.projects-grid {
    display: grid;
    grid-template-columns: 37% 63%;
    min-height: 430px;
}

#nosotros .about-grid {
    grid-template-areas:
        "image main"
        "image cta";
    grid-template-rows: auto auto;
    align-items: stretch;
}

#nosotros .about-grid > .image-panel {
    grid-area: image;
    min-height: 100%;
}

#nosotros .about-grid > .about-main {
    grid-area: main;
}

#nosotros .about-grid > .about-cta {
    grid-area: cta;
}

.image-panel {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 360px;
}

.image-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(245, 245, 245, .72);
}

.about-label {
    position: absolute;
    top: 22px;
    left: 20px;
    z-index: 2;
    background: #fff200;
    font-size: clamp(1.2rem, 1.2vw, 1.8rem);
    padding: .2rem .5rem;
    text-transform: uppercase;
}

.about-main {
    background: var(--bg-light);
    padding: clamp(2rem, 4vw, 4rem);
    text-align: center;
}

.year-block {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .9rem;
    margin-bottom: 2.2rem;
}

.year-word {
    color: var(--accent-red);
    font-size: clamp(2.2rem, 3.1vw, 3.8rem);
    font-family: "League Spartan", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

.year-digits {
    display: flex;
    gap: .5rem;
}

.digit {
    width: clamp(58px, 5vw, 84px);
    height: clamp(70px, 6.2vw, 96px);
    background: #efefef;
    border: 1px solid #c5c5c5;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: var(--accent-red);
    font-family: "League Spartan", sans-serif;
    font-size: clamp(2.2rem, 3.5vw, 4.5rem);
    font-weight: 700;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .12);
}

.about-main p {
    font-size: clamp(1.15rem, 2.1vw, 1.9rem);
    margin-bottom: 1.6rem;
    color: #232323;
    line-height: 1.2;
}

.about-cta {
    background: var(--brand-red);
    color: var(--white);
    display: grid;
    place-items: center;
    text-align: center;
    padding: clamp(2rem, 5vw, 4rem);
    min-height: 340px;
}

.about-cta h3 {
    font-family: "League Spartan", sans-serif;
    font-size: clamp(2.1rem, 4vw, 4.4rem);
    line-height: 1.08;
    margin-bottom: 1.4rem;
    font-weight: 700;
}

.about-cta p {
    font-size: clamp(1.6rem, 2.7vw, 2.2rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

#servicios,
#capacidades,
#contacto {
    background: var(--bg-light);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    padding: 1.4rem 1.7rem 1.9rem;
}

.card {
    background: var(--card-gray);
    border-radius: 8px;
    min-height: 172px;
    padding: 1.5rem 1.1rem;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    text-transform: uppercase;
    letter-spacing: .4px;
    line-height: 1.15;
    transition: transform .22s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.card-dropdown {
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.card-dropdown .card-label {
    font-weight: 700;
}

.dropdown-list {
    position: absolute;
    top: calc(100% - 6px);
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    width: min(320px, 92vw);
    padding: .9rem 1rem;
    border-radius: 0 0 10px 10px;
    background: #ededed;
    box-shadow: 0 16px 30px rgba(0, 0, 0, .14);
    list-style: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 5;
}

.card-dropdown:hover .dropdown-list,
.card-dropdown:focus-within .dropdown-list {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-list li {
    padding: .45rem 0;
    font-size: .98rem;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.25;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.dropdown-list li:last-child {
    border-bottom: 0;
}

.projects-grid {
    grid-template-columns: 32% 34% 34%;
}

.projects-right {
    background: var(--bg-light);
    padding: clamp(1.8rem, 4vw, 4rem) clamp(1.4rem, 3vw, 3.1rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

.projects-right h3 {
    font-family: "League Spartan", sans-serif;
    font-size: clamp(2.2rem, 4.2vw, 3.4rem);
    line-height: .98;
    max-width: 620px;
}

.projects-right p {
    font-size: clamp(1.55rem, 2.4vw, 1.1rem);
    line-height: 1.12;
    max-width: 700px;
    color: #262626;
}

.cap-cta {
    background: var(--accent-red);
    color: var(--white);
    text-align: center;
    padding: clamp(2rem, 4vw, 3.8rem) 1rem;
    margin-top: .7rem;
}

.cap-cta p {
    font-size: clamp(1.6rem, 3.2vw, 2rem);
    max-width: 1020px;
    margin: 0 auto;
    line-height: 1.18;
}

.contact-wrap {
    background: var(--bg-light);
    display: grid;
    grid-template-columns: 34% 66%;
    gap: .6rem;
    min-height: 370px;
    padding: clamp(1.2rem, 2.6vw, 2.3rem) clamp(1rem, 2.5vw, 2.7rem) 2.5rem;
}

.contact-left {
    font-family: "League Spartan", sans-serif;
    font-size: clamp(2.3rem, 3.2vw, 4rem);
    line-height: .95;
    font-weight: 700;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: .7rem;
}

.contact-list {
    list-style: none;
    display: grid;
    gap: 1.35rem;
    align-content: start;
    padding-top: .45rem;
}

.contact-list li {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    column-gap: 1rem;
    font-size: clamp(1.55rem, 1.5vw, 2rem);
    color: #242424;
    line-height: 1.12;
}

.icon {
    font-size: clamp(2rem, 3vw, 3.1rem);
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1120px) {
    .top-nav {
        gap: 1.1rem;
        font-size: 1.05rem;
        padding: .95rem .9rem;
        background: rgba(245, 245, 245, .77);
        backdrop-filter: blur(2px);
        justify-content: center;
    }

    .hero-left {
        max-width: 52%;
    }
}

@media (max-width: 960px) {
    .hero-overlay {
        background: linear-gradient(to bottom, rgba(238, 238, 238, .9) 54%, rgba(238, 238, 238, .2) 100%);
    }

    .hero-left {
        max-width: 100%;
        min-height: 70svh;
        justify-content: flex-end;
        padding-top: 6.1rem;
        padding-bottom: 2.4rem;
    }

    .logo-box {
        width: min(260px, 72vw);
        margin-bottom: .3rem;
    }

    .slider-mark {
        font-size: .95rem;
    }

    .about-grid,
    .about-cta-grid,
    .projects-grid,
    .contact-wrap {
        grid-template-columns: 1fr;
    }

    #nosotros .about-grid {
        grid-template-areas:
            "image"
            "main"
            "cta";
    }

    .image-panel {
        min-height: 320px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-left {
        justify-content: flex-start;
        font-size: clamp(2.5rem, 9vw, 4rem);
    }
}

@media (max-width: 620px) {
    .top-nav {
        flex-wrap: wrap;
        row-gap: .45rem;
        column-gap: .8rem;
        font-size: .86rem;
        padding: .7rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .card-dropdown {
        min-height: auto;
        padding-bottom: 4.5rem;
    }

    .dropdown-list {
        top: calc(100% - 2px);
        left: 0;
        transform: translateY(12px);
        width: 100%;
    }

    .card-dropdown:hover .dropdown-list,
    .card-dropdown:focus-within .dropdown-list {
        transform: translateY(0);
    }

    .hero-title {
        font-size: clamp(1.95rem, 11vw, 2.0rem);
    }

    .hero-p,
    .about-main p,
    .projects-right p,
    .cap-cta p,
    .contact-list li {
        font-size: clamp(1.1rem, 6vw, 1.45rem);
    }
}
