/* ── Reset & Base ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: #FDF8F0;
    color: #5C281E;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Utilities ───────────────────────────────────────── */
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C85A3C;
    margin-bottom: 0.75rem;
}
.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: #5C281E;
    margin-bottom: 1rem;
}
.section-subtitle {
    font-size: 1.05rem;
    color: #8A3828;
    max-width: 560px;
    line-height: 1.7;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 60px;
    padding: 0.8rem 1.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary {
    background: #C85A3C;
    color: #fff;
    border-color: #C85A3C;
}
.btn-primary:hover {
    background: #A84530;
    border-color: #A84530;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 90, 60, 0.3);
}
.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
    backdrop-filter: blur(4px);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: #fff;
    transform: translateY(-2px);
}
.btn-outline {
    background: transparent;
    color: #C85A3C;
    border-color: #C85A3C;
}
.btn-outline:hover {
    background: #C85A3C;
    color: #fff;
    transform: translateY(-2px);
}
.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
}
.btn-cta {
    margin-top: 1.5rem;
    background: #fff;
    color: #C85A3C;
    border-color: #fff;
}
.btn-cta:hover {
    background: #FDF8F0;
    border-color: #FDF8F0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* ── Navigation ──────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav.scrolled {
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(92, 40, 30, 0.08);
    padding: 0.75rem 0;
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(92, 40, 30, 0.7);
    transition: color 0.25s;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C85A3C;
    transition: width 0.3s;
}
.nav-link:hover { color: #C85A3C; }
.nav-link:hover::after { width: 100%; }
.nav-cta {
    background: #C85A3C;
    color: #fff !important;
    padding: 0.55rem 1.25rem;
    border-radius: 60px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}
.nav-cta:hover {
    background: #A84530;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 90, 60, 0.3);
}
.nav-cta::after { display: none; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #5C281E;
    border-radius: 2px;
    transition: all 0.3s;
}
.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    background: rgba(253, 248, 240, 0.98);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}
.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}
.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.mobile-menu-link {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #5C281E;
    transition: color 0.25s;
}
.mobile-menu-link:hover { color: #C85A3C; }
.mobile-menu-cta {
    margin-top: 1rem;
    background: #C85A3C;
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(253, 248, 240, 0.97) 0%,
        rgba(253, 248, 240, 0.92) 30%,
        rgba(253, 248, 240, 0.6) 55%,
        rgba(253, 248, 240, 0.1) 75%,
        transparent 100%
    );
}
.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(92, 40, 30, 0.05) 0%,
        transparent 40%,
        transparent 60%,
        rgba(92, 40, 30, 0.1) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 6vw 4rem;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 4rem;
    align-items: center;
}
.hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #C85A3C;
    background: rgba(200, 90, 60, 0.1);
    padding: 0.4rem 1rem;
    border-radius: 60px;
    margin-bottom: 1.25rem;
}
.hero-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    color: #5C281E;
    margin-bottom: 1.25rem;
    max-width: 600px;
}
.hero-title em {
    font-style: italic;
    color: #C85A3C;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: #8A3828;
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 480px;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: #C85A3C;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: bobble 2s ease-in-out infinite;
}
@keyframes bobble {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* Hero Card */
.hero-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(92, 40, 30, 0.12), 0 4px 16px rgba(92, 40, 30, 0.06);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-card:hover { transform: translateY(-6px); }
.hero-card-img {
    height: 260px;
    overflow: hidden;
}
.hero-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-card:hover .hero-card-img img { transform: scale(1.05); }
.hero-card-body {
    padding: 1.75rem;
}
.hero-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #C85A3C;
    margin-bottom: 0.5rem;
}
.hero-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #5C281E;
    margin-bottom: 0.5rem;
}
.hero-card-desc {
    font-size: 0.9rem;
    color: #8A3828;
    line-height: 1.65;
    margin-bottom: 1rem;
}
.hero-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #C85A3C;
    transition: gap 0.25s;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.hero-card-link:hover { gap: 0.6rem; }

