/* ==========================================================================
   MAIN STYLESHEET — Light Editorial Real Estate Theme
   ==========================================================================
   White backgrounds, bold uppercase sans-serif headings, full-bleed hero
   image on homepage with transparent header overlay, clean minimal aesthetic.
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
    /* Colors — light theme */
    --color-bg:            #ffffff;
    --color-bg-alt:        #f5f5f0;
    --color-text:          #1a1a1a;
    --color-text-muted:    #6b6b6b;
    --color-text-light:    #999999;
    --color-accent:        #1a1a1a;
    --color-accent-hover:  #444444;
    --color-border:        #e0e0e0;
    --color-overlay:       rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --container-width: 1200px;
    --section-padding: 5rem;
    --header-height: 72px;
}

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

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

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

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover,
a:focus-visible {
    color: var(--color-text-muted);
}

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

/* Utility: hide honeypot field */
.hidden {
    display: none !important;
}

/* Shared container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}


/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-bg);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 1px 0 var(--color-border);
}

/* --- Homepage hero header: transparent with dark gradient wash --- */
.site-header--hero {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
}

.site-header--hero.scrolled {
    background: var(--color-bg);
}

/* Logo swap: show white logo by default on hero, hide scrolled version */
.logo-img--scrolled {
    display: none;
}

.site-header--hero .logo-img--hero {
    display: block;
}

.site-header--hero .logo-img--scrolled {
    display: none;
}

/* When scrolled, swap to black logo */
.site-header--hero.scrolled .logo-img--hero {
    display: none;
}

.site-header--hero.scrolled .logo-img--scrolled {
    display: block;
}

/* White nav links on hero */
.site-header--hero .desktop-nav a {
    color: rgba(255, 255, 255, 0.85);
}

.site-header--hero .desktop-nav a:hover {
    color: #ffffff;
}

/* When scrolled, revert to dark nav */
.site-header--hero.scrolled .desktop-nav a {
    color: var(--color-text-muted);
}

.site-header--hero.scrolled .desktop-nav a:hover {
    color: var(--color-text);
}

/* White mobile toggle on hero */
.site-header--hero .menu-toggle {
    color: #ffffff;
}

.site-header--hero .menu-toggle .bar {
    background-color: #ffffff;
}

.site-header--hero.scrolled .menu-toggle {
    color: var(--color-text);
}

.site-header--hero.scrolled .menu-toggle .bar {
    background-color: var(--color-text);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo image */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px;
    width: auto;
}

/* Desktop nav — hidden on mobile, shown on large screens */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 2.25rem;
}

.desktop-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

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

/* Menu toggle — "Menu" text + hamburger bars */
.menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0;
    z-index: 1100;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.menu-bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.menu-bars .bar {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: var(--color-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animate bars into an X when open */
.menu-toggle[aria-expanded="true"] .menu-bars .bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-bars .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-bars .bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile nav overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1050;
}

.mobile-nav.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text);
}

.mobile-nav a:hover {
    color: var(--color-text-muted);
}

/* Lock body scroll when mobile nav is open */
body.nav-open {
    overflow: hidden;
}


/* ==========================================================================
   HERO SECTION (Homepage) — Full-bleed, edge to edge
   ========================================================================== */
.hero {
    padding: 0;
    margin: 0;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 85%;
    position: absolute;
    inset: 0;
}

/* Gradient overlay — two stacked layers for a smooth blend:
   1) Dark tint for header/text readability that fades out toward the bottom
   2) Footer bg color that fades IN from transparent, covering the last ~30% */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.10) 30%,
            rgba(0, 0, 0, 0.20) 55%,
            rgba(0, 0, 0, 0.15) 70%,
            transparent 85%
        ),
        linear-gradient(to bottom,
            transparent 60%,
            rgba(245, 245, 240, 0.25) 72%,
            rgba(245, 245, 240, 0.50) 80%,
            rgba(245, 245, 240, 0.75) 88%,
            rgba(245, 245, 240, 0.92) 94%,
            #f5f5f0 100%
        );
    pointer-events: none;
    z-index: 1;
}

