/* ===== 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: #5FB8A5;
    color: #0A2342;
}

/* ===== NAVIGATION ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #5FB8A5;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Sticky header */
#site-header.scrolled {
    background-color: rgba(247, 245, 240, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(10, 35, 66, 0.08);
}

#site-header.scrolled .font-serif,
#site-header.scrolled .text-midnight {
    color: #0A2342;
}

/* Mobile menu */
#mobile-menu.open {
    pointer-events: auto;
    opacity: 1;
}

#mobile-menu.open .mobile-menu-backdrop {
    opacity: 1;
}

#mobile-menu.open > nav > div {
    transform: scale(1);
}

.hamburger-line {
    transition: all 0.3s ease;
}

#mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav-link {
    position: relative;
}

/* ===== HERO ===== */
.hero-ornament {
    animation: expandLine 1s ease forwards;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.hero-title {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

.hero-desc {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

.hero-ctas {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

.hero-image-col {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

.hero-image-frame {
    animation: expandFrame 1s ease forwards;
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 64px; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandFrame {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scrollDot {
    0% { top: -12px; opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.hero-scroll-indicator {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

.scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* ===== CTA BUTTONS ===== */
.cta-primary {
    box-shadow: 0 4px 20px rgba(95, 184, 165, 0.3);
    transition: all 0.3s ease;
}

.cta-primary:hover {
    box-shadow: 0 8px 30px rgba(95, 184, 165, 0.4);
    transform: translateY(-2px);
}

.cta-secondary:hover {
    background-color: rgba(247, 245, 240, 0.15);
}

/* ===== SECTION COMMON ===== */
.section-eyebrow {
    animation: fadeIn 0.6s ease forwards;
}

.section-title {
    animation: fadeIn 0.6s ease forwards;
}

.section-desc {
    animation: fadeIn 0.6s ease forwards;
}

.section-eyebrow-light {
    animation: fadeIn 0.6s ease forwards;
}

.section-title-light {
    animation: fadeIn 0.6s ease forwards;
}

.section-desc-light {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== SPRING CARDS ===== */
.spring-card {
    animation: fadeIn 0.6s ease forwards;
}

/* ===== CABIN CARDS ===== */
.cabin-card {
    cursor: pointer;
}

/* ===== GALLERY ===== */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 35, 66, 0);
    transition: background 0.3s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(10, 35, 66, 0.1);
}

.gallery-item {
    position: relative;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Default state is visible for progressive enhancement */
.reveal[data-reveal] {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal[data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal[data-reveal="left"] {
        transform: translateX(-30px);
    }

    .reveal[data-reveal="left"].revealed {
        transform: translateX(0);
    }

    .reveal[data-reveal="right"] {
        transform: translateX(30px);
    }

    .reveal[data-reveal="right"].revealed {
        transform: translateX(0);
    }

    .reveal[data-reveal="scale"] {
        transform: scale(0.95);
    }

    .reveal[data-reveal="scale"].revealed {
        transform: scale(1);
    }
}

/* ===== FORM ===== */
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #5FB8A5;
    box-shadow: 0 0 0 3px rgba(95, 184, 165, 0.15);
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
    outline: 2px solid #5FB8A5;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .section-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}
