/* ===========================================================
   LA ESQUINA — WEB PÚBLICA · Paso 1B
   Diseño completo mediterráneo
   =========================================================== */

:root {
    --bg:           #F5EFE6;
    --bg-alt:       #EAE2D2;
    --bg-card:      #FFFFFF;
    --bg-dark:      #1A1A1A;
    --text:         #1A1A1A;
    --text-soft:    #4A4A4A;
    --text-muted:   #8A8A8A;
    --accent:       #A6855A;
    --accent-dark:  #8A6F4A;
    --accent-soft:  #D4BC92;
    --line:         rgba(26, 26, 26, 0.10);
    --line-strong:  rgba(26, 26, 26, 0.20);

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;

    --container-max: 1320px;
    --container-pad: 32px;
    --header-h: 88px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s, color 0.2s; }
a:hover { opacity: 0.7; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

/* TIPOGRAFÍA */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(44px, 6.5vw, 88px); }
h2 { font-size: clamp(34px, 4.8vw, 64px); }
h3 { font-size: clamp(24px, 3vw, 36px); }
h4 { font-size: 13px; font-family: var(--font-sans); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
p { margin-bottom: 16px; max-width: 60ch; }
em { font-style: italic; color: var(--accent); font-family: var(--font-serif); }

.eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}

/* BOTONES */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    cursor: pointer;
    font-family: var(--font-sans);
}
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); opacity: 1; transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.btn-secondary:hover { background: var(--text); color: var(--bg); opacity: 1; }
.btn-arrow::after { content: '→'; font-size: 16px; transition: transform 0.25s; }
.btn-arrow:hover::after { transform: translateX(4px); }

/* HEADER */
.site-header {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 28px 0;
    background: transparent;
}
.site-header.is-scrolled {
    position: fixed;
    background: rgba(245, 239, 230, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }

body.page-project .site-header,
body.page-contact .site-header {
    position: relative;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.brand-logo { height: 56px; width: auto; }

.main-nav { display: flex; gap: 36px; flex: 1; justify-content: center; }
.nav-link {
    position: relative;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 0;
}
.nav-link::after {
    content: '';
    position: absolute; bottom: 0; left: 50%;
    width: 0; height: 1px;
    background: var(--accent);
    transition: all 0.25s;
    transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.is-active::after { width: 100%; }
.nav-link:hover { opacity: 1; color: var(--accent); }
.nav-link.is-active::after { background: var(--text); }
.nav-link-disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.nav-link-cta {
    background: var(--text);
    color: var(--bg);
    padding: 12px 24px;
    margin-left: 8px;
}
.nav-link-cta:hover { background: var(--accent); color: var(--bg); opacity: 1; }
.nav-link-cta::after { display: none; }

.lang-switch {
    display: flex; gap: 4px; align-items: center;
    font-size: 11px; font-weight: 600; letter-spacing: 1.5px;
    color: var(--text-muted);
}
.lang-switch a { padding: 6px 8px; color: var(--text-muted); }
.lang-switch a.is-active { color: var(--text); }
.lang-sep { opacity: 0.4; }

.mobile-toggle {
    display: none; background: transparent; border: 0;
    padding: 8px; cursor: pointer; z-index: 210; position: relative;
}
.mobile-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--text); margin: 5px 0; transition: all 0.3s;
}

/* HERO */
.hero {
    position: relative;
    min-height: 100vh;
    padding-top: var(--header-h);
    display: flex; align-items: center;
    overflow: hidden;
    background: var(--bg);
}
.hero-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - var(--header-h));
}
.hero-content {
    padding: 80px 0 80px var(--container-pad);
    max-width: 640px;
    margin-left: max(calc((100vw - var(--container-max)) / 2), var(--container-pad));
    z-index: 2;
    animation: fadeInUp 1s ease 0.2s both;
}
.hero-content h1 { margin-bottom: 32px; }
.hero-cta-row {
    display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap;
}
.hero-image {
    position: relative;
    height: 100vh;
    margin-top: calc(-1 * var(--header-h));
    overflow: hidden;
    background: #000;
    animation: fadeIn 1.2s ease both;
}
.hero-image img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.hero-image::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--bg) 0%, transparent 25%);
    pointer-events: none;
}

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* STATS */
.stats {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 56px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-item { border-right: 1px solid var(--line); padding: 0 16px; }
.stat-item:last-child { border-right: 0; }
.stat-value {
    font-family: var(--font-serif);
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 500;
    line-height: 1;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.stat-value sup { font-size: 0.5em; color: var(--accent); margin-left: 2px; vertical-align: super; }
.stat-label {
    font-size: 11px; font-weight: 500;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--text-muted);
}

/* PILLARS */
.pillars { padding: 100px 0; background: var(--bg); }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.pillar { padding: 24px 32px; border-right: 1px solid var(--line); }
.pillar:last-child { border-right: 0; }
.pillar-icon {
    width: 48px; height: 48px;
    margin: 0 auto 24px;
    color: var(--accent);
    stroke: var(--accent); fill: none; stroke-width: 1.5;
}
.pillar h4 { margin-bottom: 12px; }
.pillar p { font-size: 14px; color: var(--text-soft); margin: 0 auto; max-width: 240px; }

/* PROJECT FEATURE */
.project-feature { padding: 120px 0; background: var(--bg-alt); }
.project-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.project-feature-text h2 { margin-bottom: 32px; }
.project-feature-text p {
    color: var(--text-soft);
    font-size: 16px; margin-bottom: 16px; max-width: 520px;
}
.project-feature-text .btn { margin-top: 32px; }
.project-feature-img {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}
.project-feature-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}
.project-feature-img:hover img { transform: scale(1.04); }

