:root {
    --ink: #111111;
    --forest: #080808;
    --hero-background: #151719;
    --paper: #f4f7fa;
    --lime: #a7e3d4;
    --coral: #e98b72;
    --blue: #dfe2e3;
    --line: rgba(17, 17, 17, 0.16);
    --body-font: "DM Sans", sans-serif;
    --display-font: "Space Grotesk", sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body-font);
}

section[id],
article[id] {
    scroll-margin-top: 88px;
}

.site-header {
    z-index: 1020;
    background: rgba(244, 247, 250, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.navbar {
    min-height: 76px;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-family: var(--display-font);
    font-size: 19px;
    font-weight: 700;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: var(--forest);
}

.brand-symbol {
    display: block;
    width: clamp(150px, 38vw, 220px);
    max-width: calc(100vw - 112px);
    max-height: 60px;
    height: auto;
    flex: 0 1 auto;
    object-fit: contain;
}

.navbar-nav .nav-link {
    padding: 10px 13px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.show {
    color: var(--forest);
}

.navbar-nav .dropdown-toggle {
    border: 0;
    background: transparent;
    font-family: var(--body-font);
}

.dropdown-menu {
    min-width: 190px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 14px 35px rgba(28, 43, 37, 0.12);
}

.dropdown-item {
    padding: 9px 10px;
    border-radius: 3px;
    color: var(--ink);
    font-size: 14px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: #e9e9e7;
    color: var(--forest);
}

.nav-contact {
    margin-left: 8px;
    padding-right: 19px !important;
    padding-left: 19px !important;
    border: 1px solid var(--forest);
    border-radius: 3px;
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 82px 0 94px;
    background-color: var(--hero-background);
    color: var(--paper);
}

.home-jumbotron {
    padding: 72px 0 84px;
    background-image:
        repeating-linear-gradient(0deg, transparent 0 47px, rgba(220, 220, 220, 0.1) 47px 48px),
        repeating-linear-gradient(90deg, transparent 0 47px, rgba(220, 220, 220, 0.1) 47px 48px),
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
        url("/assets/images/fondo.jpg");
    background-position: center, center, center, center;
    background-size: 48px 48px, 48px 48px, cover, cover;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 32px;
}

.hero-title {
    grid-column: 1;
    grid-row: 2;
    max-width: 900px;
    margin: 0 auto;
    font-family: var(--display-font);
    font-size: 48px;
    font-weight: 600;
    line-height: 1.1;
    text-align: left;
}

.hero-title em {
    color: var(--lime);
    font-style: normal;
}

.hero-copy {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    z-index: 1;
    max-width: 590px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 21px;
    color: var(--lime);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.eyebrow span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral);
}

.hero-copy h1,
.section-heading h2,
.about-heading h2,
.contact-content h2 {
    margin: 0;
    font-family: var(--display-font);
    font-weight: 600;
    letter-spacing: 0;
}

.hero-copy h1 {
    max-width: 620px;
    font-size: 64px;
    line-height: 1.04;
}

.hero-copy h1 em,
.section-heading h2 em,
.about-heading h2 em {
    color: var(--lime);
    font-style: normal;
}

.hero-description {
    max-width: 455px;
    margin: 24px 0 30px;
    color: rgba(244, 247, 250, 0.8);
    font-size: 17px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.btn-lime {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 11px 18px;
    border: 1px solid var(--lime);
    border-radius: 3px;
    background: var(--lime);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.btn-lime:hover,
.btn-lime:focus {
    border-color: var(--paper);
    background: var(--paper);
    color: var(--ink);
}

.text-link-light {
    color: var(--paper);
    font-size: 14px;
    font-weight: 600;
    text-decoration-color: rgba(244, 247, 250, 0.45);
    text-underline-offset: 5px;
}

.text-link-light:hover,
.text-link-light:focus {
    color: var(--lime);
}

.hero-visual {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.hero-visual::before {
    content: none;
}

.hero-visual img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--paper);
}

.hero-services {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin-top: 0;
}

.hero-service-item {
    overflow: hidden;
}

.hero-visual .hero-services img {
    width: 100%;
    height: auto;
    aspect-ratio: 110 / 68;
    object-fit: cover;
    border: 0;
    transition: transform 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .hero-service-item:hover img {
        transform: scale(1.04);
    }
}

.hero-index {
    position: absolute;
    right: 28px;
    bottom: 17px;
    color: rgba(245, 243, 235, 0.65);
    font-size: 11px;
    font-weight: 600;
}

.page-section {
    padding: 92px 0;
}

.projects-section {
    background: var(--paper);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 42px;
}

.eyebrow-dark {
    color: var(--forest);
}

.eyebrow-dark::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--coral);
    content: "";
}

.section-heading h2,
.about-heading h2 {
    max-width: 640px;
    font-size: 46px;
    line-height: 1.08;
}

.section-heading h2 em,
.about-heading h2 em {
    color: var(--forest);
}

.section-intro {
    max-width: 370px;
    margin: 0 0 3px;
    color: #555b60;
    font-size: 15px;
    line-height: 1.7;
    text-align: center;
}

.project-list {
    align-items: stretch;
}

.project-card {
    display: flex;
    min-height: 390px;
    flex-direction: column;
    align-items: flex-start;
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.project-card-green {
    background-color: #e2f1ed;
}

.project-card-coral {
    background-color: #f8e7e1;
}

.project-card-green::before,
.project-card-coral::before {
    display: block;
    width: calc(100% + 46px);
    margin: -23px -23px 18px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    content: "";
    flex: 0 0 auto;
}

.project-card-green::before {
    aspect-ratio: 1672 / 941;
    background-image: linear-gradient(rgba(226, 241, 237, 0.42), rgba(226, 241, 237, 0.42)), url("/assets/images/industrial/grupo1.png");
}

.project-card-coral::before {
    aspect-ratio: 1672 / 941;
    background-image: linear-gradient(rgba(248, 231, 225, 0.42), rgba(248, 231, 225, 0.42)), url("/assets/images/servicios/grupo2.png");
}

.project-card-blue {
    background: #e4e6e7;
}

.project-number {
    color: #555b60;
    font-size: 10px;
    font-weight: 700;
}

.project-mark {
    display: flex;
    width: 100%;
    height: 94px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 11px 0 15px;
}

.project-mark span {
    display: block;
    width: 38px;
    height: 38px;
    border: 1px solid var(--forest);
}

.mark-plan span:nth-child(2) {
    width: 55px;
    height: 55px;
    transform: rotate(45deg);
}

.mark-team span:nth-child(1),
.mark-team span:nth-child(3) {
    width: 29px;
    height: 29px;
    border-radius: 50%;
}

.mark-team span:nth-child(2) {
    width: 49px;
    height: 49px;
    border-radius: 50%;
    background: var(--coral);
}

.mark-result span:nth-child(2) {
    width: 54px;
    height: 54px;
    background: var(--lime);
}

.project-card h3,
.about-card h3 {
    margin: auto 0 8px;
    font-family: var(--display-font);
    font-size: 21px;
    font-weight: 600;
}

.project-card p,
.about-card p {
    max-width: 290px;
    margin: 0;
    color: #555b60;
    font-size: 14px;
    line-height: 1.65;
}

.project-offerings {
    display: grid;
    gap: 8px;
    margin: 17px 0 0;
    padding: 0;
    color: #555b60;
    font-size: 14px;
    line-height: 1.5;
    list-style: none;
}

.project-offerings li {
    padding-left: 17px;
    position: relative;
}

.project-offerings li::before {
    position: absolute;
    left: 0;
    color: var(--forest);
    content: "—";
}

.project-gallery-toggle {
    width: 100%;
    margin-top: 22px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--forest);
    border-radius: 4px;
    background: transparent;
    color: var(--forest);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
}

.project-gallery-toggle:hover,
.project-gallery-toggle:focus-visible {
    background: var(--forest);
    color: #fff;
}

.project-gallery-toggle:focus-visible,
.project-gallery:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

.project-gallery-toggle span {
    font-size: 22px;
    line-height: 1;
    transition: transform 180ms ease;
}

.project-card.is-gallery-open .project-gallery-toggle span {
    transform: rotate(45deg);
}

.project-gallery-panel {
    width: 100%;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    transition: max-height 320ms ease, margin-top 320ms ease;
}

.project-card.is-gallery-open .project-gallery-panel {
    max-height: 230px;
    margin-top: 14px;
}

.project-card-green.is-gallery-open #industrial-gallery {
    max-height: 1000px;
}

