/*
   PROIN DESARROLLADORES — Proyectos Inmobiliarios
   Design System · Grupo P-ONCE
   Paleta muestreada del logo oficial: navy #171834 + vino #9A1914
   Regla de marca: el blanco domina. Navy y vino son ACENTO, no fondo por defecto.
*/

/* Las @font-face viven en vendor/fonts.css, enlazado desde el HTML ANTES que este
   fichero. No se usa @import: encadena peticiones y bloquea el renderizado. */

/* ═══════════════════════════════════════════
   TOKENS
   ═══════════════════════════════════════════ */
:root {
    /* Marca — del logo */
    --navy: #171834;
    --navy-2: #22244a;
    --navy-3: #2e3160;
    --vino: #9a1914;
    --vino-2: #b52620;
    --vino-3: #7a120e;
    --gris: #c0bdc8;
    --arena: #e9cec3;

    /* Neutros */
    --white: #ffffff;
    --off-white: #f8f8fa;
    --line: #e5e5ea;
    --text: #1a1a24;
    --text-2: #5c5c6e;
    --text-3: #686878;

    /* Tipografía unificada del grupo (decisión CEO 27-ago-2026):
       Plus Jakarta Sans para titulares, Inter para cuerpo. Self-hosted. */
    --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Ritmo */
    --sp-1: 0.5rem;
    --sp-2: 1rem;
    --sp-3: 1.5rem;
    --sp-4: 2rem;
    --sp-5: 3rem;
    --sp-6: 4rem;
    --sp-7: 6rem;
    --sp-8: 8rem;

    /* Geometría — bordes rectos, lenguaje de obra */
    --r-sm: 2px;
    --r-md: 4px;

    /* Regla del design system OTLI: NUNCA `transition: all` donde la geometría
       pueda cambiar entre breakpoints — se atasca al cruzar la media query y
       congela width/flex. Se enumeran solo propiedades de pintado y compuesto. */
    --transition: color .3s cubic-bezier(.25, .8, .25, 1),
                  background-color .3s cubic-bezier(.25, .8, .25, 1),
                  border-color .3s cubic-bezier(.25, .8, .25, 1),
                  box-shadow .3s cubic-bezier(.25, .8, .25, 1),
                  transform .3s cubic-bezier(.25, .8, .25, 1),
                  opacity .3s cubic-bezier(.25, .8, .25, 1);
    --transition-slow: transform .6s cubic-bezier(.25, .8, .25, 1),
                       opacity .6s cubic-bezier(.25, .8, .25, 1);

    --shadow-sm: 0 1px 3px rgba(23, 24, 52, .08);
    --shadow-md: 0 8px 30px rgba(23, 24, 52, .10);
    --shadow-lg: 0 24px 64px rgba(23, 24, 52, .16);

    --nav-h: 78px;
}

/* ═══════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Iconos de linea inline (convencion OTLI: Feather, currentColor).
   Heredan el color del contexto, asi que funcionan sobre claro y sobre navy. */
.ic {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    vertical-align: -.2em;
    flex-shrink: 0;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--vino); color: var(--white); }

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

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.container {
    width: min(1240px, 100% - 3rem);
    margin-inline: auto;
}

.section { padding-block: var(--sp-7); }
.section--tight { padding-block: var(--sp-6); }

.section--dark {
    background: var(--navy);
    color: var(--white);
}
.section--dark .section-kicker { color: var(--arena); }
.section--dark .section-title { color: var(--white); }
.section--dark .section-lead { color: rgba(255, 255, 255, .72); }

.section--soft { background: var(--off-white); }

/* Encabezado de sección */
.section-head {
    max-width: 760px;
    margin-bottom: var(--sp-5);
}
.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-kicker {
    font-family: var(--font-head);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--vino);
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: var(--sp-2);
}
.section-head--center .section-kicker { justify-content: center; }
.section-kicker::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--vino);
    flex-shrink: 0;
}

.section-title {
    font-family: var(--font-head);
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.015em;
    color: var(--navy);
    text-wrap: balance;
}

