/* ─── tokens ─────────────────────────────────────────── */
:root {
    --bg: #f9f8f4;
    --bg2: #ffffff;
    --ink: #141210;
    --ink2: #6b6256;
    --charcoal: #1e1c18;
    --gold: #b8944e;
    --gold2: #9e7c38;
    --line: #e6e0d5;
    --radius: 8px;
    --max: 1200px;

    --fs-h1: clamp(2.6rem, 5.5vw, 5rem);
    --fs-h2: clamp(1.8rem, 3.5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ─── demo bar ───────────────────────────────────────── */
.demo-bar {
    background: var(--charcoal);
    color: rgba(255,255,255,0.85);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 1.5rem;
    font-size: 0.8rem;
    gap: 1rem;
}
.demo-bar strong { font-weight: 700; margin-right: 0.5rem; color: #fff; }
.demo-links { display: flex; gap: 0.75rem; align-items: center; }
.demo-links a { font-weight: 500; opacity: 0.7; }
.demo-links a:hover { opacity: 1; }
.demo-cta {
    background: var(--gold);
    color: #fff;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-weight: 600;
    opacity: 1 !important;
}

/* ─── header ─────────────────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(249, 248, 244, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.brand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--charcoal);
    flex: none;
}
.brand em { color: var(--gold); font-style: italic; }

.nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a { font-weight: 500; color: var(--ink2); font-size: 0.875rem; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
    background: var(--charcoal) !important;
    color: #fff !important;
    padding: 0.5rem 1.3rem;
    border-radius: 4px;
    font-weight: 600 !important;
}
.nav-cta:hover { background: #2d2a24 !important; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ─── reveal ─────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── hero ───────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(20,18,16,0.45) 0%, rgba(20,18,16,0.7) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: center;
    padding-top: 5rem;
    padding-bottom: 3rem;
}

.hero-content { display: flex; flex-direction: column; gap: 1.5rem; }

.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
}

.hero-content h1 {
    font-size: var(--fs-h1);
    font-weight: 400;
    color: #fff;
    line-height: 1.1;
    max-width: 700px;
}
.hero-content h1 em { font-style: italic; color: var(--gold); }

.hero-content p { color: rgba(255,255,255,0.75); font-size: 1.05rem; line-height: 1.75; max-width: 520px; }

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── search form ────────────────────────────────────── */
.hero-search {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.hero-search > p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}
.search-form { display: flex; flex-direction: column; gap: 0.75rem; }
.search-form select {
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 4px;
    padding: 0.7rem 0.9rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    outline: none;
    appearance: none;
    cursor: pointer;
}

/* ─── hero stats ─────────────────────────────────────── */
.hero-stats {
    position: relative;
    z-index: 1;
    background: var(--charcoal);
    display: flex;
    justify-content: center;
}
.hero-stats > div {
    padding: 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.hero-stats > div:last-child { border-right: none; }
.hero-stats strong {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
}
.hero-stats small { font-size: 1.5rem; }
.hero-stats span { font-size: 0.72rem; color: rgba(255,255,255,0.5); letter-spacing: 0.08em; text-transform: uppercase; }

/* ─── buttons ────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: 0.18s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}
.btn.primary { background: var(--gold); color: #fff; }
.btn.primary:hover { background: var(--gold2); }
.btn.ghost {
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1.5px solid rgba(255,255,255,0.3);
}
.btn.ghost:hover { border-color: rgba(255,255,255,0.7); color: #fff; }
.btn.outline-dark {
    background: transparent;
    color: var(--charcoal);
    border: 1.5px solid var(--line);
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
}
.btn.outline-dark:hover { border-color: var(--ink2); }
.btn.full { width: 100%; text-align: center; font-size: 0.95rem; padding: 1rem; }

/* ─── shared section ─────────────────────────────────── */
.section {
    padding: 6rem 1.5rem;
    max-width: var(--max);
    margin: 0 auto;
}

.section-head {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3.5rem;
}
.section-head h2 { font-size: var(--fs-h2); font-weight: 500; margin-bottom: 1rem; line-height: 1.15; }
.section-head p { color: var(--ink2); font-size: 1rem; line-height: 1.7; }

.label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}

/* ─── listings ───────────────────────────────────────── */
.listings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.listing-card.featured {
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
}

.listing-img {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}
.listing-img img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform 0.5s ease; }
.listing-card:hover .listing-img img { transform: scale(1.04); }
.listing-card.featured .listing-img img { aspect-ratio: 4/3; }

.listing-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gold);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
}
.listing-type {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--charcoal);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
}

.listing-body {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.listing-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--charcoal);
    line-height: 1;
}
.listing-card.featured .listing-price { font-size: 2rem; }

.listing-body h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.2; }
.listing-card.featured .listing-body h3 { font-size: 1.4rem; }

.listing-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--ink2);
}

.listing-body > p {
    color: var(--ink2);
    font-size: 0.875rem;
    line-height: 1.65;
    flex: 1;
}

