@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Raleway:wght@200;300;400&display=swap');

:root {
    --color-primary: #247F87;
    --color-secondary: #356C92;
    --color-text: #373B3B;
    --color-background: #FFFFFF;
    --color-background-soft: #F7F8F6;
    --color-border: #D8E5E3;
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Manrope', sans-serif;
    --content-width: 1200px;
    --page-gutter: 96px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 5vw, 5rem);
    font-weight: 300;
    line-height: 1.12;
}
h2 {
    color: var(--color-secondary);
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;
}
h3 {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 300;
}
a { color: var(--color-secondary); }
a:hover { color: var(--color-primary); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 3px; }

/* Consistent content gutters, except viewport-filling media */
.site-header, #main-content, .site-footer {
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
}

/* Header and navigation */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 1100;
    padding: 10px 16px;
    background: var(--color-background);
    color: var(--color-text);
}
.skip-link:focus { top: 12px; }
.site-header {
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-top: 28px;
    padding-bottom: 28px;
    transition: background-color .5s ease, box-shadow .5s ease,
                border-color .5s ease, backdrop-filter .5s ease,
                -webkit-backdrop-filter .5s ease;
}
.site-logo {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    font-weight: 300;
    line-height: 1.2;
    letter-spacing: .02em;
    text-decoration: none;
}
.site-navigation ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.site-navigation a {
    color: var(--color-text);
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
}
.site-navigation a:hover,
.site-navigation a[aria-current="page"] { color: var(--color-secondary); }
.site-logo, .site-navigation a { transition: color .5s ease; }
.site-header.is-scrolled {
    position: fixed;
    inset: 0 0 auto;
    height: 88px;
    margin: 0;
    padding: 0 var(--page-gutter);
    background: rgba(19,35,43,.55);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
}
.site-header.is-scrolled .site-logo,
.site-header.is-scrolled .site-navigation a { color: #FFF; }
.site-header.is-scrolled .site-navigation a:hover,
.site-header.is-scrolled .site-navigation a[aria-current="page"] { color: #8EDDE0; }

/* Homepage video backdrop */
body:has(.home-hero) { background: #263B45; }
body:has(.home-hero) .site-header {
    position: absolute;
    inset: 0 0 auto;
    background: transparent;
}
body:has(.home-hero) .site-header.is-scrolled {
    position: fixed;
    background: rgba(19,35,43,.55);
}
body:has(.home-hero) #main-content,
body:has(.home-hero) .site-footer { background: transparent; }
.home-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
    min-height: 100svh;
    background: transparent;
}
.home-hero-video,
.home-hero-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.home-hero-video { object-fit: cover; z-index: -2; }
.home-hero-overlay {
    z-index: -1;
    background: linear-gradient(90deg,rgba(15,35,45,.65),rgba(15,35,45,.30) 60%,rgba(15,35,45,.10));
}
.home-hero-content {
    width: 100%;
    padding-top: 155px;
    padding-bottom: 24px;
}
.home-hero h1 {
    max-width: 850px;
    margin-bottom: 8px;
    color: #FFF;
    font-size: clamp(3rem,6vw,6rem);
    text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.home-hero p {
    max-width: 650px;
    margin: 0;
    color: #FFF;
    font-size: clamp(1.1rem,1.6vw,1.4rem);
    line-height: 1.7;
    text-shadow: 0 2px 12px rgba(0,0,0,.55);
}

/* Featured properties, anchored to bottom of visible first fold */
.featured-listings {
    width: 100%;
    margin-top: auto;
    padding: 24px 0;
}
.featured-listings-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 18px;
}
.featured-listings-eyebrow {
    color: #B9E4E6;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
}
.featured-listings h2 {
    margin: 6px 0 0;
    color: #FFF;
    font-size: clamp(1.25rem,2vw,1.8rem);
    letter-spacing: .04em;
    text-transform: none;
}
.featured-listings-controls { display: flex; gap: 10px; }
.listing-arrow {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 50%;
    background: rgba(20,35,45,.35);
    color: #FFF;
    font-size: 1.3rem;
    cursor: pointer;
}
.listing-arrow:hover { background: rgba(36,127,135,.85); }
.featured-listings-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.featured-listings-track::-webkit-scrollbar { display: none; }
.property-card {
    flex: 0 0 calc((100% - 54px)/4);
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    background: rgba(18,34,43,.62);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    scroll-snap-align: start;
}
.property-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 125px;
    background: rgba(255,255,255,.10);
}
.property-card-image span {
    color: rgba(255,255,255,.7);
    font-size: .7rem;
    letter-spacing: .12em;
}
.property-card-details { padding: 10px 14px 12px; }
.property-card-price { color: #FFF; font-size: .95rem; font-weight: 700; line-height: 1.3; }
.property-card-details p,
.property-card-meta { color: rgba(255,255,255,.85); font-size: .8rem; line-height: 1.3; }
.property-card-details p { margin: 4px 0; }
.property-card-meta { font-size: .75rem; }

@media (max-width: 1440px) { :root { --page-gutter: 48px; } }
@media (max-width: 1024px) {
    :root { --page-gutter: 32px; }
    .property-card { flex-basis: calc((100% - 36px)/3); }
}
@media (max-width: 768px) {
    .site-header { flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 22px; padding-bottom: 22px; }
    .site-navigation ul { gap: 12px 20px; }
    .site-header.is-scrolled { height: auto; min-height: 88px; padding-top: 12px; padding-bottom: 12px; }
    .home-hero-content { padding-top: 190px; }
    .property-card { flex-basis: calc((100% - 18px)/2); }
}
@media (max-width: 600px) { :root { --page-gutter: 20px; } }
@media (max-width: 520px) { .property-card { flex-basis: 82%; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .site-header, .site-logo, .site-navigation a { transition: none; }
    .featured-listings-track { scroll-behavior: auto; }
    .home-hero-video { display: none; }
}
