/* ===== THE MUSIC BOX — Custom Styles ===== */

/* Base overrides and enhancements */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background: rgba(95, 184, 152, 0.25);
    color: #14293b;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #5fb898;
    outline-offset: 2px;
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #14293b;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5fb898;
}

/* ===== Animations ===== */

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

@keyframes pulse-soft {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
}

/* Staggered animation delays for grid items */
.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* ===== Responsive Adjustments ===== */

@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    #hero .font-serif.text-5xl {
        font-size: 2.25rem;
    }

    .service-card {
        transform: none !important;
    }

    .service-card:hover {
        transform: none;
    }

    /* Reduce gallery gap on mobile */
    .gallery-item img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.25rem;
    }

    .stats-grid {
        gap: 1.5rem !important;
    }

    .font-serif.text-4xl {
        font-size: 2rem;
    }
}

/* ===== Print Styles ===== */

@media print {
    nav,
    #contact,
    .cta-gradient,
    .scroll-indicator {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
        color: #000;
    }
}

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

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .gallery-item img {
        transition: none;
    }

    .service-card {
        transition: none;
    }
}

/* ===== High Contrast ===== */

@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid currentColor;
    }

    .nav-link::after {
        display: none;
    }
}