.section-lead {
    margin-top: var(--sp-2);
    font-size: 1.06rem;
    color: var(--text-2);
    max-width: 62ch;
    text-wrap: pretty;
}
.section-head--center .section-lead { margin-inline: auto; }

/* ═══════════════════════════════════════════
   MOSAICO — motivo gráfico del isotipo
   ═══════════════════════════════════════════ */
.mosaic {
    position: absolute;
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 3px;
    pointer-events: none;
    opacity: .16;
}
.mosaic span {
    aspect-ratio: 1;
    background: currentColor;
}
.mosaic span:nth-child(3n) { opacity: .45; }
.mosaic span:nth-child(4n) { opacity: .75; }
.mosaic span:nth-child(7n) { opacity: .25; }

/* ═══════════════════════════════════════════
   BOTONES
   ═══════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .95rem 1.9rem;
    font-family: var(--font-head);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn .ic { width: 1.05em; height: 1.05em; transition: transform .3s ease; }
.btn:hover .ic { transform: translateX(3px); }

.btn--primary {
    background: var(--vino);
    color: var(--white);
    border-color: var(--vino);
}
.btn--primary:hover {
    background: var(--vino-3);
    border-color: var(--vino-3);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(154, 25, 20, .3);
}

.btn--navy {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.btn--navy:hover {
    background: var(--navy-3);
    border-color: var(--navy-3);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(23, 24, 52, .28);
}

.btn--ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn--ghost:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}

.btn--ghost-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, .5);
}
.btn--ghost-light:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-4);
}

/* ═══════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════ */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 1000;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-shrink: 0;
}
.nav-logo img { height: 46px; width: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}
.nav-links a {
    font-family: var(--font-head);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--navy);
    position: relative;
    padding-block: .4rem;
    transition: var(--transition);
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--vino);
    transition: width .3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--vino); }

.nav-cta { flex-shrink: 0; }
.nav-cta .btn { padding: .7rem 1.35rem; font-size: .74rem; }

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--navy);
    transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    background: var(--navy);
    color: var(--white);
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 78% 30%, rgba(154, 25, 20, .34), transparent 62%),
        radial-gradient(ellipse 60% 70% at 12% 82%, rgba(46, 49, 96, .7), transparent 60%);
    pointer-events: none;
}

.hero .mosaic {
    top: 12%;
    right: -4%;
    width: min(46%, 560px);
    color: var(--white);
    opacity: .09;
    transform: rotate(-12deg);
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 860px;
    padding-block: var(--sp-6);
}

.hero-kicker {
    font-family: var(--font-head);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--arena);
    display: flex;
    align-items: center;
    gap: .8rem;
    margin-bottom: var(--sp-3);
}
.hero-kicker::before {
    content: '';
    width: 42px;
    height: 2px;
    background: var(--vino-2);
}

.hero h1 {
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 6.2vw, 4.6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.hero h1 em {
    font-style: normal;
    color: var(--arena);
}

.hero-lead {
    margin-top: var(--sp-3);
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: rgba(255, 255, 255, .78);
    max-width: 58ch;
    text-wrap: pretty;
}

.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, .5);
    animation: bob 2.4s ease-in-out infinite;
}
.hero-scroll .ic { width: 26px; height: 26px; }
@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 9px); }
}

/* Hero interior (páginas secundarias) */
.page-hero {
    position: relative;
    background: var(--navy);
    color: var(--white);
    padding-top: calc(var(--nav-h) + var(--sp-6));
    padding-bottom: var(--sp-6);
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 85% 40%, rgba(154, 25, 20, .3), transparent 60%);
    pointer-events: none;
}
.page-hero .mosaic {
    top: 20%;
    right: 2%;
    width: min(30%, 320px);
    color: var(--white);
    opacity: .08;
    transform: rotate(-12deg);
}
.page-hero-inner { position: relative; z-index: 2; }
.page-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}
.page-hero p {
    margin-top: var(--sp-2);
    color: rgba(255, 255, 255, .74);
    max-width: 60ch;
    font-size: 1.05rem;
}

