/* ===== Yuanye International Exploration Education Camp ===== */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #f0d48a;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0c;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c9a227, #8c2525);
    border-radius: 4px;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseSlow {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.35;
        transform: scale(1.05);
    }
}

@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        height: 48px;
        opacity: 1;
    }
    100% {
        height: 48px;
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulseSlow 4s ease-in-out infinite;
}

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

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ---- Vertical text ---- */
.write-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.25em;
}

/* ---- Navigation ---- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(5, 5, 7, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 162, 39, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, #c9a227, #f0d48a);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #f0d48a !important;
}

/* ---- Mobile Menu ---- */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu:not(.open) {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #c9a227;
    transition: width 0.3s ease;
}

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

/* ---- Mobile Menu Button ---- */
#mobileMenuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobileMenuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobileMenuBtn.active .menu-line:nth-child(3) {
    width: 6;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ---- Form Elements ---- */
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='%23c9a227' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select option {
    background: #0a0a0c;
    color: #e5e5e5;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(201, 162, 39, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1) !important;
}

/* ---- Gold Gradient Text Utility ---- */
.text-gold-gradient {
    background: linear-gradient(135deg, #f0d48a, #c9a227, #e0b850);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* ---- Button Focus States ---- */
button:focus-visible, a:focus-visible {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .write-vertical {
        display: none;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    #hero h1 br {
        display: none;
    }
}

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

/* ---- Print ---- */
@media print {
    body {
        background: white;
        color: black;
    }
    
    #navbar, .animate-fade-up {
        display: none;
    }
}