/* ─── servizi ────────────────────────────────────────── */
.servizi-section {
    background: var(--charcoal);
    padding: 6rem 1.5rem;
}
.servizi-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: start;
}

.servizi-copy .label { color: var(--gold); }
.servizi-copy h2 { font-size: var(--fs-h2); font-weight: 500; color: #fff; line-height: 1.15; margin-bottom: 1.25rem; }
.servizi-copy p { color: rgba(255,255,255,0.6); font-size: 1rem; line-height: 1.75; }

.servizi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.servizio {
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.servizio h3 { font-size: 1.1rem; font-weight: 600; color: #fff; }
.servizio p { color: rgba(255,255,255,0.55); font-size: 0.875rem; line-height: 1.7; }

/* ─── team ───────────────────────────────────────────── */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.agent-card {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.agent-img img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.agent-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.agent-body h3 { font-size: 1.2rem; font-weight: 500; }
.agent-zone { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--gold); text-transform: uppercase; }
.agent-body p { color: var(--ink2); font-size: 0.85rem; line-height: 1.65; margin-top: 0.5rem; }

/* ─── reviews ────────────────────────────────────────── */
.reviews-section { background: var(--bg); padding: 5rem 1.5rem; }

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: var(--max);
    margin: 0 auto;
}

.testimonial {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.stars { color: var(--gold); font-size: 1rem; letter-spacing: 0.1em; }
.testimonial p {
    font-style: italic;
    color: var(--ink2);
    font-size: 0.9rem;
    line-height: 1.75;
    flex: 1;
    border: none;
    padding: 0;
    margin: 0;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}
.testimonial-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial-author strong { font-size: 0.85rem; font-weight: 600; display: block; }
.testimonial-author span { font-size: 0.75rem; color: var(--ink2); }

/* ─── valuation ──────────────────────────────────────── */
.valuation-section {
    background: var(--bg2);
    border-top: 1px solid var(--line);
    padding: 6rem 1.5rem;
}
.valuation-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.valuation-copy h2 { font-size: var(--fs-h2); font-weight: 500; line-height: 1.15; margin-bottom: 1.25rem; }
.valuation-copy > p { color: var(--ink2); font-size: 1rem; line-height: 1.75; margin-bottom: 2rem; }

.valuation-includes { display: flex; flex-direction: column; gap: 0.75rem; }
.valuation-includes > div { font-size: 0.9rem; color: var(--ink2); }
.valuation-includes > div::first-letter { color: var(--gold); }

/* ─── form ───────────────────────────────────────────── */
.valuation-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    background: var(--bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}
.valuation-form label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink2);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.valuation-form input,
.valuation-form select {
    background: var(--bg2);
    border: 1px solid var(--line);
    color: var(--ink);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
}
.valuation-form input:focus,
.valuation-form select:focus { border-color: var(--gold); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-note { font-size: 0.78rem; color: var(--ink2); text-align: center; }

/* ─── footer ─────────────────────────────────────────── */
.footer { background: var(--charcoal); padding: 3.5rem 1.5rem 1.5rem; }
.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand { font-size: 1.4rem; font-weight: 500; color: #fff; }
.footer-brand em { color: var(--gold); font-style: italic; }
.footer-inner > div:first-child p { color: rgba(255,255,255,0.4); font-size: 0.82rem; margin-top: 0.5rem; }

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-nav a { font-size: 0.85rem; color: rgba(255,255,255,0.55); }
.footer-nav a:hover { color: #fff; }

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: right;
}
.footer-contact strong { font-size: 0.85rem; color: #fff; }
.footer-contact span { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

.footer-bottom {
    max-width: var(--max);
    margin: 1.5rem auto 0;
    display: flex;
    justify-content: center;
}
.footer-bottom p { font-size: 0.72rem; color: rgba(255,255,255,0.25); }

/* ─── toast ──────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--charcoal);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.85rem 1.75rem;
    border-radius: 4px;
    border-left: 3px solid var(--gold);
    transition: transform 0.35s ease;
    z-index: 9999;
    white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-search { max-width: 480px; }
    .hero-stats > div { padding: 1.25rem 1.5rem; }

    .listings-grid { grid-template-columns: 1fr; }
    .listing-card.featured { grid-row: auto; }

    .servizi-inner,
    .valuation-inner { grid-template-columns: 1fr; gap: 3rem; }
    .servizi-grid { grid-template-columns: 1fr 1fr; }

    .team-grid { grid-template-columns: 1fr 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }

    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-contact { text-align: center; }

    .section { padding: 4rem 1.25rem; }
}

@media (max-width: 640px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 68px; left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 1.5rem;
        gap: 1.2rem;
        z-index: 99;
    }
    .menu-toggle { display: flex; }
    .hero-stats { flex-wrap: wrap; }
    .hero-stats > div { flex: 1 1 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .servizi-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .demo-bar { flex-direction: column; text-align: center; }
    .valuation-form { padding: 1.5rem; }
}
