/* ── Base & Typography ────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

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

::selection {
    background-color: #fde68a;
    color: #5c2539;
}

/* ── Hero Section ─────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 8s ease-out;
}

.hero-bg.loaded .hero-img {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(61, 22, 35, 0.70) 0%,
        rgba(61, 22, 35, 0.55) 50%,
        rgba(61, 22, 35, 0.80) 100%
    );
}

.hero-content {
    padding-top: 80px;
}

/* ── Scroll-triggered animations ──────────────────────────────── */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-on-scroll.is-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Hero entrance animations — triggered via JS after load */
.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-headline {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-description {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-actions {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-scroll-indicator {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.hero-subtitle.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-headline.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-description.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-actions.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-scroll-indicator.is-visible {
    opacity: 1;
}

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

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

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

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

.mobile-nav-link {
    opacity: 1;
    transition: color 0.2s ease;
}

/* ── Header scroll state ──────────────────────────────────────── */
#site-header.scrolled {
    background-color: rgba(61, 22, 35, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#site-header.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#site-header.scrolled #logo-text {
    color: white;
}

/* ── Decorative elements ──────────────────────────────────────── */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(114, 44, 71, 0.15), transparent);
}

/* ── Button focus states ──────────────────────────────────────── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #fcd34d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Responsive tweaks ────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero-content {
        padding-top: 64px;
    }

    .hero-headline {
        font-size: 2.75rem;
    }

    .hero-headline br {
        display: none;
    }

    .hero-headline::after {
        content: '—';
        display: block;
        text-align: center;
        color: #fcd34d;
        margin-top: 0.25rem;
    }
}

@media (min-width: 641px) {
    .hero-headline br {
        display: block;
    }

    .hero-headline::after {
        content: '';
        display: none;
    }
}

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

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-subtitle,
    .hero-headline,
    .hero-description,
    .hero-actions,
    .hero-scroll-indicator {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-img {
        transition: none;
        transform: none;
    }

    .hero-bg.loaded .hero-img {
        transform: scale(1.05);
    }

    img:hover,
    .rounded-xl img,
    .rounded-2xl img {
        transition: none;
        transform: none;
    }
}