.breadcrumb {
    font-size: .8rem;
    color: rgba(255, 255, 255, .55);
    margin-bottom: var(--sp-2);
    display: flex;
    gap: .5rem;
    align-items: center;
}
.breadcrumb a:hover { color: var(--arena); }

/* ═══════════════════════════════════════════
   BARRA DE CIFRAS
   ═══════════════════════════════════════════ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.section--dark .stats {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .12);
}

.stat {
    background: var(--white);
    padding: var(--sp-4) var(--sp-3);
    text-align: center;
}
.section--dark .stat { background: var(--navy); }

.stat-num {
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 900;
    line-height: 1;
    color: var(--vino);
    letter-spacing: -.02em;
}
.section--dark .stat-num { color: var(--arena); }
/* Variante de texto: la franja ya no muestra cifras, solo rasgos verificables */
.stat-num--text {
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    line-height: 1.2;
    letter-spacing: 0;
}

.stat-label {
    margin-top: .6rem;
    font-family: var(--font-head);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
}
.section--dark .stat-label { color: rgba(255, 255, 255, .6); }

/* ═══════════════════════════════════════════
   LOS DOS BRAZOS (desarrolla / gestiona)
   ═══════════════════════════════════════════ */
.arms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--sp-4);
}

.arm {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    padding: var(--sp-5) var(--sp-4) var(--sp-4);
    overflow: hidden;
    transition: var(--transition);
}
.arm::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--vino);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s cubic-bezier(.25, .8, .25, 1);
}
.arm:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.arm:hover::before { transform: scaleX(1); }

.arm-num {
    font-family: var(--font-head);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .2em;
    color: var(--text-3);
    margin-bottom: var(--sp-2);
}

.arm h3 {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.01em;
    margin-bottom: var(--sp-2);
}

.arm p { color: var(--text-2); margin-bottom: var(--sp-3); }

.arm-list { display: grid; gap: .7rem; }
.arm-list li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    font-size: .94rem;
    color: var(--text-2);
}
.arm-list .ic {
    color: var(--vino);
    width: .58rem;
    height: .58rem;
    margin-top: .55rem;
}

/* ═══════════════════════════════════════════
   PROYECTOS
   ═══════════════════════════════════════════ */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: var(--sp-4);
}
.filter-btn {
    padding: .6rem 1.3rem;
    font-family: var(--font-head);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: var(--transition);
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--sp-4);
}

.project-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--line);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    width: 100%;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.project-media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--navy);
    overflow: hidden;
}
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.25, .8, .25, 1);
}
.project-card:hover .project-media img { transform: scale(1.06); }

/* Marcador cuando aún no hay foto — mosaico de marca, no un gris triste */
.project-media--empty {
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
}
.project-media--empty .mosaic {
    position: static;
    width: 58%;
    color: var(--white);
    opacity: .2;
    transform: rotate(-12deg);
}
.project-media--empty::after {
    content: 'Fotografía pendiente';
    position: absolute;
    bottom: .9rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-head);
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
}

.project-body {
    padding: var(--sp-3);
    display: flex;
    flex-direction: column;
    gap: .6rem;
    flex: 1;
}

.project-type {
    font-family: var(--font-head);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--vino);
}

.project-card .project-title {
    display: block;
    font-family: var(--font-head);
    font-size: 1.24rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
}

.project-loc {
    font-size: .88rem;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: .45rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--sp-6) var(--sp-3);
    border: 1px dashed var(--line);
    color: var(--text-3);
}
.empty-state .ic { width: 2rem; height: 2rem; color: var(--gris); margin: 0 auto var(--sp-2); }

