/* ============================================
   Unistella888 — Custom Styles
   Classic & Elegant | Forest Green + Off-White
   ============================================ */

/* ---------- 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 {
    background-color: #1e3827;
    color: #faf9f6;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ed;
}
::-webkit-scrollbar-thumb {
    background: #9ebfa4;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4f7d5c;
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.97);
    box-shadow: 0 1px 0 rgba(30, 56, 39, 0.08);
    backdrop-filter: blur(8px);
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.9s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.9s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

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

.hero-image {
    animation: scaleIn 1.2s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-card {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1s;
    opacity: 0;
}

.hero-decor {
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

/* ---------- Reveal Animations (below fold) ---------- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Stagger children */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }
.reveal:nth-child(6) { transition-delay: 0.6s; }
.reveal:nth-child(7) { transition-delay: 0.7s; }
.reveal:nth-child(8) { transition-delay: 0.8s; }

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

.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ---------- Menu Button Animation ---------- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

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

/* ---------- Button Hover Effects ---------- */
a.group {
    position: relative;
}

/* ---------- Image hover ---------- */
.group img {
    will-change: transform;
}

/* ---------- Form Focus ---------- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(79, 125, 92, 0.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;
    }
}

/* ---------- Print ---------- */
@media print {
    #navbar, #menuBtn, .reveal {
        display: none !important;
    }
    body {
        color: #1e3827;
        background: white;
    }
}
