/* ============================================
   Pool House Reserve — Stylesheet
   Clean minimalist · Terracotta + Sand palette
   ============================================ */

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

:root {
    --color-terra-50:  #fdf0eb;
    --color-terra-100: #fce4d9;
    --color-terra-200: #f8c4b0;
    --color-terra-300: #f0a080;
    --color-terra-400: #e87850;
    --color-terra-500: #c05a38;
    --color-terra-600: #a3482c;
    --color-terra-700: #863a24;
    --color-terra-800: #6d301f;
    --color-terra-900: #562619;

    --color-sand-50:  #fdfbf7;
    --color-sand-100: #faf5ec;
    --color-sand-200: #f3e8d4;
    --color-sand-300: #e8d5b8;
    --color-sand-400: #d4ba96;
    --color-sand-500: #b89a76;
    --color-sand-600: #967a58;
    --color-sand-700: #766046;

    --color-charcoal:  #1a1a1a;
    --color-dark:      #2c2c2c;
    --color-mid:       #555555;
    --color-muted:     #888888;
    --color-light:     #b0b0b0;
    --color-pale:      #e8e6e1;
    --color-offwhite:  #f7f5f0;
    --color-white:     #ffffff;

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Inter', -apple-system, sans-serif;

    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    color: var(--color-charcoal);
    background: var(--color-sand-50);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ── Typography ────────────────────────────── */
.eyebrow {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-terra-500);
    margin-bottom: var(--space-lg);
}

h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 300;
    line-height: 1.15;
    color: var(--color-charcoal);
}

h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    letter-spacing: -0.005em;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 400;
}

.lead {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: var(--color-mid);
    line-height: 1.7;
    max-width: 520px;
}

/* ── Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.85rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-terra-500);
    color: var(--color-white);
    border: 1px solid var(--color-terra-500);
}

.btn-primary:hover {
    background: var(--color-terra-600);
    border-color: var(--color-terra-600);
    transform: translateY(-1px);
}

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

.btn-outline:hover {
    background: var(--color-terra-500);
    color: var(--color-white);
}

.btn-ghost {
    background: transparent;
    color: var(--color-charcoal);
    border: 1px solid var(--color-pale);
}

.btn-ghost:hover {
    border-color: var(--color-terra-500);
    color: var(--color-terra-500);
}

.btn-full {
    width: 100%;
}

/* ── Header ────────────────────────────────── */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

#site-header.scrolled {
    border-bottom-color: var(--color-pale);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--color-charcoal);
    letter-spacing: 0.01em;
}

.logo-icon {
    color: var(--color-terra-500);
}

#main-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    list-style: none;
}

#main-nav a {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-mid);
    transition: var(--transition);
    position: relative;
}

#main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-terra-500);
    transition: var(--transition);
}

#main-nav a:hover {
    color: var(--color-charcoal);
}

#main-nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--color-charcoal);
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg) translate(4px, 5px);
}

.menu-toggle[aria-expanded="true"] span:last-child {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* ── Hero ──────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--color-charcoal);
    overflow: hidden;
    padding-top: 72px;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.85) 0%,
        rgba(26, 26, 26, 0.6) 40%,
        rgba(192, 90, 56, 0.3) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-3xl);
    align-items: center;
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    width: 100%;
}

.hero-text {
    max-width: 600px;
}

.hero-text .eyebrow {
    color: var(--color-terra-300);
}

.hero-text h1 {
    color: var(--color-white);
    margin-bottom: var(--space-xl);
}

.hero-text .lead {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-2xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    background: var(--color-terra-500);
    border-color: var(--color-terra-500);
}

.hero-actions .btn-primary:hover {
    background: var(--color-terra-400);
    border-color: var(--color-terra-400);
}

.hero-actions .btn-ghost {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--color-white);
}

.hero-actions .btn-ghost:hover {
    border-color: var(--color-white);
    color: var(--color-white);
}

.hero-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex-shrink: 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    min-width: 200px;
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 300;
    color: var(--color-white);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-top: var(--space-xs);
}

/* ── Section shared ────────────────────────── */
section {
    padding: var(--space-4xl) 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-3xl);
}

.section-header h2 {
    margin-bottom: var(--space-md);
}

