/* ============================================
   Wear It Again Sam Kids Consignment
   Custom Styles
   ============================================ */

/* --- Base & Reset --- */
*, *::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: #C2704E;
    color: #FDF8F0;
}

/* --- Navigation --- */
.nav-logo-text,
.nav-logo-sub {
    transition: color 0.3s ease;
}

#navbar.scrolled .nav-logo-text {
    color: #3B2314;
}

#navbar.scrolled .nav-logo-sub {
    color: #84532E;
}

#navbar.transparent .nav-logo-text {
    color: #FDF8F0;
}

#navbar.transparent .nav-logo-sub {
    color: #EDC9A0;
}

#navbar.transparent .menu-line {
    background: #FDF8F0;
}

#navbar.scrolled .menu-line {
    background: #3B2314;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(194, 112, 78, 0.1);
}

#navbar:not(.scrolled) {
    background: transparent;
}

/* Mobile menu active state */
body.menu-open {
    overflow: hidden;
}

.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

body.menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

body.menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
body.menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
body.menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
body.menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
body.menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* --- Hero --- */
.hero-eyebrow {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

.hero-headline {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
}

.hero-subhead {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-ctas {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 48px; }
    50% { opacity: 0.8; height: 64px; }
}

/* --- Section Eyebrow --- */
.section-eyebrow {
    letter-spacing: 0.2em;
}

/* --- CTA Buttons --- */
.cta-primary {
    position: relative;
    overflow: hidden;
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-secondary {
    backdrop-filter: blur(4px);
}

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

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

.reveal[data-delay="100"] {
    transition-delay: 0.1s;
}

.reveal[data-delay="200"] {
    transition-delay: 0.2s;
}

.reveal[data-delay="300"] {
    transition-delay: 0.3s;
}

/* --- Step Cards --- */
.step-card {
    transition: background-color 0.5s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(194, 112, 78, 0.2);
}

/* --- Category Cards --- */
.category-card {
    cursor: pointer;
}

.category-card .group-hover\:block {
    display: none;
}

.category-card:hover .group-hover\:block {
    display: block;
    animation: fadeUp 0.3s ease forwards;
}

/* --- Form --- */
#contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2384532E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    border-color: #C2704E;
    box-shadow: 0 0 0 3px rgba(194, 112, 78, 0.1);
}

/* --- Utility --- */
@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 {
        opacity: 1;
        transform: none;
    }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C2704E;
    outline-offset: 2px;
}

/* --- Print --- */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
