/* ──────────────────────────────────────────────────────────
   Estate Agency — Gaussian Splat Property Viewer
   ────────────────────────────────────────────────────────── */

/* ── Reset & tokens ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:   #1a2236;
    --gold:   #c8a96e;
    --gold-l: #e8d5aa;
    --bg:     #f7f5f2;
    --card:   #ffffff;
    --text:   #222;
    --muted:  #6b7280;
    --radius: 10px;
    --shadow: 0 4px 24px rgba(0,0,0,.12);
    --font:   "Inter", "Segoe UI", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(26, 34, 54, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    color: #fff;
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--gold);
}
.logo span { color: #fff; font-weight: 300; }

.nav { display: flex; gap: 1.6rem; list-style: none; }
.nav a {
    font-size: .9rem;
    font-weight: 500;
    opacity: .75;
    transition: opacity .2s;
}
.nav a:hover { opacity: 1; }

.nav-cta {
    background: var(--gold);
    color: var(--navy) !important;
    opacity: 1 !important;
    padding: .45rem 1.1rem;
    border-radius: 6px;
    font-weight: 700;
}

.menu-toggle { display: none; }

/* ── Hero / Viewer section ──────────────────────────────── */
.viewer-section {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 480px;
    background: #0d111a;
    overflow: hidden;
    padding-top: 60px;
}

.viewer-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

#splat-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}
#splat-canvas:active { cursor: grabbing; }

/* ── Loading overlay ────────────────────────────────────── */
#loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    background: rgba(13, 17, 26, .88);
    transition: opacity .4s;
    z-index: 10;
}
#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: .06em;
}

.progress-track {
    width: 260px;
    height: 4px;
    background: rgba(255,255,255,.15);
    border-radius: 2px;
    overflow: hidden;
}
#progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--gold), var(--gold-l));
    border-radius: 2px;
    transition: width .25s;
}

#progress-text {
    font-size: .85rem;
    color: rgba(255,255,255,.6);
    letter-spacing: .02em;
}

/* ── HUD overlays ───────────────────────────────────────── */
.hud-tl {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    z-index: 5;
}

#quality-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 24px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--navy);
    background: var(--gold);
}
#quality-badge[data-quality="medium"] { background: #80b3d4; }
#quality-badge[data-quality="low"]    { background: #a0a0a0; }

#splat-count {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
    letter-spacing: .03em;
}

/* Quality selector */
.quality-picker {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(8px);
    padding: .35rem .7rem;
    border-radius: 6px;
}
.quality-picker label {
    font-size: .75rem;
    color: rgba(255,255,255,.5);
}
#quality-select {
    background: transparent;
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: .8rem;
    padding: .2rem .4rem;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
}
#quality-select option { background: var(--navy); color: #fff; }

/* Controls hint */
#controls-hint {
    position: absolute;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: .8rem;
    color: rgba(255,255,255,.4);
    letter-spacing: .04em;
    pointer-events: none;
    transition: opacity 1.2s;
    z-index: 5;
}

/* Property info card (bottom-left) */
.property-card {
    position: absolute;
    bottom: 1.8rem;
    left: 1.8rem;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    padding: 1.1rem 1.4rem;
    color: #fff;
    max-width: 280px;
    z-index: 5;
}
.property-card .price {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    margin-bottom: .3rem;
}
.property-card .address {
    font-size: .88rem;
    opacity: .7;
    margin-bottom: .7rem;
}
.property-card .tags {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
.tag {
    font-size: .74rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    padding: .2rem .55rem;
    color: rgba(255,255,255,.8);
}

/* ── Details section ────────────────────────────────────── */
.details-section {
    max-width: 1160px;
    margin: 0 auto;
    padding: 4rem 1.5rem 3rem;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
}

h1.property-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .4rem;
}
.property-subtitle {
    font-size: 1.05rem;
    color: var(--muted);
    margin-bottom: 1.8rem;
}

.stat-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-val { font-size: 1.6rem; font-weight: 700; color: var(--navy); }
.stat-lbl { font-size: .8rem; color: var(--muted); margin-top: .1rem; }

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}

.description {
    font-size: .97rem;
    line-height: 1.75;
    color: #444;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    margin-bottom: 2rem;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: #444;
}
.feature-item::before {
    content: "✓";
    color: var(--gold);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Contact card ───────────────────────────────────────── */
.contact-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem;
    position: sticky;
    top: 80px;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.4rem;
}
.agent-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--navy));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}
.agent-name  { font-size: 1rem;  font-weight: 700; color: var(--navy); }
.agent-title { font-size: .82rem; color: var(--muted); }

.contact-card .price-big {
    font-size: 2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .2rem;
}
.contact-card .price-note {
    font-size: .83rem;
    color: var(--muted);
    margin-bottom: 1.4rem;
}

.btn {
    display: block;
    width: 100%;
    padding: .85rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    text-align: center;
}
.btn:active { transform: scale(.98); }

.btn-primary {
    background: var(--gold);
    color: var(--navy);
    margin-bottom: .6rem;
    box-shadow: 0 2px 10px rgba(200,169,110,.4);
}
.btn-primary:hover { box-shadow: 0 4px 18px rgba(200,169,110,.55); }

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: #fff; }

.divider { border: none; border-top: 1px solid #eee; margin: 1.2rem 0; }

.contact-details { font-size: .88rem; color: var(--muted); line-height: 1.7; }
.contact-details strong { color: var(--text); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.45);
    text-align: center;
    font-size: .82rem;
    padding: 1.8rem;
    margin-top: 3rem;
}
.site-footer a { color: var(--gold); opacity: .8; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .details-grid {
        grid-template-columns: 1fr;
    }
    .contact-card { position: static; }
}

@media (max-width: 640px) {
    .nav { display: none; }
    .menu-toggle {
        display: flex;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
    }
    .property-card { left: 1rem; right: 1rem; max-width: none; bottom: 1rem; }
    h1.property-title { font-size: 1.5rem; }
}