/* ── About ─────────────────────────────────── */
.about {
    background: var(--color-sand-50);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.about-content h2 {
    margin-bottom: var(--space-xl);
}

.about-content p {
    color: var(--color-mid);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.about-features {
    margin-top: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.9rem;
    color: var(--color-dark);
    font-weight: 400;
}

.feature-line {
    flex-shrink: 0;
    width: 32px;
    height: 1px;
    background: var(--color-terra-500);
}

/* ── Stay ──────────────────────────────────── */
.stay {
    background: var(--color-white);
}

.stay-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.stay-card {
    background: var(--color-sand-50);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.stay-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.stay-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.stay-card-content {
    padding: var(--space-xl);
}

.stay-card-content h3 {
    margin-bottom: var(--space-sm);
}

.stay-card-content p {
    font-size: 0.9rem;
    color: var(--color-mid);
    line-height: 1.7;
}

/* ── Amenities ─────────────────────────────── */
.amenities {
    background: var(--color-sand-50);
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-pale);
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--color-dark);
    transition: var(--transition);
}

.amenity-item:hover {
    border-color: var(--color-terra-200);
    background: var(--color-terra-50);
}

.amenity-item svg {
    flex-shrink: 0;
    color: var(--color-terra-500);
}

/* ── Location ──────────────────────────────── */
.location {
    background: var(--color-white);
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.location-content h2 {
    margin-bottom: var(--space-xl);
}

.location-content p {
    color: var(--color-mid);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.location-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.location-details li {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.location-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.location-value {
    font-size: 1rem;
    color: var(--color-charcoal);
    line-height: 1.6;
}

.location-link {
    color: var(--color-terra-500);
    font-size: 1.1rem;
    font-weight: 400;
    transition: var(--transition);
}

.location-link:hover {
    color: var(--color-terra-700);
}

.location-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.location-map iframe {
    width: 100%;
    height: 400px;
    display: block;
}

/* ── Contact ───────────────────────────────── */
.contact {
    background: var(--color-charcoal);
    color: var(--color-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: start;
}

.contact-info .eyebrow {
    color: var(--color-terra-300);
}

.contact-info h2 {
    color: var(--color-white);
    margin-bottom: var(--space-lg);
}

.contact-info > p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-terra-300);
    font-size: 1.1rem;
    font-weight: 400;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--color-terra-200);
}

.contact-divider {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.contact-address {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ── Form ──────────────────────────────────── */
.contact-form-wrap {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-white);
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-terra-400);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::-webkit-input-autofill,
.form-group input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(40, 40, 40, 1) inset !important;
    -webkit-text-fill-color: #fff !important;
}

.form-success {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: var(--radius-sm);
    color: #81c784;
    font-size: 0.9rem;
    margin-top: var(--space-sm);
}

/* ── Footer ────────────────────────────────── */
#site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.5);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-top {
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: var(--space-xl);
}

.footer-top .logo {
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    max-width: 380px;
    line-height: 1.7;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 0.8rem;
}

.footer-bottom a {
    color: var(--color-terra-400);
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--color-terra-300);
}

/* ── Scroll reveal (progressive enhancement) ─ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ── Mobile Nav ────────────────────────────── */
@media (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }

    #main-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(253, 251, 247, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--color-pale);
        padding: var(--space-xl);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    #main-nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    #main-nav ul {
        flex-direction: column;
        gap: var(--space-lg);
        align-items: flex-start;
    }

    #main-nav a {
        font-size: 0.9rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .hero-cards {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 140px;
    }

    .about-grid,
    .location-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-image {
        order: -1;
    }

    .stay-grid {
        grid-template-columns: 1fr;
    }

    .amenities-grid {
        grid-template-columns: 1fr 1fr;
    }

    .location-map iframe {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-lg);
    }

    .hero-cards {
        flex-direction: column;
    }

    .amenities-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ── Reduced motion ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
</style>
<sm-file path="script.js">
/* ── Pool House Reserve — Interactions ─────── */

(function () {
    'use strict';

    // ── Header scroll effect ──────────────────
    const header = document.getElementById('site-header');
    let lastScroll = 0;

    function onScroll() {
        const y = window.scrollY;
        header.classList.toggle('scrolled', y > 40);
        lastScroll = y;
    }

    window.addEventListener('scroll', onScroll, { passive: true });
    onScroll();

    // ── Mobile menu ───────────────────────────
    const menuToggle = document.getElementById('menu-toggle');
    const mainNav = document.getElementById('main-nav');

    menuToggle.addEventListener('click', function () {
        const isOpen = mainNav.classList.toggle('open');
        menuToggle.setAttribute('aria-expanded', isOpen);
    });

    // Close menu on link click
    mainNav.querySelectorAll('a').forEach(function (link) {
        link.addEventListener('click', function () {
            mainNav.classList.remove('open');
            menuToggle.setAttribute('aria-expanded', 'false');
        });
    });

    // Close on Escape
    document.addEventListener('keydown', function (e) {
        if (e.key === 'Escape' && mainNav.classList.contains('open')) {
            mainNav.classList.remove('open');
            menuToggle.setAttribute('aria-expanded', 'false');
            menuToggle.focus();
        }
    });

    // ── Scroll reveal (progressive enhancement) ──
    if (window.matchMedia('(prefers-reduced-motion: no-preference)').matches) {
        const reveals = document.querySelectorAll('.reveal');

        if (reveals.length > 0) {
            const observer = new IntersectionObserver(function (entries) {
                entries.forEach(function (entry) {
                    if (entry.isIntersecting) {
                        entry.target.classList.add('revealed');
                        observer.unobserve(entry.target);
                    }
                });
            }, {
                threshold: 0.12,
                rootMargin: '0px 0px -40px 0px'
            });

            reveals.forEach(function (el) {
                observer.observe(el);
            });
        }
    }

    // ── Contact form ──────────────────────────
    const form = document.getElementById('contact-form');
    const successMsg = document.getElementById('form-success');

    if (form) {
        form.addEventListener('submit', function (e) {
            e.preventDefault();

            // Basic validation
            const name = form.querySelector('#name').value.trim();
            const email = form.querySelector('#email').value.trim();

            if (!name || !email) {
                return;
            }

            // Simulate submission
            const submitBtn = form.querySelector('button[type="submit"]');
            submitBtn.disabled = true;
            submitBtn.textContent = 'Sending...';

            setTimeout(function () {
                form.reset();
                successMsg.hidden = false;
                submitBtn.disabled = false;
                submitBtn.textContent = 'Send Message';

                // Hide success after 5s
                setTimeout(function () {
                    successMsg.hidden = true;
                }, 5000);
            }, 800);
        });
    }

    // ── Smooth scroll for anchor links ────────
    document.querySelectorAll('a[href^="#"]').forEach(function (anchor) {
        anchor.addEventListener('click', function (e) {
            const target = document.querySelector(this.getAttribute('href'));
            if (target) {
                e.preventDefault();
                const headerHeight = header.offsetHeight;
                const top = target.getBoundingClientRect().top + window.scrollY - headerHeight - 20;
                window.scrollTo({ top: top, behavior: 'smooth' });
            }
        });
    });

})();
