/* ==================== */
/* CSS Variables        */
/* ==================== */
:root {
    --crimson: #9E1B32;
    --dark-crimson: #7d1528;
    --light-crimson: #C4374B;
    --grey: #828A8F;
    --light-grey: #A0A8AD;
    --dark-grey: #5A6266;
    --active-green: #00C853;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --bg-card: #1a1a1a;
    --bg-card-hover: #252525;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --border-color: #2a2a2a;
    --glow-crimson: rgba(158, 27, 50, 0.4);
    --glow-grey: rgba(130, 138, 143, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'proxima-nova', 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== */
/* Network Background   */
/* ==================== */
.network-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 50%, var(--bg-darker) 100%);
}

.network-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
}

/* Optional: Very subtle drift animation - remove if you prefer static */
/*
@keyframes moveNetwork {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(100px, 100px);
    }
}
*/

/* ==================== */
/* Header & Navigation  */
/* ==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px var(--glow-crimson));
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--crimson);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--crimson);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== */
/* Hero Section         */
/* ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    text-align: center;
}

.hero h1 {
    font-family: 'proxima-nova-condensed', 'Proxima Nova Condensed', 'proxima-nova', 'Proxima Nova', sans-serif;
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--crimson), var(--light-crimson), var(--light-grey));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--glow-crimson);
    animation: fadeInUp 1s ease;
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
}

.glitch::before {
    animation: glitch-1 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    animation: glitch-2 2s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(-2px, 2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    33% { transform: translate(2px, -2px); }
}

.tagline {
    font-family: 'proxima-nova', 'Proxima Nova', sans-serif;
    font-size: 1.5rem;
    color: var(--grey);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat:hover {
    background: var(--bg-card-hover);
    border-color: var(--crimson);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--glow-crimson);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--crimson);
    font-family: 'Courier New', monospace;
}

.status-active {
    color: var(--active-green);
    position: relative;
}

.status-active::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--active-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; box-shadow: 0 0 20px var(--active-green); }
}

/* ==================== */
/* Section Styles       */
/* ==================== */
.section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: 'proxima-nova-condensed', 'Proxima Nova Condensed', 'proxima-nova', 'Proxima Nova', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--crimson), transparent);
    margin: 0 auto;
}

/* ==================== */
/* Content Cards        */
/* ==================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--crimson), var(--grey));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.content-card:hover::before {
    transform: scaleX(1);
}

.content-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--crimson);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.card-icon img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(158, 27, 50, 0.3));
    transition: transform 0.3s ease;
}

.content-card:hover .card-icon img {
    transform: scale(1.1);
}

.content-card h3 {
    font-family: 'proxima-nova', 'Proxima Nova', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--crimson);
    margin-bottom: 1rem;
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== */
/* Network Info Section */
/* ==================== */
.network-info {
    background: linear-gradient(180deg, transparent, rgba(158, 27, 50, 0.05), transparent);
}

.network-details {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.detail-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.network-tools {
    text-align: center;
}

.network-tools h3 {
    font-family: 'proxima-nova', 'Proxima Nova', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tool-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.tool-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--grey);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--glow-grey);
}

.tool-icon {
    font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.tool-icon img {
    max-width: 140px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tool-link:hover .tool-icon img {
    transform: scale(1.15);
    filter: brightness(1.2);
}

.tool-name {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* ==================== */
/* Contact Section      */
/* ==================== */
.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-info {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

.contact-label {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.contact-value {
    color: var(--crimson);
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* ==================== */
/* Partners Section     */
/* ==================== */
.partners-carousel-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.carousel-nav {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 2rem;
    line-height: 1;
}

.carousel-nav:hover {
    background: var(--bg-card-hover);
    border-color: var(--crimson);
    color: var(--crimson);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: -60px;
}

.carousel-next {
    right: -60px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
}

.partner-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.partner-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--crimson);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.partner-logo {
    flex-shrink: 0;
    width: 180px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 1rem;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.partner-info h3 {
    font-family: 'proxima-nova', 'Proxima Nova', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--crimson);
    margin-bottom: 0.5rem;
}

.partner-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==================== */
/* Peers Section        */
/* ==================== */
.peers-section {
    background: linear-gradient(180deg, transparent, rgba(158, 27, 50, 0.05), transparent);
    overflow: hidden;
}

.peers-scroll-container {
    overflow: hidden;
    position: relative;
    margin-top: 2rem;
}

.peers-scroll {
    display: flex;
    gap: 3rem;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

/* Only pause on hover for devices that support hover (not touch devices) */
@media (hover: hover) and (pointer: fine) {
    .peers-scroll:hover {
        animation-play-state: paused;
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.peer-logo {
    flex-shrink: 0;
    width: 200px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

/* Only apply hover effects on devices that support hover (not touch devices) */
@media (hover: hover) and (pointer: fine) {
    .peer-logo:hover {
        background: var(--bg-card-hover);
        border-color: var(--grey);
        transform: scale(1.05);
    }
}

.peer-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ==================== */
/* Footer               */
/* ==================== */
footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo img {
    height: 60px;
    width: auto;
    opacity: 0.8;
}

.footer-text {
    text-align: center;
}

.footer-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-tagline {
    color: var(--crimson);
    font-weight: 600;
    margin-top: 0.5rem;
}

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

/* ==================== */
/* Responsive Design    */
/* ==================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.98);
        flex-direction: column;
        gap: 0;
        padding: 2rem 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1rem;
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links a::after {
        display: none;
    }

    .logo img {
        height: 40px;
    }

    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .tagline {
        font-size: 1rem;
        letter-spacing: 2px;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat {
        padding: 1rem 1.5rem;
        flex: 1 1 calc(50% - 0.5rem);
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .partners-carousel-wrapper {
        overflow: visible;
        position: relative;
        margin: 0 -1rem;
        padding: 0;
    }

    .carousel-nav {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        font-size: 1.8rem;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .partners-grid {
        display: flex !important;
        grid-template-columns: none !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 1rem;
        padding: 0 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .partners-grid::-webkit-scrollbar {
        display: none;
    }

    .partner-card {
        flex: 0 0 calc(100vw - 4rem);
        min-width: calc(100vw - 4rem);
        scroll-snap-align: center;
        flex-direction: column;
        text-align: center;
    }

    .partner-logo {
        width: 100%;
        max-width: 180px;
        margin: 0 auto;
    }

    .footer-logo img {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .stat {
        padding: 0.8rem 1rem;
    }

    .section {
        padding: 3rem 0;
    }
}
