/* ============================================================
   5K IMOBILIÁRIA — style.css
   ============================================================ */

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

:root {
    --black:   #0d0d0d;
    --white:   #ffffff;
    --orange:  #f78000;
    --orange2: #e06e00;
    --grey:    #f5f5f5;
    --grey2:   #e8e8e8;
    --text-muted: #888;
    --radius:  12px;
    --nav-h:   72px;
    --transition: 0.3s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- UTILITY ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.text-orange { color: var(--orange); }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: 8px;
    font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.95rem;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}
.btn-primary {
    background: var(--orange); color: var(--white);
}
.btn-primary:hover {
    background: var(--orange2); transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(247,128,0,.35);
}
.btn-full { width: 100%; justify-content: center; }

/* ---------- NAVBAR ---------- */
#navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h); z-index: 9000;
    background: rgba(13,13,13,0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    transition: box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.5); }

.nav-container {
    max-width: 1180px; margin: 0 auto; padding: 0 24px;
    height: 100%; display: flex; align-items: center; gap: 32px;
}

.nav-logo-link { flex-shrink: 0; display: flex; align-items: center; }
.logo-img { height: 38px; width: auto; object-fit: contain; }

.nav-links {
    display: flex; align-items: center; gap: 4px; flex: 1;
}
.nav-link {
    padding: 8px 14px; border-radius: 6px; font-size: 0.88rem; font-weight: 500;
    color: rgba(255,255,255,0.8);
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--orange); background: rgba(247,128,0,0.08); }

