:root {
    --bg-color: #0a0a0b;
    --text-color: #ffffff;
    --accent-color: #00ff88;
    --purple-glow: #6366f1;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1400px;
    --transition-fast: 0.2s ease;
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    
    /* Fluid Typography */
    --fs-hero: clamp(3rem, 8vw, 6.5rem);
    --fs-title: clamp(2rem, 5vw, 3.5rem);
    --fs-body: clamp(0.9rem, 2vw, 1.1rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: initial; /* Managed by JS for smooth scroll */
}

/* Noise Overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.04;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
}

/* Background Blobs */
.blob-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    transform: translateZ(0);
}

.blob {
    position: absolute;
    width: 800px;
    height: 800px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    animation: blobMove 30s infinite alternate;
}

.blob-1 {
    background: var(--accent-color);
    top: -20%;
    right: -10%;
}

.blob-2 {
    background: var(--purple-glow);
    bottom: -20%;
    left: -10%;
    animation-delay: -7s;
}

@keyframes blobMove {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-150px, 150px) scale(0.9); }
}

/* Hero Section & Integrated Vortex */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #000;
    transition: background 2s ease;
}

.hero.revealed {
    background: transparent;
}

#vortex-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 2s ease;
    transform: translateZ(0); /* Hardware Acceleration */
}

.hero.revealed #vortex-canvas {
    opacity: 0.3; /* Make it subtle to let blobs shine */
}

.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 10002;
}

@keyframes flashEffect {
    0% { opacity: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}

.hero-center-logo {
    position: absolute;
    z-index: 100;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 5rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    white-space: nowrap;
    pointer-events: none;
}

.hero-center-logo.active {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 40px var(--accent-color);
}

.hero-center-logo.migrate {
    position: fixed;
    z-index: 1001;
    transition: all 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

.hero-container {
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.birth-element {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(10px);
    transition: all 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.global-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(
        600px circle at var(--g-mouse-x, -100%) var(--g-mouse-y, -100%),
        rgba(255, 255, 255, 0.05),
        transparent 80%
    );
    opacity: 1; /* Always visible to allow touch interaction */
    transition: opacity 1s ease;
}

.birth-element.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

/* Common */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 4rem;
}

.highlight {
    color: var(--accent-color);
}

.section-title {
    font-family: var(--font-heading);
    font-size: var(--fs-title);
    font-weight: 800;
    text-align: center;
    margin-bottom: 6rem;
    letter-spacing: -0.04em;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), background 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.btn-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(255,255,255,0.15);
}

.btn-glow {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
}

.btn-glow:hover {
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.4);
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    backdrop-filter: blur(20px);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}

.btn-sm {
    padding: 0.6rem 1.5rem !important;
    font-size: 0.85rem !important;
    border-radius: 10px !important;
}

.btn-link {
    background: none !important;
    padding: 0 !important;
    color: #00ff8873 !important;
    font-size: 0.95rem;
    gap: 0.5rem;
    transition: gap 0.3s ease, opacity 0.3s ease;
}

.btn-link:hover {
    gap: 0.8rem;
    opacity: 0.8;
}

/* Header */
.header {
    padding: 2.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: var(--transition-slow);
}

.header.scrolled {
    padding: 1.2rem 0;
    background: rgba(10, 10, 11, 0.6);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-color);
    letter-spacing: -0.05em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 4rem;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

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

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

.hero-title {
    font-family: var(--font-heading);
    font-size: var(--fs-hero);
    font-weight: 800;
    line-height: 0.95;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.4);
    max-width: 700px;
    margin: 0 auto 3.5rem;
    font-weight: 300;
}

.hero-btns {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

/* Apps Section */
.apps-section {
    padding: 15rem 0;
}

.apps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.app-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 1rem;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-15px);
    box-shadow: 0 40px 100px rgba(0, 255, 136, 0.03);
}

.app-media {
    aspect-ratio: 1.6 / 1;
    background: #000;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.app-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-info {
    padding: 2.5rem 2.5rem 2rem;
}

.app-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.app-name {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    letter-spacing: -0.03em;
}

.app-desc {
    color: rgba(255,255,255,0.4);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Bento Grid Overhaul */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.bento-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

/* Spotlight Effect */
.bento-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.06),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.bento-item:hover::before {
    opacity: 1;
}

.bento-content {
    position: relative;
    z-index: 2;
}

/* Grain Texture */
.grain {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
    filter: brightness(0.5) contrast(1.2);
}

.bento-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

.bento-large { grid-column: span 2; grid-row: span 2; padding: 4rem; }
.bento-medium { grid-column: span 2; }
.bento-small { grid-column: span 1; }

.bento-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    opacity: 0.8;
}

.bento-item h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
    color: #fff;
}

.bento-item p {
    color: rgba(255,255,255,0.4);
    line-height: 1.6;
}

/* Icons Styles */
.bento-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.bento-item:hover .bento-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(0, 255, 136, 0.05);
}

.bento-icon svg {
    width: 24px;
    height: 24px;
}

.bento-viz {
    margin-top: auto;
    padding-top: 3rem;
}

.speed-bar {
    height: 4px;
    width: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    box-shadow: 0 0 20px var(--accent-color);
    position: relative;
}

.speed-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 15px #fff;
}


/* Footer */
.footer {
    padding: 8rem 0 4rem;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.2);
    font-size: 0.85rem;
}

/* Reveal Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile Responsive Overhaul */
@media (max-width: 1024px) {
    .container { padding: 0 2rem; }
    .apps-grid { grid-template-columns: 1fr; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large, .bento-medium, .bento-small { grid-column: span 1; grid-row: span 1; }
    .nav-links { display: none; }
}

@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    
    .header { padding: 1.5rem 0; }
    .header.scrolled { padding: 1rem 0; }
    
    .logo { font-size: 1.5rem; }
    .header .btn { padding: 0.6rem 1.2rem; font-size: 0.8rem; width: auto; border-radius: 10px; }

    .hero { padding-top: 80px; }
    .hero-title { font-size: 3rem !important; line-height: 1.1; margin-bottom: 1.5rem; }
    .hero-subtitle { font-size: 1.1rem; margin-bottom: 2.5rem; }
    
    .hero-btns { 
        flex-direction: column; 
        gap: 1.2rem; 
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn { width: 100%; border-radius: 15px; } /* Slightly sharper for mobile look */
    
    .apps-section { padding: 8rem 0; }
    .app-name { font-size: 1.8rem; }
    .app-info { padding: 1.5rem; }
    
    .section-title { margin-bottom: 4rem; font-size: 2.5rem; }
    
    
    .bento-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 1rem;
    }
    .bento-item { padding: 1.5rem; border-radius: 20px; }
    .bento-large, .bento-medium { grid-column: span 2; }
    .bento-small { grid-column: span 1; }
    
    .bento-large { padding: 2rem; }
    .bento-item h3 { font-size: 1.4rem; }
    .bento-icon { width: 40px; height: 40px; margin-bottom: 1rem; }
    .bento-icon svg { width: 20px; height: 20px; }
    
    /* Center Logo Mobile Fix */
    .hero-center-logo { font-size: 3rem !important; }
}

@media (max-width: 380px) {
    .hero-title { font-size: 2.3rem !important; }
    .logo { font-size: 1.3rem; }
}