/* PROYECTO PAGE */
.page-hero {
    padding: 140px 0 80px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
}
.page-hero-inner { max-width: 880px; }
.page-hero h1 { margin: 16px 0 32px; }

.project-prose {
    padding: 100px 0;
    max-width: 880px;
    margin: 0 auto;
}
.project-prose p {
    font-size: 17px;
    color: var(--text-soft);
    margin-bottom: 24px;
    max-width: none;
}
.project-prose p strong { color: var(--text); font-weight: 500; }

/* FRENTES */
.fronts {
    padding: 80px 0 120px;
    background: var(--bg);
    border-top: 1px solid var(--line);
}
.fronts-header { text-align: center; margin-bottom: 64px; }
.fronts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.front-card {
    background: var(--bg-card);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.front-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(26, 26, 26, 0.12);
}
.front-card-img { aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.front-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.front-card:hover .front-card-img img { transform: scale(1.06); }
.front-card-body { padding: 28px 28px 32px; }
.front-card h4 { color: var(--accent); margin-bottom: 10px; letter-spacing: 1.5px; }
.front-card h3 { font-size: 24px; margin-bottom: 12px; }
.front-card p { font-size: 14px; color: var(--text-soft); margin: 0; }

/* CTA STRIP */
.cta-strip {
    background: var(--bg-dark);
    color: var(--bg);
    padding: 100px 0;
    text-align: center;
}
.cta-strip h2 { color: var(--bg); margin-bottom: 24px; }
.cta-strip p { color: var(--accent-soft); max-width: 560px; margin: 0 auto 40px; font-size: 17px; }
.cta-strip .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.cta-strip .btn-primary:hover { background: var(--bg); color: var(--bg-dark); border-color: var(--bg); }

/* FOOTER */
.site-footer { background: var(--bg-dark); color: var(--bg-alt); padding: 80px 0 0; }
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
}
.footer-logo {
    height: 56px; width: auto;
    filter: brightness(0) invert(1) sepia(0.1) saturate(1.5);
    margin-bottom: 20px;
    opacity: 0.95;
}
.footer-tagline {
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    color: var(--accent-soft);
    max-width: 320px;
    line-height: 1.5;
}
.footer-col h4 { color: var(--accent); font-size: 11px; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col li {
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--bg-alt);
    opacity: 0.7;
    line-height: 1.5;
}
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
    color: var(--bg-alt); opacity: 0.6;
    width: 36px; height: 36px;
    border: 1px solid rgba(245, 239, 230, 0.2);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}
.footer-social a:hover { opacity: 1; color: var(--accent); border-color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(245, 239, 230, 0.08);
    padding: 24px 0;
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 1px;
}

