/* ===== Custom Styles for CHAPIN ===== */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #f0f4f8;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-3deg); }
}

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}

.animate-pulse-delayed {
    animation-delay: 1s;
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal[data-revealed="true"] {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar ===== */
.navbar-scrolled {
    background: rgba(10, 26, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== Mobile Menu ===== */
.mobile-link {
    position: relative;
}

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

.mobile-link:hover::after {
    width: 100%;
}

/* ===== Card Hover Effects ===== */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* ===== Button Ripple ===== */
button, a {
    position: relative;
    overflow: visible;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4a843, #c48a20);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e2a832, #d4a843);
}

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

/* ===== Image Placeholder Fallback ===== */
img {
    background: linear-gradient(135deg, #1e3a5f 0%, #243b53 50%, #102a43 100%);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .font-display {
        line-height: 1.1;
    }
}

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