/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

/* ── Scroll Reveal ── */
.scroll-into-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.scroll-into-view.revealed {
    opacity: 1;
    transform: translateY(0);
}
.scroll-into-view:not(.revealed) {
    opacity: 1;
    transform: translateY(20px);
}

/* ── Floating Cards Animation ── */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(-0.5deg); }
}
@keyframes float-3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(0.3deg); }
}
@keyframes float-4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(-0.3deg); }
}

.floating-card-1 { animation: float-1 6s ease-in-out infinite; }
.floating-card-2 { animation: float-2 7s ease-in-out infinite; }
.floating-card-3 { animation: float-3 5.5s ease-in-out infinite; }
.floating-card-4 { animation: float-4 6.5s ease-in-out infinite; }

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#navbar.scrolled {
    background: rgba(6, 15, 12, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 83, 0.08);
}

/* ── Mobile Menu ── */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Gold Line Underline on Headings ── */
h2 span.text-cream-400 {
    position: relative;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #060f0c; }
::-webkit-scrollbar-thumb { background: rgba(212, 168, 83, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 168, 83, 0.4); }

/* ── Selection ── */
::selection { background: rgba(212, 168, 83, 0.3); color: #fefcf3; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .floating-card-1, .floating-card-2, .floating-card-3, .floating-card-4 {
        animation: none;
    }
    html { scroll-behavior: auto; }
    .scroll-into-view:not(.revealed) {
        opacity: 1;
        transform: none;
    }
}

/* ── Focus Visible ── */
:focus-visible {
    outline: 2px solid rgba(212, 168, 83, 0.6);
    outline-offset: 2px;
}
