/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ===== HEADER SCROLL STATE ===== */
#site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
#site-header.scrolled .menu-line { background: #171717; }
#site-header.scrolled a:not([class*="bg-"]) { color: #171717; }

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
    display: flex;
}
#mobile-menu.closed {
    display: none;
}
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#mobile-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-toggle.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(5px, -5px);
}
.mobile-link {
    font-size: 1.75rem;
}

/* ===== HERO ANIMATIONS ===== */
.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}
.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}
.hero-desc {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}
.hero-ctas {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
}
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== REVEAL ANIMATIONS (below fold only) ===== */
.reveal {
    /* Default: visible — JS adds the animated state progressively */
}
.reveal.revealed {
    animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-subtitle, .hero-title, .hero-desc, .hero-ctas {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .reveal.revealed {
        animation: none;
        opacity: 1;
        transform: none;
    }
    img { transition: none; }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f7f7f7; }
::-webkit-scrollbar-thumb { background: #a3a3a3; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #737373; }

/* ===== SELECTION ===== */
::selection { background: #ff745f; color: white; }

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid #f02400;
    outline-offset: 2px;
}

/* ===== FORM STYLES ===== */
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='%23737373' 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: 40px;
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}
