/* ============================================================
   TOGETHER Project — CSS-Only Image Replacements
   Replaces 13 placeholder images with pure CSS visual treatments
   ============================================================
   Uses gradients, SVG data URIs, pseudo-elements, and keyframe
   animations to create rich backgrounds without any image files.
   ============================================================ */


/* ==========================================================================
   1. KEYFRAME ANIMATIONS — Shared across components
   ========================================================================== */

@keyframes float-gentle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%      { transform: translateY(-12px) rotate(1deg); }
    66%      { transform: translateY(6px) rotate(-0.5deg); }
}

@keyframes float-drift {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(15px, -10px); }
    50%      { transform: translate(-5px, -20px); }
    75%      { transform: translate(-15px, -5px); }
}

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

@keyframes pulse-subtle {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.7; }
}

@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes mesh-shift {
    0%, 100% {
        background-position:
            0% 0%,
            100% 100%,
            50% 50%;
    }
    33% {
        background-position:
            30% 20%,
            70% 80%,
            50% 50%;
    }
    66% {
        background-position:
            10% 80%,
            90% 20%,
            50% 50%;
    }
}


/* ==========================================================================
   2. SVG DATA URI PATTERNS — Reusable geometric patterns
   ========================================================================== */

:root {
    /* Dot grid pattern — subtle, institutional */
    --pattern-dots: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='rgba(255,255,255,0.07)'/%3E%3C/svg%3E");

    /* Hexagon pattern */
    --pattern-hex: url("data:image/svg+xml,%3Csvg width='60' height='52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 1L56 14.5V39.5L30 51L4 39.5V14.5Z' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");

    /* Circle ring pattern */
    --pattern-circles: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='20' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");

    /* Diagonal lines */
    --pattern-diag: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40L40 0' fill='none' stroke='rgba(255,255,255,0.035)' stroke-width='1'/%3E%3C/svg%3E");

    /* Connected nodes/network */
    --pattern-network: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='2' fill='rgba(255,255,255,0.06)'/%3E%3Ccircle cx='90' cy='50' r='2' fill='rgba(255,255,255,0.06)'/%3E%3Ccircle cx='50' cy='90' r='2' fill='rgba(255,255,255,0.06)'/%3E%3Cline x1='10' y1='10' x2='90' y2='50' stroke='rgba(255,255,255,0.03)' stroke-width='0.5'/%3E%3Cline x1='90' y1='50' x2='50' y2='90' stroke='rgba(255,255,255,0.03)' stroke-width='0.5'/%3E%3Cline x1='50' y1='90' x2='10' y2='10' stroke='rgba(255,255,255,0.03)' stroke-width='0.5'/%3E%3C/svg%3E");

    /* Wave pattern */
    --pattern-wave: url("data:image/svg+xml,%3Csvg width='120' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20Q30 0 60 20T120 20' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1'/%3E%3C/svg%3E");
}


/* ==========================================================================
   3. HERO BACKGROUND — Replaces hero-bg.jpg
   Multi-layer mesh gradient with animated geometric overlay
   ========================================================================== */

