/* ===================================
   PHILANTHROBOTS - VERSION B
   Network Visualization Aesthetic
   =================================== */

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

:root {
    /* Color System */
    --navy-primary: #0A2463;
    --navy-dark: #050F2E;
    --purple-electric: #6A4C93;
    --cyan-bright: #00D9FF;
    --white: #FFFFFF;
    --cyan-glow: rgba(0, 217, 255, 0.3);
    --purple-glow: rgba(106, 76, 147, 0.2);
    
    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
}

body {
    font-family: var(--font-main);
    background: var(--navy-dark);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 15, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--cyan-bright);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--cyan-bright);
    font-family: var(--font-mono);
}

.nav-tagline {
    font-size: 0.9rem;
    color: var(--white);
    opacity: 0.8;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy-primary) 100%);
}

.hero-network-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/hero-network.png');
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 1;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    max-width: 1200px;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    color: var(--cyan-bright);
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.glitch {
    position: relative;
    display: inline-block;
    animation: glitch-pulse 3s infinite;
}

@keyframes glitch-pulse {
    0%, 100% { text-shadow: 0 0 20px var(--cyan-glow); }
    50% { text-shadow: 0 0 40px var(--cyan-glow), 0 0 60px var(--purple-electric); }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--white);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.hero-cta {
    margin-top: 3rem;
}

.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    border: 2px solid var(--cyan-bright);
    color: var(--cyan-bright);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--cyan-bright);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover:before {
    left: 0;
}

.btn-primary:hover {
    color: var(--navy-dark);
    box-shadow: 0 0 30px var(--cyan-glow);
}

/* Masthead Section (Newspaper Style) */
.masthead {
    background: var(--navy-primary);
    border-top: 3px solid var(--cyan-bright);
    border-bottom: 3px solid var(--cyan-bright);
    padding: 3rem 2rem;
    text-align: center;
}

.masthead-headline {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--white);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.masthead-deck {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--cyan-bright);
    margin-bottom: 1rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.masthead-byline {
    font-size: 1rem;
    color: var(--white);
    opacity: 0.7;
    font-style: italic;
}

/* Agents Container */
.agents-container {
    position: relative;
    background: var(--navy-dark);
}

.agent {
    position: relative;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Agent Numbers */
.agent-number {
    font-size: 6rem;
    font-weight: 900;
    color: var(--purple-electric);
    opacity: 0.15;
    position: absolute;
    top: -1rem;
    left: 1rem;
    font-family: var(--font-mono);
    z-index: 1;
    line-height: 1;
}

/* Agent Titles */
.agent-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--cyan-bright);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    letter-spacing: -1px;
}

/* Agent Descriptions */
.agent-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--white);
    opacity: 0.9;
    line-height: 1.8;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

/* Tags */
.agent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.tag {
    padding: 0.5rem 1rem;
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--cyan-bright);
    color: var(--cyan-bright);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Agent Images */
.agent-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.agent-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 36, 99, 0.7) 0%, rgba(106, 76, 147, 0.5) 100%);
    mix-blend-mode: multiply;
}

/* Layout 1: Diagonal Split */
.agent-diagonal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    background: var(--navy-primary);
}

.agent-diagonal .agent-visual {
    position: relative;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0% 100%);
}

.agent-diagonal .agent-content {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.agent-diagonal-flip .agent-visual {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Layout 2: Full Bleed */
.agent-full-bleed {
    min-height: 500px;
    background: var(--navy-dark);
}

.agent-full-bleed .agent-split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.agent-full-bleed.agent-left .agent-text-block {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--navy-primary);
}

.agent-full-bleed.agent-left .agent-visual-block {
    position: relative;
}

.agent-full-bleed.agent-right .agent-split-content {
    grid-template-columns: 1fr 1fr;
}

.agent-full-bleed.agent-right .agent-visual-block {
    order: -1;
}

.agent-full-bleed.agent-right .agent-text-block {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--navy-primary);
}

.agent-full-bleed.agent-center .agent-split-content {
    grid-template-columns: 1fr;
    max-width: 1200px;
    margin: 0 auto;
}

