/* ═══════════════════════════════════════════════════════════════
   MONT HAUS — NEW DEVELOPMENT
   Dark & moody · champagne gold · editorial serif
   (design language shared with 221 Wrights Rd dark)
   ═══════════════════════════════════════════════════════════════ */

:root {
    --ink:        #0d0c0a;
    --ink-soft:   #14120f;
    --ink-line:   #262219;
    --gold:       #c9a96a;
    --gold-soft:  #a8874e;
    --cream:      #ece5d8;
    --cream-dim:  #9c937f;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans:  'Jost', 'Helvetica Neue', sans-serif;
    --hero-sans: 'Avenir Next', 'Avenir', 'Mulish', 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--ink);
    color: var(--cream);
    font-family: var(--sans);
    font-weight: 300;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--gold); color: var(--ink); }

/* ── Type ─────────────────────────────────────────────── */

.eyebrow {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: var(--gold);
}
.lead-serif {
    font-family: var(--serif);
    font-size: 1.45rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.7;
    color: var(--cream-dim);
}
.body-copy { color: var(--cream-dim); line-height: 2; }
.gold-rule {
    width: 64px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section { padding: 8rem 0; }
.section-tight { padding: 6rem 0; }
.section-head { margin-bottom: 4.5rem; }
.section-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    color: var(--cream);
}

/* ── Buttons ──────────────────────────────────────────── */

.btn-gold {
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold);
    background: transparent;
    border: 1px solid var(--gold);
    border-radius: 0;
    padding: 0.9rem 2.6rem;
    transition: all 0.45s ease;
}
.btn-gold:hover, .btn-gold:focus {
    background: var(--gold);
    color: var(--ink);
    border-color: var(--gold);
    letter-spacing: 0.42em;
}
.btn-gold:disabled { opacity: 0.5; }

/* ── Navigation ───────────────────────────────────────── */

.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1.4rem 0;
    background: transparent;
    transition: background 0.5s ease, padding 0.5s ease;
}
.site-nav.scrolled {
    background: rgba(13,12,10,0.96);
    border-bottom: 1px solid var(--ink-line);
    padding: 0.9rem 0;
    backdrop-filter: blur(12px);
}
.nav-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.site-nav.scrolled .nav-brand { opacity: 1; }
.nav-brand-mark {
    height: 30px;
    width: auto;
    display: block;
    transition: opacity 0.35s ease;
}
.nav-brand:hover .nav-brand-mark { opacity: 0.75; }
.nav-brand-sub {
    font-family: var(--sans);
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-left: 0.85rem;
    padding-left: 0.85rem;
    border-left: 1px solid var(--ink-line);
    line-height: 1;
}
.nav-brand:hover .nav-brand-sub { color: var(--cream); }
.site-nav .nav-link {
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--cream);
    padding: 0.4rem 1.1rem;
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
    transition: color 0.3s ease;
}
.site-nav.scrolled .nav-link { color: var(--cream-dim); text-shadow: none; }
.site-nav .nav-link:hover { color: var(--gold); }

/* ── Hero — preserved cover layout ────────────────────── */

.hero {
    position: relative;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
    font-family: var(--hero-sans);
    /* Shared layout variables from the original cover page */
    --baseline: 9%;
    --logo-w: clamp(120px, 9vw, 190px);
    --gap: calc(2.6vw - 5px);
    --rule-x: calc(6% + var(--logo-w) + var(--gap));
}
.hero-cover {
    position: absolute;
    inset: 0;
    background: url('../../big-lake_bg.jpg') center / cover no-repeat;
}
.hero-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(15deg, rgba(10, 20, 24, 0.38) 0%, rgba(10, 20, 24, 0) 45%),
        linear-gradient(180deg, rgba(13,12,10,0) 55%, rgba(13,12,10,0.5) 82%, rgba(13,12,10,0.96) 100%);
}
.hero-rule {
    position: absolute;
    top: 0;
    bottom: var(--baseline);
    left: var(--rule-x);
    width: 1.5px;
    background: #fff;
    z-index: 2;
}
/* Bottom band: logo far left, welcome text right of the rule —
   both bottom-aligned to the shared baseline */
