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

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

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.08s; }
    .reveal:nth-child(3) { transition-delay: 0.16s; }
    .reveal:nth-child(4) { transition-delay: 0.24s; }
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(45, 212, 191, 0.1);
}

/* ===== HERO FLOATING CARD ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.absolute.-bottom-4.-right-4 {
    animation: float 4s ease-in-out infinite;
}

/* ===== CUSTOM SELECTION ===== */
::selection {
    background: rgba(13, 148, 136, 0.4);
    color: #f0fdfa;
}

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

/* ===== MOBILE MENU TRANSITION ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ===== CARD HOVER RISE ===== */
.group:hover {
    transform: translateY(-4px);
}

.group {
    transition: transform 0.3s ease;
}

/* ===== SMOOTH SCROLL OFFSET FOR FIXED NAV ===== */
section[id] {
    scroll-margin-top: 80px;
}

/* ===== FORM INPUT AUTOFILL OVERRIDE ===== */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0f172a inset !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9;
}
