/* CSS Variables */
:root {
    /* Colors */
    --bg-start: #020412;
    --bg-end: #0a0f24;
    --cyan: #7DF9FF;
    --cyan-bright: #7DF9FF;
    --cyan-soft: #B8F3FF;
    --lavender: #C7B7FF;
    --text-primary: rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --card-bg: rgba(0,0,0,.68);
    --card-stroke: rgba(255,255,255,.10);
    --card-shadow: 0 20px 50px rgba(0,0,0,.45);
    --card-glow: 0 0 24px rgba(125,249,255,.20);
    
    /* Fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Timing */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.8s ease;
    
    /* Spacing */
    --container-padding: 2rem;
    --section-gap: 4rem;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
    position: relative;
}

/* Background video */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.4;
    filter: blur(1px);
}

/* Film grain overlay */
.film-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.08;
    mix-blend-mode: overlay;
    background-image: 
        radial-gradient(circle at 25% 25%, #fff 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, #fff 0.5px, transparent 0.5px),
        radial-gradient(circle at 50% 50%, #fff 0.5px, transparent 0.5px);
    background-size: 4px 4px, 6px 6px, 3px 3px;
    animation: grain 0.8s steps(8) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    12.5% { transform: translate(-1px, 1px) rotate(1deg); }
    25% { transform: translate(1px, -1px) rotate(-1deg); }
    37.5% { transform: translate(-1px, -1px) rotate(1deg); }
    50% { transform: translate(1px, 1px) rotate(-1deg); }
    62.5% { transform: translate(-1px, 1px) rotate(1deg); }
    75% { transform: translate(1px, -1px) rotate(-1deg); }
    87.5% { transform: translate(-1px, -1px) rotate(1deg); }
}

/* Fog layers */
.fog-layer {
    position: fixed;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.3;
    filter: blur(40px);
}

.fog-layer-1 {
    background: radial-gradient(ellipse 800px 400px at 20% 30%, var(--cyan-soft) 0%, transparent 70%);
    animation: drift1 20s ease-in-out infinite;
}

.fog-layer-2 {
    background: radial-gradient(ellipse 600px 300px at 80% 70%, var(--lavender) 0%, transparent 70%);
    animation: drift2 25s ease-in-out infinite;
    opacity: 0.2;
}

.fog-layer-3 {
    background: radial-gradient(ellipse 400px 600px at 50% 20%, var(--cyan-bright) 0%, transparent 60%);
    animation: drift3 30s ease-in-out infinite;
    opacity: 0.15;
}

@keyframes drift1 {
    0%, 100% { transform: translate(-10%, -10%) rotate(0deg); }
    33% { transform: translate(5%, -15%) rotate(1deg); }
    66% { transform: translate(-5%, 5%) rotate(-1deg); }
}

@keyframes drift2 {
    0%, 100% { transform: translate(10%, 10%) rotate(0deg); }
    50% { transform: translate(-15%, -5%) rotate(2deg); }
}

@keyframes drift3 {
    0%, 100% { transform: translate(0%, 15%) rotate(0deg); }
    25% { transform: translate(10%, -10%) rotate(-1deg); }
    75% { transform: translate(-10%, 5%) rotate(1deg); }
}

/* Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.particle {
    position: absolute;
    background: var(--cyan-bright);
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(0.5px);
    box-shadow: 0 0 6px var(--cyan-bright);
}

/* Main container */
.main-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--container-padding);
}

/* Header */
.header {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 20;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Hero section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--cyan-soft) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(125, 249, 255, 0.3);
}

.hero-logo {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(125, 249, 255, 0.4));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { 
        opacity: 1;
        filter: drop-shadow(0 0 20px rgba(125, 249, 255, 0.4)) brightness(1);
    }
    50% { 
        opacity: 0.9;
        filter: drop-shadow(0 0 30px rgba(125, 249, 255, 0.6)) brightness(1.1);
    }
}

.ghost-reaper-image {
    max-width: 200px;
    height: auto;
    margin: 2rem auto 3rem;
    display: block;
    border-radius: 50%;
    filter: drop-shadow(0 0 15px rgba(125, 249, 255, 0.3));
    animation: ghostFloat 4s ease-in-out infinite;
}