.hero-bottom {
    position: absolute;
    left: 0; right: 0;
    bottom: var(--baseline);
    z-index: 3;
    color: #fff;
}
.hero-logo {
    position: absolute;
    left: 6%;
    bottom: 0;
    display: block;
    width: var(--logo-w);
    transition: opacity 0.35s ease;
}
.hero-logo:hover { opacity: 0.75; }
.hero-logo img { display: block; width: 100%; height: auto; }
.hero-welcome { margin-left: calc(var(--rule-x) + var(--gap)); }
.hero-welcome .line1 {
    font-size: clamp(1rem, 1.9vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.14em;
    opacity: 0.95;
}
.hero-welcome .line2 {
    font-size: clamp(1.5rem, 3.1vw, 3.3rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-top: 0.2em;
    white-space: nowrap;
}
.hero-scroll {
    position: absolute;
    bottom: 2rem;
    right: 6%;
    z-index: 3;
    font-family: var(--sans);
    color: var(--gold);
    font-size: 0.62rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    text-decoration: none;
    opacity: 0.9;
    text-align: center;
}
.hero-scroll::after {
    content: '';
    display: block;
    width: 1px; height: 44px;
    margin: 0.8rem auto 0;
    background: linear-gradient(180deg, var(--gold), transparent);
    animation: scrollPulse 2.4s ease-in-out infinite;
}
@keyframes scrollPulse { 50% { opacity: 0.25; } }

@media (max-width: 640px) {
    .hero { --baseline: 12%; }
    .hero-rule { left: 8%; }
    .hero-bottom { left: calc(8% + 1.4rem); right: 1rem; }
    /* Logo drops into the flow, directly above the welcome lines */
    .hero-logo {
        position: static;
        width: 120px;
        margin-bottom: 1.4rem;
    }
    .hero-welcome { margin-left: 0; }
    .hero-welcome .line2 { white-space: normal; }
    .hero-scroll { display: none; }
}

/* ── Project cards ────────────────────────────────────── */

.project-card {
    display: block;
    height: 100%;
    background: var(--ink-soft);
    border: 1px solid var(--ink-line);
    text-decoration: none;
    transition: border-color 0.4s ease, transform 0.4s ease;
}
a.project-card:hover { border-color: var(--gold); transform: translateY(-4px); }
.project-card.is-static { cursor: default; }

.project-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.88);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}
a.project-card:hover .project-media img { transform: scale(1.045); filter: brightness(1); }

.project-status {
    position: absolute;
    top: 1rem; left: 1rem;
    z-index: 2;
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    padding: 0.45rem 0.9rem;
    background: rgba(13,12,10,0.72);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(236,229,216,0.25);
    color: var(--cream);
}
.project-status--current  { color: var(--gold); border-color: rgba(201,169,106,0.5); }
.project-status--upcoming { color: var(--cream); }
.project-status--past     { color: var(--cream-dim); }

.project-body { padding: 1.8rem 1.8rem 2rem; }
.project-loc {
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.6rem;
}
.project-name {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--cream);
    margin-bottom: 0.4rem;
}
.project-tagline {
    font-family: var(--serif);
    font-style: italic;
    color: var(--cream-dim);
    margin-bottom: 0;
}
.project-cta {
    display: inline-block;
    margin-top: 1.2rem;
    font-size: 0.64rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--cream-dim);
    transition: color 0.3s ease;
}
a.project-card:hover .project-cta { color: var(--gold); }

/* ── Contact band ─────────────────────────────────────── */

.contact-band {
    background: var(--ink-soft);
    border-top: 1px solid var(--ink-line);
    border-bottom: 1px solid var(--ink-line);
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ink-line);
    border-radius: 0;
    color: var(--cream);
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    padding: 0.9rem 0.2rem;
    transition: border-color 0.4s ease;
}
.form-input:focus { outline: none; border-bottom-color: var(--gold); }
.form-input::placeholder {
    color: var(--cream-dim);
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.3em;
}
textarea.form-input { resize: vertical; }

