.empresaHero {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 72px);
    background: var(--color2);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: clamp(72px, 8vw, 118px) 0;
}

.empresaHeroImage,
.empresaHeroOverlay {
    position: absolute;
    inset: 0;
}

.empresaHeroImage {
    width: 100%;
    height: 136%;
    object-fit: cover;
    z-index: -2;
    transform: translate3d(0, var(--empresa-hero-parallax, 0px), 0) scale(1.06);
    will-change: transform;
}

.empresaHeroOverlay {
    background:
        linear-gradient(90deg, rgba(37, 35, 29, 0.58) 0%, rgba(37, 35, 29, 0.34) 42%, rgba(37, 35, 29, 0.08) 100%),
        linear-gradient(0deg, rgba(37, 35, 29, 0.24), rgba(37, 35, 29, 0.06));
    z-index: -1;
}

.empresaHeroGrid {
    width: 100%;
    display: flex;
    align-items: center;
}

.empresaHeroCopy {
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    width: min(680px, 100%);
    padding-left: clamp(24px, 4vw, 54px);
    border-left: 7px solid var(--color1);
    position: relative;
}

.empresaHeroCopy h1 {
    font-size: clamp(3.4rem, 8vw, 7.8rem);
    line-height: 0.9;
    margin-bottom: 28px;
    max-width: 7ch;
    font-weight: 900;
}

.empresaHeroCopy h1 span {
    display: block;
    font-weight: 300;
}

.empresaHeroCopy p {
    font-size: clamp(1.05rem, 1.45vw, 1.28rem);
    line-height: 1.65;
    max-width: 520px;
    margin-bottom: 28px;
    font-weight: 300;
}

.empresaHeroCopy .btn {
    font-weight: 800;
    letter-spacing: 0;
}

.empresaLeadershipImage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.empresaMilestone {
    background: var(--color1);
    color: #fff;
    padding: clamp(34px, 5vw, 62px) 0;
}

.empresaMilestoneGrid {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 5vw, 72px);
}

.empresa45 {
    width: min(220px, 48vw);
    margin-inline: auto;
    display: block;
}

.empresaMilestone h2,
.empresaLeadership h2,
.empresaGalleryHeader h2 {
    line-height: 0.95;
    margin-bottom: 18px;
}

.empresaMilestone .subtitulo,
.empresaLeadership .subtitulo,
.empresaGalleryHeader .subtitulo {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
    font-weight: 300;
    color: inherit;
}

.empresaMilestone .subtitulo_destacado,
.empresaLeadership .subtitulo_destacado,
.empresaGalleryHeader .subtitulo_destacado {
    font-size: clamp(2.6rem, 6vw, 6rem);
    font-weight: 900;
    color: #fff;
}

.empresaLeadership .subtitulo_destacado,
.empresaGalleryHeader .subtitulo_destacado {
    color: var(--color1);
}

.empresaMilestone p,
.empresaGalleryHeader p {
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.55;
    max-width: 760px;
    font-weight: 300;
}

.empresaLeadership {
    padding: clamp(72px, 9vw, 124px) 0;
    background: #f5f5f3;
}

.empresaLeadershipGrid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(320px, 1.08fr);
    gap: clamp(30px, 6vw, 86px);
    align-items: center;
}

.empresaLeadershipText {
    border-left: 7px solid var(--color1);
    padding-left: clamp(22px, 3vw, 38px);
}

.empresaLeadershipText p {
    font-size: clamp(1rem, 1.45vw, 1.22rem);
    line-height: 1.72;
    color: #34322e;
    margin-bottom: 18px;
}

.empresaLeadershipImage {
    border-radius: 8px;
    overflow: hidden;
    height: clamp(340px, 36vw, 430px);
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.14);
}

.empresaPurpose {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--color2);
    color: #fff;
    padding: clamp(86px, 9vw, 138px) 0;
}

.empresaPurpose::before,
.empresaPurpose::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
}

.empresaPurpose::before {
    inset: -16%;
    background-image: url("../img/fondocasas.jpg");
    background-size: cover;
    background-position: center;
    transform: translate3d(0, var(--empresa-purpose-parallax, 0px), 0) scale(1.16);
    will-change: transform;
}

.empresaPurpose::after {
    z-index: -1;
    background: rgba(0, 0, 0, 0.32);
}

.empresaPurposeGrid {
    display: grid;
    grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
    gap: clamp(28px, 6vw, 96px);
    align-items: start;
}

.empresaPurposeLabel {
    border-left: 7px solid #fff;
    padding-left: clamp(18px, 2.5vw, 30px);
    min-height: 96px;
    display: flex;
    align-items: flex-start;
}

