/* Design tokens and custom styles */
:root {
    --header-height: 60px;
    --mobile-cta-height: 56px;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
}

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Hero slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
}

/* Masonry gallery */
.gallery-masonry {
    column-count: 2;
    column-gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (min-width: 1024px) {
    .gallery-masonry {
        column-count: 4;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Gallery Navigation */
.gallery-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-nav-btn {
    background: #81A65D;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-nav-btn:hover:not(:disabled) {
    background: #6F8C51;
    transform: scale(1.1);
}

.gallery-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gallery-page-info {
    font-size: 1.125rem;
    font-weight: 600;
    color: #708C64;
    min-width: 4rem;
    text-align: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 1);
}

.lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.lightbox-close {
    top: 20px;
    right: 20px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Sticky elements */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}

.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.sticky-cta-bar a {
    transition: background-color 0.2s ease;
}

.sticky-cta-bar a:active {
    transform: scale(0.98);
}

@media (min-width: 768px) {
    .sticky-cta-bar {
        display: none;
    }
}

/* Focus states */
a:focus, button:focus {
    outline: 2px solid #A67B5B;
    outline-offset: 2px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }

    body {
        background-color: #1a1a1a;
        color: #e5e5e5;
    }

    .sticky-header {
        background-color: rgba(26, 26, 26, 0.9);
    }

    .sticky-cta-bar {
        background-color: #1a1a1a;
    }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-slide {
        transition: none;
    }
}

/* Map iframe */
.map-iframe {
    border: 0;
}
