/*
  Stylesheet for Property Logic RE
  Dark mode design with modern real estate aesthetic.
*/

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    font-weight: 400;
    line-height: 1.55;
    background-color: var(--bg);
}

/* Dark mode palette */
:root {
    --bg: #0d1117;
    --bg-card: #161b22;
    --bg-elevated: #1c2333;
    --bg-subtle: #121820;
    --border: #21262d;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --text-subtle: #6e7681;
    --primary: #c9343e;
    --secondary: #2A76D0;
    --accent: #FFC857;
    /* Unified type system — Inter for both heading and body. Variable font axis 400..800. */
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Typography baseline — Inter with tightened tracking on larger sizes. */
h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
}
h2 {
    font-family: var(--font-heading);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.015em;
}
p { font-weight: 400; }
.nav,
.button,
.eyebrow,
.meta {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Utility classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    text-align: center;
    color: var(--text-muted);
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #a82830;
    transform: translateY(-2px);
}

/* Navigation bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 2rem;
    z-index: 1000;
    background-color: transparent;
    backdrop-filter: none;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
}

.logo {
    height: 3.5rem;
    width: auto;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.7rem;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
    user-select: none;
    filter: none;
}

.logo-img {
    display: block;
    height: 100%;
    width: auto;
    max-width: 100%;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 4px;
    text-shadow: none;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links .cta {
    background-color: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 3px;
}

.nav-links .cta:hover {
    background-color: #a82830;
    color: #fff;
}

.nav-links .cta::after {
    display: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    border: none;
    background: transparent;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background-color: #fff;
    margin: 4px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Responsive navigation */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background-color: rgba(13, 17, 23, 0.98);
        flex-direction: column;
        gap: 1.5rem;
        padding-top: 6rem;
        transition: right 0.3s ease;
    }
    .nav-links.open {
        right: 0;
    }
    .nav-links a {
        font-size: 1.2rem;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-links .cta {
        padding: 0.6rem 1.2rem;
    }
}

/* Hero section */
.hero {
    position: relative;
    height: 100vh;
    background-image: url('assets/main_photo.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 17, 23, 0.35) 0%, rgba(13, 17, 23, 0.6) 35%, rgba(13, 17, 23, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.7);
}

/* Features / Investments section */
.features {
    background-color: var(--bg-subtle);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-muted);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Property grid section */
.real-estate {
    background-color: var(--bg);
}

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.property-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.property-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.property-content {
    padding: 1.5rem;
}

.property-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.property-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Lifestyle section */
.lifestyle {
    background-color: var(--bg-subtle);
}

.lifestyle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.lifestyle-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lifestyle-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.lifestyle-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s ease;
}

.lifestyle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.lifestyle-card:hover .lifestyle-image {
    transform: none;
}

.lifestyle-card:hover .lifestyle-image img {
    transform: scale(1.1);
}

.lifestyle-content {
    padding: 1.5rem;
    background-color: var(--bg-card);
    position: relative;
    z-index: 1;
}

.lifestyle-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.lifestyle-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* About section */
.about {
    background-color: var(--bg);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.about-text {
    flex: 1 1 400px;
}

.about-text h2 {
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-image {
    flex: 1 1 350px;
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
    }
    .about-image {
        width: 100%;
        height: 300px;
    }
}

/* Footer */
footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border);
    color: #fff;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-info {
    flex: 1 1 300px;
}

.footer-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.footer-info p {
    margin-bottom: 1rem;
    max-width: 400px;
    color: var(--text-muted);
}

/* Quick contact action buttons */
.contact-quick-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.contact-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.1rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    min-width: 90px;
    transition: all 0.2s;
}
.contact-action-btn:hover {
    border-color: var(--primary);
    background: rgba(201,52,62,0.08);
    transform: translateY(-2px);
}
.contact-action-btn i {
    font-size: 1.4rem;
    color: var(--primary);
}

