/* ============================================
   Real Estate One — Custom Styles
   Classic & Elegant | Terracotta + Sand
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #B86B4A;
    color: #fefdfb;
}

/* --- Section Padding --- */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 10rem;
        padding-bottom: 10rem;
    }
}

/* --- Section Eyebrow --- */
.section-eyebrow {
    display: flex;
}

/* --- Navigation --- */
.nav {
    background: transparent;
}

.nav.scrolled {
    background: rgba(254, 253, 251, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav.scrolled .nav-logo-text,
.nav.scrolled .nav-link,
.nav.scrolled .menu-line {
    color: #2a2620;
}

.nav-logo-text {
    color: #fefdfb;
}

.nav-logo-icon {
    color: #fefdfb;
}

.nav.scrolled .nav-logo-icon {
    color: #2a2620;
}

.nav-link {
    color: rgba(254, 253, 251, 0.85);
}

.nav.scrolled .nav-link {
    color: #53493c;
}

/* Mobile menu */
.mobile-menu-link {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    background: #fefdfb;
}

.nav.scrolled .menu-line {
    background: #2a2620;
}

.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* --- Hero --- */
.hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    display: block;
}

.hero-overlay {
    background: linear-gradient(
        to right,
        rgba(42, 38, 32, 0.88) 0%,
        rgba(42, 38, 32, 0.75) 50%,
        rgba(42, 38, 32, 0.55) 100%
    );
}

.hero-inner {
    position: relative;
    z-index: 1;
}

/* Hero animations — only for above-the-fold content that is visible by default */
.hero-eyebrow,
.hero-headline,
.hero-subtitle,
.hero-ctas,
.stats-card {
    will-change: opacity, transform;
}

/* --- Stats Card --- */
.stats-card {
    transform: translateY(24px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

/* Hero content animations */
.hero-eyebrow {
    transform: translateY(24px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-headline {
    transform: translateY(24px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.hero-subtitle {
    transform: translateY(24px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.hero-ctas {
    transform: translateY(24px);
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.9s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #B86B4A;
    color: #fefdfb;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid #B86B4A;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background: #a35536;
    border-color: #a35536;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184, 107, 74, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: #fefdfb;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid rgba(254, 253, 251, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: #fefdfb;
    background: rgba(254, 253, 251, 0.1);
    transform: translateY(-2px);
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #fefdfb;
    color: #B86B4A;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-cta-primary:hover {
    background: #fefdfb;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    color: #fefdfb;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid rgba(254, 253, 251, 0.6);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
    border-color: #fefdfb;
    background: rgba(254, 253, 251, 0.1);
    transform: translateY(-2px);
}

/* --- Service Cards --- */
.service-card {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Property Cards --- */
.property-card {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.property-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Testimonial Cards --- */
.testimonial-card {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Scroll Reveal (below fold only) --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left {
    transform: translateX(-32px);
}

.reveal-right {
    transform: translateX(32px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    .hero-eyebrow,
    .hero-headline,
    .hero-subtitle,
    .hero-ctas,
    .stats-card {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* --- Scroll to Top --- */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 40;
    width: 44px;
    height: 44px;
    background: #B86B4A;
    color: #fefdfb;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(184, 107, 74, 0.3);
}

.scroll-top-btn:hover {
    background: #a35536;
    transform: translateY(-2px);
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: all;
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* --- Utility --- */
@media (max-width: 767px) {
    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}