/* REVEAL */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1100px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-image { height: 60vh; min-height: 500px; margin-top: 40px; }
    .hero-image::after { background: linear-gradient(180deg, var(--bg) 0%, transparent 20%); }
    .hero-content { margin-left: 0; padding-left: var(--container-pad); padding-right: var(--container-pad); }
    .hero { min-height: 0; }
    .project-feature-grid { grid-template-columns: 1fr; gap: 48px; }
    .pillars-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 0; }
    .pillar:nth-child(2) { border-right: 0; }
    .pillar { padding: 0 24px; }
    .fronts-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

@media (max-width: 900px) {
    :root { --container-pad: 24px; }
    .main-nav, .lang-switch { display: none; }
    .mobile-toggle { display: block; }
    /* ===== FIX MENU MOVIL (dentro de @media 900px) ===== */
    body.menu-open { overflow: hidden; }
    body.menu-open .main-nav {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: var(--bg);
        padding: 110px 32px 90px;
        gap: 22px;
        align-items: center;
        justify-content: flex-start;
        overflow-y: auto;
        z-index: 2000 !important;
    }
    body.menu-open .lang-switch {
        display: flex !important;
        position: fixed;
        left: 0; right: 0; bottom: 24px;
        justify-content: center;
        background: transparent;
        z-index: 2001 !important;
    }
    body.menu-open .site-header { z-index: 2002 !important; }
    body.menu-open .mobile-toggle {
        position: fixed; top: 26px; right: 22px;
        display: block !important;
        z-index: 2005 !important;
    }
    body.menu-open .nav-link { font-size: 19px; letter-spacing: 1.5px; padding: 8px 0; }

    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 0; }
    .stat-item:nth-child(2) { border-right: 0; }
    .stat-item { border-bottom: 1px solid var(--line); padding-bottom: 24px; }
    .stat-item:nth-last-child(-n+2) { border-bottom: 0; padding-bottom: 0; padding-top: 24px; }
}

@media (max-width: 600px) {
    .footer-inner { grid-template-columns: 1fr; }
    .footer-brand { grid-column: span 1; }
    .pillars-grid { grid-template-columns: 1fr; }
    .pillar { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px 24px; }
    .pillar:last-child { border-bottom: 0; }
    h1 { font-size: 44px; }
    h2 { font-size: 34px; }
    .hero-cta-row .btn { flex: 1; justify-content: center; }
}

body.menu-open { overflow: hidden; }
body.menu-open .main-nav,
body.menu-open .lang-switch {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0;
    background: var(--bg);
    padding: 120px 32px 32px;
    gap: 24px;
    align-items: center;
    z-index: 200;
}
body.menu-open .nav-link { font-size: 18px; letter-spacing: 1.5px; }
/* Fix menú móvil: header no tapa el menú desplegado */
body.menu-open .site-header { z-index: 190; }

body.menu-open .lang-switch {
    inset: auto 0 32px 0;
    padding: 24px;
    flex-direction: row;
    justify-content: center;
    background: transparent;
    position: fixed;
}

/* ===========================================================
   GALERÍA
   =========================================================== */
