/* ============================================
   Constructora Unidos — Design tokens
   Paleta: concreto + acero + naranja seguridad
   ============================================ */
:root {
    --concrete: #EEF2F8;
    --concrete-dim: #E0E6F0;
    --charcoal: #0F2A5C;
    --charcoal-soft: #173B78;
    --steel: #526078;
    --steel-light: #93A0B8;
    --safety: #F47920;
    --safety-dark: #D9650F;
    --paper: #FFFFFF;
    --line: rgba(15, 42, 92, 0.12);
    --line-dark: rgba(255, 255, 255, 0.14);
    --font-display: "Barlow Condensed", sans-serif;
    --font-body: "Inter", sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --wrap: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--charcoal);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

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

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

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.wrap {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(2.1rem, 4vw, 3rem);
    text-transform: uppercase;
}

h3 {
    font-size: 1.3rem;
    text-transform: uppercase;
    font-weight: 600;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--safety);
    margin: 0 0 10px;
}

.section-lead {
    max-width: 640px;
    color: var(--steel);
    font-size: 1.05rem;
    margin: 14px 0 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 28px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 2px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

    .btn:hover {
        transform: translateY(-1px);
    }

    .btn:focus-visible {
        outline: 3px solid var(--safety);
        outline-offset: 2px;
    }

.btn-primary {
    background: var(--safety);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--safety-dark);
    }

.btn-ghost {
    border-color: currentColor;
    color: var(--charcoal);
    background: transparent;
}

.section-dark .btn-ghost {
    color: var(--paper);
}

.btn-ghost:hover {
    background: var(--charcoal);
    color: var(--paper);
}

.btn-block {
    width: 100%;
}

/* ============ HEADER ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 245, 241, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .logo-mark {
        height: 42px;
        width: auto;
        display: block;
    }

    .logo-text {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 1.35rem;
        text-transform: uppercase;
        letter-spacing: 0.01em;
    }

    .logo-text .accent {
        color: var(--safety);
    }

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

    .main-nav a {
        font-size: 0.92rem;
        font-weight: 500;
        color: var(--charcoal);
        padding: 6px 0;
        border-bottom: 2px solid transparent;
        transition: border-color 0.15s ease, color 0.15s ease;
    }

        .main-nav a:hover {
            border-color: var(--safety);
        }

.nav-cta {
    background: var(--charcoal);
    color: var(--paper) !important;
    padding: 10px 18px !important;
    border-bottom: none !important;
}

    .nav-cta:hover {
        background: var(--safety) !important;
    }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

    .nav-toggle span {
        width: 24px;
        height: 2px;
        background: var(--charcoal);
    }

/* ============ HERO ============ */
.hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: var(--charcoal);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(6, 18, 41, 0.78) 0%, rgba(6, 18, 41, 0.55) 42%, rgba(6, 18, 41, 0.88) 100%),
        linear-gradient(90deg, rgba(6, 18, 41, 0.92) 0%, rgba(6, 18, 41, 0.35) 62%, rgba(6, 18, 41, 0.15) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 70px 24px 90px;
    max-width: 760px;
}

.hero-copy h1,
.hero-content h1 {
    font-size: clamp(2.8rem, 5.6vw, 4.8rem);
    text-transform: uppercase;
    color: var(--paper);
}

    .hero-content h1 em {
        font-style: normal;
        color: var(--safety);
    }

.hero-lead {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 520px;
    margin: 22px 0 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-content .btn-ghost {
    color: var(--paper);
    border-color: rgba(255, 255, 255, 0.6);
}

    .hero-content .btn-ghost:hover {
        background: var(--paper);
        color: var(--charcoal);
    }

.hero-stages {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 56px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.6);
}

    .hero-stages .tick {
        color: var(--safety);
    }

.value-strip {
    background: var(--charcoal);
    border-top: 1px solid var(--line-dark);
}

