:root {
    color-scheme: light;
    --cafe-oscuro: #1E1E24;
    --cafe: #7E5233;
    --dorado: #C5A059;
    --dorado-claro: #C5A059;
    --crema: #E7E8EA;
    --papel: #FFFFFF;
    --texto: #1E1E24;
    --borde: #A0A5AB;

    --alto-barra: 35px;
    --alto-menu: 78px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 0;
    background: var(--papel);
    color: var(--texto);
    font-family: 'DM Sans', Arial, sans-serif;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

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

.contenedor {
    width: min(1200px, calc(100% - 40px));
    min-width: 0;
    margin-inline: auto;
}

.saltar {
    position: absolute;
    top: -100px;
    left: 20px;
    z-index: 100;
    padding: 12px;
    background: #fff;
}

.saltar:focus {
    top: 10px;
}

/* BARRA SUPERIOR Y NAVEGACIÓN */

.barra-superior {
    height: var(--alto-barra);
    background: #1E1E24;
    color: #E7E8EA;
    font-size: 12px;
}

.barra-interior {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.barra-superior a {
    color: #fff;
}

.encabezado {
    position: relative;
    z-index: 30;
    background: var(--cafe-oscuro);
    color: #FFFFFF;
    box-shadow: 0 1px 8px #1E1E2418;
}

.navegacion {
    height: var(--alto-menu);
    display: flex;
    align-items: center;
    gap: 28px;
    min-width: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-family: Manrope, sans-serif;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

.logo-simbolo {
    color: var(--dorado);
    font-size: 34px;
    font-weight: 400;
}

.logo small {
    display: block;
    margin-top: 5px;
    color: #A0A5AB;
    font-size: 7px;
    letter-spacing: 2px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 21px;
    margin-left: auto;
    min-width: 0;
}

.menu a {
    font-size: 13px;
    font-weight: 700;
}

.menu a:hover {
    color: var(--dorado);
}

.boton {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 16px 20px;
    border: 0;
    background: var(--dorado);
    color: #1E1E24;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.boton:hover {
    background: #7E5233;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.boton-cabecera {
    white-space: nowrap;
}

.boton-menu {
    display: none;
    margin-left: auto;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #FFFFFF;
    font-size: 28px;
    cursor: pointer;
}

/* PORTADA CON VIDEO */

.hero {
    position: relative;
    height: calc(100vh - var(--alto-barra) - var(--alto-menu));
    height: calc(100dvh - var(--alto-barra) - var(--alto-menu));
    min-height: 650px;
    overflow: hidden;
    background: var(--cafe-oscuro);
    color: #fff;
}

.video-portada {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.capa-video {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            #1E1E24E8 0%,
            #1E1E24BD 55%,
            #1E1E2455 100%);
}

.hero-contenido {
    position: relative;
    z-index: 2;
    padding-top: clamp(85px, 12vh, 145px);
}

.etiqueta {
    color: #7E5233;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.etiqueta-clara {
    color: var(--dorado-claro);
}

.hero h1 {
    max-width: 880px;
    min-height: 2.25em;
    margin: 24px 0;
    font-family: Manrope, sans-serif;
    font-size: clamp(44px, 5.8vw, 80px);
    line-height: 1.08;
    letter-spacing: -.05em;
}

.hero h1 em,
h2 em {
    color: var(--dorado-claro);
    font-style: normal;
}

.cursor-escritura {
    display: inline-block;
    width: 3px;
    height: .85em;
    margin-left: 5px;
    background: var(--dorado-claro);
    vertical-align: -.08em;
    animation: parpadeo .75s steps(1) infinite;
}

.cursor-escritura.terminado {
    animation: none;
    opacity: 0;
}

@keyframes parpadeo {
    50% {
        opacity: 0;
    }
}

.hero-descripcion {
    max-width: 640px;
    color: #E7E8EA;
    font-size: 17px;
    line-height: 1.7;
}

.hero-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 35px;
}

.boton-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 15px 20px;
    border: 1px solid #E7E8EA;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.boton-secundario:hover {
    background: #ffffff25;
}

.hero-pie {
    position: absolute;
    right: 0;
    bottom: 26px;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #E7E8EA;
    font-size: 12px;
}

.hero-pie button {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

/* FRANJA DESPUÉS DE LA PORTADA */

.franja {
    background: #E7E8EA;
    border-bottom: 1px solid var(--borde);
}

.franja-interior {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    min-width: 0;
}

.franja strong {
    font-family: Manrope, sans-serif;
    color: var(--cafe-oscuro);
}

.franja span {
    color: #7E5233;
    font-size: 14px;
}

.franja a {
    color: #7E5233;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

/* Cada sección ocupa como mínimo una pantalla.
   Si su contenido es más alto, la sección crece. */

.seccion,
.proceso,
.sectores,
.contacto {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
}

.seccion,
.proceso,
.contacto {
    padding-block: 80px;
}

.seccion>.contenedor,
.proceso>.contenedor,
.sectores>.contenedor,
.contacto>.contenedor {
    flex: none;
}

/* TÍTULOS */

.titulo-seccion {
    max-width: 760px;
    margin-bottom: 42px;
}

h2 {
    margin: 16px 0;
    color: var(--cafe-oscuro);
    font-family: Manrope, sans-serif;
    font-size: clamp(36px, 4vw, 58px);
    line-height: 1.13;
    letter-spacing: -2px;
}

.seccion h2 em,
.sectores h2 em,
.contacto h2 em {
    color: #7E5233;
}

.titulo-seccion>p:last-child {
    color: #7E5233;
    line-height: 1.7;
}

/* SERVICIOS */

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.servicio {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 375px;
    min-width: 0;
    padding: 26px;
    overflow: hidden;
    border: 1px solid var(--borde);
    background: #A0A5AB;
    color: #1E1E24;
    box-shadow: 0 10px 30px #1E1E240D;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.servicio::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--dorado);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}

.servicio:hover {
    transform: translateY(-7px);
    border-color: #7E5233;
    box-shadow: 0 20px 40px #1E1E2420;
}

.servicio:hover::before {
    transform: scaleX(1);
}

.servicio-superior {
    display: flex;
    justify-content: space-between;
    color: #7E5233;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.servicio-icono {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 38px 0 24px;
    border: 1px solid #7E5233;
    border-radius: 50%;
    background: #FFFFFF;
    color: #7E5233;
    font-size: 35px;
}

.servicio h3 {
    margin: 0 0 10px;
    font-family: Manrope, sans-serif;
    font-size: 21px;
    line-height: 1.3;
}

.servicio p {
    margin: 0 0 22px;
    color: #1E1E24;
    font-size: 14px;
    line-height: 1.6;
}

.servicio a {
    margin-top: auto;
    color: #1E1E24;
    font-size: 13px;
    font-weight: 800;
}

.otros-servicios {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--borde);
}

.otros-servicios strong {
    white-space: nowrap;
    font-size: 13px;
}

.otros-servicios div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.otros-servicios span {
    padding: 8px 11px;
    border: 1px solid var(--borde);
    color: #7E5233;
    font-size: 12px;
}

/* PROCESO */

.proceso {
    background: var(--cafe-oscuro);
    color: #fff;
}

.proceso-grid,
.nosotros-grid,
.contacto-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8%;
}

.proceso h2 {
    color: #fff;
}

.proceso-intro {
    max-width: 430px;
    color: #E7E8EA;
    line-height: 1.7;
}

.paso {
    display: flex;
    gap: 25px;
    padding: 22px 0;
    border-bottom: 1px solid #ffffff35;
}

.paso:first-child {
    border-top: 1px solid #ffffff35;
}

.paso b {
    color: var(--dorado-claro);
    font-size: 23px;
}

.paso h3 {
    margin: 0 0 6px;
}

.paso p {
    margin: 0;
    color: #E7E8EA;
    font-size: 14px;
}

/* NOSOTROS */

.nosotros-grid {
    align-items: center;
}

.imagen-nosotros {
    position: relative;
    min-height: 480px;
    background: linear-gradient(135deg, #7E5233, #1E1E24);
}

.imagen-nosotros img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

.imagen-nosotros span {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 7px 10px;
    background: #1E1E24D9;
    color: #fff;
    font-size: 11px;
}

.nosotros-texto>p:not(.etiqueta) {
    color: #7E5233;
    line-height: 1.8;
}

.valores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--borde);
}

.valores b,
.valores strong,
.valores small {
    display: block;
}

.valores b {
    margin-bottom: 12px;
    color: #7E5233;
    font-size: 12px;
}

.valores strong {
    margin-bottom: 6px;
}

.valores small {
    color: #7E5233;
    line-height: 1.4;
}

/* CARRUSEL */

.sectores {
    flex-direction: column;
    justify-content: center;
    padding-block: 80px;
    overflow: hidden;
    background: var(--crema);
}

.sectores-titulo {
    margin-bottom: 42px;
    text-align: center;
}

.sectores-titulo>p:last-child {
    color: #7E5233;
}

.tarjeta-sector {
    flex: none;
    width: 300px;
    overflow: hidden;
    border: 1px solid var(--borde);
    border-radius: 16px;
    background: #FFFFFF;
    box-shadow: 0 12px 30px #1E1E2418;
}

.sector-imagen {
    height: 175px;
    overflow: hidden;
    background: linear-gradient(135deg, #7E5233, #1E1E24);
}

.sector-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.tarjeta-sector:hover .sector-imagen img {
    transform: scale(1.08);
}

.sector-imagen img.imagen-faltante {
    display: none;
}

.sector-texto {
    padding: 18px 20px 22px;
}

.sector-texto span {
    color: #7E5233;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.sector-texto h3 {
    margin: 9px 0 0;
    color: var(--cafe-oscuro);
    font-family: Manrope, sans-serif;
    font-size: 19px;
    line-height: 1.3;
}

/* CONTACTO */

.contacto {
    background: #E7E8EA;
}

.contacto p {
    color: #7E5233;
    line-height: 1.7;
}

.datos-contacto {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 40px;
    font-weight: 700;
}

form {
    padding: 35px;
    background: #FFFFFF;
    box-shadow: 0 20px 50px #1E1E2418;
}

form h3 {
    margin: 0 0 25px;
    font-family: Manrope, sans-serif;
    font-size: 25px;
}

label {
    display: block;
    margin: 16px 0;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    margin-top: 7px;
    padding: 13px;
    border: 1px solid var(--borde);
    background: #fff;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--dorado);
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.nota {
    color: #7E5233;
    font-size: 12px;
    line-height: 1.5;
}

.boton-enviar {
    width: 100%;
}

/* PIE */

footer {
    padding: 45px 0 25px;
    background: #1E1E24;
    color: #fff;
}

.pie-contenido {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

footer p {
    color: #E7E8EA;
    font-size: 13px;
}

.whatsapp {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    padding: 13px 18px;
    border-radius: 30px;
    background: #25D366;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 20px #1E1E2433;
}

/* TABLETAS */

@media (max-width: 1050px) {
    .menu {
        gap: 14px;
    }

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

    .franja-interior {
        flex-wrap: wrap;
        padding: 20px 0;
    }
}

/* MENÚ Y DISTRIBUCIÓN MÓVIL */

@media (max-width: 950px) {
    :root {
        --alto-menu: 68px;
    }

    .boton-cabecera {
        display: none;
    }

    .boton-menu {
        display: grid;
        place-items: center;
    }

    .menu {
        display: none;
        position: absolute;
        top: var(--alto-menu);
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 15px 25px;
        max-height: calc(100dvh - var(--alto-barra) - var(--alto-menu));
        overflow-y: auto;
        background: var(--cafe-oscuro);
        box-shadow: 0 12px 20px #1E1E2422;
    }

    .menu.abierto {
        display: flex;
    }

    .menu a {
        padding: 12px 0;
    }

    .hero {
        height: auto;
        min-height: calc(100vh - var(--alto-barra) - var(--alto-menu));
        min-height: calc(100dvh - var(--alto-barra) - var(--alto-menu));
        padding-bottom: 90px;
    }

    .hero h1 {
        min-height: 0;
        letter-spacing: -.04em;
    }

    .seccion,
    .proceso,
    .sectores,
    .contacto {
        align-items: flex-start;
        min-height: 100vh;
        min-height: 100dvh;
        padding-block: 75px;
    }

    .proceso-grid,
    .nosotros-grid,
    .contacto-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 35px;
    }

    .imagen-nosotros {
        min-height: 350px;
    }

    .imagen-nosotros img {
        height: 350px;
    }
}

@media (max-width: 600px) {
    .servicios-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .servicio {
        min-height: 0;
    }

    .franja-interior {
        gap: 12px;
    }

    .franja a {
        white-space: normal;
    }
}

@media (max-width: 520px) {
    .hero h1 {
        font-size: clamp(36px, 9vw, 42px);
    }

    .hero-descripcion {
        font-size: 15px;
    }

    .hero-pie {
        font-size: 11px;
    }

    .hero-pie button span {
        display: none;
    }

    .otros-servicios {
        display: block;
    }

    .otros-servicios div {
        margin-top: 15px;
    }

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

    form {
        padding: 25px 20px;
    }

    .pie-contenido {
        display: block;
    }

    .tarjeta-sector {
        width: 250px;
    }

    .sector-imagen {
        height: 150px;
    }
}

@media (max-width: 400px) {
    .contenedor {
        width: min(1200px, calc(100% - 32px));
    }

    .logo {
        font-size: 13px;
    }

    .logo small {
        font-size: 6px;
        letter-spacing: 1.2px;
    }

    .hero-acciones .boton,
    .hero-acciones .boton-secundario {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .cursor-escritura {
        display: none;
    }
}

/* Profundidad 3D: efecto puntual, sin animaciones permanentes. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    #servicios .servicios-grid {
        perspective: 1100px;
        perspective-origin: 50% 45%;
    }

    #servicios .servicio {
        transform: translateZ(0);
        backface-visibility: hidden;
        transition: transform .42s cubic-bezier(.2, .8, .2, 1),
                    box-shadow .42s ease,
                    border-color .42s ease;
    }

    #servicios .servicio::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: linear-gradient(115deg,
            transparent 20%,
            rgba(255, 255, 255, .46) 45%,
            transparent 65%);
        transform: translateX(-135%);
        transition: transform .6s ease;
    }

    #servicios .servicio:hover,
    #servicios .servicio:focus-within {
        transform: translate3d(0, -10px, 22px) rotateX(3deg) rotateY(-3deg);
        border-color: #7E5233;
        box-shadow: 16px 25px 42px rgba(30, 30, 36, .2);
    }

    #servicios .servicio:nth-child(even):hover,
    #servicios .servicio:nth-child(even):focus-within {
        transform: translate3d(0, -10px, 22px) rotateX(3deg) rotateY(3deg);
    }

    #servicios .servicio:hover::after,
    #servicios .servicio:focus-within::after {
        transform: translateX(135%);
    }

    #capacidades .cap-lista {
        perspective: 1000px;
    }

    #capacidades .cap-lista details {
        transition: transform .35s ease,
                    border-color .35s ease,
                    box-shadow .35s ease;
    }

    #capacidades .cap-lista details[open] {
        transform: translate3d(0, -4px, 12px) rotateX(1.5deg);
        box-shadow: 0 20px 34px rgba(30, 30, 36, .18);
    }
}

@media (max-width: 850px), (hover: none), (pointer: coarse) {
    #servicios .servicios-grid,
    #capacidades .cap-lista {
        perspective: none;
    }

    #capacidades .cap-lista details[open] {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #servicios .servicio,
    #servicios .servicio::after,
    #capacidades .cap-lista details {
        transition: none;
        animation: none;
    }
}