.gallery-section {
    padding: 64px 0;
}
.gallery-section + .gallery-section {
    padding-top: 0;
}
.gallery-group-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    letter-spacing: -0.01em;
}
.gallery-grid {
    display: grid;
    gap: 16px;
}
.gallery-grid-1 { grid-template-columns: 1fr; }
.gallery-grid-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-grid-4 { grid-template-columns: repeat(2, 1fr); }
.gallery-grid-5 { grid-template-columns: repeat(3, 1fr); }
.gallery-grid-5 .gallery-item:nth-child(4),
.gallery-grid-5 .gallery-item:nth-child(5) { grid-column: span 1; }

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    margin: 0;
    background: #000;
    aspect-ratio: 4 / 3;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.3s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-item figcaption {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    padding: 24px 16px 12px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-item:hover figcaption { opacity: 1; }

/* ===========================================================
   LIGHTBOX
   =========================================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.lightbox.is-open { display: flex; animation: fadeIn 0.25s ease; }
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}
.lightbox-caption {
    color: var(--bg-alt);
    font-size: 13px;
    letter-spacing: 1px;
    margin-top: 16px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: transparent;
    border: 0;
    color: var(--bg-alt);
    cursor: pointer;
    transition: opacity 0.2s;
    z-index: 1010;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 0.7; }
.lightbox-close {
    top: 24px;
    right: 32px;
    font-size: 36px;
    line-height: 1;
}
.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    line-height: 1;
    padding: 16px;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* ===========================================================
   IDENTIDAD
   =========================================================== */
.identity-features {
    padding: 80px 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.feature-item {
    padding: 16px;
}
.feature-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    color: var(--accent);
}
.feature-item h4 {
    font-size: 13px;
    color: var(--text);
    letter-spacing: 1.5px;
}

.identity-card {
    padding: 100px 0;
}
.identity-card-light { background: var(--bg); }
.identity-card-dark { background: var(--bg-alt); }

.identity-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.identity-card-grid-reverse .identity-card-img { order: -1; }

.identity-card-text h2 {
    margin-bottom: 24px;
}
.identity-card-text p {
    color: var(--text-soft);
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 480px;
}
.identity-card-img {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #000;
}
.identity-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}
.identity-card-img:hover img { transform: scale(1.04); }

.identity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.identity-tags li {
    background: rgba(166, 133, 90, 0.10);
    color: var(--accent-dark);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 1px solid rgba(166, 133, 90, 0.2);
}

/* ===========================================================
   FORMULARIO SUMATE — REDISEÑO
   =========================================================== */
.form-section {
    padding: 80px 0 120px;
    background: var(--bg);
}
.form-container {
    max-width: 880px;
}
.join-form {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

/* === Bloques (secciones 01, 02, 03) === */
.form-block {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.form-block-title {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
    letter-spacing: -0.01em;
}
.form-block-num {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--accent);
    background: rgba(166, 133, 90, 0.10);
    padding: 4px 10px;
    border-radius: 2px;
}

/* === Grids === */
.form-grid {
    display: grid;
    gap: 20px;
}
.form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

/* === Field === */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}
.form-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    width: 100%;
}
.form-label em {
    color: var(--accent);
    font-style: normal;
    font-family: var(--font-sans);
}

/* === Inputs === */
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea {
    background: transparent;
    border: 0;
    border-bottom: 1.5px solid var(--line-strong);
    padding: 12px 0;
    font-family: var(--font-sans);
    font-size: 17px;
    color: var(--text);
    transition: border-color 0.25s ease;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
}
.form-field input:focus,
.form-field textarea:focus {
    border-bottom-color: var(--accent);
}
.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
    font-style: italic;
}
.form-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
    border: 1.5px solid var(--line-strong);
    padding: 16px 18px;
    background: var(--bg-card);
}
.form-field textarea:focus {
    border-color: var(--accent);
}

/* === Selects estilizados === */
.form-select-wrap {
    position: relative;
    width: 100%;
}
.form-select-wrap::after {
    content: '';
    position: absolute;
    right: 4px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 1.5px solid var(--accent);
    border-bottom: 1.5px solid var(--accent);
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}
.form-select-wrap select {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1.5px solid var(--line-strong);
    padding: 12px 28px 12px 0;
    font-family: var(--font-sans);
    font-size: 17px;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border-radius: 0;
    outline: 0;
    transition: border-color 0.25s ease;
}
.form-select-wrap select:focus {
    border-bottom-color: var(--accent);
}

/* === Fieldset (grupo de radios) === */
.form-fieldset {
    border: 0;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-fieldset legend {
    padding: 0;
    margin-bottom: 4px;
    width: 100%;
}

/* === Radio cards (operación) === */
.form-radio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.form-radio-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--line);
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    color: var(--text);
    position: relative;
    user-select: none;
}
.form-radio-card:hover {
    border-color: var(--accent-soft);
    background: rgba(166, 133, 90, 0.03);
}
.form-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.form-radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}
.form-radio-card:has(input[type="radio"]:checked) {
    border-color: var(--accent);
    background: rgba(166, 133, 90, 0.06);
}
.form-radio-card:has(input[type="radio"]:checked) .form-radio-dot {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: inset 0 0 0 4px var(--bg-card);
}
.form-radio-text {
    line-height: 1.3;
}

