/* ============================================
   The Eucalyptus Room — Custom Styles
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::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: rgba(26, 60, 52, 0.15);
    color: #1A3C34;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F5F0;
}
::-webkit-scrollbar-thumb {
    background: #b5cfc0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8db59e;
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #1A3C34;
    color: #FAFAF7;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #1A3C34;
}

.btn-primary:hover {
    background-color: transparent;
    color: #1A3C34;
}

.btn-primary-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #FAFAF7;
    color: #1A3C34;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #FAFAF7;
}

.btn-primary-lg:hover {
    background-color: transparent;
    color: #FAFAF7;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: transparent;
    color: #1A3C34;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #1A3C34;
}

.btn-outline:hover {
    background-color: #1A3C34;
    color: #FAFAF7;
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: transparent;
    color: #d9e4de;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(217, 228, 222, 0.4);
}

.btn-outline-light:hover {
    background-color: rgba(217, 228, 222, 0.1);
    border-color: #d9e4de;
    color: #FAFAF7;
}

/* ---------- Input Fields ---------- */
.input-field {
    border: 1px solid #DCDCD1;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #1A3C34;
    background-color: #FAFAF7;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

.input-field::placeholder {
    color: #8db59e;
}

.input-field:hover {
    border-color: #8db59e;
}

.input-field:focus {
    border-color: #1A3C34;
    box-shadow: 0 0 0 3px rgba(26, 60, 52, 0.1);
}

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

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

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

/* Mobile menu */
.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav-link {
    font-family: 'Playfair Display', Georgia, serif;
}

/* ---------- Header scroll state ---------- */
#site-header.scrolled {
    background-color: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 60, 52, 0.08);
}

#site-header.scrolled .logo-stroke {
    stroke: #1A3C34;
}

#site-header.scrolled .logo-fill {
    fill: #1A3C34;
}

#site-header.scrolled .logo-leaf {
    stroke: #1A3C34;
}

/* ---------- Marquee ---------- */
.marquee-track {
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ---------- Service Cards ---------- */
.card-service {
    opacity: 1;
}

/* ---------- Reveal Animations ---------- */
/*
 * All reveal animations are progressive enhancement.
 * Content is visible by default; JS adds the animated state.
 * Respects prefers-reduced-motion.
 */

/* Hero reveals — run once on load */
.reveal-hero {
    opacity: 1;
    transform: none;
}

.js-active .reveal-hero {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-active .reveal-hero:nth-child(1) { transition-delay: 0.1s; }
.js-active .reveal-hero:nth-child(2) { transition-delay: 0.2s; }
.js-active .reveal-hero:nth-child(3) { transition-delay: 0.3s; }
.js-active .reveal-hero:nth-child(4) { transition-delay: 0.4s; }
.js-active .reveal-hero:nth-child(5) { transition-delay: 0.5s; }

/* Section reveals — triggered by IntersectionObserver */
.reveal-section {
    opacity: 1;
    transform: none;
}

.js-active .reveal-section {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-section.revealed {
    opacity: 1;
    transform: none;
}

/* Stagger children */
.reveal-section > * {
    opacity: 1;
    transform: none;
}

.js-active .reveal-section:not(.revealed) > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-active .reveal-section.revealed > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.js-active .reveal-section.revealed > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: none; }
.js-active .reveal-section.revealed > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: none; }
.js-active .reveal-section.revealed > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: none; }
.js-active .reveal-section.revealed > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: none; }
.js-active .reveal-section.revealed > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal-hero, .reveal-section {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Focus visible ---------- */
:focus-visible {
    outline: 2px solid #1A3C34;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Image hover ---------- */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .btn-primary, .btn-outline {
        width: 100%;
        justify-content: center;
    }
}
