/* ==========================================
   Dr. Nancy A. Spinelli — Custom Styles
   ========================================== */

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

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

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Floating Decorative Shapes
   ========================================== */
.floating-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.06;
}

.shape-circle-1 {
    width: 400px;
    height: 400px;
    background: #ffda3d;
    border-radius: 50%;
    top: 20%;
    right: -100px;
    animation: floatShape 20s ease-in-out infinite;
}

.shape-circle-2 {
    width: 250px;
    height: 250px;
    background: #b8224a;
    border-radius: 50%;
    bottom: 10%;
    left: -50px;
    animation: floatShape 25s ease-in-out infinite reverse;
}

.shape-square {
    width: 150px;
    height: 150px;
    background: #ffda3d;
    border-radius: 24px;
    top: 50%;
    left: 5%;
    transform: rotate(45deg);
    animation: floatShape 18s ease-in-out infinite;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid #b8224a;
    top: 70%;
    right: 8%;
    animation: floatShape 22s ease-in-out infinite reverse;
    opacity: 0.04;
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
    }
    50% {
        transform: translateY(15px) rotate(-3deg);
    }
    75% {
        transform: translateY(-20px) rotate(2deg);
    }
}

/* ==========================================
   Navbar
   ========================================== */
#navbar {
    background: rgba(253, 244, 246, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(154, 24, 58, 0.08);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(102, 24, 52, 0.1);
}

/* ==========================================
   Mobile Menu
   ========================================== */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

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

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

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

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

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

#menu-btn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ==========================================
   Service Cards
   ========================================== */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    border-color: rgba(255, 218, 61, 0.3);
}

/* ==========================================
   Scroll Reveal Animations
   Only applies when user prefers motion
   ========================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

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

    .reveal-left.revealed {
        opacity: 1;
        transform: translateX(0);
    }

    .reveal-scale {
        opacity: 1;
        transform: scale(1);
        transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .reveal-scale.revealed {
        opacity: 1;
        transform: scale(1);
    }
}

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

    .floating-shape {
        display: none;
    }
}

/* ==========================================
   Focus Styles
   ========================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ffda3d;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .floating-shape,
    .floating-shape,
    #navbar,
    .scroll-indicator {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}

/* ==========================================
   Small Screen Adjustments
   ========================================== */
@media (max-width: 640px) {
    .shape-square {
        display: none;
    }

    .shape-triangle {
        display: none;
    }
}

/* ==========================================
   Large Screen Adjustments
   ========================================== */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
