/* ── Base Reset & Utilities ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

/* Default visible state for no-JS */
.reveal {
    opacity: 1;
    transform: none;
}

/* ── Navbar ── */
#navbar {
    background: rgba(253, 246, 238, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(192, 114, 81, 0.08);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(61, 43, 31, 0.06);
}

/* ── Scroll line animation ── */
.scroll-line {
    animation: scrollDown 1.8s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(-100%); opacity: 0; }
    30% { opacity: 1; }
    70% { opacity: 1; }
    100% { transform: translateY(200%); opacity: 0; }
}

/* ── Mobile Menu ── */
.mobile-link {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── Hover underline for nav links ── */
nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: #C07251;
    transition: width 0.3s ease;
    margin-top: 2px;
}

nav a:hover::after {
    width: 100%;
}

/* ── Form focus styles ── */
input:focus,
textarea:focus {
    border-image: linear-gradient(to right, #C07251, #A85D3E) 1;
}

input:focus,
textarea:focus {
    border-image: none;
    border-bottom-color: #C07251;
}

/* ── Selection color ── */
::selection {
    background: rgba(192, 114, 81, 0.2);
    color: #3D2B1F;
}

/* ── Smooth image loading ── */
img {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* ── Button ripple-like hover ── */
button[type="submit"]:active {
    transform: scale(0.98);
}

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

/* ── Hamburger animation ── */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 6;
    transform: rotate(-45deg) translate(3px, -3px);
}