/* ── Features Bar ────────────────────────────────────── */
.features {
    background: #fff;
    border-top: 1px solid rgba(200, 90, 60, 0.08);
    border-bottom: 1px solid rgba(200, 90, 60, 0.08);
}
.features-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}
.feature-item {
    padding: 2.5rem 2rem;
    border-right: 1px solid rgba(200, 90, 60, 0.08);
    transition: background 0.3s;
}
.feature-item:last-child { border-right: none; }
.feature-item:hover { background: rgba(200, 90, 60, 0.03); }
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(200, 90, 60, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C85A3C;
    margin-bottom: 1rem;
}
.feature-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #5C281E;
    margin-bottom: 0.35rem;
}
.feature-desc {
    font-size: 0.85rem;
    color: #8A3828;
    line-height: 1.6;
}

/* ── Menu Section ────────────────────────────────────── */
.menu-section {
    padding: 6rem 0;
    background: #FDF8F0;
}
.menu-header {
    text-align: center;
    margin-bottom: 4rem;
}
.menu-header .section-subtitle {
    margin: 0 auto;
}
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.menu-category {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 24px rgba(92, 40, 30, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.menu-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(92, 40, 30, 0.1);
}
.menu-cat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(200, 90, 60, 0.1);
}
.menu-cat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(200, 90, 60, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C85A3C;
    flex-shrink: 0;
}
.menu-cat-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #5C281E;
}
.menu-items { display: flex; flex-direction: column; gap: 1rem; }
.menu-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(200, 90, 60, 0.06);
    transition: padding-left 0.25s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { padding-left: 0.5rem; }
.menu-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #5C281E;
    margin-bottom: 0.2rem;
}
.menu-item-desc {
    font-size: 0.82rem;
    color: #8A3828;
    line-height: 1.55;
}
.menu-note {
    margin-top: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(200, 90, 60, 0.06);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    color: #8A3828;
}
.menu-note a {
    color: #C85A3C;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.menu-note a:hover { color: #A84530; }

/* ── About Section ───────────────────────────────────── */
.about-section {
    padding: 6rem 0;
    background: #fff;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-images {
    position: relative;
}
.about-img-main {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(92, 40, 30, 0.12);
}
.about-img-main img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}
.about-img-float {
    position: absolute;
    bottom: -2rem;
    right: -2rem;
    width: 200px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    border: 6px solid #fff;
    box-shadow: 0 12px 32px rgba(92, 40, 30, 0.15);
}
.about-img-float img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.about-accent {
    position: absolute;
    top: -1.5rem;
    left: -1.5rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(200, 90, 60, 0.1);
    z-index: -1;
}
.about-text .section-title { margin-bottom: 1.25rem; }
.about-lead {
    font-size: 1.1rem;
    color: #5C281E;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-weight: 500;
}
.about-text p {
    font-size: 0.95rem;
    color: #8A3828;
    line-height: 1.75;
    margin-bottom: 1rem;
}
.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(200, 90, 60, 0.1);
}
.about-stat { flex: 1; }
.about-stat-number {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #C85A3C;
    line-height: 1;
    margin-bottom: 0.35rem;
}
.about-stat-label {
    font-size: 0.8rem;
    color: #8A3828;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Gallery Section ─────────────────────────────────── */
.gallery-section {
    padding: 6rem 0;
    background: #FDF8F0;
}
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 220px);
    gap: 1rem;
}
.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(92, 40, 30, 0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.35s;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}
.gallery-item--tall { grid-column: 1 / 5; grid-row: 1 / 3; }
.gallery-item--wide { grid-column: 8 / 13; grid-row: 1 / 3; }
.gallery-item:nth-child(2) { grid-column: 5 / 8; grid-row: 1; }
.gallery-item:nth-child(3) { grid-column: 5 / 8; grid-row: 2; }
.gallery-item:nth-child(4) { grid-column: 1 / 5; grid-row: 1; }