/* Compact contact form */
.contact-form-compact {
    max-width: 640px;
    margin: 0 auto;
}
.contact-optin {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.7rem;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--text-subtle);
    cursor: pointer;
}
.contact-optin input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}
.contact-optin a {
    color: var(--text-muted);
    text-decoration: underline;
}
.contact-optin a:hover {
    color: var(--primary);
}
.contact-form-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.contact-form-row input {
    flex: 1;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    background: var(--bg-elevated);
    color: var(--text);
    font-family: var(--font-body);
}
.contact-form-row input::placeholder { color: var(--text-subtle); }
.contact-form-msg-row {
    display: flex;
    gap: 0.5rem;
}
.contact-form-msg-row input {
    flex: 1;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    background: var(--bg-elevated);
    color: var(--text);
    font-family: var(--font-body);
}
.contact-form-msg-row input::placeholder { color: var(--text-subtle); }
.contact-form-msg-row .btn-primary {
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    white-space: nowrap;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-subtle);
}

/* IDX search bar in hero */
.hero-search-wrap {
    margin-top: 1.25rem;
    width: 100%;
    display: flex;
    justify-content: center;
}
.idx-search {
    display: flex;
    gap: .5rem;
    justify-content: center;
    align-items: center;
}
.hero-input-wrap {
    position: relative;
    flex: 1;
    max-width: 540px;
    width: min(540px, 80vw);
}
.hero-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.45);
    font-size: 0.95rem;
    z-index: 2;
    pointer-events: none;
}
.idx-search input {
    width: 100%;
    padding: .75rem 1rem .75rem 2.4rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(13, 17, 23, 0.6);
    color: #fff;
    backdrop-filter: blur(12px);
    font-size: 1rem;
    font-family: var(--font-body);
}
.idx-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.idx-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201,52,62,0.2);
}
.idx-search .btn-primary {
    padding: .75rem 1.1rem;
    border-radius: 10px;
}

/* Hero autocomplete dropdown */
.hero-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    z-index: 1100;
    display: none;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.hero-suggestions.open { display: block; }
.hero-sug {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text);
    transition: background 0.12s;
    text-decoration: none;
}
.hero-sug:first-child { border-radius: 12px 12px 0 0; }
.hero-sug:last-child { border-radius: 0 0 12px 12px; }
.hero-sug:hover, .hero-sug.highlighted { background: var(--bg-elevated); }
.hero-sug-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hero-sug-photo {
    width: 48px; height: 36px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-elevated);
}
.hero-sug-text {
    flex: 1;
    min-width: 0;
}
.hero-sug-addr {
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero-sug-meta {
    font-size: 0.72rem;
    color: var(--text-subtle);
}
.hero-sug-price {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
    white-space: nowrap;
}
/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for grids */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Market stats blocks */
.stat-block {
    padding: 2rem 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform 0.3s, border-color 0.3s;
}
.stat-block:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}
.stat-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}
.stat-desc {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.stat-detail {
    font-size: 0.75rem;
    color: var(--text-subtle);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 0.95rem; }
    .container { padding: 2.5rem 0; }
    .feature-grid { gap: 1rem; }
    .feature-card { padding: 1.5rem; }
    .feature-card h3 { font-size: 1.2rem; }
    .property-grid { gap: 1rem; }
    .lifestyle-grid { gap: 1rem; }
    .footer-info h3, .footer-form h3 { font-size: 1.4rem; }
    .footer-container { gap: 2rem; }
    footer { padding-top: 2.5rem; }
    .nav-links {
        background-color: rgba(13, 17, 23, 0.98);
    }
    /* Header logo on mobile — was 3.5rem, dominated the viewport */
    .navbar { padding: 0.5rem 1rem; }
    .logo { height: 2.25rem; }
    /* Hero tagline tighter on small screens */
    .hero h1[style*="letter-spacing"] {
        font-size: 1rem !important;
        letter-spacing: 0.18em !important;
        text-indent: 0.18em !important;
    }
    /* Search input was overflowing — shrink font + tighter placeholder */
    .idx-search input {
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    .idx-search {
        flex-direction: column;
    }
    .hero-input-wrap {
        width: 100%;
        max-width: 100%;
    }
    .idx-search .btn-primary {
        width: 100%;
    }
    .contact-quick-actions {
        gap: 0.6rem;
    }
    .contact-action-btn {
        padding: 0.85rem 1rem;
        min-width: 75px;
        font-size: 0.75rem;
    }
    .contact-action-btn i { font-size: 1.2rem; }
    .contact-form-row {
        flex-direction: column;
    }
    .contact-form-msg-row {
        flex-direction: column;
    }
    .contact-form-msg-row .btn-primary {
        width: 100%;
    }
}
