/* ============================================
   INFINITY AI GAMING ACADEMY — GLOBAL STYLES
   ============================================ */

/* --------------------------------------------
   1. CSS Variables & Design Tokens
   -------------------------------------------- */
:root {
    --deep-space: #030712;
    --nebula: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --neon-magenta: #e879f9;
    --neon-magenta-glow: rgba(232, 121, 249, 0.4);
    --electric-blue: #38bdf8;
    --electric-blue-glow: rgba(56, 189, 248, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 80px;
}

/* --------------------------------------------
   2. Reset & Base Styles
   -------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--deep-space);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

address {
    font-style: normal;
}

.container {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
}

/* --------------------------------------------
   3. Typography
   -------------------------------------------- */
h1, h2, h3, h4, .logo-text, .section-title, .btn {
    font-family: var(--font-display);
    letter-spacing: 0.02em;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.2;
    margin-top: 0.25em;
}

.section-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--neon-magenta);
    letter-spacing: 0.15em;
}

.lead {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 1em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--neon-magenta), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --------------------------------------------
   4. Utilities & Glassmorphism
   -------------------------------------------- */
.glass-panel {
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border-radius: 16px;
}

/* --------------------------------------------
   5. Buttons
   -------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9em 2.2em;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.btn-primary {
    background: linear-gradient(90deg, var(--neon-magenta), #d946ef);
    color: var(--deep-space);
    box-shadow: 0 0 20px var(--neon-magenta-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--neon-magenta-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--electric-blue);
    border: 1px solid var(--electric-blue);
    box-shadow: 0 0 15px var(--electric-blue-glow);
}

.btn-secondary:hover {
    background: rgba(56,189,248,0.1);
    box-shadow: 0 0 30px var(--electric-blue-glow);
}

.btn-glow {
    width: 100%;
}

/* --------------------------------------------
   6. Header & Navigation
   -------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
    background: rgba(3,7,18,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.3rem;
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--neon-magenta), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    background: linear-gradient(135deg, var(--neon-magenta), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    position: relative;
    padding: 0.25em 0;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-magenta), var(--electric-blue));
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.mobile-menu-btn.open .hamburger {
    transform: rotate(45deg);
    background: var(--neon-magenta);
}

.mobile-menu-btn.open .hamburger::before {
    top: 0;
    transform: rotate(90deg);
    background: var(--neon-magenta);
}

.mobile-menu-btn.open .hamburger::after {
    top: 0;
    opacity: 0;
}

/* --------------------------------------------
   7. Hero Section
   -------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: calc(var(--header-height) + 2rem) 1rem 4rem;
    background: radial-gradient(circle at 50% 50%, #1e1b4b 0%, #0f172a 40%, var(--deep-space) 80%);
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 0.4em 1em;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(10px);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--electric-blue);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: floatIn 1s ease-out both;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1rem;
    animation: floatIn 1s ease-out 0.15s both;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2.5rem;
    animation: floatIn 1s ease-out 0.3s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: floatIn 1s ease-out 0.45s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--electric-blue), transparent);
}

/* --------------------------------------------
   8. About / Systems Section
   -------------------------------------------- */
.about {
    position: relative;
    padding: 7rem 0;
    background: linear-gradient(180deg, var(--deep-space) 0%, #0b1221 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.holo-card {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(232,121,249,0.1), rgba(56,189,248,0.1));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(232,121,249,0.15);
    animation: float 6s ease-in-out infinite;
}

.holo-ring {
    position: absolute;
    width: 120%;
    height: 120%;
    border: 1px solid rgba(56,189,248,0.3);
    border-radius: 50%;
    animation: spin 10s linear infinite;
}

.holo-icon {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-magenta), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    cursor: default;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(56,189,248,0.1);
}

.feature-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.feature-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 5rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    backdrop-filter: blur(8px);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-magenta), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------
   9. Programs Section
   -------------------------------------------- */
.programs {
    padding: 7rem 0;
    background: var(--deep-space);
    position: relative;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.program-card {
    position: relative;
    padding: 2.5rem;
    background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.program-card:hover {
    transform: translateY(-8px);
    border-color: rgba(232,121,249,0.3);
    box-shadow: 0 20px 60px rgba(232,121,249,0.15);
}

.card-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.program-card:hover .card-glare {
    opacity: 1;
}

.program-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(56,189,248,0.4));
}

