/* ==========================================
   THE CHAPTER CO. — Custom Styles
   ========================================== */

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

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

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: rgba(245, 166, 35, 0.3);
    color: #fff;
}

/* ==========================================
   GEOMETRIC SHAPES — Hero Section
   ========================================== */

.geo-shape {
    position: absolute;
    opacity: 0.12;
    pointer-events: none;
}

.shape-circle-1 {
    width: 400px;
    height: 400px;
    border: 2px solid #F5A623;
    border-radius: 50%;
    top: -100px;
    right: -80px;
    animation: float-slow 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 200px;
    height: 200px;
    background: #F5A623;
    border-radius: 50%;
    bottom: 15%;
    left: 5%;
    animation: float-medium 14s ease-in-out infinite;
}

.shape-circle-3 {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 40%;
    right: 10%;
    animation: float-slow 18s ease-in-out infinite reverse;
}

.shape-square-1 {
    width: 100px;
    height: 100px;
    background: rgba(245, 166, 35, 0.15);
    border-radius: 20px;
    top: 20%;
    left: 8%;
    transform: rotate(45deg);
    animation: float-medium 16s ease-in-out infinite;
}

.shape-square-2 {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    bottom: 25%;
    right: 20%;
    transform: rotate(20deg);
    animation: float-slow 12s ease-in-out infinite reverse;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 86px solid rgba(245, 166, 35, 0.1);
    top: 60%;
    left: 15%;
    animation: float-medium 15s ease-in-out infinite;
}

.shape-ring-1 {
    width: 280px;
    height: 280px;
    border: 3px solid rgba(245, 166, 35, 0.08);
    border-radius: 50%;
    bottom: -50px;
    right: 5%;
    animation: float-slow 22s ease-in-out infinite;
}

/* Floating Animations */
@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(3deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
    75% { transform: translateY(-25px) rotate(1deg); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(5deg); }
    66% { transform: translateY(-25px) rotate(-3deg); }
}

/* ==========================================
   NAVBAR
   ========================================== */

#navbar {
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

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

/* ==========================================
   MOBILE MENU
   ========================================== */

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

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s 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.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ==========================================
   PRODUCT CARDS — Hover Effects
   ========================================== */

.group:hover .group-hover\:rotate-6 {
    transform: rotate(6deg) scale(1.05);
}

/* ==========================================
   FORM STYLES
   ========================================== */

select option {
    background: #2A1124;
    color: #fff;
}

/* ==========================================
   FOCUS VISIBLE
   ========================================== */

:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 2px;
}

/* ==========================================
   RESPONSIVE TWEAKS
   ========================================== */

@media (max-width: 640px) {
    .shape-circle-1 {
        width: 200px;
        height: 200px;
    }
    
    .shape-circle-2 {
        width: 100px;
        height: 100px;
    }
    
    .shape-square-1 {
        width: 50px;
        height: 50px;
    }
    
    .shape-triangle-1 {
        border-left: 30px solid transparent;
        border-right: 30px solid transparent;
        border-bottom: 52px solid rgba(245, 166, 35, 0.1);
    }
    
    .shape-ring-1 {
        width: 150px;
        height: 150px;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    .geo-shape,
    .shape-circle-1,
    .shape-circle-2,
    .shape-circle-3,
    .shape-square-1,
    .shape-square-2,
    .shape-triangle-1,
    .shape-ring-1 {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
