:root {
    --bg-base: #080808;
    --bg-surface: #121212;
    --bg-surface-hover: #1a1a1a;
    --text-primary: #f5f5f5;
    --text-secondary: #999999;
    --border-color: #222222;
    --accent: #ffffff;
    --accent-invert: #000000;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius-soft: 8px;
    --radius-pill: 9999px;
    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.dark-theme {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.w-full { width: 100%; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-soft);
    cursor: pointer;
    transition: transform var(--transition), background-color var(--transition), border-color var(--transition);
    text-align: center;
    gap: 0.5rem;
}

.btn:active {
    transform: translateY(1px) scale(0.98);
}

.btn-primary {
    background-color: var(--accent);
    color: var(--accent-invert);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: #e0e0e0;
    border-color: #e0e0e0;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-surface);
    border-color: #333;
}

.btn-white {
    background-color: var(--accent);
    color: var(--accent-invert);
    border: none;
}

.btn-white:hover {
    background-color: #e0e0e0;
}

.btn-nav {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
}
.btn-nav:hover {
    background-color: var(--bg-surface-hover);
}

/* Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 8, 8, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero */
.hero {
    padding-top: 92px;
    padding-bottom: 4.75rem;
    min-height: 76vh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.82fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}

.hero-content {
    padding-top: clamp(1rem, 4vh, 3rem);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: none;
}

.hero-badge::before {
    content: "";
    width: 42px;
    height: 1px;
    background: rgba(245, 245, 245, 0.42);
}

.hero-title {
    font-size: clamp(2.7rem, 4.45vw, 4.9rem);
    margin-bottom: 1.5rem;
    max-width: 720px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 620px;
}

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

.hero-facts {
    margin-top: 1.55rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, max-content));
    gap: 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: fit-content;
    max-width: 100%;
}

.hero-facts span {
    padding: 0.9rem 1.15rem;
    border-right: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.hero-facts span:first-child {
    padding-left: 0;
}

.hero-facts span:last-child {
    padding-right: 0;
    border-right: 0;
}

.hero-image-wrapper {
    position: relative;
    width: min(100%, 520px);
    justify-self: end;
    border-radius: var(--radius-soft);
    overflow: hidden;
    aspect-ratio: 4/4.65;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 28px 70px rgba(0,0,0,0.42);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(0.98);
    transform-origin: center;
}

/* Filter Bar */
.filter-section {
    margin-top: 0;
    padding: 0 0 3rem;
    position: relative;
    z-index: 10;
}

.filter-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-soft);
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.filter-group {
    flex: 1;
    padding: 0.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select,
.filter-group input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    width: 100%;
}

.filter-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 256 256'%3E%3Cpath fill='%23a1a1aa' d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 1.5rem;
    cursor: pointer;
}

.filter-group select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.filter-divider {
    width: 1px;
    height: 3rem;
    background: var(--border-color);
}

.filter-btn {
    height: 100%;
    padding: 0 2rem;
    min-height: 3.5rem;
}

/* Catalog Bento Grid */
.catalog-section {
    padding: 8rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid transparent;
}
.link-arrow:hover {
    border-bottom-color: var(--text-primary);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 400px;
    gap: 1.5rem;
}

.bento-cell {
    position: relative;
    border-radius: var(--radius-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
}

.bento-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
}

.cell-large {
    grid-column: span 2;
}

.bento-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

.bento-cell:hover .bento-bg {
    transform: scale(1.05);
}

.bento-content {
    position: relative;
    z-index: 1;
}

.bento-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    font-size: 0.75rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.bento-content p {
    color: #ccc;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.bento-price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
}

/* Selection Section */
.selection-section {
    padding: 6rem 0;
    background-color: var(--bg-surface);
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.selection-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.selection-content p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.selection-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.selection-form input,
.selection-form textarea {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-soft);
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition);
}

.selection-form textarea {
    min-height: 100px;
    resize: none;
}

.selection-form input:focus,
.selection-form textarea:focus {
    border-color: var(--text-secondary);
}