/* ═══════════════════════════════════════════
   MODAL DE PROYECTO
   ═══════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sp-3);
    background: rgba(23, 24, 52, .84);
    backdrop-filter: blur(6px);
}
.modal.open { display: flex; animation: fadeIn .28s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
    position: relative;
    background: var(--white);
    width: min(880px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    animation: rise .35s cubic-bezier(.25, .8, .25, 1);
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-close {
    position: absolute;
    top: .8rem;
    right: .8rem;
    z-index: 3;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    color: var(--navy);
    transition: var(--transition);
}
.modal-close:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.modal-media { aspect-ratio: 16 / 10; background: var(--navy); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }

.modal-content { padding: var(--sp-4); }
.modal-content h3 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .4rem;
}
.modal-desc { color: var(--text-2); margin-block: var(--sp-2) var(--sp-3); }

/* ═══════════════════════════════════════════
   PROCESO
   ═══════════════════════════════════════════ */
.process {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: var(--sp-4);
    counter-reset: step;
}
.step { position: relative; padding-top: var(--sp-4); }
.step::before {
    counter-increment: step;
    content: '0' counter(step);
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--font-head);
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1;
    color: var(--line);
    letter-spacing: -.03em;
}
.section--dark .step::before { color: rgba(255, 255, 255, .16); }
.step h3 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
}
.section--dark .step h3 { color: var(--white); }
.step p { font-size: .94rem; color: var(--text-2); }
.section--dark .step p { color: rgba(255, 255, 255, .68); }

/* ═══════════════════════════════════════════
   VALORES
   ═══════════════════════════════════════════ */
.values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--sp-4);
}
.value { text-align: left; }
.value-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    background: var(--navy);
    color: var(--white);
    margin-bottom: var(--sp-2);
    border-radius: var(--r-sm);
}
.value-icon .ic { width: 24px; height: 24px; }
.value h3 {
    font-family: var(--font-head);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .45rem;
}
.value p { font-size: .94rem; color: var(--text-2); }

/* ═══════════════════════════════════════════
   BANDA CTA
   ═══════════════════════════════════════════ */