/* === Footer === */
.form-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
}
.form-error {
    color: #c44;
    font-size: 14px;
    margin: 0;
    text-align: center;
}
.form-submit {
    min-width: 280px;
    justify-content: center;
    padding: 18px 40px;
    font-size: 13px;
}

/* === Inputs con error === */
.form-field input.is-error,
.form-field textarea.is-error {
    border-color: #c44 !important;
}

/* === Responsive === */
@media (max-width: 700px) {
    .form-grid-2,
    .form-radio-grid {
        grid-template-columns: 1fr;
    }
    .form-block-title {
        font-size: 19px;
        gap: 12px;
    }
    .form-submit {
        width: 100%;
    }
    .join-form {
        gap: 40px;
    }
}

/* SUCCESS */
.form-success {
    padding: 80px 0 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}
.form-success-card {
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-card);
    padding: 64px 48px 56px;
    border: 1px solid var(--line);
    box-shadow: 0 20px 60px rgba(26, 26, 26, 0.05);
}
.form-success-icon {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px;
    max-height: 64px;
    display: block;
    margin: 0 auto 32px;
    color: var(--accent);
    flex-shrink: 0;
}
.form-success-card h2 { margin-bottom: 16px; }
.form-success-card p { color: var(--text-soft); margin: 0 auto 32px; }

/* ===========================================================
   RESPONSIVE EXTRAS PARA WEB-2
   =========================================================== */
@media (max-width: 1100px) {
    .identity-card-grid { grid-template-columns: 1fr; gap: 48px; }
    .identity-card-grid-reverse .identity-card-img { order: 0; }
    .gallery-grid-3, .gallery-grid-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .gallery-grid-2, .gallery-grid-3, .gallery-grid-4, .gallery-grid-5 {
        grid-template-columns: 1fr;
    }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row-2 { grid-template-columns: 1fr; }
    .form-radio-group { grid-template-columns: 1fr; }
    .lightbox-prev { left: 8px; font-size: 36px; }
    .lightbox-next { right: 8px; font-size: 36px; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; gap: 24px; }
    .form-success-card { padding: 40px 24px; }
}

/* ===========================================================
   AUTH / MI CUENTA — WEB-3A
   =========================================================== */

/* Botones nav login/cuenta */
.nav-link-login {
    border: 1px solid var(--line-strong);
    padding: 8px 18px !important;
    border-radius: 2px;
    transition: all 0.2s ease;
    background: transparent;
}
.nav-link-login:hover {
    background: var(--text);
    color: var(--bg) !important;
    border-color: var(--text);
}
.nav-link-account {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    padding: 8px 16px !important;
    border-radius: 2px;
    background: rgba(166, 133, 90, 0.05);
    transition: all 0.2s ease;
}
.nav-link-account:hover {
    background: var(--accent);
    color: var(--bg) !important;
}
.nav-link-account .nav-account-icon {
    display: inline-flex;
    align-items: center;
}

/* === Form alerts === */
.form-alert {
    padding: 16px 20px;
    border-radius: 2px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
    border-left: 3px solid;
}
.form-alert-ok {
    background: rgba(76, 175, 80, 0.06);
    color: #2e7d32;
    border-color: #4caf50;
}
.form-alert-error {
    background: rgba(196, 68, 68, 0.06);
    color: #c44;
    border-color: #c44;
}
.form-hint {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: -8px 0 12px;
    font-style: italic;
}

/* === Account summary === */
.account-summary {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 24px 32px;
    margin-bottom: 56px;
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}
.account-summary-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.account-summary-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}
.account-summary-value {
    font-size: 16px;
    color: var(--text);
    font-family: var(--font-sans);
}

/* === Account downloads === */
.account-downloads {
    margin-top: 56px;
    padding-top: 56px;
    border-top: 1px solid var(--line);
}
.account-download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 24px;
}
.account-download-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
}
.account-download-card:hover {
    border-color: var(--accent);
    background: rgba(166, 133, 90, 0.04);
    transform: translateY(-2px);
}
.account-download-icon {
    width: 56px;
    height: 56px;
    background: rgba(166, 133, 90, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-download-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text);
}
.account-download-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* === Account logout === */
.account-logout {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid var(--line);
    text-align: center;
}
.account-logout-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}
.account-logout-link:hover {
    color: #c44;
}