.selection-visual {
    border-radius: var(--radius-soft);
    overflow: hidden;
    aspect-ratio: 3/4;
}

.selection-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mortgage Calculator */
.calc-section {
    padding: 8rem 0;
}

.calc-wrapper {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    background: var(--bg-surface);
    padding: 4rem;
    border-radius: var(--radius-soft);
    border: 1px solid var(--border-color);
}

.calc-inputs h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.calc-slider-group {
    margin-bottom: 2.5rem;
}

.calc-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.calc-label-row label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.calc-label-row span {
    font-family: var(--font-display);
    font-weight: 500;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

.calc-result {
    background: var(--bg-base);
    padding: 3rem;
    border-radius: var(--radius-soft);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.result-value {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 1rem;
}

.result-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Reviews Section */
.reviews-section {
    padding: 6rem 0;
}

.reviews-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.review-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: var(--radius-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-text {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 500;
}

.author-role {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Map Section */
.map-section {
    position: relative;
    height: 600px;
    width: 100%;
    overflow: hidden;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
}

.map-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: var(--radius-soft);
    text-align: center;
    max-width: 400px;
    backdrop-filter: blur(12px);
}

.map-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.map-card p {
    color: var(--text-secondary);
}

.map-pin {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

/* Footer */
.footer {
    padding: 6rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-brand h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 400px;
}

.footer-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: var(--radius-soft);
    width: 100%;
    max-width: 480px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-soft);
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition);
}

.modal-input:focus {
    border-color: var(--text-secondary);
}

.btn-icon {
    font-size: 1rem;
    padding: 1.25rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
}
.footer-links a:hover {
    color: var(--text-primary);
}

/* Catalog Modal */
.catalog-modal-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: var(--radius-soft);
    width: 100%;
    max-width: 900px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .catalog-modal-container {
    transform: translateY(0);
}

.catalog-modal-header {
    margin-bottom: 2rem;
    flex-shrink: 0;
}

.catalog-modal-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.catalog-modal-header p {
    color: var(--text-secondary);
}

.catalog-scroll-area {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 1rem;
}

.catalog-scroll-area::-webkit-scrollbar {
    width: 6px;
}
.catalog-scroll-area::-webkit-scrollbar-track {
    background: var(--bg-base);
    border-radius: 4px;
}
.catalog-scroll-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.catalog-category {
    margin-bottom: 3rem;
}

.catalog-category h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    color: var(--text-secondary);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.catalog-card {
    border-radius: var(--radius-soft);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.catalog-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
    pointer-events: none;
}

.catalog-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

.catalog-card:hover .catalog-card-img {
    transform: scale(1.05);
}

.catalog-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem;
    z-index: 1;
}

.catalog-card-info h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.catalog-card-info p {
    color: #ccc;
    font-size: 0.875rem;
}

/* Catalog Advanced Filters & Prices */
.catalog-advanced-filters {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-criteria {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.criteria-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.criteria-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-right: 0.5rem;
}

.criteria-tag {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.criteria-tag:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.criteria-tag.active {
    background: var(--text-primary);
    color: var(--bg-base);
    border-color: var(--text-primary);
}

.catalog-slider-group {
    max-width: 400px;
}

.catalog-price {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

/* Favorites / Star Button */
.star-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition);
}

.star-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.6);
}

.star-btn.active {
    color: #ffd700;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container, .selection-grid, .calc-wrapper, .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-image-wrapper,
    .selection-visual {
        aspect-ratio: 16/9;
        width: 100%;
        justify-self: center;
    }
    
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
        background: transparent;
        border: none;
        gap: 1rem;
    }
    
    .filter-group {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-soft);
        padding: 1rem;
        width: 100%;
    }
    
    .filter-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .bento-grid, .reviews-grid {
        grid-template-columns: 1fr;
    }
    
    .cell-large {
        grid-column: span 1;
    }
    
    .hero {
        padding-top: 88px;
    }
    
    .hero-title {
        font-size: 2.28rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-facts {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .hero-facts span {
        padding: 0.8rem 0;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
    }

    .hero-facts span:last-child {
        border-bottom: 0;
    }
}
