/* ============================================
   Ruby's Ready To Wear — Custom Styles
   ============================================ */

/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #2D4A3E;
    color: #FDFBF7;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6EF;
}
::-webkit-scrollbar-thumb {
    background: #2D4A3E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3a6238;
}

/* ── Navbar ── */
#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(45, 74, 62, 0.08);
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #C8A96E;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Mobile Menu ── */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}
#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ── Hero Animations ── */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-content:nth-child(2) {
    animation-delay: 0.15s;
}
.hero-content:nth-child(3) {
    animation-delay: 0.3s;
}
.hero-content:nth-child(4) {
    animation-delay: 0.4s;
}

.hero-image {
    opacity: 0;
    transform: translateX(40px);
    animation: heroSlideIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes heroSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Initial state — only animated when JS adds .revealed */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Service Cards ── */
.group:hover .group-hover\:-rotate-2 {
    transform: rotate(-2deg);
}
.group:hover .group-hover\:translate-x-1 {
    transform: translateX(4px);
}

/* ── Gallery Hover ── */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* ── Button Effects ── */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ── Form Styling ── */
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='%232D4A3E' 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;
}

/* ── Utility ── */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}
