/* ===================================
    Kamvas 13 Gen 3 Microsite
   Modern, High-Performance Styles
   =================================== */

/* CSS Variables */
:root {
    /* Colors */
    --color-bg: #0a0a0a;
    --color-surface: #141414;
    --color-text: #ffffff;
    --color-text-muted: #999999;
    --color-accent: #ff6b6b;
    --color-accent-hover: #ff5252;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;
    --font-size-6xl: 4.5rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Layout */
    --container-max: 1400px;
    --container-fluid: 90%;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-actions .btn {
    min-width: 220px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-fluid {
    width: var(--container-fluid);
    margin: 0 auto;
}

/* ===================================
   Navigation
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-lg) 0;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.3s var(--ease-smooth), opacity 0.3s var(--ease-smooth);
}

.nav.hidden {
    transform: translateY(-100%);
}

.nav.canvas-hidden {
    opacity: 0;
    transform: translateY(-120%);
    pointer-events: none;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 32px;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-muted);
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s var(--ease-smooth);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all 0.3s var(--ease-smooth);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-text);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
}

/* ===================================
   Hero Banner
   =================================== */
.hero-banner {
    position: relative;
    padding: calc(var(--space-3xl) + 80px) 0 var(--space-3xl);
    background: radial-gradient(circle at top right, rgba(255, 107, 107, 0.1), transparent 60%),
                radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.04), transparent 55%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-text {
    position: relative;
    z-index: 1;
}

.hero-text::before {
    content: '';
    position: absolute;
    inset: -10% -5% 20% -12%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent);
    filter: blur(80px);
    z-index: -1;
}

.hero-heading {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
}

.hero-description {
    font-size: var(--font-size-xl);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.hero-actions .btn {
    min-width: 220px;
}

.hero-note {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    opacity: 0.8;
}

.hero-visual {
    position: relative;
}

.hero-visual::after {
    content: '';
    position: absolute;
    inset: 15% 10% 5% 20%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.3), transparent 60%);
    filter: blur(80px);
    z-index: 0;
}

.hero-visual-inner {
    position: relative;
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.03);
    border-radius: calc(var(--radius-xl) * 1.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
}

.hero-visual-inner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: -10%;
    border-radius: 50%;
    background: linear-gradient(120deg, rgba(255, 107, 107, 0.12), transparent);
    filter: blur(60px);
    z-index: -1;
}

/* ===================================
   Immersive Experience
   =================================== */

.immersive-section {
    position: relative;
    padding: var(--space-3xl) 0;
    overflow: hidden;
}

.immersive-section .container {
    max-width: min(100%, var(--container-max));
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
}

.immersive-background {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 107, 107, 0.15), transparent 65%),
                linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.6) 100%);
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
}

.immersive-section .container {
    position: relative;
    z-index: 1;
}

.experience-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: center;
    justify-items: center;
}

.experience-media {
    position: relative;
    height: 70vh;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transform-style: preserve-3d;
    perspective: 1400px;
}

.device-frame {
    position: relative;
    width: min(520px, 90%);
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
    border-radius: calc(var(--radius-xl) * 1.1);
    padding: 12px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
    transition: transform 0.6s var(--ease-smooth);
    transform-style: preserve-3d;
}

.device-screen {
    width: 100%;
    height: 100%;
    background: #050505;
    border-radius: calc(var(--radius-lg) * 1.1);
    overflow: hidden;
}

.device-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screen-overlay {
    position: absolute;
    inset: 12px;
    border-radius: calc(var(--radius-lg) * 1.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.3), rgba(10, 10, 10, 0.6));
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.overlay-label {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.7);
}

#immersiveVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-xl) * 1.1);
    object-fit: cover;
    background-color: #000;
    transform-origin: center;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

#immersiveCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--radius-xl) * 1.1);
    pointer-events: none;
    opacity: 0;
    transform-origin: center;
    transition: opacity 0.3s ease;
}

#immersiveCanvas.frame-sequence-active {
    opacity: 1;
}

.immersive-progress {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.immersive-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), #ee5a6f);
}

/* ===================================
   Introduction
   =================================== */
.intro {
    padding: var(--space-3xl) 0;
    background-color: var(--color-bg);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.label {
    display: inline-block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.section-description {
    font-size: var(--font-size-lg);
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.intro-visual {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.intro-visual img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   Features
   =================================== */
.features {
    padding: var(--space-3xl) 0;
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    margin-bottom: var(--space-3xl);
    padding: var(--space-3xl) 0;
}

.feature-block-reverse {
    direction: rtl;
}

.feature-block-reverse > * {
    direction: ltr;
}

.feature-media {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.feature-media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s var(--ease-smooth);
}

.feature-media:hover img {
    transform: scale(1.05);
}

.feature-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.feature-description {
    font-size: var(--font-size-lg);
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.feature-list li {
    display: flex;
    align-items: center;
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
}

.feature-list li::before {
    content: '→';
    color: var(--color-accent);
    margin-right: var(--space-sm);
    font-weight: 700;
}

/* ===================================
   Specifications
   =================================== */
.specs {
    padding: var(--space-3xl) 0;
    background-color: var(--color-surface);
}

.specs-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.spec-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.3s var(--ease-smooth);
}

.spec-card:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.spec-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    color: var(--color-accent);
}

.spec-icon svg {
    width: 100%;
    height: 100%;
}

.spec-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.spec-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.spec-list li {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    padding-left: var(--space-md);
    position: relative;
}

.spec-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 4px;
    background-color: var(--color-accent);
    border-radius: 50%;
}

/* ===================================
   CTA
   =================================== */
.cta {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

.cta-description {
    font-size: var(--font-size-xl);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-xl);
}

.cta-features {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.cta-feature svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

/* ===================================
   Footer
   =================================== */
.footer {
    padding: var(--space-2xl) 0;
    background-color: var(--color-surface);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
}

.footer-logo img {
    height: 32px;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-copyright {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
    .hero-grid,
    .intro-grid,
    .experience-grid,
    .feature-block {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .feature-block-reverse {
        direction: ltr;
    }

    .experience-media {
        min-height: 420px;
    }
}

@media (max-width: 768px) {
    :root {
        --space-3xl: 4rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        flex-direction: column;
    }
    
    .cta-features {
        flex-direction: column;
        gap: var(--space-md);
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .immersive-section {
        padding: var(--space-2xl) 0;
    }

    .immersive-section .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .experience-grid {
        justify-items: center;
    }

    .experience-media {
        height: min(68vh, 115vw);
        min-height: 340px;
    }

    .device-frame {
        width: min(90vw, 420px);
        padding: 10px;
    }

    .immersive-progress {
        bottom: 20px;
        width: 120px;
    }

    .experience-media canvas,
    .experience-media video {
        border-radius: calc(var(--radius-xl) * 0.9);
    }
}

@media (max-width: 640px) {
    .hero-heading {
        font-size: clamp(2rem, 8vw, 3.2rem);
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .experience-media {
        height: min(60vh, 100vw);
        min-height: 300px;
    }

    .device-frame {
        width: min(92vw, 380px);
        padding: 8px;
    }

    .screen-overlay {
        inset: 8px;
    }

    .overlay-label {
        font-size: var(--font-size-xs);
        letter-spacing: 0.18em;
    }

    .immersive-progress {
        bottom: 16px;
        width: 100px;
    }
}