/* ── Visit Section ───────────────────────────────────── */
.visit-section {
    padding: 6rem 0;
    background: #fff;
}
.visit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}
.visit-info .section-title { margin-bottom: 1rem; }
.visit-desc {
    font-size: 1rem;
    color: #8A3828;
    line-height: 1.75;
    margin-bottom: 2rem;
}
.visit-details { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2rem; }
.visit-detail {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.visit-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(200, 90, 60, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C85A3C;
    flex-shrink: 0;
}
.visit-detail-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #C85A3C;
    margin-bottom: 0.2rem;
}
.visit-detail-value {
    font-size: 0.95rem;
    color: #5C281E;
    line-height: 1.6;
}
.visit-link {
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.25s;
}
.visit-link:hover { color: #A84530; }
.visit-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.visit-map {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(92, 40, 30, 0.1);
    min-height: 420px;
}

/* ── CTA Section ─────────────────────────────────────── */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #C85A3C 0%, #A84530 50%, #8A3828 100%);
    text-align: center;
}
.cta-pretitle {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.75rem;
}
.cta-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.cta-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}
.cta-phone {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cta-phone:hover { color: #FADDD3; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
    background: #5C281E;
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 0;
}
.footer-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: start;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 280px;
    margin-top: 0.75rem;
}
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-link {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    transition: color 0.25s;
}
.footer-link:hover { color: #FADDD3; }
.footer-contact p {
    font-size: 0.85rem;
    line-height: 1.7;
    display: flex;
    align-items: center;
}
.footer-bottom {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}
.footer-bottom a {
    color: rgba(255,255,255,0.5);
    transition: color 0.25s;
}
.footer-bottom a:hover { color: #FADDD3; }

/* ── Scroll Animations ───────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 7rem;
    }
    .hero-card { max-width: 480px; }
    .about-grid,
    .visit-grid { grid-template-columns: 1fr; gap: 3rem; }
    .about-img-float { right: 1rem; bottom: -1.5rem; width: 160px; height: 160px; }
    .menu-grid { grid-template-columns: 1fr 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 2rem; }
    .footer-links { flex-direction: row; gap: 1.5rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .features-inner { grid-template-columns: 1fr 1fr; }
    .feature-item { border-right: none; border-bottom: 1px solid rgba(200, 90, 60, 0.08); }
    .feature-item:nth-child(2) { border-right: none; }
    .menu-grid { grid-template-columns: 1fr; }
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .gallery-item--tall { grid-column: 1 / 3; grid-row: auto; min-height: 280px; }
    .gallery-item--wide { grid-column: 1 / 3; grid-row: auto; min-height: 220px; }
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4) { grid-column: auto; grid-row: auto; min-height: 200px; }
    .about-img-main img { height: 360px; }
    .about-img-float { width: 130px; height: 130px; }
    .visit-cta-group { flex-direction: column; }
    .visit-cta-group .btn { width: 100%; }
}

@media (max-width: 480px) {
    .features-inner { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .about-stats { flex-direction: column; gap: 1.25rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item--tall,
    .gallery-item--wide,
    .gallery-item:nth-child(2),
    .gallery-item:nth-child(3),
    .gallery-item:nth-child(4) { grid-column: auto; min-height: 220px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transform: translateY(30px); }
    .reveal.visible { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
</style>
<sm-file path="script.js">
(function () {
    'use strict';

    // ── Navbar scroll effect ──────────────────────────────
    const nav = document.getElementById('nav');
    let lastScroll = 0;

    function handleScroll() {
        const currentScroll = window.pageYOffset;
        if (currentScroll > 60) {
            nav.classList.add('scrolled');
        } else {
            nav.classList.remove('scrolled');
        }
        lastScroll = currentScroll;
    }

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

    // ── Mobile menu ───────────────────────────────────────
    const navToggle = document.getElementById('navToggle');
    const mobileMenu = document.getElementById('mobileMenu');
    const mobileLinks = mobileMenu.querySelectorAll('a');

    function toggleMenu() {
        const isOpen = mobileMenu.classList.contains('open');
        mobileMenu.classList.toggle('open');
        navToggle.classList.toggle('active');
        navToggle.setAttribute('aria-expanded', !isOpen);
        document.body.style.overflow = isOpen ? '' : 'hidden';
    }

    navToggle.addEventListener('click', toggleMenu);
    mobileLinks.forEach(function (link) {
        link.addEventListener('click', function () {
            mobileMenu.classList.remove('open');
            navToggle.classList.remove('active');
            navToggle.setAttribute('aria-expanded', 'false');
            document.body.style.overflow = '';
        });
    });

    // ── Scroll reveal ─────────────────────────────────────
    const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

    if (!prefersReducedMotion && 'IntersectionObserver' in window) {
        const revealElements = document.querySelectorAll('.reveal');

        if (revealElements.length > 0) {
            // Set initial state via JS for progressive enhancement
            // Elements are visible by default in CSS (.reveal { opacity: 0; })
            // but we add the class via JS so they animate in
            revealElements.forEach(function (el) {
                el.classList.add('reveal');
            });

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

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

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