/* === Responsive === */
@media (max-width: 700px) {
    .account-summary { flex-direction: column; gap: 16px; padding: 20px; }
    .account-download-grid { grid-template-columns: 1fr; }
}

/* ===========================================================
   UNIDADES — WEB-3B
   =========================================================== */

/* === Notice (login / completar perfil) === */
.units-notice {
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    padding: 32px 0;
}
.units-notice-warm {
    background: linear-gradient(180deg, rgba(166,133,90,0.08) 0%, rgba(166,133,90,0.02) 100%);
}
.units-notice-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.units-notice-eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    margin: 0 0 6px;
}
.units-notice-text {
    font-size: 16px;
    color: var(--text);
    margin: 0;
    line-height: 1.5;
    max-width: 640px;
}

/* === Toolbar (filtros + stats) === */
.units-toolbar {
    background: var(--bg);
    padding: 48px 0 32px;
    border-bottom: 1px solid var(--line);
}
.units-stats {
    display: flex;
    gap: 64px;
    margin-bottom: 40px;
}
.units-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.units-stat-num {
    font-family: var(--font-serif);
    font-size: 40px;
    font-weight: 500;
    color: var(--text);
    line-height: 1;
}
.units-stat-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
}

.units-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.units-filter-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.units-filter-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 80px;
}
.units-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.units-chip {
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    padding: 8px 16px;
    font-size: 13px;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    letter-spacing: 0.3px;
}
.units-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.units-chip.is-active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* === Grid de unidades === */
.units-section {
    padding: 64px 0 120px;
    background: var(--bg);
}
.units-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 0;
    font-size: 14px;
}
.units-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 80px 0;
    font-size: 16px;
}
.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* === Card === */
.unit-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.25s ease;
    overflow: hidden;
}
.unit-card:hover {
    border-color: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(26, 26, 26, 0.06);
}
.unit-card.is-sold {
    opacity: 0.65;
}
.unit-card.is-sold:hover {
    transform: none;
}

.unit-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
    border-radius: 2px;
    z-index: 2;
}
.unit-badge-sold {
    background: var(--text);
    color: var(--bg);
}

.unit-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.unit-card-num {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.01em;
}
.unit-card-cat {
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(166, 133, 90, 0.1);
    padding: 4px 8px;
    border-radius: 2px;
}

.unit-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.unit-card-tipo {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.unit-card-loc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}
.unit-card-m2 {
    font-size: 14px;
    color: var(--text);
    margin: 4px 0 0;
    font-weight: 500;
}

.unit-card-prices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.unit-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.unit-price-row strong {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text);
    font-weight: 600;
}
.unit-price-row-highlight {
    background: rgba(166, 133, 90, 0.06);
    margin: 4px -8px 0;
    padding: 8px;
    border-radius: 2px;
}
.unit-price-row-highlight strong {
    color: var(--accent);
    font-size: 16px;
}

.unit-card-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border: 1.5px dashed var(--line-strong);
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    transition: all 0.2s ease;
}
.unit-card-locked:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.unit-card-locked-icon {
    font-size: 18px;
}

/* === Responsive === */
@media (max-width: 900px) {
    .units-stats { gap: 32px; }
    .units-stat-num { font-size: 32px; }
}
@media (max-width: 700px) {
    .units-grid { grid-template-columns: 1fr; }
    .units-notice-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    .units-filter-group { flex-direction: column; align-items: flex-start; gap: 8px; }
    .units-filter-label { min-width: 0; }
    .units-stat-num { font-size: 28px; }
    .units-stats { gap: 24px; }
}

/* ===========================================================
   MASTERPLAN — WEB-3C (con render de fondo + polígonos invisibles)
   =========================================================== */

.mplan-section {
    padding: 48px 0 96px;
    background: var(--bg);
}

.mplan-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

/* Viewer con imagen + overlay */
.mplan-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 2000 / 1420;
    background: var(--bg-card);
    border: 1px solid var(--line);
    overflow: hidden;
}