/* Hero text — centered in the image */
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 2rem) 1.5rem 2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.05;
    color: #ffffff;
    font-size: clamp(2rem, 7vw, 5.5rem);
    margin-bottom: 0.5rem;
}

.hero-title br {
    display: none;
}

@media (min-width: 540px) {
    .hero-title br {
        display: block;
    }
}

.hero-subtext {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw + 0.5rem, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.75rem;
}

/* CTA buttons row — stacks on mobile, side-by-side on tablet+ */
.hero-ctas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.hero-ctas .btn {
    text-align: center;
    width: 100%;
    max-width: 280px;
}

/* High-contrast primary CTA on hero — white bg, dark text */
.hero-ctas .btn-primary {
    background-color: #ffffff;
    color: #1a1a1a;
}

.hero-ctas .btn-primary:hover,
.hero-ctas .btn-primary:focus-visible {
    background-color: #f0f0f0;
    color: #1a1a1a;
}

.btn-outline {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background-color: rgba(255, 255, 255, 0.4);
    border-color: #ffffff;
    color: #ffffff;
}


/* Hero search widget container */
.hero-search {
    width: 100%;
    max-width: 900px;
}

/* Show vertical widget on mobile, twoline on desktop */
.hero-search--desktop {
    display: none;
}

@media (min-width: 768px) {
    .hero-search--mobile {
        display: none;
    }
    .hero-search--desktop {
        display: block;
    }
}


/* ==========================================================================
   PAGE SECTIONS (Contact, Success, etc.)
   ========================================================================== */
.page-section {
    padding: calc(var(--header-height) + 2rem) 0 var(--section-padding);
    min-height: 80vh;
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

.page-content {
    max-width: 680px;
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.page-content h2 {
    font-family: var(--font-heading);
    color: var(--color-text);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-content a {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-content a:hover {
    color: var(--color-text-muted);
}


/* ==========================================================================
   CONTACT FORM
   ========================================================================== */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.form-group .required {
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-light);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

/* Primary button (submit) */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.btn-primary {
    background-color: var(--color-text);
    color: var(--color-bg);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
}


/* ==========================================================================
   CONTACT PAGE — Two-column layout
   ========================================================================== */
.contact-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-form-col {
    flex: 1;
    min-width: 0;
}

.contact-photo-col {
    flex: 1;
    min-width: 0;
}

.contact-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    max-height: 600px;
}


/* ==========================================================================
   WIDGET PREVIEW PAGE
   ========================================================================== */
.widget-heading {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 3rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.widget-heading:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.widget-preview {
    margin-bottom: 2rem;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--color-bg-alt);
    padding: 4rem 0;
    text-align: center;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.footer-logo-img {
    height: 36px;
    width: auto;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    padding: 0.25rem 0.75rem;
}

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

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-social a {
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: var(--color-text);
}

.footer-social-icon {
    width: 20px;
    height: 20px;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--color-text-light);
}


/* ==========================================================================
   RESPONSIVE — Tablet (>= 768px)
   ========================================================================== */
@media (min-width: 768px) {
    .hero-image-wrapper {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-content {
        padding: 3rem 3.5rem;
    }

    .hero-ctas {
        flex-direction: row;
        justify-content: center;
    }

    .hero-ctas .btn {
        width: auto;
        max-width: none;
    }

    .contact-layout {
        flex-direction: row;
        gap: 3rem;
    }

    .desktop-nav {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }

    .mobile-nav {
        display: none;
    }
}


/* ==========================================================================
   RESPONSIVE — Desktop (>= 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
    :root {
        --header-height: 80px;
    }

    .container {
        padding: 0 2.5rem;
    }

    .hero-content {
        padding: 4rem 5rem;
    }

    .hero-title {
        font-size: clamp(3.5rem, 5vw, 6rem);
    }
}