.project-card-coral.is-gallery-open #services-gallery {
    max-height: 1000px;
}

.project-gallery {
    display: grid;
    width: 100%;
    grid-auto-columns: calc((100% - 12px) / 3);
    grid-auto-flow: column;
    grid-template-rows: 1fr;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
}

#industrial-gallery .project-gallery,
#services-gallery .project-gallery {
    grid-auto-columns: auto;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
    overflow: visible;
    overscroll-behavior-x: auto;
    scroll-snap-type: none;
}

.project-gallery-item {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    aspect-ratio: 1;
    margin: 0;
    border: 1px solid #6d9fbd;
    background: #fff;
    cursor: zoom-in;
    scroll-snap-align: start;
}

.project-gallery-item:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

.project-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 250ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .project-gallery-item:hover img {
        transform: scale(1.1);
    }
}

.about-section {
    background: #eceeed;
}

.about-grid > article {
    display: flex;
}

.about-heading {
    max-width: 710px;
    margin-bottom: 38px;
}

.about-heading > p:last-child {
    max-width: 570px;
    margin: 19px 0 0;
    color: #555b60;
    font-size: 16px;
    line-height: 1.7;
}

.about-card {
    width: 100%;
    height: 100%;
    min-height: 240px;
    padding: 23px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.68);
}

