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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(90, 168, 143, 0.3);
    color: #f0f4f8;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #102a43;
}
::-webkit-scrollbar-thumb {
    background: #334e68;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #486581;
}

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

.floating-card:nth-child(1) {
    animation-delay: 0s;
}
.floating-card:nth-child(2) {
    animation-delay: -1.5s;
}
.floating-card:nth-child(3) {
    animation-delay: -3s;
}
.floating-card:nth-child(4) {
    animation-delay: -4.5s;
}

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

/* ===== Reveal Animations ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(32px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
}

/* ===== Nav Scroll State ===== */
.nav-scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 78, 104, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .menu-line {
    background-color: #aad0c2 !important;
}

/* ===== Mobile Menu ===== */
.mobile-menu-open #mobile-menu {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 5rem;
}

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

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

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* ===== Smooth Section Transitions ===== */
section {
    position: relative;
}

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

/* ===== Button Focus States ===== */
a:focus-visible, button:focus-visible {
    outline: 2px solid #5aa88f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }
}