.program-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.program-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.program-meta {
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.program-meta span {
    color: var(--electric-blue);
    font-weight: 600;
}

.card-link {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--neon-magenta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color var(--transition-base);
}

.card-link:hover {
    color: #fce7f3;
    text-shadow: 0 0 12px var(--neon-magenta-glow);
}

/* --------------------------------------------
   10. Game Lab Section
   -------------------------------------------- */
.game-lab {
    padding: 7rem 0;
    background: linear-gradient(180deg, #0b1221, var(--deep-space));
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.game-card {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.game-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    border-color: rgba(232,121,249,0.25);
}

.game-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232,121,249,0.2), rgba(56,189,248,0.2));
    z-index: 1;
}

.placeholder-text {
    position: relative;
    z-index: 2;
}

.image-placeholder.magenta { background: linear-gradient(135deg, #4c1d95, #be185d); }
.image-placeholder.blue { background: linear-gradient(135deg, #1e3a8a, #0891b2); }
.image-placeholder.purple { background: linear-gradient(135deg, #581c87, #3730a3); }
.image-placeholder.cyan { background: linear-gradient(135deg, #134e4a, #0e7490); }

.game-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to top, rgba(3,7,18,0.9), transparent);
    z-index: 3;
}

.game-tags span {
    display: inline-block;
    padding: 0.35em 0.8em;
    border-radius: 6px;
    background: rgba(56,189,248,0.15);
    border: 1px solid rgba(56,189,248,0.3);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--electric-blue);
    font-family: var(--font-display);
    text-transform: uppercase;
}

.game-card-body {
    padding: 1.5rem;
}

.game-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.game-card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.game-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.game-features span {
    padding: 0.3em 0.7em;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* --------------------------------------------
   11. Contact Section
   -------------------------------------------- */
.contact {
    position: relative;
    padding: 7rem 0;
    background: radial-gradient(circle at 80% 20%, #1e1b4b 0%, var(--deep-space) 60%);
    overflow: hidden;
}

.contact-bg-canvas-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.contact-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info .section-title {
    margin-bottom: 1rem;
}

.contact-lead {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 400px;
}

.info-list {
    display: grid;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: transform var(--transition-base);
}

.info-item:hover {
    transform: translateX(4px);
    border-color: rgba(232,121,249,0.3);
}

.info-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--neon-magenta), var(--electric-blue));
    font-size: 1.1rem;
    color: var(--deep-space);
    flex-shrink: 0;
}

.info-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.info-item a, .info-item address {
    color: var(--text-primary);
    font-weight: 500;
}

.info-item a:hover {
    color: var(--electric-blue);
}

/* Form */
.contact-form {
    padding: 2.5rem;
}

.form-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.9em 1em;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--electric-blue);
    box-shadow: 0 0 20px rgba(56,189,248,0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

::placeholder {
    color: rgba(148,163,184,0.5);
}

.btn-loader {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--deep-space);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.75rem;
}

button[type="submit"].loading .btn-text {
    opacity: 0.8;
}

button[type="submit"].loading .btn-loader {
    display: inline-block;
}

.form-feedback {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.5em;
}

.form-feedback.success {
    color: var(--electric-blue);
}

.form-feedback.error {
    color: #f87171;
}

/* --------------------------------------------
   12. Footer
   -------------------------------------------- */
.site-footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: var(--deep-space);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* --------------------------------------------
   13. Keyframes
   -------------------------------------------- */
@keyframes floatIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Section entrance animation classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------
   14. Responsive Media Queries
   -------------------------------------------- */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .holo-card {
        margin-bottom: 2rem;
    }
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-list {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: calc(100vh - var(--header-height));
        background: rgba(3,7,18,0.95);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-left: 1px solid var(--glass-border);
        transition: right 0.3s ease;
    }
    .nav-list.open {
        right: 0;
    }
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .programs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    .holo-card {
        width: 220px;
        height: 220px;
    }
    .contact-form {
        padding: 1.5rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}