/* Same autofill fix for the contact form */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--ink-soft) inset;
    -webkit-text-fill-color: var(--cream);
    caret-color: var(--cream);
    transition: background-color 99999s ease-in-out 0s;
}

.hp-field { position: absolute; left: -9999px; height: 0; opacity: 0; }

.form-status {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: var(--cream-dim);
}
.form-status.is-ok  { color: var(--gold); }
.form-status.is-err { color: #c98a6a; }

.footer-contact a {
    color: var(--cream);
    text-decoration: none;
    border-bottom: 1px solid var(--ink-line);
    transition: all 0.3s ease;
}
.footer-contact a:hover { color: var(--gold); border-color: var(--gold); }

/* ── Footer ───────────────────────────────────────────── */

.site-footer { padding: 3rem 0; }
.footer-legal {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream-dim);
}
.footer-legal a { color: var(--cream-dim); text-decoration: none; }
.footer-legal a:hover { color: var(--gold); }

/* ═══ Gate page ═══════════════════════════════════════ */

.gate-body {
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,169,106,0.07), transparent),
        var(--ink);
}
/* Ghosted mountain image behind the gate */
.gate-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../../big-lake_bg.jpg') center / cover no-repeat;
    opacity: 0.09;
    filter: grayscale(35%);
    pointer-events: none;
}
.gate-wrap { position: relative; z-index: 1; }
.gate-logo {
    width: 128px;
    height: auto;
    margin-bottom: 2.2rem;
}
.gate-card {
    max-width: 660px;
    width: 100%;
    padding: 3rem 2rem;
}
.gate-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.8rem, 8vw, 4.2rem);
    letter-spacing: 0.06em;
    color: var(--cream);
}
.gate-sub {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--cream-dim);
}
.gate-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ink-line);
    color: var(--cream);
    font-family: var(--sans);
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    padding: 0.9rem 0.5rem;
    transition: border-color 0.4s ease;
}
.gate-input:focus { outline: none; border-bottom-color: var(--gold); }

/* Kill the white browser-autofill box — keep the dark transparent style */
.gate-input:-webkit-autofill,
.gate-input:-webkit-autofill:hover,
.gate-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--ink) inset;
    -webkit-text-fill-color: var(--cream);
    caret-color: var(--cream);
    transition: background-color 99999s ease-in-out 0s;
}
.gate-field { position: relative; }
.gate-field .gate-input { padding-right: 2.6rem; padding-left: 2.6rem; }
.gate-eye {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.4rem;
    color: var(--cream-dim);
    cursor: pointer;
    transition: color 0.3s ease;
}
.gate-eye:hover, .gate-eye:focus { color: var(--gold); outline: none; }
.gate-input::placeholder {
    color: var(--cream-dim);
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.35em;
}
.gate-error {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #c98a6a;
    border: 1px solid rgba(201,138,106,0.35);
    padding: 0.8rem 1.2rem;
}
.gate-footer {
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--cream-dim);
}

/* ── Scroll reveal ────────────────────────────────────── */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════════════
   SITE.MONTHAUS.COM ADDITIONS — listings search + detail
   (extends the newdev design system above)
   ═══════════════════════════════════════════════════════════════ */

/* ── Listings header + filter bar ─────────────────────── */
.listings-head { padding: 9rem 0 2rem; }

.filter-bar {
    display: grid;
    grid-template-columns: repeat(6, 1fr) auto;
    gap: 0.75rem;
    align-items: stretch;
}
@media (max-width: 991px) { .filter-bar { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .filter-bar { grid-template-columns: repeat(2, 1fr); } }

.filter-input {
    background: var(--ink-soft);
    border: 1px solid var(--ink-line);
    color: var(--cream);
    font-family: var(--sans);
    font-size: 0.72rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    padding: 0.85rem 1rem;
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239c937f' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    transition: border-color 0.35s ease;
    cursor: pointer;
}
.filter-input:focus { outline: none; border-color: var(--gold); }
.filter-submit { padding: 0.85rem 2rem; white-space: nowrap; }

.result-count {
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cream-dim);
}