.mplan-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.mplan-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.mplan-overlay .mplan-zone {
    pointer-events: auto;
}

.mplan-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    background: rgba(245, 239, 230, 0.9);
}
.mplan-loading[hidden] {
    display: none !important;
}

/* Zonas: invisibles por default, brillan al hover */
.mplan-zone {
    fill: transparent;
    stroke: transparent;
    stroke-width: 0.4;
    cursor: pointer;
    transition: fill 0.25s ease, stroke 0.25s ease, filter 0.25s ease;
}

.mplan-zone:hover,
.mplan-zone:focus {
    outline: none;
    fill: rgba(166, 133, 90, 0.35);
    stroke: rgba(166, 133, 90, 1);
    filter: drop-shadow(0 0 8px rgba(166, 133, 90, 0.6));
}
.mplan-zone-info:hover,
.mplan-zone-info:focus {
    fill: rgba(255, 255, 255, 0.30);
    stroke: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.4));
}

/* ====== Drawer ====== */
.mplan-drawer {
    position: fixed;
    inset: 0;
    z-index: 9000;
}
.mplan-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.4);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.mplan-drawer.is-open .mplan-drawer-overlay {
    opacity: 1;
}
.mplan-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 480px;
    background: var(--bg);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.mplan-drawer.is-open .mplan-drawer-panel {
    transform: translateX(0);
}

.mplan-drawer-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    position: relative;
    flex-shrink: 0;
}
.mplan-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.mplan-drawer-close:hover {
    background: var(--bg-card);
}
#mplan-drawer-eyebrow {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    margin: 0 0 8px;
    text-transform: uppercase;
}
#mplan-drawer-title {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.mplan-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px 40px;
}
.mplan-drawer-loading,
.mplan-drawer-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 32px 0;
    font-size: 14px;
}
.mplan-drawer-error {
    color: #c44;
    text-align: center;
    padding: 32px 0;
    font-size: 14px;
}
.mplan-drawer-info-block {
    padding: 24px;
    background: var(--bg-card);
    border: 1px dashed var(--line-strong);
    text-align: center;
}
.mplan-drawer-info-text {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 8px;
}
.mplan-drawer-info-detail {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
    letter-spacing: 1.5px;
}

.mplan-drawer-locked {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-card);
    border: 1.5px dashed var(--line-strong);
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    margin-bottom: 24px;
    transition: all 0.2s ease;
}
.mplan-drawer-locked:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.mplan-drawer-locked-icon {
    font-size: 20px;
}

.mplan-unit-row {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 16px 18px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}
.mplan-unit-row:hover {
    border-color: var(--accent-soft);
}
.mplan-unit-row.is-sold {
    opacity: 0.6;
}
.mplan-unit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 12px;
}
.mplan-unit-num {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    margin-right: 10px;
}
.mplan-unit-cat {
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(166, 133, 90, 0.1);
    padding: 3px 7px;
    border-radius: 2px;
}
.mplan-unit-badge {
    background: var(--text);
    color: var(--bg);
    font-size: 9px;
    letter-spacing: 1.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 2px;
}
.mplan-unit-tipo {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 2px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.mplan-unit-m2 {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}
.mplan-prices {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.mplan-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    color: var(--text-muted);
}
.mplan-price-row strong {
    font-family: var(--font-sans);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}
.mplan-price-row-highlight {
    background: rgba(166, 133, 90, 0.06);
    margin: 4px -6px 0;
    padding: 6px;
    border-radius: 2px;
}
.mplan-price-row-highlight strong {
    color: var(--accent);
    font-size: 14px;
}

body.drawer-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 700px) {
    .mplan-drawer-panel { max-width: 100%; }
    .mplan-drawer-header { padding: 24px 20px 20px; }
    .mplan-drawer-body { padding: 20px; }
    #mplan-drawer-title { font-size: 22px; }
}

/* === LOGO-CREMA-FOOTER (La Esquina) === */
.footer-logo{filter:brightness(0) invert(1) sepia(12%) saturate(180%) hue-rotate(5deg) opacity(.92);}
/* === /LOGO-CREMA-FOOTER === */
