/* ============================================
   Mely Mar 2 — Custom Styles
   Classic & Elegant · Burgundy + Blush
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* ---- Skip Link ---- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 999;
    padding: 0.75rem 1.5rem;
    background: #6B1D32;
    color: #FDF8F6;
    font-family: 'Lato', sans-serif;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ---- Writing Mode (vertical text) ---- */
.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ---- Navbar ---- */
.nav {
    background: transparent;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(42, 10, 16, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(107, 29, 50, 0.3);
}

.nav.scrolled .font-serif,
.nav.scrolled .font-sans {
    color: #FDF8F6 !important;
}

.nav.scrolled .nav-link {
    color: rgba(253, 248, 246, 0.7) !important;
}

.nav.scrolled .nav-link:hover {
    color: #F2D7D9 !important;
}

.nav.scrolled .menu-line {
    background: #FDF8F6 !important;
}

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

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

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

/* ---- Mobile Menu ---- */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #ecb5b5;
    transition: width 0.3s ease;
}

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

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
#menuBtn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

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

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

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

/* ---- Stagger children ---- */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.5s; }

.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Form Focus States ---- */
input:focus,
textarea:focus {
    outline: none;
}

/* ---- Selection ---- */
::selection {
    background: rgba(107, 29, 50, 0.2);
    color: #4a131f;
}

/* ---- Print ---- */
@media print {
    .nav, #menuBtn, .skip-link {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
