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

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

body {
    background-color: #020617;
    color: #e2e8f0;
}

::selection {
    background-color: rgba(79, 209, 197, 0.3);
    color: #f1f5f9;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #020617;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

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

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(79, 209, 197, 0.1); }
    50% { box-shadow: 0 0 40px rgba(79, 209, 197, 0.2); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* === Floating Cards === */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

/* === Reveal Animations === */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* === Navbar === */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
}

#navbar.scrolled {
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(79, 209, 197, 0.1);
}

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

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
    color: #4fd1c5;
    transform: scale(1.05);
}

/* === Menu Lines Animation === */
.menu-line {
    transition: all 0.3s ease;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* === Button Focus === */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid #4fd1c5;
    outline-offset: 2px;
}

/* === Image optimization === */
img {
    max-width: 100%;
    height: auto;
}

/* === Responsive tweaks === */
@media (max-width: 640px) {
    .font-cinzel {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

/* === Print styles === */
@media print {
    body { background: white; color: black; }
    nav, .floating-card, #process { display: none; }
}
