
/* ========================================
   HABITAT — ESTILOS GENERALES
======================================== */

:root {
    --cream: #f5f1ea;
    --white: #ffffff;
    --dark: #2c2620;
    --muted: #6f655a;
    --olive: #b06a47;
    --olive-dark: #8c4f31;
    --line: #e4dbd0;
    --display: "Syne", Georgia, sans-serif;
    --sans: "Karla", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background: var(--cream);
    color: var(--dark);
    font-family: var(--sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body,
button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

button,
a {
    outline-offset: 5px;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--olive);
}

::selection {
    background: var(--olive-dark);
    color: white;
}

.eyebrow {
    display: inline-block;
    color: var(--olive-dark);
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    line-height: 1.5;
}


/* ========================================
   NAVEGACIÓN
======================================== */

.navbar {
    width: 100%;
    min-height: 88px;
    padding: 0 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: rgba(245, 241, 234, 0.96);
    border-bottom: 1px solid rgba(44, 38, 32, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px);
}

.logo {
    font-family: var(--display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1;
}

.logo span {
    color: var(--olive);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 34px;
}

.nav-links a {
    position: relative;
    color: #55564f;
    font-size: 0.83rem;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 100%;
    height: 1px;
    background: var(--olive);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--olive-dark);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-cta {
    padding: 12px 17px;
    border: 1px solid var(--dark);
    font-size: 0.77rem;
    font-weight: 600;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.nav-cta span {
    margin-left: 8px;
}

.nav-cta:hover {
    background: var(--dark);
    color: white;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.menu-toggle span {
    display: block;
    width: 19px;
    height: 1.5px;
    background: var(--dark);
    transition: transform 0.3s ease;
}

.menu-toggle.active span:first-child {
    transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle.active span:last-child {
    transform: translateY(-3.75px) rotate(-45deg);
}


/* ========================================
   PORTADA / HERO
======================================== */

.hero {
    min-height: 650px;
    padding: 65px 7% 75px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 6%;
    overflow: hidden;
}

.hero-content {
    padding: 25px 0;
    animation: heroEnter 0.85s ease both;
}

.hero h1 {
    max-width: 610px;
    margin: 25px 0;
    font-family: var(--display);
    font-size: clamp(3.1rem, 5.1vw, 5.3rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.025em;
}

.hero h1 span,
.section-heading h2 span,
.about-content h2 span,
.contact-section h2 span {
    display: block;
    color: var(--olive);
    font-weight: 800;
}

.hero-content > p {
    max-width: 445px;
    color: var(--muted);
    font-size: 0.97rem;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 26px;
    margin-top: 34px;
}

.btn-primary {
    min-height: 53px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: var(--dark);
    color: white;
    font-size: 0.81rem;
    font-weight: 600;
    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.btn-primary:hover {
    background: var(--olive-dark);
    transform: translateY(-3px);
}

.btn-primary span {
    font-size: 1rem;
}

.text-link {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.81rem;
    transition: border-color 0.3s ease;
}

.text-link:hover {
    border-color: var(--olive);
}

.hero-note {
    margin-top: 65px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.73rem;
}

.note-line {
    width: 35px;
    height: 1px;
    background: var(--olive);
}

.hero-visual {
    height: 530px;
    position: relative;
    animation: imageEnter 1s 0.15s ease both;
}

.hero-visual > img {
    object-position: center;
}

.image-label {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 56px;
    padding: 12px 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: rgba(37, 39, 32, 0.83);
    color: white;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}

.image-label span:first-child {
    color: #e0e0d4;
}

.floating-card {
    position: absolute;
    left: -32px;
    bottom: 95px;
    padding: 17px 21px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    box-shadow: 0 12px 40px rgba(37, 39, 32, 0.1);
    animation: floatCard 5s ease-in-out infinite;
}

.floating-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--cream);
    color: var(--olive);
    font-size: 1.2rem;
}

.floating-card strong {
    font-size: 0.77rem;
    font-weight: 600;
}

.floating-card p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.7rem;
}


/* ========================================
   CATÁLOGO DE PROPIEDADES
======================================== */

.properties-section {
    padding: 105px 7% 110px;
    background: var(--white);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 35px;
}

.section-heading h2,
.about-content h2,
.contact-section h2 {
    margin-top: 16px;
    font-family: var(--display);
    font-size: clamp(2.5rem, 4.2vw, 4rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.section-heading > p {
    max-width: 310px;
    padding-bottom: 7px;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.8;
}

.property-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 39px 0 27px;
}

.filter-btn {
    min-height: 39px;
    padding: 0 19px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font-size: 0.76rem;
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--dark);
    border-color: var(--dark);
    color: white;
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 45px 25px;
}

.property-card {
    min-width: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
}

.property-card.is-hidden {
    display: none;
}

.property-image {
    height: 340px;
    display: block;
    position: relative;
    overflow: hidden;
    background: #e5e2d8;
}

.property-image img {
    transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.property-card:hover .property-image img {
    transform: scale(1.045);
}

.property-tag {
    position: absolute;
    top: 17px;
    left: 17px;
    padding: 8px 12px;
    background: var(--cream);
    color: var(--dark);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.09em;
}

.property-arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: white;
    font-size: 1.15rem;
    transition:
        background 0.3s ease,
        color 0.3s ease;
}

.property-card:hover .property-arrow {
    background: var(--olive);
    color: white;
}

.property-info {
    padding-top: 20px;
}

.property-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 15px;
}

.property-title h3 {
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.35;
}

.property-price {
    flex-shrink: 0;
    font-size: 0.82rem;
    font-weight: 700;
}

.property-location {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

.property-features {
    margin-top: 19px;
    padding-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.72rem;
}

.property-features span + span {
    position: relative;
}

.property-features span + span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -10px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--olive);
}

.demo-notice {
    margin-top: 36px;
    color: var(--muted);
    font-size: 0.7rem;
    text-align: center;
}


/* ========================================
   PRESENTACIÓN DE HABITAT
======================================== */

.about-section {
    padding: 110px 7%;
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: center;
    gap: 9%;
}

.about-image {
    height: 510px;
    position: relative;
    background: #e5e2d8;
}

.about-image img {
    object-position: center;
}

.about-image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 14px 18px;
    background: var(--dark);
    color: white;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
}

.about-content h2 {
    margin-bottom: 23px;
    font-size: clamp(2.4rem, 3.6vw, 3.6rem);
}

.about-content > p {
    margin-bottom: 29px;
    color: var(--muted);
    font-size: 0.89rem;
    line-height: 1.95;
}


/* ========================================
   CONTACTO
======================================== */

.contact-section {
    padding: 80px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: var(--dark);
    color: white;
}

.contact-section .eyebrow {
    color: #b8bd9d;
}

.contact-section h2 {
    max-width: 650px;
    font-size: clamp(2.6rem, 4.5vw, 4.2rem);
}

.contact-section h2 span {
    color: #b8bd9d;
}

.contact-section > div > p {
    max-width: 480px;
    margin-top: 20px;
    color: #c2c3b9;
    font-size: 0.88rem;
    line-height: 1.8;
}

.btn-light {
    min-height: 54px;
    padding: 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 20px;
    background: var(--cream);
    color: var(--dark);
    font-size: 0.8rem;
    font-weight: 700;
    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.btn-light:hover {
    background: #dfe1d1;
    transform: translateY(-3px);
}


/* ========================================
   PIE DE PÁGINA
======================================== */

.footer {
    min-height: 115px;
    padding: 30px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: #eeece4;
}

.footer .logo {
    font-size: 1.7rem;
}

.footer > p,
.footer-copy {
    color: var(--muted);
    font-size: 0.73rem;
}

.back-to-top {
    font-size: 0.76rem;
    transition: color 0.25s ease;
}

.back-to-top:hover {
    color: var(--olive);
}


/* ========================================
   ANIMACIONES
======================================== */

@keyframes heroEnter {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes imageEnter {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}


/* ========================================
   TABLETS
======================================== */

@media (max-width: 1050px) {
    .navbar {
        padding: 0 5%;
        gap: 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-cta {
        padding: 11px 13px;
    }

    .hero {
        padding-right: 5%;
        padding-left: 5%;
        gap: 4%;
    }

    .hero h1 {
        font-size: clamp(3rem, 5.2vw, 4.4rem);
    }

    .hero-visual {
        height: 470px;
    }

    .properties-section,
    .about-section,
    .contact-section {
        padding-right: 5%;
        padding-left: 5%;
    }

    .property-image {
        height: 300px;
    }

    .about-section {
        gap: 6%;
    }

    .about-image {
        height: 450px;
    }
}


/* ========================================
   MÓVILES
======================================== */

@media (max-width: 760px) {
    html {
        scroll-padding-top: 78px;
    }

    .navbar {
        min-height: 76px;
        padding: 0 6%;
    }

    .logo {
        font-size: 1.85rem;
    }

    .nav-cta {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        padding: 12px 6% 24px;
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        background: var(--cream);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 16px 25px rgba(37, 39, 32, 0.06);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition:
            opacity 0.25s ease,
            transform 0.25s ease,
            visibility 0.25s ease;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links a {
        padding: 13px 0;
        border-bottom: 1px solid var(--line);
        font-size: 0.9rem;
    }

    .nav-links a::after {
        display: none;
    }

    .hero {
        padding: 65px 6% 70px;
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .hero-content {
        padding: 0;
    }

    .hero h1 {
        max-width: 570px;
        margin: 20px 0;
        font-size: clamp(3rem, 10vw, 4.4rem);
    }

    .hero-content > p {
        max-width: 500px;
        font-size: 0.9rem;
    }

    .hero-actions {
        gap: 20px;
        margin-top: 27px;
    }

    .hero-note {
        margin-top: 35px;
    }

    .hero-visual {
        height: min(115vw, 490px);
        min-height: 340px;
    }

    .floating-card {
        left: -7px;
        bottom: 75px;
        padding: 13px;
    }

    .image-label {
        padding: 12px;
        font-size: 0.65rem;
    }

    .properties-section {
        padding: 75px 6% 80px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .section-heading h2,
    .contact-section h2 {
        font-size: clamp(2.6rem, 8vw, 3.5rem);
    }

    .section-heading > p {
        max-width: 450px;
    }

    .property-filters {
        margin: 28px 0 22px;
        gap: 8px;
    }

    .filter-btn {
        padding: 0 14px;
    }

    .property-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .property-image {
        height: min(72vw, 390px);
        min-height: 260px;
    }

    .property-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .property-title h3 {
        font-size: 1.45rem;
    }

    .property-features {
        gap: 9px 18px;
    }

    .about-section {
        padding: 75px 6%;
        grid-template-columns: 1fr;
        gap: 37px;
    }

    .about-image {
        height: min(100vw, 430px);
        min-height: 300px;
    }

    .about-content h2 {
        font-size: clamp(2.5rem, 8vw, 3.4rem);
    }

    .contact-section {
        padding: 65px 6%;
        align-items: flex-start;
        flex-direction: column;
        gap: 28px;
    }

    .contact-section h2 {
        font-size: clamp(2.6rem, 8vw, 3.6rem);
    }

    .footer {
        padding: 30px 6%;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 15px;
    }

    .footer > p {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .back-to-top {
        justify-self: end;
    }

    .footer-copy {
        grid-column: 1 / -1;
    }
}


/* ========================================
   MÓVILES PEQUEÑOS
======================================== */

@media (max-width: 390px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .btn-primary {
        max-width: 100%;
        padding: 0 16px;
        gap: 12px;
    }

    .floating-card {
        gap: 9px;
    }

    .floating-card strong {
        font-size: 0.7rem;
    }

    .image-label {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .property-title h3 {
        font-size: 1.3rem;
    }
}


/* ========================================
   ACCESIBILIDAD: MENOS MOVIMIENTO
======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}