@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@700&display=swap');

:root {
    --gold: #d4af77;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
}

.heading-font {
    font-family: 'Playfair Display', serif;
}

/* Realty One logo — file has a black matte; bar must be pure black */
.brokerage-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: #000;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(212, 175, 119, 0.25);
    border-bottom: 1px solid rgba(212, 175, 119, 0.25);
}

.brokerage-bar img {
    display: block;
    height: clamp(2.75rem, 8vw, 3.5rem);
    width: auto;
    max-width: min(100%, 22rem);
    object-fit: contain;
}

.hero-bg {
    background: linear-gradient(92deg, #0f172a 0%, #1e2937 100%);
}

.sticky-cta {
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 119, 0.45); }
    50% { box-shadow: 0 0 0 8px rgba(212, 175, 119, 0); }
}

.form-input {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(212, 175, 119, 0.35);
    border-color: var(--gold);
}

.phone-input {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    animation: pulse-ring 2.5s ease infinite;
}

.phone-input:focus {
    animation: none;
}

.success-message {
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

.fallback-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.fallback-panel.is-open {
    max-height: 520px;
    opacity: 1;
}

.exit-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.exit-overlay[hidden] {
    display: none !important;
}

.exit-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.exit-modal {
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    color: #0f172a;
    transform: scale(0.94) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.exit-overlay.is-visible .exit-modal {
    transform: scale(1) translateY(0);
}

body.exit-modal-open {
    overflow: hidden;
}

.approval-stamp-inner {
    width: 5.5rem;
    height: 5.5rem;
    border: 3px solid #10b981;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.15);
    animation: stampIn 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.approval-stamp-icon {
    font-size: 1.75rem;
    color: #059669;
    line-height: 1;
}

.approval-stamp-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #047857;
    margin-top: 0.15rem;
}

@keyframes stampIn {
    from { transform: scale(0.5) rotate(-12deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.area-chip {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(212, 175, 119, 0.55);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.area-chip:hover {
    background: rgba(212, 175, 119, 0.25);
    border-color: var(--gold);
}

.buyer-engage-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 4.5rem;
    z-index: 90;
    background: linear-gradient(90deg, #0f172a, #1e293b);
    border-top: 2px solid var(--gold);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.35);
    animation: slideUp 0.35s ease forwards;
}

@media (min-width: 1024px) {
    .buyer-engage-bar {
        bottom: 0;
    }
}

.buyer-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    padding: 0 0.75rem 0.75rem;
}

@media (min-width: 1024px) {
    .buyer-sticky-cta {
        display: none !important;
    }
}

#idx-root.idx-pending {
    cursor: pointer;
}

#idx-root.idx-pending:hover {
    border-color: var(--gold);
}

#idx-root.idx-mounted {
    border: none;
    min-height: 520px;
}

#idx-root .idx-iframe,
#idx-root iframe {
    display: block;
    width: 100%;
    min-height: 520px;
    border: 0;
    border-radius: 1rem;
}

/* ��� Listings buyer funnel ��� */
.listings-page {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.search-shell-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(212, 175, 119, 0.25);
    padding: 1.5rem 1.25rem 1.35rem;
}

@media (min-width: 640px) {
    .search-shell-card {
        padding: 1.75rem 2rem 1.5rem;
    }
}

.search-shell-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.search-shell-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #b45309;
    margin-bottom: 0.25rem;
}

.search-shell-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

@media (min-width: 640px) {
    .search-shell-title {
        font-size: 1.5rem;
    }
}

.search-shell-hint {
    font-size: 0.8rem;
    color: #64748b;
    max-width: 14rem;
    text-align: right;
}

.search-filter-group {
    margin-bottom: 1rem;
}

.search-filter-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .search-filter-row {
        flex-direction: row;
    }
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.45rem;
}

.filter-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-chip {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    transition: all 0.15s ease;
    cursor: pointer;
}

.filter-chip:hover {
    border-color: var(--gold);
    color: #0f172a;
}

