/* ===== Custom Styles for Choice Cabinetry ===== */

/* Base */
*, *::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: rgba(245, 158, 11, 0.3);
    color: #faf5ff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #1a0a2e;
}
::-webkit-scrollbar-thumb {
    background: #5B2C6F;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
/* Default: all elements visible (no JS) */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

/* JS-enabled + prefers-reduced-motion: no-preference: animate on scroll */
.js.motion-ok .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.js.motion-ok .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.js.motion-ok .reveal:nth-child(2) { transition-delay: 0.1s; }
.js.motion-ok .reveal:nth-child(3) { transition-delay: 0.2s; }
.js.motion-ok .reveal:nth-child(4) { transition-delay: 0.3s; }
.js.motion-ok .reveal:nth-child(5) { transition-delay: 0.4s; }
.js.motion-ok .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(26, 10, 46, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(91, 44, 111, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.mobile-link {
    transition: opacity 0.3s ease;
}

/* ===== Floating Cards Animation ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.js.motion-ok #hero .absolute.relative {
    animation: float 6s ease-in-out infinite;
}

.js.motion-ok #hero .absolute.relative:nth-child(2) {
    animation-delay: -1s;
    animation-duration: 7s;
}

.js.motion-ok #hero .absolute.relative:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 5.5s;
}

.js.motion-ok #hero .absolute.relative:nth-child(4) {
    animation-delay: -3s;
    animation-duration: 6.5s;
}

/* ===== Form Select Arrow ===== */
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='%23a855f7' 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;
}

/* ===== Subtle line decorations ===== */
.divider-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Reduced motion ===== */
@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 !important;
        transform: none !important;
    }
}
