/* ========================================
   Community Hub Landing Page — Styles
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --gradient-main: linear-gradient(135deg, #6366f1, #3b82f6, #06b6d4);
    --gradient-reports: linear-gradient(135deg, #3b82f6, #6366f1);
    --gradient-members: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-events: linear-gradient(135deg, #f59e0b, #f43f5e);
    --gradient-comms: linear-gradient(135deg, #8b5cf6, #ec4899);
    --border-color: rgba(148, 163, 184, 0.1);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Animated Background Orbs --- */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.bg-orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-indigo);
    top: -200px;
    right: -200px;
    animation: float1 20s ease-in-out infinite alternate;
}

.bg-orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    bottom: -150px;
    left: -150px;
    animation: float2 25s ease-in-out infinite alternate;
}

.bg-orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float3 18s ease-in-out infinite alternate;
}

@keyframes float1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, 60px) scale(1.1); }
}

@keyframes float2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, -80px) scale(1.15); }
}

@keyframes float3 {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-45%, -55%) scale(0.9); }
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-main);
    border-radius: var(--radius-sm);
    color: white;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width var(--transition);
    border-radius: 2px;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 160px 24px 100px;
    display: flex;
    align-items: center;
    gap: 60px;
    min-height: 90vh;
}

.hero-content {
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-indigo);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    line-height: 1.7;
    margin-bottom: 36px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-main);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.hero-cta svg {
    transition: transform var(--transition);
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

/* Hero Visual (floating cards) */
.hero-visual {
    flex: 0.8;
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card {
    position: absolute;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: var(--shadow-glow);
    animation: floatCard 6s ease-in-out infinite alternate;
}

.hero-card .mini-icon {
    font-size: 1.6rem;
}

.hero-card-1 {
    top: 40px;
    left: 10px;
    animation-delay: 0s;
}

.hero-card-2 {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    animation-delay: -2s;
}

.hero-card-3 {
    bottom: 40px;
    left: 40px;
    animation-delay: -4s;
}

@keyframes floatCard {
    0% { transform: translateY(0); }
    100% { transform: translateY(-16px); }
}

.hero-card-2 {
    animation-name: floatCard2;
}

@keyframes floatCard2 {
    0% { transform: translateY(-50%); }
    100% { transform: translateY(calc(-50% - 16px)); }
}

/* --- Section Styles --- */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* --- Applications Grid --- */
.apps-section {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 100px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* App Card Shared */
.app-card {
    position: relative;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}

.app-card-content {
    padding: 32px 28px;
    position: relative;
    z-index: 1;
}

.app-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(99, 102, 241, 0.08), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

/* Active Card */
.app-card-active {
    cursor: pointer;
}

.app-card-active:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
}

.app-card-active:hover .app-card-glow {
    opacity: 1;
}

.app-card-active:hover .app-arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* Coming Soon Card */
.app-card-soon {
    opacity: 0.6;
}

.app-card-soon:hover {
    opacity: 0.75;
}

/* App Icon */
.app-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: white;
}

.app-icon-reports { background: var(--gradient-reports); }
.app-icon-members { background: var(--gradient-members); }
.app-icon-events { background: var(--gradient-events); }
.app-icon-comms { background: var(--gradient-comms); }

/* App Info */
.app-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.app-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Status Badge */
.app-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-live {
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.status-soon {
    background: var(--text-muted);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Arrow Indicator */
.app-arrow {
    position: absolute;
    top: 28px;
    right: 28px;
    color: var(--accent-indigo);
    opacity: 0;
    transform: translate(-8px, 8px);
    transition: all var(--transition);
}

/* --- About Section --- */
.about-section {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
}

.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 48px;
    margin-top: 16px;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* --- Contact Section --- */
.contact-section {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
    text-align: center;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 14px 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition);
}

.contact-btn:hover {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-color);
    padding: 32px 24px;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Intersection Observer based reveal */
.app-card {
    animation: fadeInUp 0.5s ease-out both;
}

.app-card:nth-child(1) { animation-delay: 0.1s; }
.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.3s; }
.app-card:nth-child(4) { animation-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 140px 24px 60px;
        min-height: auto;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-visual {
        width: 100%;
        height: 260px;
    }

    .hero-card-1 { top: 20px; left: 5%; }
    .hero-card-2 { right: 5%; }
    .hero-card-3 { bottom: 10px; left: 15%; }

    .nav-links {
        gap: 20px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .stats-row {
        gap: 36px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-visual {
        display: none;
    }

    .stats-row {
        flex-direction: column;
        gap: 24px;
    }
}