.empresaPurposeLabel span {
    font-size: clamp(0.9rem, 1.3vw, 1.1rem);
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.empresaPurposeText h2 {
    max-width: 860px;
    font-family: "Roboto", sans-serif;
    font-size: clamp(1.75rem, 3.15vw, 3.45rem);
    line-height: 1.08;
    font-weight: 300;
    letter-spacing: 0;
    text-transform: none;
    text-wrap: balance;
}

.empresaPurposeText h2 span {
    font-weight: 900;
}

.empresaValues {
    background: #fff;
    padding: clamp(72px, 8vw, 116px) 0;
}

.empresaValuesHeader {
    display: grid;
    grid-template-columns: minmax(360px, 0.85fr) minmax(320px, 0.85fr);
    gap: clamp(32px, 6vw, 86px);
    align-items: end;
    margin-bottom: clamp(34px, 5vw, 64px);
    border-left: 7px solid var(--color1);
    padding-left: clamp(20px, 3vw, 34px);
}

.empresaValuesHeader p {
    max-width: 620px;
    color: #34322e;
    font-size: clamp(1rem, 1.45vw, 1.2rem);
    line-height: 1.65;
    padding-bottom: 12px;
}

.empresaValuesHeader h2 {
    line-height: 0.95;
    text-align: right;
}

.empresaValuesHeader .subtitulo {
    display: block;
    font-size: clamp(2rem, 3.8vw, 3.65rem);
    font-weight: 300;
    color: var(--color2);
}

.empresaValuesHeader .subtitulo_destacado {
    display: block;
    font-size: clamp(2.45rem, 4.8vw, 4.85rem);
    font-weight: 900;
    color: var(--color1);
}

.empresaValuesGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid rgba(37, 35, 29, 0.14);
    border-left: 1px solid rgba(37, 35, 29, 0.14);
}

.empresaValuesGrid article {
    min-height: clamp(330px, 26vw, 430px);
    padding: clamp(28px, 4vw, 52px);
    border-right: 1px solid rgba(37, 35, 29, 0.14);
    border-bottom: 1px solid rgba(37, 35, 29, 0.14);
    background: #fff;
}

.empresaValuesGrid article span {
    display: inline-block;
    margin-bottom: clamp(42px, 5vw, 72px);
    color: var(--color1);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.2em;
}

.empresaValuesGrid h3 {
    max-width: 13ch;
    margin-bottom: 18px;
    color: var(--color2);
    font-size: clamp(1.7rem, 2.8vw, 2.55rem);
    line-height: 0.98;
}

.empresaValuesGrid p {
    max-width: 64ch;
    color: #3f3d37;
    font-size: clamp(0.98rem, 1.18vw, 1.08rem);
    line-height: 1.68;
}

.empresaPrinciples {
    background: #f5f5f3;
    padding: clamp(68px, 8vw, 108px) 0;
}

.empresaPrinciplesHeader {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(260px, 0.65fr);
    align-items: center;
    gap: clamp(22px, 5vw, 72px);
    margin-bottom: clamp(28px, 4vw, 46px);
    border-right: 7px solid var(--color1);
    padding-right: clamp(20px, 3vw, 34px);
}

.empresaPrinciplesHeader h2 {
    line-height: 0.95;
    text-align: right;
}

.empresaPrinciplesHeader .subtitulo {
    display: block;
    font-size: clamp(2rem, 3.8vw, 3.65rem);
    font-weight: 300;
    color: var(--color2);
}

.empresaPrinciplesHeader .subtitulo_destacado {
    display: block;
    font-size: clamp(2.45rem, 4.8vw, 4.85rem);
    font-weight: 900;
    color: var(--color1);
}

.empresaPrinciplesHeader p {
    color: #111;
    font-size: clamp(1rem, 1.55vw, 1.2rem);
    line-height: 1.6;
    max-width: 620px;
    padding-bottom: 0;
}

.empresaPrinciplesGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 24px);
    background: transparent;
    border-radius: 8px;
}

.empresaPrinciples article {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: clamp(430px, 36vw, 560px);
    padding: 0;
    border: 1px solid #e3dfd8;
    border-top: 6px solid var(--color1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 22px 52px rgba(37, 35, 30, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.empresaPrinciples article::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(37, 35, 29, 0.02) 0%, rgba(37, 35, 29, 0.08) 38%, rgba(37, 35, 29, 0.68) 100%),
        linear-gradient(90deg, rgba(37, 35, 29, 0.2) 0%, rgba(37, 35, 29, 0.02) 70%);
    z-index: -1;
}

.empresaPrinciples article > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: -2;
}

.empresaPrinciples article > h3,
.empresaPrinciples article > p {
    margin-left: clamp(26px, 3vw, 36px);
    margin-right: clamp(26px, 3vw, 36px);
}

.empresaPrinciples article:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 68px rgba(37, 35, 30, 0.13);
}

.empresaPrinciples h3 {
    max-width: 12ch;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    line-height: 1.02;
    margin-bottom: 16px;
    color: #fff;
}

.empresaPrinciples article > p {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.62;
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    padding-bottom: clamp(28px, 3.2vw, 44px);
}

