/* SERUM SYSTEMS - MASTER STYLESHEET 
    Features: Border Beam, Staggered Reveals, Premium Starfield
*/

:root {
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.2);
    --bg: #010204;
    --card-bg: rgba(10, 10, 15, 0.15);
}

/* Modern Angle Property for Smooth Rim Animation */
@property --border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

/* Base Reset */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    cursor: default;
}

/* Canvas Positioning */
#antigravity-canvas {
    position: fixed;
    inset: 0;
    z-index: 10; /* Behind UI (100+) but above background */
    pointer-events: none;
}

/* Premium Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { 
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 10px; 
    transition: 0.3s;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

html { scroll-behavior: initial; } /* Let Lenis handle it */
::selection { background: var(--accent); color: #000; }

body {
    background-color: var(--bg);
    background-image: radial-gradient(circle at 50% 0%, #050a14 0%, var(--bg) 100%);
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 
   Lightning Flash: Using a pseudo-element overlay 
   This allows UI elements with higher z-index to stay static 
*/
body::after {
    content: '';
    position: fixed;
    inset: 0;
    /* Enhanced background to simulate a lightning burst */
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.9) 0%, /* Bright center */
        rgba(0, 212, 255, 0.8) 5%,  /* Electric blue core */
        rgba(0, 212, 255, 0.4) 20%, /* Fading blue glow */
        transparent 50% /* Transparent outer */
    );
    opacity: 0;
    z-index: 50; /* Above content, below Nav/Announcement */
    pointer-events: none;
    mix-blend-mode: overlay;
    /* Sharper transition for a more impactful flash */
    transition: opacity 0.08s ease-out, filter 0.08s ease-out;
    filter: blur(0px); /* Base state for filter */
}
body.lightning-flash::after { 
    opacity: 0.8; /* More intense flash */
    filter: blur(2px); /* Subtle blur during flash */
}

/* Glassmorphism Global Refinement */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

a, button { cursor: pointer; transition: all 0.3s ease; text-decoration: none; color: inherit; }

/* --- NAVIGATION & ANNOUNCEMENT --- */
.announcement-bar { 
    position: absolute; /* Moves away on scroll to avoid mixing */
    top: 0; width: 100%; z-index: 100; height: 32px; 
    overflow: hidden; display: flex; align-items: center;
    background: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.marquee-content {
    display: flex; white-space: nowrap; gap: 4rem;
    animation: marquee 30s linear infinite; padding-left: 100%;
    font-size: 11px; letter-spacing: 1px; font-weight: 700;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

#main-nav {
    position: fixed; 
    top: 48px; /* Start below announcement */
    width: 100%; z-index: 110; /* Higher than lightning */
    padding: 0 24px; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#nav-container {
    max-width: 1280px; margin: 0 auto; display: flex;
    justify-content: space-between; align-items: center;
    background: rgba(10, 10, 15, 0.3); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px; padding: 10px 32px; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link {
    font-size: 14px; font-weight: 500; opacity: 0.6;
    position: relative;
}
.nav-link:hover, .nav-link.active { opacity: 1; color: var(--accent); }
.nav-link::after {
    content: ''; position: absolute; bottom: -4px; left: 50%; width: 0; height: 2px;
    background: var(--accent); transition: 0.3s; transform: translateX(-50%);
}
.nav-link.active::after { width: 100%; }

#main-nav.scrolled { top: 10px; }
#main-nav.scrolled #nav-container {
    padding: 6px 24px; background: rgba(2, 4, 8, 0.7);
    border-color: rgba(0, 212, 255, 0.1);
}

/* Mobile Navigation Fixes */
@media (max-width: 768px) {
    #nav-container {
        padding: 8px 16px;
        border-radius: 20px;
    }
    .nav-links {
        gap: 12px;
    }
    .nav-link {
        font-size: 11px;
    }
    .logo-text {
        font-size: 14px;
    }
    .announcement-bar { height: 28px; }
    .marquee-content { font-size: 9px; }
}

/* --- THE CONIC BORDER BEAM (Cyan & White) --- */
.glow-box {
    position: relative;
    padding: 3rem;
    border-radius: 2.5rem;
    background: transparent;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    z-index: 60; /* Higher than lightning flash to remain stable */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border 0.3s;
}

@media (max-width: 768px) {
    .glow-box { padding: 1.5rem; border-radius: 1.5rem; }
}

.glow-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px; /* The thickness of the rim light */
    /* Conic gradient that rotates around the rim */
    background: conic-gradient(from var(--border-angle), transparent 80%, #00d4ff, #ffffff, #00d4ff, transparent 95%);
    
    /* THE FIX: This mask "punches a hole" in the center of the light */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    
    animation: border-rotate 3s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

.glow-box:hover::before { opacity: 1; }
.glow-box:hover { transform: translateY(-8px); }

@keyframes border-rotate {
    from { --border-angle: 0deg; }
    to { --border-angle: 360deg; }
}

/* --- REVEAL ANIMATIONS (Staggered) --- */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: 1s cubic-bezier(0.2, 1, 0.3, 1); 
}

.reveal-left { 
    opacity: 0; 
    transform: translateX(-100px); 
    transition: 1.2s cubic-bezier(0.2, 1, 0.3, 1); 
}

.reveal-right { 
    opacity: 0; 
    transform: translateX(100px); 
    transition: 1.2s cubic-bezier(0.2, 1, 0.3, 1); 
}

.reveal.active, .reveal-left.active, .reveal-right.active { 
    opacity: 1; 
    transform: translate(0, 0); 
}

/* --- TEAM SECTION --- */
.member-avatar { transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.member-card:hover .member-avatar { transform: scale(1.1) rotate(5deg); box-shadow: 0 0 20px var(--accent-glow); }
.team-grid { display: flex; flex-direction: column; gap: 40px; max-width: 900px; margin: 0 auto; }
.member-card { display: flex; align-items: center; gap: 30px; padding: 20px; border-radius: 2rem; }
.member-card:hover { background: rgba(255, 255, 255, 0.02); }

@media (min-width: 768px) {
    .member-card.right-align { flex-direction: row-reverse; text-align: right; }
}

.member-avatar {
    width: 80px; height: 80px; border-radius: 20px;
    background: linear-gradient(45deg, #00d4ff, #ffffff);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* --- ROADMAP --- */
.roadmap-container { position: relative; max-width: 1000px; margin: 0 auto; }
.roadmap-line {
    position: absolute; left: 20px; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(to bottom, var(--accent), transparent);
}

@media (min-width: 768px) { .roadmap-line { left: 50%; transform: translateX(-50%); } }

.roadmap-item { position: relative; margin-bottom: 4rem; width: 100%; }
.roadmap-dot {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; background: var(--bg);
    border: 2px solid var(--accent); border-radius: 50%; z-index: 10;
}

.roadmap-dot.active {
    box-shadow: 0 0 20px var(--accent);
    animation: pulse-cyan 2s infinite;
}

@keyframes pulse-cyan {
    0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(0, 212, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

@media (min-width: 768px) { .roadmap-dot { left: 50%; transform: translate(-50%, -50%); } }

/* --- GALLERY --- */
.gallery-item {
    border-radius: 1.5rem; overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #000; aspect-ratio: 16/9;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    opacity: 0.7; transition: 0.6s ease;
}
.gallery-item:hover img { opacity: 1; transform: scale(1.05); }

/* --- TYPOGRAPHY & UTILS --- */
.text-gradient { 
    background: linear-gradient(to right, #ffffff, #00d4ff, #0088aa); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
}

.tag {
    padding: 6px 14px; background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2); border-radius: 99px;
    font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--accent);
}
