/* Custom styles for Mobile Aikido Dojo */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Clip diagonal for hero background */
.clip-diagonal {
    clip-path: polygon(50% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Card elevation on hover */
.card-elevate {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-elevate:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

/* Header scroll state */
#site-header.scrolled {
    background: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu button animations */
.menu-line {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

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

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Mobile link hover */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s 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; }

/* Scroll reveal base — content always visible by default */
.reveal {
    opacity: 1;
    transform: none;
}

/* Only animate when JS adds the class and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1), transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    }

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

    /* Stagger children */
    .reveal-stagger > * {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1), transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0s; }
    .reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.08s; }
    .reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.16s; }
    .reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.24s; }
    .reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.32s; }

    .reveal-stagger.revealed > * {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232a2a2a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 2rem;
}

/* Selection color */
::selection {
    background: rgba(196, 82, 40, 0.15);
    color: #1a1a1a;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid #c45228;
    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;
    }
}

/* Print styles */
@media print {
    #site-header, #menu-btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .card-elevate {
        break-inside: avoid;
    }
}