.hero-header {
    /* Remove dependency on any background-image */
    background-image: none !important;

    /* Layered mesh gradient background */
    background:
        /* Dot grid for texture */
        var(--pattern-dots),
        /* Teal glow — bottom left */
        radial-gradient(ellipse 60% 50% at 15% 80%, rgba(13, 124, 102, 0.4) 0%, transparent 70%),
        /* Blue glow — top right */
        radial-gradient(ellipse 50% 60% at 85% 20%, rgba(29, 161, 212, 0.3) 0%, transparent 70%),
        /* Magenta accent — subtle, center-right */
        radial-gradient(ellipse 30% 40% at 70% 60%, rgba(212, 38, 110, 0.15) 0%, transparent 60%),
        /* Teal secondary — top left */
        radial-gradient(ellipse 40% 30% at 20% 15%, rgba(17, 163, 133, 0.2) 0%, transparent 60%),
        /* Dark base */
        linear-gradient(160deg, #0a1420 0%, #0F1B2D 40%, #0d2538 100%);
}

/* Floating geometric shapes overlay */
.hero-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0.6;
    background:
        /* Large hexagon — top right */
        url("data:image/svg+xml,%3Csvg width='200' height='180' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100 5L190 50V130L100 175L10 130V50Z' fill='none' stroke='rgba(29,161,212,0.12)' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat calc(100% - 8vw) 15%,
        /* Medium circle — left */
        url("data:image/svg+xml,%3Csvg width='140' height='140' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='70' cy='70' r='60' fill='none' stroke='rgba(13,124,102,0.1)' stroke-width='1.5'/%3E%3Ccircle cx='70' cy='70' r='40' fill='none' stroke='rgba(13,124,102,0.06)' stroke-width='1'/%3E%3C/svg%3E") no-repeat 8vw 60%,
        /* Small hexagon — bottom center */
        url("data:image/svg+xml,%3Csvg width='80' height='70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 3L76 21V55L40 67L4 55V21Z' fill='none' stroke='rgba(212,38,110,0.08)' stroke-width='1'/%3E%3C/svg%3E") no-repeat 45% 78%,
        /* Dot cluster — top left */
        url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='30' r='3' fill='rgba(255,255,255,0.08)'/%3E%3Ccircle cx='60' cy='15' r='2' fill='rgba(255,255,255,0.06)'/%3E%3Ccircle cx='90' cy='50' r='2.5' fill='rgba(255,255,255,0.07)'/%3E%3Ccircle cx='40' cy='80' r='2' fill='rgba(255,255,255,0.05)'/%3E%3Ccircle cx='100' cy='95' r='3' fill='rgba(255,255,255,0.06)'/%3E%3C/svg%3E") no-repeat 15% 20%,
        /* Diamond — right center */
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L55 30L30 55L5 30Z' fill='none' stroke='rgba(29,161,212,0.08)' stroke-width='1'/%3E%3C/svg%3E") no-repeat calc(100% - 15vw) 50%;
    animation: float-gentle 20s ease-in-out infinite;
    pointer-events: none;
}


/* ==========================================================================
   4. PAGE HEADER BACKGROUNDS — Replaces 6 *-header-bg.jpg images
   Each page gets unique gradient + pattern combo
   ========================================================================== */

/* Base: remove any inline background-image dependency */
.page-header[class*="page-header--"] {
    background-image: none !important;
}

/* ── About page ── */
.page-header--about {
    background:
        var(--pattern-circles),
        radial-gradient(ellipse 50% 60% at 20% 70%, rgba(13, 124, 102, 0.35) 0%, transparent 70%),
        radial-gradient(ellipse 40% 50% at 80% 30%, rgba(29, 161, 212, 0.2) 0%, transparent 60%),
        linear-gradient(150deg, #0a1420 0%, #0F1B2D 50%, #0d2235 100%);
}

/* ── Team page ── */
.page-header--team {
    background:
        var(--pattern-hex),
        radial-gradient(ellipse 50% 50% at 75% 60%, rgba(29, 161, 212, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 35% 45% at 15% 40%, rgba(13, 124, 102, 0.25) 0%, transparent 60%),
        linear-gradient(170deg, #0F1B2D 0%, #0d2538 60%, #0a1e30 100%);
}

/* ── News page ── */
.page-header--news {
    background:
        var(--pattern-diag),
        radial-gradient(ellipse 45% 55% at 60% 40%, rgba(212, 38, 110, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 30% 70%, rgba(13, 124, 102, 0.3) 0%, transparent 65%),
        linear-gradient(140deg, #0F1B2D 0%, #0d1f32 60%, #0a1825 100%);
}

/* ── Timeline page ── */
.page-header--timeline {
    background:
        var(--pattern-dots),
        radial-gradient(ellipse 55% 45% at 40% 50%, rgba(17, 163, 133, 0.25) 0%, transparent 65%),
        radial-gradient(ellipse 35% 50% at 85% 70%, rgba(29, 161, 212, 0.2) 0%, transparent 60%),
        linear-gradient(165deg, #0a1420 0%, #0F1B2D 45%, #0d2235 100%);
}

/* ── Contact page ── */
.page-header--contact {
    background:
        var(--pattern-wave),
        radial-gradient(ellipse 50% 55% at 25% 50%, rgba(13, 124, 102, 0.35) 0%, transparent 65%),
        radial-gradient(ellipse 40% 40% at 80% 30%, rgba(212, 38, 110, 0.1) 0%, transparent 55%),
        linear-gradient(155deg, #0F1B2D 0%, #0d2538 50%, #0a2030 100%);
}

/* ── Community of Practice page ── */
.page-header--cop {
    background:
        var(--pattern-network),
        radial-gradient(ellipse 45% 55% at 70% 50%, rgba(29, 161, 212, 0.25) 0%, transparent 65%),
        radial-gradient(ellipse 40% 45% at 20% 60%, rgba(13, 124, 102, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 25% 30% at 50% 20%, rgba(212, 38, 110, 0.1) 0%, transparent 50%),
        linear-gradient(160deg, #0a1420 0%, #0F1B2D 40%, #0d2538 100%);
}


/* ==========================================================================
   5. CTA SECTION BACKGROUND — Replaces cta-bg.jpg
   Rich layered mesh gradient with decorative floating shapes
   ========================================================================== */

.cta-section {
    /* Remove dependency on background-image */
    background-image: none !important;
    background:
        var(--pattern-dots),
        radial-gradient(ellipse 50% 60% at 20% 50%, rgba(13, 124, 102, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 45% 55% at 80% 40%, rgba(29, 161, 212, 0.35) 0%, transparent 65%),
        radial-gradient(ellipse 30% 35% at 60% 80%, rgba(212, 38, 110, 0.15) 0%, transparent 55%),
        linear-gradient(135deg, #095E4E 0%, #0D7C66 30%, #1788B4 100%);
}

/* Decorative floating elements */
.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    background:
        /* Large translucent circle — right */
        radial-gradient(circle 120px at calc(100% - 10vw) 50%, rgba(255, 255, 255, 0.04) 0%, transparent 70%),
        /* Small circle — left */
        radial-gradient(circle 60px at 12vw 30%, rgba(255, 255, 255, 0.05) 0%, transparent 70%),
        /* Hexagon accent */
        url("data:image/svg+xml,%3Csvg width='100' height='90' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 3L95 25V65L50 87L5 65V25Z' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='1'/%3E%3C/svg%3E") no-repeat calc(100% - 20vw) 20%,
        /* Diamond */
        url("data:image/svg+xml,%3Csvg width='50' height='50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M25 3L47 25L25 47L3 25Z' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='1'/%3E%3C/svg%3E") no-repeat 25vw 70%;
    animation: float-gentle 25s ease-in-out infinite;
}


/* ==========================================================================
   6. ILLUSTRATION CONTAINERS — Styled wrappers for SVG illustrations
   Used for collaboration, greencomp, and gameworld content images
   ========================================================================== */

/* ── Base container ── */
.illustration-container {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.illustration-container img {
    display: block;
    width: 100%;
    height: auto;
    transition: var(--transition-slow);
}

.illustration-container:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.illustration-container:hover img {
    transform: scale(1.02);
}

/* Subtle animated border glow on hover */
.illustration-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: calc(var(--border-radius-lg) + 1px);
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.illustration-container:hover::before {
    opacity: 1;
}

/* ── Collaboration illustration ── */
.illustration-collaboration {
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(13, 124, 102, 0.08) 0%, transparent 70%),
        linear-gradient(145deg, #f0faf7 0%, #e8f6f2 50%, #eaf4f8 100%);
}

/* ── GreenComp illustration ── */
.illustration-greencomp {
    background:
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(29, 161, 212, 0.06) 0%, transparent 70%),
        linear-gradient(135deg, #edf8f5 0%, #f0f7fb 50%, #f2f8f6 100%);
}

/* ── Game world illustration ── */
.illustration-gameworld {
    background:
        radial-gradient(ellipse 55% 50% at 50% 50%, rgba(15, 27, 45, 0.05) 0%, transparent 70%),
        linear-gradient(150deg, #eef5f9 0%, #f0f8f6 50%, #f2f3f8 100%);
}


/* ==========================================================================
   7. FLOATING DECORATIVE ELEMENTS — Reusable utility classes
   Add to any section for ambient visual depth
   ========================================================================== */

/* Base floating shape */
.floating-shape {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.floating-shape--circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1.5px solid rgba(13, 124, 102, 0.12);
    animation: float-drift 18s ease-in-out infinite;
}

.floating-shape--hexagon {
    width: 80px;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg width='80' height='70' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 3L76 20V52L40 67L4 52V20Z' fill='none' stroke='rgba(29,161,212,0.1)' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center;
    animation: float-gentle 22s ease-in-out infinite;
}

.floating-shape--diamond {
    width: 50px;
    height: 50px;
    border: 1.5px solid rgba(212, 38, 110, 0.1);
    transform: rotate(45deg);
    animation: float-drift 15s ease-in-out infinite reverse;
}

.floating-shape--dot-cluster {
    width: 100px;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='15' cy='25' r='3' fill='rgba(13,124,102,0.1)'/%3E%3Ccircle cx='50' cy='10' r='2' fill='rgba(29,161,212,0.08)'/%3E%3Ccircle cx='80' cy='40' r='2.5' fill='rgba(13,124,102,0.09)'/%3E%3Ccircle cx='35' cy='70' r='2' fill='rgba(29,161,212,0.07)'/%3E%3Ccircle cx='70' cy='85' r='3' fill='rgba(212,38,110,0.06)'/%3E%3C/svg%3E") no-repeat center;
    animation: float-gentle 20s ease-in-out infinite;
}

/* Animation delay utilities for staggered movement */
.floating-shape--delay-1 { animation-delay: -3s; }
.floating-shape--delay-2 { animation-delay: -7s; }
.floating-shape--delay-3 { animation-delay: -12s; }


/* ==========================================================================
   8. ACCESSIBILITY — Respect reduced motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-header::after,
    .cta-section::after,
    .floating-shape,
    .floating-shape--circle,
    .floating-shape--hexagon,
    .floating-shape--diamond,
    .floating-shape--dot-cluster {
        animation: none !important;
    }
}

/* Print: hide decorative elements */
@media print {
    .hero-header::after,
    .cta-section::after,
    .floating-shape {
        display: none !important;
    }

    .illustration-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
