/* ============================================
   Sugar Shack — Custom Styles
   Deep Navy + Warm Gold | Vibrant Modern
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: #0A1128;
    color: #ffffff;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.06;
}

.geo-circle-1 {
    top: 15%;
    right: 5%;
    width: 400px;
    height: 400px;
    border: 2px solid #D4A843;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.geo-circle-2 {
    bottom: 20%;
    left: 3%;
    width: 250px;
    height: 250px;
    background: #D4A843;
    border-radius: 50%;
    opacity: 0.04;
    animation: float 10s ease-in-out infinite reverse;
}

.geo-square-1 {
    top: 60%;
    right: 10%;
    width: 120px;
    height: 120px;
    border: 2px solid #E8C06A;
    transform: rotate(45deg);
    animation: spin-slow 20s linear infinite;
}

.geo-triangle-1 {
    top: 40%;
    left: 8%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid #D4A843;
    opacity: 0.04;
    animation: float 12s ease-in-out infinite;
}

.geo-dots {
    bottom: 10%;
    right: 15%;
    display: grid;
    grid-template-columns: repeat(5, 8px);
    gap: 12px;
    opacity: 0.08;
}

.geo-dots span {
    width: 4px;
    height: 4px;
    background: #E8C06A;
    border-radius: 50%;
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(45deg); }
    50% { transform: translateY(-15px) rotate(45deg); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 7s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(10, 17, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
.menu-line {
    display: block;
}

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

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

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

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

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

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

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* ============================================
   Menu Tabs
   ============================================ */
.menu-tab {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    font-family: 'Space Grotesk', system-ui, sans-serif;
}

.menu-tab:hover {
    background: rgba(212, 168, 67, 0.1);
    color: #E8C06A;
    border-color: rgba(212, 168, 67, 0.3);
}

.menu-tab.active {
    background: #D4A843;
    color: #0A1128;
    border-color: #D4A843;
}

.menu-content {
    animation: fadeIn 0.4s ease;
}

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

/* ============================================
   Scroll Reveal (Progressive Enhancement)
   Only applies when JS is enabled and user prefers motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

.js-enabled @media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #E8C06A;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #ffffff;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .geo-circle-1 {
        width: 200px;
        height: 200px;
    }
    .geo-circle-2 {
        width: 150px;
        height: 150px;
    }
    .geo-square-1 {
        width: 80px;
        height: 80px;
    }
    .geo-triangle-1 {
        border-left-width: 40px;
        border-right-width: 40px;
        border-bottom-width: 69px;
    }
}
