/* ========================================
   TC Nails & Spa — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(77, 158, 120, 0.2);
    color: #1a2332;
}

/* ========================================
   Navigation
   ======================================== */
.nav-link {
    color: rgba(26, 35, 50, 0.6);
}

/* Light nav links (when on dark hero) */
nav[data-scrolled="true"] .nav-link,
nav[data-light="false"] .nav-link {
    color: rgba(255, 255, 255, 0.6);
}

nav[data-light="true"] .nav-link {
    color: rgba(26, 35, 50, 0.6);
}

nav[data-scrolled="true"] .nav-link:hover,
nav[data-light="false"] .nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

nav[data-light="true"] .nav-link:hover {
    color: rgba(26, 35, 50, 1);
}

/* Navbar icon/logo color */
nav[data-scrolled="true"] .logo-icon,
nav[data-light="false"] .logo-icon {
    color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 0.4);
}

nav[data-light="true"] .logo-icon {
    color: rgba(26, 35, 50, 1);
    border-color: rgba(26, 35, 50, 0.3);
}

nav[data-scrolled="true"] .logo-text,
nav[data-light="false"] .logo-text {
    color: rgba(255, 255, 255, 1);
}

nav[data-light="true"] .logo-text {
    color: rgba(26, 35, 50, 1);
}

nav[data-scrolled="true"] .logo-sub,
nav[data-light="false"] .logo-sub {
    color: rgba(255, 255, 255, 0.5);
}

nav[data-light="true"] .logo-sub {
    color: rgba(26, 35, 50, 0.5);
}

/* Mobile menu button */
.menu-line {
    background: currentColor;
}

nav[data-light="false"] .menu-line {
    background: rgba(255, 255, 255, 0.8);
}

nav[data-light="true"] .menu-line {
    background: rgba(26, 35, 50, 0.8);
}

/* Mobile menu active state */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.active .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
}

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

/* ========================================
   Hero Animations
   ======================================== */
.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.5s forwards;
    opacity: 0;
}

.hero-description {
    animation: fadeInUp 0.8s ease 0.7s forwards;
    opacity: 0;
}

.hero-cta {
    animation: fadeInUp 0.8s ease 0.9s forwards;
    opacity: 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========================================
   Scroll Reveal (progressive enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    /* Stagger children */
    .reveal-grid > *:nth-child(1) { transition-delay: 0ms; }
    .reveal-grid > *:nth-child(2) { transition-delay: 100ms; }
    .reveal-grid > *:nth-child(3) { transition-delay: 200ms; }
    .reveal-grid > *:nth-child(4) { transition-delay: 300ms; }
    .reveal-grid > *:nth-child(5) { transition-delay: 400ms; }
    .reveal-grid > *:nth-child(6) { transition-delay: 500ms; }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transition: background-color 0.5s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
textarea:focus,
select:focus {
    border-color: #4d9e78 !important;
}

input::placeholder,
textarea::placeholder {
    color: #9fb3c8;
    font-weight: 300;
}

/* ========================================
   Image Hover Effects
   ======================================== */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================================
   Utility
   ======================================== */
.no-scroll {
    overflow: hidden;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-description {
        font-size: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5.5rem;
    }
}

/* ========================================
   Focus Visible (Accessibility)
   ======================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #4d9e78;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    nav, .hero-cta, #contact-form, button {
        display: none !important;
    }

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

    .bg-midnight-950, .bg-midnight-900 {
        background: #fff !important;
        color: #000 !important;
    }
}
