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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f1f5f9;
}

/* Scroll Reveal - Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        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);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Scroll Reveal - JS-driven, hidden by default for progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

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

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(8, 14, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.06);
    box-shadow: 0 1px 40px rgba(0, 0, 0, 0.4);
}

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

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

/* Smooth focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #080e1a;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Image placeholder fallback */
img {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Subtle gold shimmer animation for decorative elements */
@keyframes shimmer {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

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

.loaded #hero .font-serif,
.loaded #hero h1 {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.loaded #hero p {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.loaded #hero .flex-col {
    animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Teal gradient text utility */
.text-teal-gradient {
    background: linear-gradient(135deg, #5eead4 0%, #14b8a6 50%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism card */
.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

/* Noise texture overlay */
.noise-overlay {
    position: relative;
}

.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.noise-overlay > * {
    position: relative;
    z-index: 2;
}
