/* ==========================================================================
   Almeida Imóveis — LP Corretor (estilo Estato: navy + verde)
   ========================================================================== */

:root {
    --navy:        hsl(215, 45%, 10%);
    --navy-soft:   hsl(215, 38%, 14%);
    --green:       hsl(142, 71%, 45%);
    --green-hover: hsl(142, 71%, 38%);
    --white:       #fff;
    --off:         hsl(210, 30%, 97%);
    --text:        hsl(215, 30%, 16%);
    --muted:       hsl(215, 12%, 45%);
    --light:       hsla(0, 0%, 100%, .85);
    --border:      hsla(215, 30%, 16%, .1);

    --font: 'Figtree', system-ui, sans-serif;
    --font-display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
    --container: 1180px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --radius: 14px;
    --shadow: 0 18px 48px rgba(10, 20, 40, .14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
.container { width: 92%; max-width: var(--container); margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .hero-video { display: none; }
}

/* ---------- Reveal on scroll ---------- */
.js-enabled .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-enabled .reveal.appear { opacity: 1; transform: translateY(0); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; font-size: .9rem;
    padding: .8rem 1.6rem; border-radius: 8px; border: none;
    transition: transform .18s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 24px hsla(142, 71%, 45%, .35); position: relative; overflow: hidden; }
.btn-green:hover { background: var(--green-hover); transform: translateY(-3px); box-shadow: 0 14px 32px hsla(142, 71%, 45%, .45); }
.btn-green::after { /* shine */
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 40%, hsla(0,0%,100%,.35) 50%, transparent 60%);
    transform: translateX(-120%);
}
.btn-green:hover::after { transform: translateX(120%); transition: transform .6s var(--ease); }
.btn-lg { font-size: 1rem; padding: 1rem 2.2rem; }

/* ---------- Header ---------- */
.header {
    position: fixed; inset-inline: 0; top: 0; z-index: 999; height: 72px;
    background: hsla(215, 45%, 10%, .85); backdrop-filter: blur(12px);
    border-bottom: 1px solid hsla(0, 0%, 100%, .08);
    transition: background-color .3s var(--ease);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { color: #fff; font-weight: 800; font-size: 1.2rem; letter-spacing: -.3px; display: flex; align-items: center; gap: 8px; }
.logo-mark { color: var(--green); font-size: 1.5rem; }
.logo-accent { color: var(--green); font-weight: 600; }
.nav-menu { display: flex; gap: 28px; }
.nav-link { color: var(--light); font-size: .9rem; font-weight: 500; position: relative; padding-block: 4px; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 140px 0 90px; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, hsla(215, 45%, 8%, .88) 20%, hsla(215, 45%, 8%, .55) 60%, hsla(215, 45%, 8%, .35));
}
.hero-content { position: relative; z-index: 2; }
.hero-title { color: #fff; font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -1px; margin-bottom: 22px; }
.grifo { color: var(--green); }
.hero-sub { color: var(--light); font-size: 1.06rem; margin-bottom: 30px; }

.hero-social { display: flex; align-items: center; gap: 14px; margin-bottom: 40px; color: var(--light); font-size: .88rem; line-height: 1.35; }
.avatars { display: flex; }
.avatars img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.avatars img + img { margin-left: -12px; }
.hero-social strong { color: #fff; }

/* Tabs + search */
.tabs { display: inline-flex; }
.tab {
    background: hsla(0, 0%, 100%, .92); color: var(--text);
    border: none; font-weight: 600; font-size: .88rem;
    padding: .7rem 1.5rem; border-radius: 10px 10px 0 0;
    opacity: .75; transition: opacity .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.tab.active { background: var(--green); color: #fff; opacity: 1; }
.search-card {
    background: #fff; border-radius: 0 var(--radius) var(--radius) var(--radius);
    box-shadow: var(--shadow);
    padding: 22px; display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 18px; align-items: end;
    max-width: 980px;
}
.field label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 6px; }
.field input, .field select {
    width: 100%; border: 1px solid var(--border); border-radius: 8px;
    padding: .7rem .8rem; font-family: inherit; font-size: .88rem; color: var(--text); background: #fff;
}
.field input:focus, .field select:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.btn-search { padding: .78rem 1.9rem; }

/* ---------- Stats ---------- */
.stats { background: var(--navy); padding: 42px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-num { display: block; color: var(--green); font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--light); font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; }

/* ---------- Properties ---------- */
.properties { padding: 100px 0; background: var(--off); }
.section-head { text-align: center; max-width: 560px; margin: 0 auto 50px; }
.eyebrow { color: var(--green); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 10px; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.6px; }
.section-title.light { color: #fff; }

.prop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.prop-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 6px 20px rgba(10, 20, 40, .07);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.prop-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.prop-card.hidden { display: none; }
.prop-media { position: relative; height: 210px; overflow: hidden; }
.prop-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.prop-card:hover .prop-media img { transform: scale(1.07); }
.badge {
    position: absolute; top: 14px; left: 14px;
    background: var(--green); color: #fff;
    font-size: .7rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
    padding: 5px 12px; border-radius: 999px;
}
.badge-rent { background: hsl(215, 80%, 50%); }
.prop-body { padding: 20px; }
.prop-price { color: var(--green); font-weight: 800; font-size: 1.25rem; margin-bottom: 6px; }
.prop-price span { color: var(--muted); font-size: .82rem; font-weight: 500; }
.prop-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.prop-specs { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .8rem; }
.prop-specs li::before { content: '•'; color: var(--green); margin-right: 6px; }

/* ---------- About ---------- */
.about { padding: 100px 0; }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: center; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; }
.about-text .section-title { margin-bottom: 16px; }
.about-text > p { color: var(--muted); margin-bottom: 20px; }
.about-list { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.about-list li { font-weight: 600; font-size: .95rem; }
.about-list li::before { content: '✓'; color: var(--green); font-weight: 800; margin-right: 10px; }
.creci { color: var(--muted); font-size: .82rem; letter-spacing: .5px; margin-bottom: 26px; }

/* ---------- CTA / Footer ---------- */
.cta { background: var(--navy); padding: 90px 0; text-align: center; }
.cta-inner p { color: var(--light); margin: 14px 0 30px; }
.footer { background: var(--navy-soft); padding: 22px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--light); font-size: .8rem; }
.footer-credit a { color: var(--green); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .prop-grid { grid-template-columns: repeat(2, 1fr); }
    .search-card { grid-template-columns: 1fr 1fr; }
    .btn-search { grid-column: 1 / -1; justify-content: center; }
    .about-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 720px) {
    .nav-cta { display: none; }
    .nav-toggle { display: flex; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    .nav-menu {
        position: fixed; inset: 72px 0 auto 0;
        background: var(--navy); flex-direction: column; align-items: center;
        gap: 22px; padding: 30px 0;
        transform: translateY(-130%); transition: transform .4s var(--ease);
    }
    .nav-menu[data-open="true"] { transform: translateY(0); }
    .prop-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
    .hero { padding-top: 120px; }
}

/* ==========================================================================
   v2 — tipografia display, coreografia do hero, cards e filtro animados
   ========================================================================== */

.hero-title, .section-title, .stat-num, .prop-price { font-family: var(--font-display); }
.hero-title { font-weight: 700; letter-spacing: -.5px; }

/* Hero: linhas mascaradas + entradas sequenciais (só com JS; sem JS tudo fica visível) */
.hline { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.hline > span { display: block; }

.js-enabled .hline > span {
    transform: translateY(112%);
    animation: hlineUp .85s var(--ease) forwards;
}
.js-enabled .hline:nth-child(1) > span { animation-delay: .12s; }
.js-enabled .hline:nth-child(2) > span { animation-delay: .24s; }

.js-enabled .hero-enter {
    opacity: 0;
    animation: heroRise .8s var(--ease) forwards;
    animation-delay: var(--d, .5s);
}

@keyframes hlineUp { to { transform: translateY(0); } }
@keyframes heroRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* Grifo: sublinhado que se desenha depois que a linha sobe */
.grifo { position: relative; font-style: normal; }
.grifo::after {
    content: ''; position: absolute; left: 0; bottom: .04em;
    width: 100%; height: .12em; background: var(--green); opacity: .55;
    border-radius: 2px; z-index: -1;
    transform: scaleX(0); transform-origin: left;
}
.js-enabled .grifo::after { animation: grifoDraw .7s var(--ease) 1s forwards; }
@keyframes grifoDraw { to { transform: scaleX(1); } }

/* Cards de imóveis: véu + convite no hover */
.prop-media::after {
    content: 'Ver detalhes  →';
    position: absolute; inset: 0;
    display: flex; align-items: flex-end; padding: 16px;
    font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: #fff;
    background: linear-gradient(to top, hsla(215, 45%, 8%, .82), transparent 55%);
    opacity: 0; transform: translateY(8px);
    transition: opacity .35s var(--ease), transform .35s var(--ease);
    pointer-events: none;
}
.prop-card:hover .prop-media::after { opacity: 1; transform: translateY(0); }

/* Filtro venda/aluguel: cards re-entram animados ao trocar de aba */
.js-enabled .prop-card.entering { animation: propIn .45s var(--ease) backwards; }
@keyframes propIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 600px) {
    .search-card {
        grid-template-columns: 1fr;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-social {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .avatars {
        margin-bottom: 4px;
    }
}
