/* ========================================
   Family Tailor & Gift Shop — 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;
}

/* ========================================
   Geometric Shape Animations
   ======================================== */

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

.geo-circle-1 {
    width: 400px;
    height: 400px;
    border: 2px solid rgba(74, 222, 128, 0.1);
    border-radius: 50%;
    top: 10%;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.geo-circle-2 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 20%;
    left: 5%;
    animation: float 6s ease-in-out infinite reverse;
}

.geo-square-1 {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(74, 222, 128, 0.15);
    top: 30%;
    left: 8%;
    transform: rotate(45deg);
    animation: spin-slow 20s linear infinite;
}

.geo-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(74, 222, 128, 0.06);
    top: 60%;
    right: 10%;
    animation: float 7s ease-in-out infinite;
}

.geo-dots {
    width: 120px;
    height: 120px;
    background-image: radial-gradient(circle, rgba(74, 222, 128, 0.3) 1px, transparent 1px);
    background-size: 15px 15px;
    bottom: 15%;
    right: 25%;
    animation: float 5s ease-in-out infinite reverse;
}

.geo-circle-3 {
    width: 500px;
    height: 500px;
    border: 2px solid rgba(74, 222, 128, 0.06);
    border-radius: 50%;
    top: 20%;
    left: -150px;
    animation: float 10s ease-in-out infinite;
}

.geo-square-2 {
    width: 80px;
    height: 80px;
    border: 2px solid rgba(74, 222, 128, 0.1);
    bottom: 30%;
    right: 15%;
    transform: rotate(30deg);
    animation: spin-slow 15s linear infinite reverse;
}

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

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

/* ========================================
   Service Cards
   ======================================== */

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* ========================================
   Gallery Items
   ======================================== */

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: auto;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 20, 40, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ========================================
   Navbar
   ======================================== */

#navbar {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease, background-color 0.5s ease, box-shadow 0.5s ease;
}

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

/* ========================================
   Mobile Menu
   ======================================== */

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4ade80, transparent);
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-link:hover::after {
    width: 80%;
    left: 10%;
}

/* ========================================
   Scroll Reveal Animations
   (Progressive Enhancement — only active when JS runs)
   ======================================== */

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        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; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ========================================
   Custom Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a1428;
}

::-webkit-scrollbar-thumb {
    background: #1a3665;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2d5a9f;
}

/* ========================================
   Selection
   ======================================== */

::selection {
    background: rgba(74, 222, 128, 0.3);
    color: #f0f4f8;
}

/* ========================================
   Focus Styles
   ======================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* ========================================
   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;
    }
}