.nav-contacts {
    display: flex; flex-direction: row; align-items: center; gap: 20px;
    margin-left: auto; flex-shrink: 0;
}
.nav-phone {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.75);
    white-space: nowrap;
    transition: color var(--transition);
}
.nav-phone:hover { color: var(--orange); }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    width: 36px; height: 36px; justify-content: center; align-items: center;
    border-radius: 6px; z-index: 9001; flex-shrink: 0;
    transition: background var(--transition);
}
.nav-toggle:hover { background: rgba(255,255,255,0.08); }
.nav-toggle span {
    display: block; width: 22px; height: 2px; background: var(--white);
    border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* CRITICAL: pointer-events none when overlay is hidden */
.nav-overlay {
    display: none; visibility: hidden; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 8998;
    pointer-events: none;
}
.nav-overlay.active { display: block; visibility: visible; pointer-events: auto; }

/* ---------- HERO ---------- */
.hero {
    min-height: 70vh; display: flex; align-items: center; justify-content: center;
    background: var(--black); position: relative; overflow: hidden;
    padding: calc(var(--nav-h) + 60px) 24px 80px;
}
.hero-bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(247,128,0,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247,128,0,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}
.hero-glow {
    position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
    width: 600px; height: 300px;
    background: radial-gradient(ellipse, rgba(247,128,0,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero-content { position: relative; text-align: center; color: var(--white); max-width: 800px; }

.hero-title {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
    margin-bottom: 48px;
}

.hero-commission {
    display: inline-block;
    border: 2px solid rgba(247,128,0,0.4);
    border-radius: var(--radius);
    padding: 28px 48px;
    background: rgba(247,128,0,0.06);
}
/* Nova hierarquia: COMISSÃO FIXA > INDEPENDENTEMENTE > 5.000€ + IVA */
.commission-main {
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 900; letter-spacing: -0.01em;
    color: var(--orange); line-height: 1.1;
    margin-bottom: 12px;
}
.commission-tagline {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    font-weight: 700; letter-spacing: 0.1em;
    color: var(--orange); text-transform: uppercase;
    margin-bottom: 16px; opacity: 0.85;
}
.commission-price {
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    font-weight: 500; color: rgba(255,255,255,0.45);
    letter-spacing: 0.04em;
}
.commission-price-iva { font-weight: 400; }
.hero-cta-btn { margin-top: 24px; }

.hero-scroll {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 38px; border: 2px solid rgba(255,255,255,0.2); border-radius: 12px;
    display: flex; justify-content: center; padding-top: 6px;
}
.scroll-dot {
    width: 4px; height: 8px; background: var(--orange); border-radius: 2px;
    animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{transform:translateY(0);opacity:1} 50%{transform:translateY(8px);opacity:0.3} }

/* ---------- SECTIONS ---------- */
.section { padding: 100px 0; }
.section-light { background: var(--white); }
.section-dark  { background: var(--black); color: var(--white); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }

/* ---------- CARDS ---------- */
.cards-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.card {
    background: var(--grey); border-radius: var(--radius);
    padding: 36px 28px; border: 1px solid var(--grey2);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.card-icon { width: 48px; height: 48px; margin-bottom: 20px; }
.card-icon svg { width: 48px; height: 48px; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.card p  { font-size: 0.9rem; color: #555; line-height: 1.65; }

/* ---------- SPLIT LAYOUT ---------- */
.split-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start;
}
.split-content h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; margin: 12px 0 20px; color: var(--white); }
.split-content p  { color: rgba(255,255,255,0.65); font-size: 0.95rem; line-height: 1.75; }

.eyebrow {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em;
    color: var(--orange); text-transform: uppercase;
}
.eyebrow-calc { display: block; margin-bottom: 16px; font-size: 1.35rem; letter-spacing: 0.06em; }

/* ---------- CALCULATOR ---------- */
.calculator {
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 28px;
}

.calc-field { display: flex; flex-direction: column; gap: 8px; }
.calc-label { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.08em; }

.calc-value-display {
    font-size: 1.4rem; font-weight: 700; color: var(--white);
    display: flex; align-items: baseline; gap: 8px;
    font-variant-numeric: tabular-nums;
}
.calc-iva { font-size: 0.75rem; font-weight: 400; color: rgba(255,255,255,0.45); }

.calc-slider-row { display: flex; align-items: center; gap: 10px; }
.calc-btn {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,0.08); color: var(--white);
    font-size: 1.1rem; line-height: 1; flex-shrink: 0;
    transition: background var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.calc-btn:hover { background: rgba(247,128,0,0.3); }

.calc-track-wrap { flex: 1; }
input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 4px; border-radius: 2px; outline: none;
    background: linear-gradient(to right,
        var(--orange) 0%,
        var(--orange) calc(var(--fill, 50%) * 1%),
        rgba(255,255,255,0.15) calc(var(--fill, 50%) * 1%),
        rgba(255,255,255,0.15) 100%);
    cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px;
    border-radius: 50%; background: var(--orange);
    border: 2px solid var(--white); cursor: pointer;
    box-shadow: 0 0 0 3px rgba(247,128,0,0.25);
    transition: box-shadow var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { box-shadow: 0 0 0 6px rgba(247,128,0,0.25); }
input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--orange); border: 2px solid var(--white); cursor: pointer;
}

.calc-result-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.calc-result-label { font-size: 0.85rem; color: rgba(255,255,255,0.55); white-space: nowrap; }
.calc-result-label--logo { display: flex; align-items: center; }
.calc-logo-img { height: 22px; width: auto; object-fit: contain; }

.calc-result-trad {
    display: flex; align-items: baseline; gap: 6px;
    font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,0.75);
    font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 140px; justify-content: flex-end;
}
.calc-result-5k {
    display: flex; align-items: baseline; gap: 6px;
    font-size: 1.05rem; font-weight: 700; color: var(--orange);
    white-space: nowrap; min-width: 140px; justify-content: flex-end;
}
.calc-result-iva { font-size: 0.72rem; font-weight: 400; color: rgba(255,255,255,0.4); }

.calc-result-divider { height: 1px; background: rgba(247,128,0,0.3); margin: 4px 0; }

/* Bloco de poupança destacado */
.calc-savings-highlight {
    margin-top: 4px;
    border: 1.5px solid var(--orange);
    border-radius: 10px;
    background: rgba(247,128,0,0.08);
    padding: 16px 18px 12px;
    position: relative;
    overflow: hidden;
}
.calc-savings-highlight::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 60% 50%, rgba(247,128,0,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.calc-savings-inner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 8px;
}
.calc-savings-label { font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 0.06em; }
.calc-savings-amount {
    font-size: 1.6rem; font-weight: 900; color: var(--orange);
    font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 140px; text-align: right;
    text-shadow: 0 0 20px rgba(247,128,0,0.4);
}

.calc-note { font-size: 0.7rem; color: rgba(255,255,255,0.3); line-height: 1.4; }
.btn-calc-cta { margin-top: 20px; width: 100%; justify-content: center; text-transform: uppercase; }

/* ---------- FOUNDER ---------- */
.founder-layout {
    display: grid; grid-template-columns: 1fr 420px; gap: 72px; align-items: center;
}
.founder-accent {
    font-size: 5rem; line-height: 1; color: var(--orange); font-weight: 900;
    margin-bottom: -12px; display: block;
}
.founder-text-col h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 20px; }
.founder-text-col p  { font-size: 0.93rem; color: #555; line-height: 1.75; margin-bottom: 16px; }

.founder-info { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.founder-name { display: block; font-weight: 700; font-size: 1rem; }
.founder-role { font-size: 0.82rem; color: var(--text-muted); }

.founder-photo-wrap {
    border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.15);
    aspect-ratio: 3/4; background: var(--grey2);
}
.founder-photo { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---------- CONTACT ---------- */
.contact-layout {
    display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start;
}
.contact-intro h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 20px; color: var(--white); }
.contact-intro p  { color: rgba(255,255,255,0.6); font-size: 0.93rem; line-height: 1.75; margin-bottom: 28px; }

.contact-highlights { display: flex; flex-direction: column; gap: 12px; }
.ch-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.88rem; color: rgba(255,255,255,0.75); font-weight: 500;
}

.contact-form-wrapper {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: var(--radius); padding: 36px;
}
.contact-form-wrapper h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; color: var(--white); }
.form-tagline {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-bottom: 24px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.7); }
.form-group input {
    padding: 12px 14px;
    border: 1.5px solid rgba(255,255,255,0.12); border-radius: 8px;
    background: rgba(255,255,255,0.06); color: var(--white);
    font-family: 'Poppins', sans-serif; font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input::placeholder { color: rgba(255,255,255,0.3); }
.form-group input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(247,128,0,0.15); }
.form-group input.input-error { border-color: #fc8181; }
.form-error { font-size: 0.78rem; color: #fc8181; min-height: 18px; }

.form-success {
    display: none; align-items: center; gap: 10px;
    background: rgba(247,128,0,0.12); border: 1px solid rgba(247,128,0,0.3);
    border-radius: 8px; padding: 14px 16px;
    font-size: 0.88rem; font-weight: 500; color: rgba(255,255,255,0.85);
    margin-top: 12px;
}
.form-success.visible { display: flex; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }

.faq-item {
    border: 1.5px solid var(--grey2); border-radius: var(--radius);
    overflow: hidden; transition: border-color var(--transition);
}
.faq-item.open { border-color: var(--orange); }

.faq-question {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 20px 24px;
    font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 600;
    color: var(--black); background: var(--white); text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.faq-question:hover { color: var(--orange); }

.faq-icon {
    width: 22px; height: 22px; flex-shrink: 0;
    background: var(--grey2); border-radius: 50%;
    position: relative; transition: background var(--transition), transform var(--transition);
}
.faq-icon::before, .faq-icon::after {
    content: ''; position: absolute; background: var(--black);
    border-radius: 2px; transition: transform var(--transition), opacity var(--transition);
}
.faq-icon::before { width: 10px; height: 2px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.faq-icon::after  { width: 2px; height: 10px; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.faq-item.open .faq-icon { background: var(--orange); }
.faq-item.open .faq-icon::before { background: var(--white); }
.faq-item.open .faq-icon::after  { background: var(--white); opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }

.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
}
.faq-item.open .faq-answer { max-height: 400px; padding: 0 24px 20px; }
.faq-answer p { font-size: 0.9rem; color: #555; line-height: 1.7; }

/* ---------- FOOTER ---------- */
#footer {
    background: #080808; color: rgba(255,255,255,0.7);
    padding: 64px 0 0;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr;
    gap: 48px; padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-logo-img { height: 36px; width: auto; object-fit: contain; }
.footer-ami  { font-size: 0.78rem; font-weight: 600; color: var(--orange); margin-top: 4px; }
.footer-company { font-size: 0.75rem; color: rgba(255,255,255,0.45); line-height: 1.4; max-width: 240px; }
.footer-phone {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.82rem; color: rgba(255,255,255,0.6);
    transition: color var(--transition);
}
.footer-phone:hover { color: var(--orange); }

.footer-col h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; }
.footer-col a  { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.55); margin-bottom: 8px; transition: color var(--transition); }
.footer-col a:hover { color: var(--orange); }

.footer-address-col h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white); margin-bottom: 14px; }
.footer-address { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.8; font-style: normal; }

.footer-nav { display: flex; gap: 48px; }

.footer-bottom {
    padding: 20px 0; text-align: center;
    font-size: 0.78rem; color: rgba(255,255,255,0.3);
}

/* ---------- WHATSAPP FAB ---------- */
.fab {
    position: fixed; bottom: 28px; right: 28px; z-index: 8000;
    width: 58px; height: 58px; border-radius: 50%;
    background: #25d366; color: var(--white);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.45);
    transition: transform var(--transition), box-shadow var(--transition);
}
.fab:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,0.55); }