.value-strip-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.value-item {
    padding: 26px 24px;
    border-right: 1px solid var(--line-dark);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .value-item:last-child {
        border-right: none;
    }

    .value-item strong {
        font-family: var(--font-display);
        text-transform: uppercase;
        font-size: 1.1rem;
        color: var(--paper);
    }

    .value-item span {
        color: var(--steel-light);
        font-size: 0.88rem;
    }

/* ============ SECTIONS ============ */
.section {
    padding: 100px 0;
}

.section-tight {
    padding: 100px 0;
}

.section-dark {
    background: var(--charcoal);
    color: var(--paper);
}

    .section-dark .section-lead {
        color: var(--steel-light);
    }

/* ============ SERVICIOS ============ */
.services-grid {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.service-card {
    background: var(--paper);
    padding: 32px 28px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

    .service-card:hover {
        background: var(--concrete);
    }

    .service-card:active {
        transform: scale(0.99);
    }

    .service-card:focus-visible {
        outline: 2px solid var(--safety);
        outline-offset: -2px;
    }

.service-num {
    font-family: var(--font-mono);
    color: var(--safety);
    font-size: 0.85rem;
}

.service-card h3 {
    margin: 14px 0 16px;
}

.service-card ul li {
    padding: 7px 0;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
    color: var(--steel);
}

    .service-card ul li:first-child {
        border-top: none;
    }

/* ============ PROCESO ============ */
.process-line {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    counter-reset: none;
}

    .process-line li {
        position: relative;
        padding: 28px 20px 0 0;
        border-top: 3px solid var(--safety);
    }

.process-num {
    display: block;
    font-family: var(--font-mono);
    color: var(--steel-light);
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.process-line h3 {
    font-size: 1.05rem;
    color: var(--paper);
    margin-bottom: 10px;
}

.process-line p {
    color: var(--steel-light);
    font-size: 0.9rem;
    margin: 0;
}

/* ============ NOSOTROS ============ */
.nosotros-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: start;
}

.nosotros-media img {
    width: 100%;
    aspect-ratio: 9/10;
    object-fit: cover;
    border-radius: 2px;
    position: sticky;
    top: 100px;
}

.reason {
    display: flex;
    gap: 20px;
    padding: 26px 0;
    border-top: 1px solid var(--line);
}

    .reason:first-of-type {
        margin-top: 40px;
    }

.reason-num {
    font-family: var(--font-mono);
    color: var(--safety);
    font-size: 0.85rem;
    flex-shrink: 0;
    padding-top: 2px;
}

.reason h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.reason p {
    margin: 0;
    color: var(--steel);
}

.lang-pills {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

    .lang-pills span {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 5px 10px;
        border: 1px solid var(--line);
        border-radius: 20px;
        color: var(--steel);
    }

/* ============ PROYECTOS / GALERÍA ============ */
.gallery {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 260px;
    grid-auto-flow: dense;
    gap: 14px;
}

.gallery-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 2px;
}
    /* Antes las fotos "tall" ocupaban 2 filas; se quitó para que las 6 queden parejas */
    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.4s ease;
    }

    .gallery-item:hover img {
        transform: scale(1.05);
    }

    .gallery-item figcaption {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 16px;
        background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
        color: #fff;
        font-family: var(--font-display);
        text-transform: uppercase;
        font-size: 1rem;
        letter-spacing: 0.02em;
    }

/* ============ CONTACTO ============ */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-details {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
}

.contact-line {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0;
    border-top: 1px solid var(--line-dark);
    transition: color 0.15s ease;
}

    .contact-line:hover {
        color: var(--safety);
    }

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--steel-light);
}

.quote-form {
    background: var(--charcoal-soft);
    border: 1px solid var(--line-dark);
    border-radius: 2px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .field label {
        font-family: var(--font-mono);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--steel-light);
    }

    .field input, .field textarea {
        background: var(--charcoal);
        border: 1px solid var(--line-dark);
        border-radius: 2px;
        padding: 13px 14px;
        color: var(--paper);
        font-family: var(--font-body);
        font-size: 0.95rem;
        resize: vertical;
    }

        .field input:focus, .field textarea:focus {
            outline: none;
            border-color: var(--safety);
        }

.form-note {
    margin: 0;
    font-size: 0.82rem;
    color: var(--steel-light);
    text-align: center;
}

/* ============ FOOTER ============ */
.site-footer {
    background: var(--charcoal);
    padding: 28px 0 40px;
    border-top: 1px solid var(--line-dark);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--steel-light);
    font-size: 0.85rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-logo {
    height: 34px;
    width: auto;
    display: block;
}

.footer-tagline {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--safety);
}

/* ============ SERVICE DRAWER ============ */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 18, 41, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 200;
}

    .drawer-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

.service-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    background: var(--paper);
    box-shadow: -12px 0 40px rgba(6, 18, 41, 0.25);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 201;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

    .service-drawer.open {
        transform: translateX(0);
    }

.drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(6, 18, 41, 0.55);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.15s ease;
}

    .drawer-close:hover {
        background: var(--safety);
    }

.drawer-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    flex-shrink: 0;
    background: var(--concrete);
}

    .drawer-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.drawer-body {
    padding: 32px 32px 40px;
}

    .drawer-body h3 {
        margin: 10px 0 16px;
        font-size: 1.6rem;
    }

    .drawer-body p {
        color: var(--steel);
        margin: 0 0 24px;
        line-height: 1.6;
    }

    .drawer-body ul {
        margin: 0 0 32px;
    }

        .drawer-body ul li {
            padding: 10px 0;
            border-top: 1px solid var(--line);
            font-size: 0.95rem;
            color: var(--charcoal);
        }

        .drawer-body ul li:last-child {
            border-bottom: 1px solid var(--line);
        }

@media (max-width: 640px) {
    .service-drawer {
        width: 100vw;
    }
}

/* ============ WHATSAPP FAB ============ */
.whatsapp-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 90;
    transition: transform 0.15s ease;
}

    .whatsapp-fab:hover {
        transform: scale(1.08);
    }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .hero {
        min-height: 78vh;
    }

    .hero-content {
        padding: 50px 24px 70px;
    }

    .value-strip-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .value-item:nth-child(2) {
        border-right: none;
    }

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

    .process-line {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 20px;
    }

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

    .nosotros-media img {
        position: static;
    }

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

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

@media (max-width: 640px) {
    .logo-mark {
        height: 34px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .main-nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--paper);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 24px 24px;
        border-bottom: 1px solid var(--line);
        display: none;
        gap: 4px;
    }

        .main-nav.open {
            display: flex;
        }

        .main-nav a {
            padding: 12px 0;
            border-bottom: 1px solid var(--line);
        }

    .nav-cta {
        text-align: center;
        margin-top: 8px;
    }

    .nav-toggle {
        display: flex;
    }

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

    .process-line {
        grid-template-columns: 1fr;
    }

    .gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .gallery-tall {
        grid-row: span 1;
    }

    .value-strip-inner {
        grid-template-columns: 1fr;
    }

    .value-item {
        border-right: none;
        border-bottom: 1px solid var(--line-dark);
    }

    .value-item:last-child {
        border-bottom: none;
    }
}