/* ── Listing cards (extends .project-card) ────────────── */
.listing-price { margin-bottom: 0.2rem; }
.listing-specs {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    color: var(--cream-dim);
    margin: 0.5rem 0 0;
}
.media-empty { background: var(--ink-soft); aspect-ratio: 4 / 3; }

/* ── Pagination ───────────────────────────────────────── */
.pager-link {
    font-size: 0.68rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--ink-line);
    transition: border-color 0.35s ease;
}
.pager-link:hover { border-color: var(--gold); color: var(--gold); }
.pager-info {
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cream-dim);
    margin: 0 1.6rem;
}

/* ── Detail: gallery ──────────────────────────────────── */
.detail-gallery { padding-top: 76px; background: var(--ink); }
.gallery-main {
    position: relative;
    max-height: 72vh;
    overflow: hidden;
    background: var(--ink-soft);
}
.gallery-main img {
    width: 100%;
    max-height: 72vh;
    object-fit: cover;
    display: block;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(13,12,10,0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(236,229,216,0.2);
    color: var(--cream);
    font-size: 1.6rem;
    line-height: 1;
    width: 52px; height: 52px;
    transition: all 0.3s ease;
    cursor: pointer;
}
.gallery-nav:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.gallery-prev { left: 1.2rem; }
.gallery-next { right: 1.2rem; }
.gallery-count {
    position: absolute;
    bottom: 1rem; right: 1.2rem;
    z-index: 2;
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    padding: 0.45rem 0.9rem;
    background: rgba(13,12,10,0.72);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(236,229,216,0.25);
    color: var(--cream);
}
.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.2rem;
    overflow-x: auto;
    background: var(--ink);
    scrollbar-width: thin;
    scrollbar-color: var(--ink-line) transparent;
}
.gallery-thumbs img {
    height: 64px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    opacity: 0.45;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    flex: 0 0 auto;
}
.gallery-thumbs img:hover { opacity: 0.8; }
.gallery-thumbs img.active { opacity: 1; border-color: var(--gold); }

/* ── Detail: summary + facts ──────────────────────────── */
.detail-head { padding-top: 3.5rem; }
.detail-price {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    color: var(--gold);
}
.fact-label {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--cream-dim);
    margin-bottom: 0.3rem;
}
.fact-value {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--cream);
    margin-bottom: 0;
}
.fact-value-sm { font-size: 1.05rem; padding-top: 0.35rem; }

/* ── Detail: sidebar ──────────────────────────────────── */
.detail-side {
    background: var(--ink-soft);
    border: 1px solid var(--ink-line);
    padding: 2.2rem;
}
.side-agent {
    font-family: var(--serif);
    font-size: 1.25rem;
    color: var(--cream);
    margin-bottom: 0.15rem;
}
.side-office {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cream-dim);
}
.history-table { width: 100%; font-size: 0.78rem; }
.history-table td { padding: 0.5rem 0; border-bottom: 1px solid var(--ink-line); vertical-align: top; }
.history-table tr:last-child td { border-bottom: none; }
.h-date { white-space: nowrap; color: var(--cream-dim); padding-right: 1.2rem !important; width: 1%; }
.h-event { color: var(--cream); }
.h-new { color: var(--gold); }

/* ── Detail: map ──────────────────────────────────────── */
.listing-map {
    height: 420px;
    border: 1px solid var(--ink-line);
}
/* Invert OSM's light tiles to match the dark design (keyless dev tiles) */
.listing-map .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) saturate(0.4) brightness(0.75) contrast(0.9);
}
.leaflet-container { background: var(--ink-soft); font-family: var(--sans); }