.cta-band {
    position: relative;
    background: var(--vino);
    color: var(--white);
    padding-block: var(--sp-6);
    overflow: hidden;
    text-align: center;
}
.cta-band .mosaic {
    top: -20%;
    left: -3%;
    width: min(28%, 300px);
    color: var(--white);
    opacity: .1;
    transform: rotate(-12deg);
}
.cta-band-inner { position: relative; z-index: 2; }
.cta-band h2 {
    font-family: var(--font-head);
    font-size: clamp(1.7rem, 3.6vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    text-wrap: balance;
}
.cta-band p {
    margin-top: var(--sp-2);
    color: rgba(255, 255, 255, .84);
    max-width: 56ch;
    margin-inline: auto;
}
.cta-band .btn-row { justify-content: center; }

/* ═══════════════════════════════════════════
   CONTACTO
   ═══════════════════════════════════════════ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: var(--sp-6);
    align-items: start;
}

.contact-grid > * { min-width: 0; }
.contact-methods { display: grid; gap: var(--sp-3); }
.contact-method {
    display: flex;
    gap: var(--sp-2);
    align-items: flex-start;
    padding: var(--sp-3);
    border: 1px solid var(--line);
    transition: var(--transition);
}
.contact-method:hover { border-color: var(--navy); transform: translateX(4px); }
.contact-method .ic-box {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: var(--navy);
    color: var(--white);
    flex-shrink: 0;
    border-radius: var(--r-sm);
}
.contact-method .ic-box .ic { width: 20px; height: 20px; }
.contact-method h3 {
    font-family: var(--font-head);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: .2rem;
}
.contact-method p { font-weight: 500; color: var(--navy); }
.contact-method small { color: var(--text-3); font-size: .84rem; }

.form { display: grid; gap: var(--sp-3); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.field { display: grid; gap: .45rem; }
.field label {
    font-family: var(--font-head);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-2);
}
.field { min-width: 0; }
.field input,
.field select,
.field textarea {
    width: 100%;
    min-width: 0;
    padding: .85rem 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: var(--transition);
    font-family: var(--font-body);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid var(--navy);
    outline-offset: 1px;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(23, 24, 52, .08);
}
.field textarea { resize: vertical; min-height: 130px; }
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--vino); }

.form-error {
    display: none;
    font-size: .8rem;
    color: var(--vino);
}
.field.invalid .form-error { display: block; }

.form-success {
    display: none;
    padding: var(--sp-3);
    background: rgba(23, 24, 52, .04);
    border-left: 3px solid var(--navy);
    color: var(--navy);
}
.form-success.show { display: block; }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
    background: var(--navy);
    color: rgba(255, 255, 255, .68);
    padding-top: var(--sp-6);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: var(--sp-4);
    padding-bottom: var(--sp-5);
}
.footer h3 {
    font-family: var(--font-head);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: var(--sp-2);
}
/* El logo va a COLOR sobre panel blanco.
   Una silueta blanca no funciona: el isotipo es un mosaico y, al perder los
   huecos entre piezas, se convierte en una mancha ilegible. */
.footer-logo .logo-panel {
    display: inline-block;
    background: var(--white);
    padding: .85rem 1.15rem;
    border-radius: var(--r-md);
    margin-bottom: var(--sp-3);
    line-height: 0;
}
.footer-logo .logo-panel img { height: 66px; width: auto; }
.footer p { font-size: .92rem; }
.footer ul { display: grid; gap: .6rem; }
.footer a { font-size: .92rem; transition: var(--transition); }
.footer a:hover { color: var(--arena); }

.footer-name {
    font-family: var(--font-head);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: .45rem;
}
.footer-contact li { display: flex; align-items: flex-start; gap: .65rem; }
.footer-contact .ic { width: 1.05em; height: 1.05em; margin-top: .22em; color: var(--arena); }
.footer-contact span { font-size: .92rem; }
.footer a .ic { width: .8em; height: .8em; margin-left: .25rem; vertical-align: -.05em; }
.footer-contact a .ic { margin-left: 0; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-block: var(--sp-3);
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    align-items: center;
    justify-content: space-between;
    font-size: .84rem;
}
.footer-brand { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); }
.footer-brand .logo-panel {
    display: inline-block;
    background: var(--white);
    padding: .35rem .6rem;
    border-radius: var(--r-md);
    line-height: 0;
}
.footer-brand .logo-panel img { height: 32px; width: auto; }
.footer-sep { width: 1px; height: 28px; background: rgba(255, 255, 255, .2); }
/* El botón flotante de WhatsApp (fixed, abajo a la derecha) no debe tapar el último texto del footer */
.footer-bottom { padding-right: 4.5rem; }
.footer-gp {
    display: flex;
    align-items: center;
    gap: .7rem;
}
.footer-gp img {
    height: 34px;
    width: auto;
    background: var(--white);
    border-radius: 50%;
    padding: 4px;
}

/* ═══════════════════════════════════════════
   WHATSAPP FLOTANTE
   ═══════════════════════════════════════════ */
.wa-float {
    position: fixed;
    right: 1.4rem;
    bottom: 1.4rem;
    z-index: 900;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    background: #25d366;
    color: var(--white);
    border-radius: 50%;
    box-shadow: 0 8px 26px rgba(37, 211, 102, .42);
    transition: var(--transition);
}
.wa-float .ic { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.08) translateY(-2px); }

/* ═══════════════════════════════════════════
   REVEAL
   ═══════════════════════════════════════════ */
/* El contenido se oculta SOLO si el JS esta vivo (clase `js` puesta por el
   script en linea del <head>). Sin JS, o si main.js falla, todo se ve igual:
   nunca se pierde contenido por una animacion. */
.reveal { opacity: 1; transform: none; }