.about-card-number {
    display: inline-grid;
    width: 32px;
    aspect-ratio: 1;
    place-items: center;
    margin-bottom: 24px;
    background: var(--forest);
    color: var(--lime);
    font-size: 11px;
    font-weight: 700;
}

.about-card h3 {
    margin: 0 0 10px;
    font-size: 23px;
}

.values-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.values-card li {
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--forest);
    font-size: 12px;
    font-weight: 600;
}

.contact-section {
    padding: 70px 0;
    background-color: #eaf2f8;
}

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

.contact-copy {
    flex: 1 1 55%;
}

.contact-content .eyebrow {
    color: var(--ink);
}

.contact-content h2 {
    max-width: 620px;
    font-size: 42px;
    line-height: 1.1;
}

.contact-content .btn-lime {
    margin-top: 24px;
    flex: 0 0 auto;
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.contact-visual {
    flex: 0 1 42%;
    margin: 0;
}

.contact-visual img {
    display: block;
    width: 100%;
    height: auto;
}

.contact-content .btn-lime:hover,
.contact-content .btn-lime:focus {
    border-color: var(--forest);
    background: var(--forest);
}

.contact-content button.btn-lime,
.contact-modal .btn-lime {
    font-family: var(--body-font);
    cursor: pointer;
}

.contact-modal .modal-content {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
}

.project-image-modal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: #111;
    color: #fff;
}

.project-image-modal .modal-header {
    padding: 14px 18px;
    border: 0;
}

.project-image-modal .modal-title {
    margin: 0;
    font-family: var(--display-font);
    font-size: 20px;
}

.project-image-modal .modal-body {
    padding: 0 18px 16px;
    text-align: center;
}

.project-image-modal .modal-body img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
}

