/* Reset & Base Variables */
:root {
    --bg-color: #050505;
    --text-primary: #f0f0f0;
    --text-secondary: #a0aab5;
    --accent-blue-light: #3b82f6;
    --accent-blue-deep: #1e3a8a;
    --glow-blue: rgba(30, 58, 138, 0.4);
    
    --font-primary: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
    
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(59, 130, 246, 0.5);
    
    --transition-smooth: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* Typography */
.serif-accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: #ffffff;
    color: #050505;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0; /* Boxy */
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.btn-primary:hover {
    background-color: var(--accent-blue-light);
    color: #ffffff;
    box-shadow: 0 0 25px var(--glow-blue);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 6rem 0;
    background: url('assets/hero.png') center/cover no-repeat;
    /* Fade the image itself out at the bottom */
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

/* Bottom edge blur and color blend removed in favor of mask fading */

.hero-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4rem;
    width: 100%;
    padding: 0; /* Absolutely zero padding, flush to edge */
}

.hero-content {
    flex: 1 1 500px;
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 6rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    color: #050505;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #222222;
    max-width: 500px;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* Floating Stat Cards removed */

/* Marquee */
.marquee-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    overflow: hidden;
    display: flex;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.marquee-content span {
    padding: 0 2rem;
}

.marquee-content .dot {
    color: var(--accent-blue-light);
}

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

/* Bento Grid Section */
.ecosystem {
    padding: 8rem 0;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 5rem;
    line-height: 1.1;
}

.pixel-cards-grid {
    --bg: #050505;
    --fg: #e3e3e3;
    --surface-1: #101012;
    --surface-2: #222222;
    --ease-out: cubic-bezier(0.5, 1, 0.89, 1);
    --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.pixel-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-areas: "card";
    height: 480px;
    border: 1px solid var(--surface-2);
    isolation: isolate;
    transition: border-color 200ms var(--ease-out);
    text-decoration: none;
    background: var(--bg);
    border-radius: 20px;
}

.pixel-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at bottom left,
        transparent 55%,
        var(--surface-1)
    );
    pointer-events: none;
    box-shadow: var(--bg) -0.5cqi 0.5cqi 2.5cqi inset;
    transition: opacity 900ms var(--ease-out);
}

.pixel-card::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    aspect-ratio: 1;
    background: radial-gradient(circle, var(--bg), transparent 65%);
    opacity: 0;
    transition: opacity 800ms var(--ease-out);
}

.pixel-card > pixel-canvas {
    grid-area: card;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.pixel-card-inner {
    grid-area: card;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.pixel-card-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s;
    filter: grayscale(100%);
    z-index: 0;
}

.pixel-card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.pixel-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--fg);
    letter-spacing: -0.5px;
}

.pixel-btn {
    color: var(--fg);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    z-index: 10;
}

/* Hover Effects */
.pixel-card:where(:hover, :focus-within) {
    border-color: var(--active-color, var(--fg));
    transition: border-color 800ms var(--ease-in-out);
}

.pixel-card:where(:hover, :focus-within)::before {
    opacity: 0;
}

.pixel-card:where(:hover, :focus-within)::after {
    opacity: 1;
}

.pixel-card:hover .pixel-card-inner img {
    transform: scale(1.05);
    opacity: 0.8;
}

.pixel-card:hover .pixel-btn {
    border-color: rgba(255, 255, 255, 0.3);
}

.pixel-btn:hover {
    background: var(--active-color);
    color: #050505;
    border-color: var(--active-color);
    transform: scale(1.05);
}

/* Responsive */
/* 1024px media query removed for pixel-cards-grid to keep 2 columns */
@media (max-width: 1024px) {
    /* No changes needed for pixel-cards-grid here */
}

@media (max-width: 768px) {
    .hero-stats {
        height: auto;
        display: flex;
        gap: 1.5rem;
        flex-direction: column;
        width: 100%;
    }
    
    .stat-card {
        position: relative;
        top: auto; left: auto; bottom: auto; right: auto;
        width: 100%;
        animation: none;
    }
    
    .pixel-cards-grid {
        grid-template-columns: 1fr;
    }
}
