/* Fuentes locales para conservar la tipografía incluso sin conexión externa. */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../assets/fonts/inter-300.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../assets/fonts/inter-600.woff2") format("woff2");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../assets/fonts/inter-800.woff2") format("woff2");
}

/* Base tipográfica y medidas fluidas del diseño de Figma. */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #080808;
    font-family: "Inter", Arial, sans-serif;
    line-height: 1.4;
}

html {
    scroll-behavior: smooth;
}

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

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

button,
summary {
    font: inherit;
    cursor: pointer;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.15;
    text-wrap: balance;
}

p,
a,
h1,
h2,
h3 {
    overflow-wrap: break-word;
}

main {
    min-width: 0;
}

:focus-visible {
    outline: 0.1875rem solid #da0032;
    outline-offset: 0.3rem;
}

.skip_link {
    position: absolute;
    z-index: 10;
    inset-block-start: 0.5rem;
    inset-inline-start: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    color: #080808;
    transform: translateY(-200%);
}

.skip_link:focus {
    transform: translateY(0);
}

[hidden] {
    display: none !important;
}

/* Encabezado: la imagen ocupa su marco sin deformarse. */

.hero {
    position: relative;
    min-height: 22.8125rem;
    isolation: isolate;
    color: #fff;
}

.hero > img {
    position: absolute;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 50%), transparent 48%, rgb(0 0 0 / 22%));
    content: "";
}

.footer a:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.hero_copy {
    width: calc(100% - 9rem);
    max-width: 71rem;
    margin-inline: auto;
    padding-block: 6.5rem 2rem;
}

.hero_copy h1 {
    max-width: 48rem;
    font-size: 2.25rem;
}

.hero_copy p {
    max-width: 35rem;
    margin-top: 0.625rem;
    font-size: 0.9375rem;
    line-height: 1.45;
}

/* Contacto: el contenido crece cuando el texto ocupa más líneas. */

.contact_banner {
    position: relative;
    min-height: 23.25rem;
    isolation: isolate;
    color: #fff;
}

.contact_banner > img {
    position: absolute;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact_banner::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgb(0 0 0 / 70%), rgb(0 0 0 / 20%));
    content: "";
}

.contact_content {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: end;
    gap: 3rem;
    width: calc(100% - 10rem);
    max-width: 69.75rem;
    margin-inline: auto;
    padding-block: 8.125rem 3.125rem;
}

.contact_content h2 {
    font-size: 2.25rem;
}

.contact_content p {
    max-width: 35rem;
    margin-top: 1.25rem;
    font-size: 1.5rem;
    line-height: 1.4;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 4rem;
    padding: 1rem 1.25rem;
    background: #da0032;
    color: #fff;
    font-size: 1.5rem;
    text-align: center;
    line-height: 1.25;
}

.button:hover {
    background: #b80030;
}

/* Pie negro y navegación de contacto. */

.footer {
    padding: 1.6875rem 3.125rem 2.0625rem;
    background: #000;
    color: #fff;
}

.footer_grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 0.65fr);
    align-items: center;
    gap: 2rem;
    max-width: 74rem;
    margin-inline: auto;
    min-height: 17.625rem;
    font-size: 1.1rem;
    font-weight: 800;
}

.footer_brand {
    max-width: 19.25rem;
}

.footer_links,
.footer_contact {
    display: grid;
    gap: 0.2rem;
}

.footer_contact h2,
.footer_social h2 {
    font-size: 1.1rem;
    line-height: 1.4;
}

.footer_contact a {
    overflow-wrap: anywhere;
}

.social_links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.social_links a {
    display: grid;
    place-items: center;
    min-width: 2rem;
    min-height: 2.75rem;
    font-size: 0.875rem;
}

.social_links img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.footer_credit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 1.1rem;
}

.footer_credit a {
    width: 6.5625rem;
}

.footer_credit img {
    width: 100%;
    height: 3rem;
    object-fit: cover;
}

/* Accesibilidad: respetar la preferencia de movimiento reducido. */

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

/* Header uniforme: mismo marco, logo y navegación que el home. */
.navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: calc(100% - 2 * clamp(1.5rem, 5vw, 3.375rem));
    margin-inline: auto;
    min-height: 10.625rem;
}

.brand {
    flex-shrink: 0;
    width: 8.75rem;
}

.navigation_links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-size: 1rem;
    flex-wrap: wrap;
    justify-content: end;
}

.navigation_links > a,
.services_menu > summary {
    padding-block: 0.75rem;
}

.navigation_links a:hover,
.navigation_links summary:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.services_menu {
    position: relative;
}

.services_menu > summary {
    list-style: none;
}

.services_menu > summary::-webkit-details-marker {
    display: none;
}

.services_links {
    position: absolute;
    z-index: 5;
    inset-block-start: 100%;
    inset-inline-start: 0;
    display: grid;
    width: 14rem;
    padding: 0.5rem;
    background: #080808;
    box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 20%);
}

.services_links a {
    padding: 0.75rem;
}

/* Tabletas: el menú conserva su alineación y permite saltos de línea. */
@media (max-width: 64rem) {
    .navigation {
        gap: 1rem;
    }

    .navigation_links {
        gap: 0.25rem 1rem;
    }
}

/* Móviles: logo y enlaces mantienen las mismas medidas en todas las páginas. */
@media (max-width: 40rem) {
    .navigation {
        width: calc(100% - 3rem);
        align-items: start;
        min-height: 9rem;
    }

    .brand {
        width: 5rem;
    }

    .navigation_links {
        max-width: 15rem;
        padding-top: 1rem;
        font-size: 0.8125rem;
    }

    .navigation_links > a,
    .services_menu > summary {
        min-height: 2.75rem;
    }

    .services_links {
        width: 12rem;
    }
}
