/* Desert Divers Scuba Center — Custom Styles */

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

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

body {
    background-color: #fefcfb;
    color: #370613;
}

::selection {
    background-color: #b51844;
    color: #fff;
}

/* ── Navigation ── */
#nav {
    background: rgba(254, 252, 251, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(147, 15, 51, 0.08);
}

#nav.scrolled {
    background: rgba(254, 252, 251, 0.95);
    box-shadow: 0 1px 20px rgba(55, 6, 19, 0.08);
}

/* ── Mobile Menu ── */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Hero Animations ── */
.hero-line {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-line span {
    display: block;
    transform: translateY(105%);
    animation: revealText 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-line:nth-child(1) span { animation-delay: 0.1s; }
.hero-line:nth-child(2) span { animation-delay: 0.2s; }
.hero-line:nth-child(3) span { animation-delay: 0.3s; }
.hero-line:nth-child(4) span { animation-delay: 0.4s; }

.hero-eyebrow {
    animation: fadeIn 0.8s 0.5s ease both;
}

.hero-sub {
    animation: fadeIn 0.8s 0.7s ease both;
}

.hero-cta {
    animation: fadeIn 0.8s 0.9s ease both;
}

@keyframes slideUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes revealText {
    from { transform: translateY(105%); }
    to { transform: translateY(0); }
}

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

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

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

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

/* ── Form Styles ── */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(181, 24, 68, 0.15);
}

/* ── 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;
        transform: none;
    }

    .hero-line span {
        transform: none;
        animation: none;
        opacity: 1;
    }

    .hero-eyebrow, .hero-sub, .hero-cta {
        animation: none;
        opacity: 1;
    }
}

/* ── Mobile Menu Open State ── */
body.menu-open {
    overflow: hidden;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeIn 0.4s ease both;
}

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

/* ── Hamburger Animation ── */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .hero-cta {
        flex-direction: column;
    }

    .hero-cta a {
        width: 100%;
        justify-content: center;
    }
}