.filter-chip.is-active {
    background: linear-gradient(145deg, #f5ecd8 0%, #ebe0c8 100%);
    border-color: var(--gold);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(212, 175, 119, 0.35);
}

.criteria-preview-wrap {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    margin-bottom: 1.1rem;
}

.criteria-preview-wrap .filter-label {
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.criteria-preview {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f8fafc;
    line-height: 1.4;
}

.search-shell-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.shell-cta-primary {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    border: none;
    cursor: pointer;
    background: linear-gradient(145deg, #e0c48a 0%, #d4af77 45%, #c49a5c 100%);
    color: #0f172a;
    box-shadow: 0 8px 24px rgba(212, 175, 119, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shell-cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(212, 175, 119, 0.5);
}

.shell-cta-main {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.shell-cta-sub {
    font-size: 0.72rem;
    font-weight: 500;
    opacity: 0.85;
}

.shell-cta-secondary {
    width: 100%;
    padding: 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.shell-cta-secondary:hover {
    color: #0f172a;
}

.listings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .listings-grid {
        grid-template-columns: 1fr 380px;
        gap: 2rem;
    }
}

@media (min-width: 1280px) {
    .listings-grid {
        grid-template-columns: 1fr 400px;
    }
}

.listings-map-col {
    min-width: 0;
}

.map-section-head {
    margin-bottom: 0.75rem;
}

.idx-map-frame {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    min-height: 420px;
}

@media (min-width: 768px) {
    .idx-map-frame {
        min-height: 560px;
    }
}

@media (min-width: 1024px) {
    .idx-map-frame {
        min-height: 680px;
    }
}

.idx-map-frame.idx-mounted,
#idx-root.idx-mounted {
    min-height: 420px;
}

@media (min-width: 768px) {
    .idx-map-frame.idx-mounted,
    #idx-root.idx-mounted {
        min-height: 560px;
    }
}

@media (min-width: 1024px) {
    .idx-map-frame.idx-mounted,
    #idx-root.idx-mounted {
        min-height: 680px;
    }
}

#idx-root.idx-mounted .idx-iframe,
#idx-root.idx-mounted iframe,
.idx-map-frame iframe {
    min-height: 420px;
    height: 65vh;
    max-height: 720px;
}

@media (min-width: 1024px) {
    #idx-root.idx-mounted iframe,
    .idx-map-frame iframe {
        height: 680px;
        max-height: none;
    }
}

.idx-placeholder-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    color: #64748b;
}

.listings-lead-col {
    min-width: 0;
}

.lead-card-premium {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.5rem 1.35rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(212, 175, 119, 0.2);
}

.listings-stack .lead-card-premium {
    position: static;
}

.lead-card-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    margin-bottom: 0.65rem;
}

.lead-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.35rem;
    line-height: 1.25;
}

.lead-card-sub {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.lead-trust-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    font-size: 0.8125rem;
    color: #475569;
}

.lead-trust-list li {
    padding: 0.35rem 0 0.35rem 1.35rem;
    position: relative;
}

.lead-trust-list li::before {
    content: "?";
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: 700;
}

.buyer-sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 85;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom, 0));
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.06) 30%, rgba(15, 23, 42, 0.12) 100%);
    pointer-events: none;
}

.buyer-sticky-cta[hidden] {
    display: none !important;
}

.buyer-sticky-inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #0f172a;
    border: 2px solid var(--gold);
    border-radius: 1rem;
    padding: 0.65rem 0.75rem 0.65rem 1rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
}

.buyer-sticky-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
}

.buyer-sticky-criteria {
    font-size: 0.75rem;
    color: #cbd5e1;
    line-height: 1.3;
    max-width: 12rem;
}

.buyer-sticky-btn {
    flex-shrink: 0;
    background: var(--gold);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.875rem;
    padding: 0.75rem 1.1rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
}

.buyer-sticky-btn:hover {
    background: #e0c48a;
}

@media (min-width: 1024px) {
    .buyer-sticky-cta {
        display: none !important;
    }
}

.buyer-engage-bar {
    bottom: 5.25rem;
}

@media (min-width: 1024px) {
    .buyer-engage-bar {
        bottom: 0;
    }
}