/* ---------- SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- TABLET (≤900px) ---------- */
@media (max-width: 900px) {
    .nav-contacts { display: none; }
    .nav-toggle { display: flex; margin-left: auto; }

    .nav-links {
        display: flex; flex-direction: column; align-items: flex-start;
        position: fixed; top: 0; right: -100%; bottom: 0;
        width: min(320px, 80vw);
        height: 100dvh;
        background: #111;
        padding: calc(var(--nav-h) + 24px) 28px 28px;
        gap: 6px; z-index: 8999; overflow-y: auto;
        transition: right 0.32s cubic-bezier(0.4,0,0.2,1);
    }
    .nav-links.open { right: 0; }
    .nav-link { width: 100%; font-size: 1rem; padding: 12px 16px; color: rgba(255,255,255,0.85); }

    /* overlay: sempre display:block no mobile, mas pointer-events:none quando inativo */
    .nav-overlay { display: block; pointer-events: none; }
    .nav-overlay.active { display: block; pointer-events: auto; }

    .cards-grid { grid-template-columns: 1fr; gap: 16px; }

    .split-layout { grid-template-columns: 1fr; gap: 48px; }
    .split-content { order: 1; }
    .split-visual { order: 2; }

    .founder-layout { grid-template-columns: 1fr; gap: 40px; }
    .founder-text-col  { order: 1; }
    .founder-photo-col { order: 2; }
    .founder-photo-wrap { max-width: 340px; margin: 0 auto; aspect-ratio: 4/5; }

    .contact-layout { grid-template-columns: 1fr; gap: 40px; }

    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-nav { gap: 24px; }
}

/* ---------- MOBILE (≤600px) ---------- */
@media (max-width: 600px) {
    .section { padding: 72px 0; }
    .hero { min-height: 80vh; padding: calc(var(--nav-h) + 40px) 20px 60px; }
    .hero-title { font-size: clamp(1.65rem, 8vw, 2.4rem); }
    .hero-commission { padding: 20px 28px; }
    .commission-main { font-size: clamp(1.8rem, 9vw, 3rem); }
    .commission-tagline { font-size: clamp(0.72rem, 3vw, 0.9rem); }

    .container { padding: 0 18px; }

    .calculator { padding: 20px; }
    .calc-result-trad, .calc-result-5k { min-width: 110px; }
    .calc-savings-amount { min-width: 110px; }

    .contact-form-wrapper { padding: 24px 18px; }

    .footer-top { grid-template-columns: 1fr; }
    .footer-nav { flex-direction: column; gap: 32px; }

    .fab { bottom: 18px; right: 18px; width: 52px; height: 52px; }

    .nav-links { width: 100%; }
}