.empresaLivingGallery {
    padding: clamp(64px, 8vw, 112px) 0 0;
    background: #fff;
    overflow: hidden;
}

.empresaGalleryHeader {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 1fr);
    align-items: end;
    gap: clamp(42px, 6vw, 96px);
    margin-bottom: clamp(36px, 5vw, 62px);
}

.empresaGalleryHeader p {
    color: #3f3d37;
    padding-bottom: 14px;
}

.empresaGalleryHeader .subtitulo_destacado {
    font-size: clamp(2.7rem, 4.6vw, 4.95rem);
}

.empresaFlipGalleryViewport {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    padding: 8px 0 18px;
}

.empresaFlipGallery {
    --row: clamp(248px, 20.7vw, 352px);
    display: flex;
    flex-direction: column;
    gap: 0;
    perspective: 1200px;
}

.empresaFlipTrack {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: empresaGalleryMarquee 92s linear infinite;
}

.empresaFlipTrack--2 {
    animation-duration: 112s;
    transform: translateX(-18vw);
}

.empresaFlipTile {
    position: relative;
    background: #ebe9e3;
    width: clamp(250px, 24vw, 410px);
    height: var(--row);
    flex: 0 0 auto;
    border: 1px solid #fff;
    border-radius: 0;
    margin: 0;
    perspective: 1200px;
    box-shadow: none;
}

.empresaFlipTile--narrow {
    width: clamp(190px, 18vw, 310px);
}

.empresaFlipTile--wide {
    width: clamp(320px, 31vw, 520px);
}

.empresaFlipCard {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.empresaFlipTile.is-flipping .empresaFlipCard {
    animation: empresaTileHalfFlip 1.2s cubic-bezier(0.42, 0, 0.18, 1) forwards;
}

.empresaFlipFace {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.empresaFlipFace--back {
    transform: rotateY(180deg);
}

@keyframes empresaGalleryMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes empresaTileHalfFlip {
    0% {
        transform: rotateY(0deg);
    }

    100% {
        transform: rotateY(180deg);
    }
}

@media (max-width: 980px) {
    .empresaLeadershipGrid,
    .empresaPrinciplesHeader,
    .empresaGalleryHeader,
    .empresaPurposeGrid,
    .empresaValuesHeader {
        grid-template-columns: 1fr;
    }

    .empresaValuesHeader h2 {
        text-align: left;
    }

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

    .empresaValuesGrid article {
        min-height: auto;
    }

    .empresaPrinciplesHeader {
        border-right: 0;
        border-left: 7px solid var(--color1);
        padding-right: 0;
        padding-left: clamp(20px, 3vw, 34px);
    }

    .empresaPrinciplesHeader h2 {
        order: -1;
        text-align: left;
    }

    .empresaHero {
        min-height: calc(100svh - 64px);
        padding: clamp(62px, 12vw, 92px) 0;
    }

    .empresaHeroCopy {
        width: min(620px, 92%);
    }

    .empresaMilestoneGrid,
    .empresaPrinciplesGrid {
        grid-template-columns: 1fr;
    }

    .empresaLeadershipImage {
        height: 320px;
    }

    .empresaFlipGallery {
        --row: clamp(207px, 38.6vw, 290px);
    }

    .empresaFlipTile {
        width: clamp(220px, 44vw, 340px);
    }

    .empresaFlipTile--narrow {
        width: clamp(180px, 36vw, 280px);
    }

    .empresaFlipTile--wide {
        width: clamp(260px, 52vw, 390px);
    }
}

@media (max-width: 620px) {
    main#empresa > section {
        min-height: auto;
    }

    .empresaHeroCopy {
        padding-left: 22px;
    }

    .empresaHeroCopy h1 {
        font-size: clamp(2.7rem, 16vw, 4.5rem);
    }

    .empresaMilestone,
    .empresaLeadership,
    .empresaPurpose,
    .empresaValues,
    .empresaPrinciples,
    .empresaLivingGallery {
        padding-left: 0;
        padding-right: 0;
    }

    .empresaLivingGallery {
        padding-bottom: 0;
    }

    .empresaPurposeText h2 {
        font-size: clamp(1.65rem, 7vw, 2.55rem);
    }

    .empresaValuesHeader,
    .empresaPurposeLabel {
        margin-inline: 0;
    }

    .empresaValuesGrid article {
        padding: 30px 22px;
    }

    .empresaValuesGrid article span {
        margin-bottom: 28px;
    }

    .empresaPrinciples article {
        min-height: auto;
    }

    .empresaFlipGallery {
        --row: 185px;
    }

    .empresaFlipTile,
    .empresaFlipTile--narrow,
    .empresaFlipTile--wide {
        width: 210px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .empresaFlipTrack {
        animation: none;
    }

    .empresaFlipTile.is-flipping .empresaFlipCard {
        animation: none;
    }
}
