/* =====================================================================
   NEBUKEN — Custom CSS
   Loads on top of Tailwind (CDN). Holds the bespoke utilities that the
   React build defined inline (glass-card, gold-text, animations, etc.).
   ===================================================================== */

* {
    box-sizing: border-box;
}

body {
    background-color: #0a1628;
    color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-display {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.01em;
}

.font-body {
    font-family: 'Inter', sans-serif;
}

.font-mono,
code {
    font-family: 'JetBrains Mono', monospace;
}

::selection {
    background: rgba(245, 158, 11, 0.3);
    color: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

section[id] {
    scroll-margin-top: 5rem;
}

/* =====================================================================
   Surfaces & decorative utilities
   ===================================================================== */

.glass-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gold-text {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #b45309 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-right: 11px;
    line-height: 1.3;
}

.silver-text {
    background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 50%, #64748b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.grid-pattern {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.glow-gold {
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.glow-blue {
    box-shadow: 0 0 60px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.noise {
    position: relative;
}

.noise::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.5'/></svg>");
    mix-blend-mode: overlay;
}

/* =====================================================================
   Animations
   ===================================================================== */

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50%      { transform: scale(1.6); opacity: 0.4; }
}

.pulse-dot {
    transform-origin: center;
    transform-box: fill-box;
    animation: pulse-dot 2.4s ease-in-out infinite;
}

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

.float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

/* Scroll-reveal entrance (driven by main.js IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state — toggled from JS */
#site-navbar.is-scrolled {
    background-color: rgba(10, 22, 40, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modal open/close */
#register-modal.is-open {
    display: flex;
}
#register-modal[aria-hidden="false"] {
    display: flex;
}

/* Toasts */
.nb-toast {
    pointer-events: auto;
    background: rgba(10, 22, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.nb-toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.nb-toast.is-success { border-color: rgba(16, 185, 129, 0.3); }
.nb-toast.is-error   { border-color: rgba(239,  68,  68, 0.3); }

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #1e3458;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a4677;
}

.custom-scroll::-webkit-scrollbar {
    width: 8px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
    border-radius: 999px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(251,191,36,0.9),
        rgba(217,119,6,0.9)
    );

    border-radius: 999px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(252,211,77,1),
        rgba(245,158,11,1)
    );
}