.project-image-modal .modal-body p {
    margin: 10px 0 0;
    color: #fff;
    font-size: 14px;
}

.contact-modal .modal-header,
.contact-modal .modal-footer {
    padding: 22px 24px;
    border-color: var(--line);
}

.contact-modal .modal-title {
    margin: 0;
    font-family: var(--display-font);
    font-size: 27px;
    font-weight: 600;
}

.contact-modal .modal-body {
    padding: 22px 24px;
}

.contact-form-note {
    margin: 0 0 20px;
    color: #555b60;
    font-size: 14px;
    line-height: 1.6;
}

.contact-form .form-label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.contact-form .form-control {
    border-color: rgba(17, 17, 17, 0.22);
    border-radius: 3px;
}

.contact-form .form-control:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 0.2rem rgba(8, 8, 8, 0.12);
}

.contact-form-status {
    margin: 16px 0 0;
    font-size: 14px;
    line-height: 1.5;
}

.contact-form-status:empty {
    display: none;
}

.contact-form-status.is-success {
    color: #17633c;
}

.contact-form-status.is-error {
    color: #a12622;
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.site-footer {
    padding: 22px 0;
    background-color: var(--ink);
    background-image: linear-gradient(rgba(17, 17, 17, 0.72), rgba(17, 17, 17, 0.82)), url("/assets/images/imagen7.png");
    background-position: center;
    background-size: cover;
    color: rgba(245, 243, 235, 0.75);
    font-size: 12px;
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 500ms ease, transform 500ms ease;
}

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

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.footer-social a {
    display: grid;
    width: 36px;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(245, 243, 235, 0.35);
    border-radius: 50%;
    color: var(--paper);
}

.footer-social a:hover,
.footer-social a:focus-visible {
    border-color: var(--lime);
    color: var(--lime);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.footer-social .social-icon-fill,
.footer-social .social-icon-dot {
    fill: currentColor;
    stroke: none;
}

:focus-visible {
    outline: 3px solid var(--coral);
    outline-offset: 3px;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 10px 0 16px;
    }

    .navbar-nav .nav-link {
        padding: 10px 0;
    }

    .nav-contact {
        display: inline-block;
        margin: 4px 0 0;
        padding: 9px 14px !important;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .hero-copy h1 {
        font-size: 52px;
    }

}

@media (max-width: 767.98px) {
    .project-card.project-card-green,
    .project-card.project-card-coral {
        min-height: 0;
    }

    .project-card-green h3,
    .project-card-coral h3 {
        margin: 0 0 8px;
    }

    .project-gallery-toggle {
        margin-top: 0;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 62px 0 72px;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 38px;
    }

    .hero-copy,
    .hero-visual {
        grid-column: 1;
        grid-row: auto;
    }

    .hero-copy h1 {
        max-width: 520px;
        font-size: 46px;
    }

    .hero-title {
        width: 100%;
        max-width: 560px;
        font-size: 36px;
    }

    .hero-description {
        font-size: 16px;
    }

    .hero-visual {
        max-width: 560px;
    }

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

    .page-section {
        padding: 67px 0;
    }

    .section-heading,
    .contact-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading {
        gap: 16px;
        margin-bottom: 30px;
    }

    .section-heading h2,
    .about-heading h2 {
        font-size: 38px;
    }

    .project-card {
        min-height: 0;
    }

    .about-grid > article {
        min-height: 340px;
    }

    .contact-section {
        padding: 56px 0;
    }

    .contact-copy,
    .contact-visual {
        width: 100%;
    }

    .contact-visual {
        max-width: 420px;
        align-self: center;
    }

    .contact-content h2 {
        font-size: 36px;
    }
}

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

    .project-gallery-item img,
    .project-gallery-panel,
    .project-gallery-toggle,
    .project-gallery-toggle span {
        transition: none;
    }

    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-visual .hero-services img {
        transition: none;
    }
}
