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

body {
    background-color: #040910;
    color: #f0f3f9;
}

::selection {
    background-color: rgba(94, 234, 173, 0.25);
    color: #f0f3f9;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #071020;
}
::-webkit-scrollbar-thumb {
    background: rgba(94, 234, 173, 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(94, 234, 173, 0.35);
}

/* ─── Animations ─── */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ─── Hero Cards ─── */
.hero-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 40px rgba(94, 234, 173, 0.06);
}

/* ─── Reveal Animations ─── */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: translate(0);
    }
}

/* ─── Header ─── */
#site-header {
    background: transparent;
}

#site-header.scrolled {
    background: rgba(4, 9, 16, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(240, 243, 249, 0.05);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.3);
}

#site-header.scrolled #site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(4, 9, 16, 0.6), transparent);
    pointer-events: none;
}

/* ─── Mobile Menu ─── */
#mobile-menu {
    animation: slideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #5eeaad;
    transition: width 0.3s ease;
}

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

/* ─── Form ─── */
#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    background-color: rgba(11, 29, 58, 0.8);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: rgba(240, 243, 249, 0.15);
}

/* ─── Success / Error States ─── */
.form-success {
    background: rgba(94, 234, 173, 0.1) !important;
    border: 1px solid rgba(94, 234, 173, 0.25) !important;
    color: #95e0c4 !important;
}

.form-error {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
}

/* ─── Input Error States ─── */
.input-error {
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2) !important;
}

/* ─── Focus Visible ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5eeaad;
    outline-offset: 2px;
}

/* ─── Utility ─── */
.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;
}

/* ─── Print ─── */
@media print {
    header, #contact, #footer { display: none; }
    body { background: white; color: black; }
    a { color: black; }
}
