/* ============================================
   Gilmer Donuts — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* --- Navbar --- */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-fixed.scrolled {
    background-color: rgba(250, 250, 248, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(123, 45, 139, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-fixed .nav-link {
    color: rgba(123, 45, 139, 0.6) !important;
}

.nav-fixed .nav-link:hover {
    color: rgba(123, 45, 139, 0.9) !important;
}

.nav-fixed .nav-link::after {
    background-color: rgba(123, 45, 139, 0.6);
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(250, 250, 248, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(123, 45, 139, 0.08);
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu.hidden {
    display: none;
    animation: none;
}

.mobile-menu-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(123, 45, 139, 0.06);
    transition: color 0.2s ease;
}

.mobile-menu-link:hover {
    color: #7B2D8B;
}

/* --- Hero --- */
.hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(35, 8, 40, 0.45) 0%,
        rgba(35, 8, 40, 0.55) 50%,
        rgba(35, 8, 40, 0.75) 100%
    );
}

.hero-content {
    padding-top: 80px;
}

.hero-eyebrow {
    animation: fadeUp 0.8s ease 0.2s both;
}

.hero-title {
    animation: fadeUp 0.8s ease 0.4s both;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease 0.6s both;
}

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

.hero-scroll {
    animation: fadeUp 0.8s ease 1.2s both;
}

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

/* --- Buttons --- */
.btn-primary {
    box-shadow: 0 4px 20px rgba(212, 160, 23, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(212, 160, 23, 0.4);
    transform: translateY(-1px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* --- Menu Items --- */
.menu-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(123, 45, 139, 0.08);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover .menu-img {
    transform: scale(1.05);
}

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

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Reduced motion — animations are progressive enhancement */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-eyebrow,
    .hero-title,
    .hero-subtitle,
    .hero-cta,
    .hero-scroll {
        animation: none;
        opacity: 1;
    }
}

/* --- Scroll-triggered reveals (applied via JS) --- */
.js-enabled .reveal-up,
.js-enabled .reveal-left,
.js-enabled .reveal-right {
    opacity: 0;
}

.js-enabled .reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.js-enabled .reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.js-enabled .reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Mobile menu button --- */
#menu-toggle:hover .menu-line {
    background-color: #7B2D8B;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Utility --- */
::selection {
    background-color: rgba(123, 45, 139, 0.15);
    color: #370f3f;
}