html.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.25, .8, .25, 1);
}
html.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    html.js .reveal { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 980px) {
    .contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .nav-links {
        position: fixed;
        inset: var(--nav-h) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--white);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        padding: var(--sp-2) 1.5rem var(--sp-3);
        /* Cerrado: fuera de pantalla, sin foco alcanzable ni clics fantasma.
           translateY(0) explícito en vez de `none` — interpola sin sobresaltos. */
        transform: translateY(-130%);
        visibility: hidden;
        transition: transform .4s cubic-bezier(.25, .8, .25, 1), visibility .4s;
    }
    .nav-links.open {
        transform: translateY(0);
        visibility: visible;
    }
    .nav-links a {
        padding: .95rem 0;
        border-bottom: 1px solid var(--line);
    }
    .nav-links a::after { display: none; }
    .nav-cta { display: none; }
    .hamburger { display: flex; }

    :root { --sp-7: 4rem; --sp-8: 5rem; }

    .hero { min-height: 84vh; }
    .hero .mosaic { opacity: .06; width: 62%; }
    .form-row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
    .container { width: min(1240px, 100% - 2rem); }
    .projects-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-brand { justify-content: center; }
    .footer-bottom { padding-right: 0; padding-bottom: 5rem; }
    .footer-sep { display: none; }
    .btn { width: 100%; }
    .btn-row { flex-direction: column; }
    .cta-band .btn-row { align-items: stretch; }
}

/* El atributo hidden debe ganar a display:flex/grid de estos componentes */
.filters[hidden], .filter-btn[hidden] { display: none; }

/* ═══════════════════════════════════════════
   NAV · enlace externo a Vive Bien
   ═══════════════════════════════════════════ */
.nav-links a .ic { width: .8em; height: .8em; margin-left: .25rem; vertical-align: -.05em; }
@media (max-width: 1120px) { .nav-links { gap: var(--sp-3); } }
/* 861–1020 px: con 6 enlaces + CTA hay que compactar o un enlace se parte en dos líneas */
@media (min-width: 861px) and (max-width: 1020px) {
    .nav-links { gap: 1rem; }
    .nav-links a { font-size: .72rem; letter-spacing: .06em; }
    .nav-cta .btn { padding: .65rem 1rem; }
}

/* ═══════════════════════════════════════════
   SOCIO COMERCIAL · Vive Bien
   ═══════════════════════════════════════════ */
.partner {
    display: grid;
    grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
    gap: var(--sp-5);
    align-items: center;
    background: var(--white);
    border: 1px solid var(--line);
    padding: var(--sp-5);
}
.partner-mark { display: flex; align-items: center; justify-content: center; }
.partner-mark img { display: block; width: 100%; max-width: 240px; height: auto; }
/* Filete vertical fino entre logotipo y texto: recurso que Vive Bien usa en sus piezas */
.partner-body { padding-left: var(--sp-5); border-left: 2px solid var(--vino); }
.partner .btn { text-align: center; white-space: normal; }
@media (max-width: 860px) {
    .partner { grid-template-columns: minmax(0, 1fr); padding: var(--sp-4) var(--sp-3); }
    .partner-mark { justify-content: flex-start; }
    .partner-body { padding-left: 0; border-left: 0; padding-top: var(--sp-3); border-top: 2px solid var(--vino); }
}

/* ═══════════════════════════════════════════
   PORTAFOLIO · miniaturas del detalle y nota
   ═══════════════════════════════════════════ */
.modal-thumbs { display: flex; gap: .6rem; margin-bottom: var(--sp-3); }
.modal-thumb {
    width: 84px;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 2px solid var(--line);
    background: var(--navy);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .2s ease, opacity .2s ease;
    opacity: .75;
}
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal-thumb:hover { opacity: 1; }
.modal-thumb.active { border-color: var(--vino); opacity: 1; }
.projects-note {
    margin-top: var(--sp-4);
    max-width: 62ch;
    font-size: .84rem;
    line-height: 1.55;
    color: var(--text-3);
}

/* Fachadas panorámicas (≥ 2:1): se ven completas, sin recortar los lados ni deformarse.
   El fondo es el mismo navy de la marca, así que las franjas se leen como marco, no como vacío. */
.project-media--contain img,
.modal-media--contain img { object-fit: contain; }
.partner--group { margin-bottom: var(--sp-5); }

/* Solo para lectores de pantalla (encabezado de sección sin título visible) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Reserva el alto del portafolio mientras JS dibuja las fichas: evita que el bloque inferior salte (CLS) */
#projectsGrid:empty { min-height: 100vh; }