@keyframes ghostFloat {
    0%, 100% { 
        transform: translateY(0px);
        filter: drop-shadow(0 0 15px rgba(125, 249, 255, 0.3));
    }
    50% { 
        transform: translateY(-8px);
        filter: drop-shadow(0 0 20px rgba(125, 249, 255, 0.5));
    }
}

.hero-subhead {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

.hero-tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: rgba(125, 249, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(125, 249, 255, 0.2), transparent);
    transition: left 0.6s;
}

.cta-button:hover {
    border-color: var(--cyan-bright);
    box-shadow: 
        0 0 20px rgba(125, 249, 255, 0.3),
        inset 0 0 20px rgba(125, 249, 255, 0.1);
    transform: translateY(-2px);
}

.cta-button:hover::before {
    left: 100%;
}

/* stats layout */
.stats{
    width:min(1100px,92vw);
    margin: clamp(16px,2.5vh,28px) auto 8vh;
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap: clamp(14px,2.2vw,22px);
}

@media(max-width:900px){
    .stats{ grid-template-columns:1fr; }
}

/* black glass cards with highlight */
.stat-card{
    position:relative;
    border-radius:22px;
    padding:32px 28px;
    background: linear-gradient(180deg, rgba(0,0,0,.82), var(--card-bg));
    border:1px solid var(--card-stroke);
    box-shadow: var(--card-shadow), var(--card-glow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow:hidden;
    transform: translateY(0) translateZ(0);
    animation: floatCard 6.5s ease-in-out infinite, pulseGlow 5.8s ease-in-out infinite;
    text-align: center;
}

/* soft cyan top highlight sweep */
.stat-card::before{
    content:"";
    position:absolute; 
    inset:-2px;
    background: radial-gradient(120% 60% at 50% -20%, rgba(125,249,255,.18), transparent 60%);
    pointer-events:none;
    mix-blend-mode:screen;
    opacity:.7;
}

/* stagger float for depth */
.stat-card:nth-child(2){ 
    animation-delay:.6s,.4s; 
}
.stat-card:nth-child(3){ 
    animation-delay:1.2s,.8s; 
}

/* numbers + labels */
.stat-number{
    font: 700 clamp(26px,3.6vw,40px)/1 "Space Grotesk",system-ui,sans-serif;
    color: var(--cyan);
    text-shadow: 0 0 18px rgba(125,249,255,.45);
    letter-spacing:.5px;
}

.stat-label{
    margin-top:8px;
    color: rgba(255,255,255,.78);
    font: 500 14px/1.3 Inter,system-ui,sans-serif;
}

/* hover intensifies glow */
.stat-card:hover{
    box-shadow:
        0 28px 60px rgba(0,0,0,.55),
        0 0 40px rgba(125,249,255,.32);
    transform: translateY(-4px);
    transition: transform .35s ease, box-shadow .35s ease;
}

/* motion */
@keyframes floatCard{
    0%,100%{ transform: translateY(0); }
    50%{ transform: translateY(-6px); }
}

@keyframes pulseGlow{
    0%,100%{ filter: drop-shadow(0 0 0 rgba(125,249,255,.0)); }
    50%{ filter: drop-shadow(0 0 14px rgba(125,249,255,.25)); }
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-gap: 3rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-content {
        padding: 2rem 0;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .film-grain,
    .fog-layer,
    .particle {
        animation: none;
    }
    
    .cta-button::before {
        display: none;
    }
    
    .cta-button:hover {
        transform: none;
    }
    
    .stat-card { 
        animation: none; 
    }
    .stat-card:hover { 
        transform:none; 
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --glass-border: rgba(255, 255, 255, 0.3);
    }
}

/* Focus styles for accessibility */
.cta-button:focus {
    outline: 2px solid var(--cyan-bright);
    outline-offset: 4px;
}

.cta-button:focus:not(:focus-visible) {
    outline: none;
}

.cta-button:focus-visible {
    outline: 2px solid var(--cyan-bright);
    outline-offset: 4px;
}