.agent-full-bleed.agent-center .agent-text-block {
    padding: 6rem 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--purple-electric) 100%);
}

.coalition-finale .agent-number {
    position: static;
    display: inline-block;
    font-size: 8rem;
    opacity: 0.2;
    margin-bottom: 1rem;
}

.coalition-finale .agent-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

/* Layout 3: Split Screen */
.agent-split-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 550px;
    background: var(--navy-dark);
}

.agent-split-screen .split-content {
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--navy-primary);
    border-right: 2px solid var(--cyan-bright);
}

.agent-split-screen .split-visual {
    position: relative;
}

.agent-split-screen.agent-flip {
    grid-template-columns: 1fr 1fr;
}

.agent-split-screen.agent-flip .split-content {
    order: 2;
    border-right: none;
    border-left: 2px solid var(--cyan-bright);
}

.agent-split-screen.agent-flip .split-visual {
    order: 1;
}

/* Layout 5: Newspaper */
.agent-newspaper {
    background: #1A1A1A;
    color: var(--white);
    padding: 4rem 2rem;
    border-top: 5px solid var(--cyan-bright);
    border-bottom: 5px solid var(--cyan-bright);
}

.newspaper-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.newspaper-headline {
    color: var(--cyan-bright);
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    text-transform: uppercase;
    border-bottom: 3px solid var(--cyan-bright);
    padding-bottom: 1rem;
}

.newspaper-visual {
    margin-top: 2rem;
    height: 300px;
}

.newspaper-visual .agent-image {
    border: 3px solid var(--cyan-bright);
}

.newspaper-body {
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1.9;
    column-count: 1;
    text-align: justify;
}

.agent-newspaper .agent-number {
    color: var(--purple-electric);
    opacity: 0.2;
    position: static;
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.agent-newspaper .agent-tags {
    margin-top: 2rem;
}

.agent-newspaper .tag {
    background: rgba(0, 217, 255, 0.1);
    color: var(--cyan-bright);
    border-color: var(--cyan-bright);
}

/* Agent Separation */
.agent {
    border-bottom: 6px solid var(--cyan-bright);
    padding-bottom: 4rem;
    position: relative;
}

.agent:last-child {
    border-bottom: none;
}

/* Button Container */
.button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1rem 0 10rem 0;
    position: relative;
    z-index: 100;
}

/* Fund Button */
.fund-button {
    display: block;
    width: fit-content;
    background: transparent;
    color: var(--cyan-bright);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--cyan-bright);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.fund-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--cyan-bright) 0%, var(--purple-electric) 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.fund-button:hover:before {
    left: 0;
}

.fund-button:hover {
    color: var(--navy-dark);
    box-shadow: 0 0 30px var(--cyan-glow);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--navy-dark);
    padding: 4rem 2rem;
    border-top: 2px solid var(--cyan-bright);
    position: relative;
}

.footer-network {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/network-pattern-1.png');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-text p {
    font-size: 1.1rem;
    color: var(--white);
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 1.5rem !important;
    color: var(--cyan-bright) !important;
    font-weight: 600;
    margin-top: 2rem !important;
    opacity: 1 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .agent-diagonal,
    .agent-full-bleed .agent-split-content,
    .agent-split-screen,
    .newspaper-layout {
        grid-template-columns: 1fr;
    }
    
    .agent-diagonal .agent-visual {
        clip-path: none;
        height: 300px;
    }
    
    .agent-split-screen .split-content {
        border-right: none;
        border-bottom: 2px solid var(--cyan-bright);
    }
    
    .agent-split-screen.agent-flip .split-content {
        border-left: none;
        order: 1;
    }
    
    .agent-split-screen.agent-flip .split-visual {
        order: 2;
    }
    
    .split-visual,
    .agent-visual-block {
        height: 300px;
    }
    
    .agent-number {
        font-size: 4rem;
    }
    
    .newspaper-body {
        column-count: 1;
        text-align: left;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agent {
    animation: fadeInUp 0.8s ease-out;
}

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