/* ─────────────────────────────────────────────────────────
   RGU Landing — style.css
   Custom CSS to complement Tailwind utility classes.
   ───────────────────────────────────────────────────────── */

/* ─── DESIGN TOKENS ─────────────────────────────────────── */
:root {
    --bg-base:       #080810;
    --bg-surface:    #0c0c18;
    --bg-elevated:   #0f0f1e;
    --accent-violet: #a855f7;
    --accent-sky:    #38bdf8;
    --accent-lime:   #a3e635;
    --accent-pink:   #f472b6;
    --accent-orange: #fb923c;
    --accent-teal:   #34d399;
    --rgu-purple:    #660066;
    --text-primary:  #f8fafc;
    --text-muted:    #475569;
    --border-subtle: rgba(255,255,255,0.08);
}

/* ─── RESET ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'DM Sans', system-ui, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(168,85,247,0.30);
    color: #f8fafc;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: #080810; }
::-webkit-scrollbar-thumb { background: rgba(168,85,247,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(168,85,247,0.60); }

/* ─── KEYFRAME ANIMATIONS ────────────────────────────────── */
@keyframes cineTop    { from { transform: translateY(0); }    to { transform: translateY(-100%); } }
@keyframes cineBottom { from { transform: translateY(0); }    to { transform: translateY(100%);  } }
@keyframes ticker     { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes scrollDot  { 0%,100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(10px); opacity: .3; } }
@keyframes glowPulse  { 0%,100% { text-shadow: 0 0 60px rgba(168,85,247,.5), 0 0 120px rgba(168,85,247,.2); } 50% { text-shadow: 0 0 90px rgba(168,85,247,.8), 0 0 180px rgba(168,85,247,.3); } }
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes heroFadeR  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes scanLine   { 0% { top: -3px; } 100% { top: 100%; } }
@keyframes tagFloat   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes blobFloat  { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(20px,-15px) scale(1.04); } 66% { transform: translate(-15px,20px) scale(0.97); } }
@keyframes marquee    { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes shine      { 0% { left: -75%; } 60%,100% { left: 125%; } }
@keyframes fadeInUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale{ from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse      { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ─── HERO ELEMENTS ──────────────────────────────────────── */
.cine-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 60;
    background: black; pointer-events: none; height: 18vh;
}
.cine-top.revealed    { animation: cineTop 0.95s cubic-bezier(.76,0,.24,1) forwards; }
.cine-bottom {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 60;
    background: black; pointer-events: none; height: 18vh;
}
.cine-bottom.revealed { animation: cineBottom 0.95s cubic-bezier(.76,0,.24,1) forwards; }

.hero-glow-pulse { animation: glowPulse 4s ease-in-out infinite; }

.scan-line {
    position: absolute; left: 0; right: 0; height: 2px;
    pointer-events: none; z-index: 20; opacity: 0.05;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
    animation: scanLine 7s linear infinite;
}

.ticker-track { animation: ticker 22s linear infinite; }

.scroll-dot { animation: scrollDot 1.6s ease-in-out infinite; }

.tag-float-0 { animation: tagFloat 3.5s ease-in-out infinite 0s;    }
.tag-float-1 { animation: tagFloat 3.5s ease-in-out infinite 0.15s; }
.tag-float-2 { animation: tagFloat 3.5s ease-in-out infinite 0.3s;  }

/* Hero fade-in helpers */
.hero-fade-up-1 { animation: heroFadeUp .6s ease forwards .15s; opacity: 0; }
.hero-fade-up-2 { animation: heroFadeUp .7s ease forwards .25s; opacity: 0; }
.hero-fade-up-3 { animation: heroFadeUp .7s ease forwards .40s; opacity: 0; }
.hero-fade-up-4 { animation: heroFadeUp .7s ease forwards .52s; opacity: 0; }
.hero-fade-up-5 { animation: heroFadeUp .7s ease forwards .64s; opacity: 0; }
.hero-fade-r    { animation: heroFadeR  .8s ease forwards .50s; opacity: 0; }

/* ─── INTERSECTION OBSERVER ANIMATIONS ───────────────────── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.delay-0   { transition-delay: 0ms;   }
.delay-80  { transition-delay: 80ms;  }
.delay-160 { transition-delay: 160ms; }
.delay-240 { transition-delay: 240ms; }
.delay-320 { transition-delay: 320ms; }
.delay-400 { transition-delay: 400ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-500 { transition-delay: 500ms; }
.delay-700 { transition-delay: 700ms; }

/* ─── CARD HOVER EFFECTS ─────────────────────────────────── */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px) scale(1.02);
}

.card-top-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.card-hover:hover .card-top-glow-inner { opacity: 1; }

/* ─── PROGRESS BAR ANIMATIONS ───────────────────────────── */
.progress-bar {
    height: 100%;
    border-radius: 9999px;
    width: 0%;
    transition: width 1s ease-out 0.4s;
}
.progress-bar.animated {
    /* Width is set by inline style, this just enables the transition */
}

/* ─── GLASS ──────────────────────────────────────────────── */
.glass {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.10);
}
.glass-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 8px 32px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ─── GRID TEXTURE ───────────────────────────────────────── */
.grid-texture {
    background-image:
        linear-gradient(rgba(255,255,255,0.8) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.8) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.025;
}

/* ─── NAVBAR ─────────────────────────────────────────────── */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    transition: all 0.5s ease;
    padding: 20px 0;
    background: transparent;
}
#navbar.scrolled {
    background: rgba(8,8,16,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 10px 0;
}

.nav-link {
    position: relative;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    border-radius: 8px;
    color: rgba(255,255,255,0.68);
    text-decoration: none;
    transition: color 0.2s ease;
}
.nav-link:hover { color: #fff; }
.nav-link-underline {
    position: absolute;
    bottom: 4px; left: 50%;
    transform: translateX(-50%);
    width: 0; height: 2px;
    background: #a3e635;
    border-radius: 9999px;
    transition: width 0.3s ease;
}
.nav-link:hover .nav-link-underline { width: 20px; }

/* Mobile drawer */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* ─── OUTCOME CARD PROGRESS ──────────────────────────────── */
.outcome-progress {
    height: 2px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
    margin-top: 24px;
}
.outcome-progress-fill {
    height: 100%;
    border-radius: 9999px;
    width: 25%;
    transition: width 0.5s ease;
}

/* ─── HAPPENING FILTER ───────────────────────────────────── */
.filter-btn {
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}
.filter-btn.active {
    background: linear-gradient(90deg, #a855f7, #38bdf8);
    color: #fff;
    box-shadow: 0 4px 16px rgba(168,85,247,0.35);
    border-color: transparent;
}

/* Event card hidden state */
.event-card[data-hidden="true"] {
    display: none;
}

/* ─── RESPONSIVE OVERRIDES ───────────────────────────────── */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; width: 100%; }
    section { max-width: 100vw; overflow-x: hidden; }
}
