:root {
    --bg-dark: #0B0C10;
    --bg-glass: rgba(11, 12, 16, 0.6);
    --cyan: #00E5FF;
    --purple: #B388FF;
    --text-primary: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.7);
    --border-light: rgba(255, 255, 255, 0.1);
}

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

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
}

.highlight {
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Helper Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

.hero-content {
    flex: 1;
    z-index: 2;
    max-width: 600px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 24px;
    height: 24px;
    border: 2px solid var(--cyan);
    border-radius: 4px;
    margin-right: 12px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.logo-text {
    font-size: 1.2rem;
    letter-spacing: 4px;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 400;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--cyan);
    color: var(--bg-dark);
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}

.android-only {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 1rem;
}

/* 3D Visual in Hero */
.hero-visual {
    flex: 1;
    position: relative;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glass-cube {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.cube-inner {
    width: 80px;
    height: 80px;
    border: 3px solid var(--cyan);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--cyan);
    animation: pulse 4s infinite alternate;
}

.glow-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
}

.glow-orb.cyan {
    background: var(--cyan);
    top: 20%;
    left: 20%;
    animation: drift 10s infinite alternate;
}

.glow-orb.purple {
    background: var(--purple);
    bottom: 10%;
    right: 20%;
    animation: drift 12s infinite alternate-reverse;
}

/* Features Section */
.features-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 10%;
    position: relative;
    z-index: 10;
    scroll-snap-align: start;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 180px);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.mobile-duplicate {
    display: none !important;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 32px;
    border-radius: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Bento Sizing Classes */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    padding: 48px;
}

.bento-wide {
    grid-column: span 2;
    grid-row: span 1;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 32px;
}

.bento-tall {
    grid-column: span 1;
    grid-row: span 2;
}

/* CSS Icons */
.css-shape {
    width: 32px;
    height: 32px;
    position: relative;
}

.shape-cube {
    width: 60px;
    height: 60px;
    border: 2px solid var(--cyan);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,229,255,0.4), inset 0 0 20px rgba(0,229,255,0.2);
    transform: rotate(45deg);
    animation: pulse 4s infinite alternate;
}

.shape-wave {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    border-radius: 2px;
    box-shadow: 0 0 15px var(--purple);
}

.shape-nodes {
    border-radius: 50%;
    border: 2px dashed var(--cyan);
    animation: float 6s infinite linear;
}

.shape-shield {
    border: 2px solid var(--purple);
    border-radius: 8px 8px 24px 24px;
    box-shadow: 0 0 15px rgba(179,136,255,0.4);
    width: 100%;
    height: 100%;
}

.shape-gem-wrapper {
    filter: drop-shadow(0 0 12px var(--cyan));
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.shape-gem {
    width: 32px;
    height: 44px;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: gem-float 3s infinite ease-in-out;
}

/* Linear-style Mouse Tracking Border Glow */
.feature-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 32px;
    padding: 2px; 
    background: radial-gradient(
        600px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), 
        var(--cyan), 
        transparent 40%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Inner Hover Glow */
.feature-card::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(
        400px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), 
        rgba(179, 136, 255, 0.15), 
        transparent 40%
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.features-grid:hover .feature-card::before,
.features-grid:hover .feature-card::after {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.04);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
}

.bento-large .feature-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 40px;
}

.bento-wide .feature-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

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

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

.bento-large h3 {
    font-size: 2rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
}

.bento-large p {
    font-size: 1.1rem;
}

/* Gallery Section */
.gallery-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 0;
    position: relative;
    scroll-snap-align: start;
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-header h3 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.gallery-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 40px 0;
}

/* Carousel Track */
.carousel-track {
    display: flex;
    gap: 32px;
    width: max-content;
    animation: scroll 30s linear infinite;
    padding-left: 32px;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.glass-card {
    width: 340px;
    height: 380px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
}

.glass-card:hover {
    transform: translateY(-20px) scale(1.02);
    background: rgba(255, 255, 255, 0.06);
}

.glass-card:hover .card-glow.cyan { box-shadow: 0 0 100px 20px rgba(0, 229, 255, 0.3); }
.glass-card:hover .card-glow.purple { box-shadow: 0 0 100px 20px rgba(179, 136, 255, 0.3); }

.card-tag {
    position: absolute;
    top: 32px;
    left: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.glass-card h4 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    line-height: 1.1;
}

.glass-card p {
    color: var(--text-muted);
}

.card-glow {
    position: absolute;
    width: 1px;
    height: 1px;
    bottom: 50%;
    left: 50%;
    border-radius: 50%;
    transition: box-shadow 0.4s ease;
}

/* Footer */
footer {
    text-align: center;
    padding: 6rem 2rem 4rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    background-color: var(--bg-dark);
    scroll-snap-align: end;
}

footer h2 {
    font-size: 1.5rem;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.company-branding {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 16px)); } /* Scrolls half the width since we duplicated items */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes gem-float {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-8px) rotateY(180deg); filter: hue-rotate(45deg); }
}

@keyframes drift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 6rem;
    }
    
    .hero-content {
        margin-bottom: 4rem;
    }
    
    .logo-wrapper {
        justify-content: center;
    }
    
    .hero-visual {
        height: 300px;
    }
}

@media (max-width: 768px) {
    /* Disable strict snap scrolling on mobile for a natural scrolling experience */
    html {
        scroll-snap-type: none;
    }
    
    .features-section, .gallery-section, .hero {
        min-height: auto;
        scroll-snap-align: none;
    }

    .hero {
        padding-top: 8rem;
        padding-bottom: 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }

    /* Convert Bento Grid to Horizontal Scroll */
    .features-section {
        padding: 3rem 0;
        overflow: hidden; /* Hide horizontal scroll */
    }

    .bento-grid {
        display: flex;
        width: max-content;
        animation: scroll-features 15s linear infinite;
        gap: 12px;
    }
    
    .bento-grid:hover {
        animation-play-state: paused;
    }

    .mobile-duplicate {
        display: flex !important;
    }

    .feature-card {
        width: 260px;
        height: 280px;
        flex-shrink: 0;
        padding: 20px !important;
        justify-content: center;
    }

    /* Normalize all bento cards on mobile */
    .bento-large, .bento-wide, .bento-tall {
        grid-column: auto;
        grid-row: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .feature-icon, .bento-large .feature-icon, .bento-wide .feature-icon {
        width: 56px !important;
        height: 56px !important;
        margin-bottom: 16px !important;
    }

    /* Scale down CSS icons */
    .css-shape {
        transform: scale(0.8);
    }

    .feature-card h3, .bento-large h3 {
        font-size: 1.2rem !important;
        margin-bottom: 6px;
    }

    .feature-card p, .bento-large p {
        font-size: 0.9rem !important;
    }

    /* Scale down Gallery for mobile */
    .gallery-section {
        padding: 3rem 0;
    }
    
    .gallery-header {
        margin-bottom: 2rem;
    }

    .gallery-header h3 {
        font-size: 1.75rem;
    }

    .glass-card {
        width: 260px;
        height: 300px;
        padding: 20px;
    }
    
    .glass-card h4 {
        font-size: 1.5rem;
    }

    footer {
        padding: 3rem 2rem 2rem;
    }
}
