/* ==========================================================================
   MACBOOK M5 PREMIUM STYLING SYSTEM (SPACE BLACK & SCROLL ANIMATION)
   ========================================================================== */

/* Theme Variables Definition */
:root {
    /* Base Color Tokens - Pure Matte Space Black */
    --bg-pure-black: #000000;
    --bg-dark-gray: #050505;
    --bg-card-gray: #08080a;
    --border-color-muted: rgba(255, 255, 255, 0.05);
    --border-color-hover: rgba(255, 255, 255, 0.14);
    
    --text-primary: #ffffff;
    --text-secondary: #86868b;
    --text-tertiary: #424245;

    /* Theme-specific variables (Default: Space Black Theme - Monochromatic) */
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --accent-glow-secondary: #86868b;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #86868b 100%);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Animation Speeds */
    --transition-fast: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-medium: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Space Black Theme (Sleek Monochromatic Silver/White Reflections) */
body.theme-spaceblack {
    --accent-color: #ffffff;
    --accent-color-rgb: 255, 255, 255;
    --accent-glow-secondary: #86868b;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #86868b 100%);
}

/* Space Gray Theme (Stealth Space Gray / Deep Charcoal Slate) */
body.theme-obsidian {
    --accent-color: #8e8e93;
    --accent-color-rgb: 142, 142, 147;
    --accent-glow-secondary: #3a3a3c;
    --accent-gradient: linear-gradient(135deg, #a2a2a7 0%, #48484a 100%);
}

/* Silver Theme (Crisp Metallic Silver reflections) */
body.theme-titanium {
    --accent-color: #e3e3e3;
    --accent-color-rgb: 227, 227, 227;
    --accent-glow-secondary: #a1a1a6;
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #a1a1a6 100%);
}

/* ==========================================================================
   RESET & SYSTEM BASICS
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-pure-black);
    color: var(--text-primary);
    overflow-x: clip; /* Secure sticky elements from scroll boundary breaking */
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-pure-black);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: clip; /* Secure sticky */
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   CUSTOM DECORATIVE LAYERS & CURSOR
   ========================================================================== */

/* Custom premium mouse cursor */
.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
    transition: width 0.2s, height 0.2s;
}

.custom-cursor-glow {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.05) 0%, rgba(var(--accent-color-rgb), 0) 70%);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background 0.5s ease;
}

/* Smooth background grid gridlines */
.ambient-grid-overlay {
    display: none; /* Removed completely to achieve absolute seamless pitch black void */
}

/* Localized volumetric lighting blooms - Dimmed for absolute pitch-black */
.ambient-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    border-radius: 50%;
    filter: blur(140px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.15; /* Highly dimmed to guarantee pure dark visual contrast */
    transition: background 0.8s ease, transform 0.2s ease-out;
}

.bg-glow-1 {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.2) 0%, rgba(0, 0, 0, 0) 75%);
}

.bg-glow-2 {
    bottom: -20%;
    right: -10%;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.15) 0%, rgba(0, 0, 0, 0) 75%);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color-muted);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
}

.glass-nav.scrolled {
    height: 60px;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 4px;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: width var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

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

.btn-primary-nav {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-color-muted);
    transition: all var(--transition-fast);
}

.btn-primary-nav:hover {
    background: var(--text-primary);
    color: var(--bg-pure-black);
    border-color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   SCROLL ANIMATION HERO TRACKS & CONTAINER
   ========================================================================== */
.hero-scroll-track {
    position: relative;
    height: 300vh; /* Lock height to give scrolling canvas speed room */
    background-color: #000000;
    z-index: 10;
}

.hero-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Stack text at top, canvas below vertically */
    align-items: center;
    background-color: #000000;
    padding-top: 80px; /* Reduced space to grant more vertical room to canvas laptop below */
}

.hero-text-content {
    position: relative; /* Change from absolute centering overlay to stack natively */
    width: 95%;
    max-width: 1200px;
    text-align: center;
    z-index: 15;
    pointer-events: none; /* Let scrolling events pass */
    will-change: transform, opacity;
    margin-bottom: 10px; /* Vertical separation spacing */
}

.hero-pill-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5.5vw, 5.0rem); /* Clean, optimized, and shorter typography */
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
}

.gradient-text-1 {
    color: var(--text-primary);
}

.gradient-text-2 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(var(--accent-color-rgb), 0.2));
}

.hero-subtitle {
    font-size: clamp(0.9rem, 1.2vw, 1.0rem); /* Shorter, neat, and highly clear */
    color: #e8e8ed; /* Crisp high-contrast white-silver that never blends into background glows */
    max-width: 540px;
    margin: 0 auto 2rem auto;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95); /* Deep shadow overlay for outstanding sharpness */
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    pointer-events: auto; /* Re-enable buttons click operations over overlays */
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-medium);
    cursor: pointer;
}

.btn-premium-glow {
    background: var(--accent-gradient);
    color: #000000;
    position: relative;
    box-shadow: 0 10px 30px rgba(var(--accent-color-rgb), 0.15);
}

.btn-premium-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(var(--accent-color-rgb), 0.35);
}

.btn-secondary-glass {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color-muted);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.btn-secondary-glass:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-color-hover);
    transform: translateY(-3px);
}

.play-icon {
    width: 16px;
    height: 16px;
}

/* Canvas Media Container styling */
.hero-canvas-container {
    position: relative;
    width: 100%;
    flex-grow: 1; /* Automatically expand to take remaining vertical room naturally! */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    min-height: 0; /* Protect flex columns from stretching past screen bounds */
}

#heroCanvas {
    width: 100%;
    height: 100%;
    max-width: 100%; /* Fully responsive boundaries for a massive, highly detailed display */
    max-height: 82vh; /* Maximized to let the canvas laptop animation look extremely large within the screen void */
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 25px 60px rgba(0, 0, 0, 0.95));
    will-change: transform;
}

/* Responsive side-by-side desktop layout: Left-Text, Right-Animation */
@media (min-width: 992px) {
    .hero-sticky-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 8%; /* Safe premium widescreen margins */
        padding-top: 50px;
    }

    .hero-text-content {
        width: 44%;
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        margin-bottom: 0;
    }

    .hero-subtitle {
        margin: 0 0 2.2rem 0;
        text-align: left;
    }

    .hero-buttons {
        justify-content: flex-start;
        width: 100%;
    }

    .hero-canvas-container {
        width: 52%;
        height: 80vh;
        flex-grow: 0;
        margin-left: auto;
    }

}

/* Hide old floating features card completely as content now prints directly in the main text column */
.scroll-feature-highlight {
    display: none !important;
}

.hero-image-glowing-backdrop {
    position: absolute;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.04) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(45px);
    z-index: -1;
    pointer-events: none;
}

/* Floating Badges inside Sticky Viewport */
.floating-spec-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.4rem;
    border-radius: 16px;
    background: rgba(8, 8, 10, 0.85);
    border: 1px solid var(--border-color-muted);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 20;
    transition: all var(--transition-medium);
    opacity: 0;
    transform: translateY(20px);
    will-change: transform, opacity;
}

.spec-card-left {
    bottom: 12%;
    left: 8%;
}

.spec-card-right {
    top: 15%;
    right: 8%;
}

.floating-spec-card.active {
    opacity: 1;
    transform: translateY(0);
}

.floating-spec-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent-color-rgb), 0.3);
    box-shadow: 0 20px 40px rgba(var(--accent-color-rgb), 0.1);
}

.spec-icon {
    font-size: 1.25rem;
}

.spec-info {
    display: flex;
    flex-direction: column;
}

.spec-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.spec-val {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* ==========================================================================
   BENTO GRID BREAKTHROUGHS
   ========================================================================== */
.bento-section {
    padding: 140px 0;
    position: relative;
    z-index: 10;
    background-color: #000000;
}

.section-header {
    margin-bottom: 5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 1.5rem;
}

.bento-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.25rem;
    background: var(--bg-card-gray);
    border: 1px solid var(--border-color-muted);
    transition: all var(--transition-medium);
}

.glass-card {
    backdrop-filter: blur(10px);
}

/* Card internal subtle ambient backlight on hover */
.card-inner-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.03) 0%, rgba(0,0,0,0) 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width var(--transition-medium), height var(--transition-medium);
}

.bento-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.bento-card:hover .card-inner-glow {
    width: 400px;
    height: 400px;
}

/* Large and Medium layout rules */
.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: space-between;
}

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

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

.bento-card-header {
    position: relative;
    z-index: 5;
}

.bento-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.bento-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.2;
}

.bento-card-footer {
    position: relative;
    z-index: 5;
}

.bento-card-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== CINEMATIC CHIP SHOWCASE CARD ===== */
.chip-showcase-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    width: 100%;
    min-height: 520px;
    border-radius: 32px;
    overflow: hidden;
    padding: 3.5rem 4rem;
    gap: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #060608 0%, #0c0c10 50%, #040407 100%);
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
    box-sizing: border-box;
}

.chip-showcase-card:hover {
    border-color: rgba(255,255,255,0.14);
    box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 120px rgba(255,255,255,0.03);
}

/* Animated ambient inner glow */
.chip-showcase-inner-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(120,120,180,0.07) 0%, transparent 70%);
    pointer-events: none;
}

/* Pulsing ambient rings behind chip */
@keyframes chipRingPulse {
    0%   { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50%  { transform: translate(-50%, -50%) scale(1.15); opacity: 0.12; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
}

.chip-ring {
    position: absolute;
    right: 20%;
    top: 50%;
    border-radius: 50%;
    border: 1px solid rgba(200,200,255,0.08);
    pointer-events: none;
    animation: chipRingPulse 4s ease-in-out infinite;
}

.chip-ring-1 {
    width: 380px;
    height: 380px;
    transform: translate(50%, -50%);
    animation-delay: 0s;
}
.chip-ring-2 {
    width: 540px;
    height: 540px;
    transform: translate(50%, -50%);
    animation-delay: 0.8s;
    border-color: rgba(180,180,255,0.05);
}
.chip-ring-3 {
    width: 700px;
    height: 700px;
    transform: translate(50%, -50%);
    animation-delay: 1.6s;
    border-color: rgba(160,160,255,0.03);
}

/* Left text column */
.chip-text-column {
    flex: 0 0 clamp(260px, 35%, 400px);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 10;
    min-width: 0;
}

.chip-headline {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -3px;
    color: #ffffff;
    margin: 0.4rem 0;
}

.chip-headline-accent {
    background: linear-gradient(135deg, #a8a8b3 0%, #ffffff 60%, #8585a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chip-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 360px;
}

/* Spec stat counters */
.chip-stat-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.chip-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.chip-stat:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
}

.chip-stat-value {
    font-family: var(--font-heading);
    font-size: 2.0rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -1px;
    line-height: 1;
}

.chip-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

/* Right canvas column */
.chip-canvas-column {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
}

.bento-chip-canvas {
    width: 100%;
    height: 100%;
    min-height: 380px;
    max-height: 460px;
    display: block;
    background: transparent;
    position: relative;
    z-index: 5;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), filter 0.6s ease;
}

.chip-showcase-card:hover .bento-chip-canvas {
    transform: scale(1.04);
    filter: drop-shadow(0 0 60px rgba(160,160,255,0.15));
}

/* Glowing halo behind the chip canvas */
.chip-canvas-glow {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(140,140,220,0.10) 0%, transparent 70%);
    pointer-events: none;
    animation: chipRingPulse 5s ease-in-out infinite;
    z-index: 1;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
    .chip-showcase-card {
        flex-direction: column;
        padding: 2.5rem 2rem;
        min-height: auto;
    }
    .chip-text-column {
        flex: none;
        width: 100%;
    }
    .chip-canvas-column {
        width: 100%;
        min-height: 280px;
    }
    .chip-headline {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }
    .chip-ring { display: none; }
}

/* 2. Display screen stat */
.bento-display-specs {
    margin: auto 0;
    text-align: center;
    position: relative;
}

.spec-large-stat {
    font-family: var(--font-heading);
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.02) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.spec-stat-unit {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: -10px;
}

/* ===== RETINA DISPLAY SCROLL-DRIVEN CANVAS ===== */
.bento-retina-card {
    overflow: hidden;
}

.bento-retina-media {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    margin: 0.5rem 0;
    min-height: clamp(200px, 30vw, 350px);
}

.bento-retina-canvas {
    width: 100%;
    height: 100%;
    min-height: clamp(200px, 30vw, 350px);
    display: block;
    background: transparent;
    position: relative;
    z-index: 5;
    border-radius: 12px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
    opacity: 1 !important;
}

.bento-retina-card:hover .bento-retina-canvas {
    transform: scale(1.03);
    filter: drop-shadow(0 0 40px rgba(var(--accent-color-rgb), 0.12));
}

.bento-retina-glow {
    position: absolute;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    animation: retinaGlowPulse 4s ease-in-out infinite;
}

@keyframes retinaGlowPulse {
    0%   { transform: scale(0.9); opacity: 0.4; }
    50%  { transform: scale(1.1); opacity: 0.15; }
    100% { transform: scale(0.9); opacity: 0.4; }
}

/* 3. Audio Visualizer */
.bento-audio-visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    height: 80px;
    margin: auto 0;
}

.bento-audio-visualizer .bar {
    width: 8px;
    height: 20px;
    background: var(--accent-gradient);
    border-radius: 4px;
    animation: soundWaves 1.5s ease-in-out infinite alternate;
}

.bento-audio-visualizer .bar:nth-child(2) { height: 40px; animation-delay: 0.2s; }
.bento-audio-visualizer .bar:nth-child(3) { height: 60px; animation-delay: 0.4s; }
.bento-audio-visualizer .bar:nth-child(4) { height: 35px; animation-delay: 0.1s; }
.bento-audio-visualizer .bar:nth-child(5) { height: 55px; animation-delay: 0.3s; }
.bento-audio-visualizer .bar:nth-child(6) { height: 25px; animation-delay: 0.5s; }
.bento-audio-visualizer .bar:nth-child(7) { height: 45px; animation-delay: 0.25s; }

/* 4. Battery meter */
.battery-meter-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: auto 0;
}

.battery-outer {
    flex-grow: 1;
    height: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color-muted);
    border-radius: 8px;
    padding: 3px;
    position: relative;
}

.battery-outer::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 7px;
    width: 6px;
    height: 12px;
    background: var(--border-color-muted);
    border-radius: 0 3px 3px 0;
}

.battery-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.1);
}

.battery-percentage {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    min-width: 60px;
}

/* 5. Thin Side profile — scroll-driven canvas animation */
.bento-thin-media {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 12px;
    margin: 1rem 0;
}

.bento-thin-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 12px;
}

/* 6. Ports spec */
.ports-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: auto 0;
}

.port-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color-muted);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: all var(--transition-fast);
}

.port-badge {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.port-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

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

/* ==========================================================================
   DYNAMIC LIGHTING DEMO SECTION
   ========================================================================== */
.lighting-showcase-section {
    padding: 120px 0;
    position: relative;
    z-index: 10;
    background-color: #000000;
}

.lighting-interactive-panel {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 580px;
    margin: 0 auto;
    background-color: #020202;
    border: 1px solid var(--border-color-muted);
    border-radius: 32px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: none; /* Hide default cursor to show custom spotlight interaction */
}

/* Spotlight masking layer overlay */
.spotlight-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle 180px at 0% 0%, rgba(var(--accent-color-rgb), 0.18) 0%, rgba(0, 0, 0, 0.99) 100%);
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: multiply;
    transition: background 0.1s ease;
}

/* Base image inside panel */
.lighting-base-img {
    width: 80%;
    height: auto;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
    z-index: 1;
    filter: saturate(0.5) contrast(1.1) brightness(0.4);
    transition: filter 0.3s;
}

.lighting-interactive-panel:hover .lighting-base-img {
    filter: saturate(1) contrast(1.15) brightness(0.9);
}

/* User interactive guide banner */
.lighting-instructions {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--border-color-muted);
    backdrop-filter: blur(10px);
    z-index: 10;
    font-size: 0.8rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.mouse-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.wheel-animate {
    animation: mouseScroll 1.2s infinite;
}

/* ==========================================================================
   CONFIGURATOR SECTION & DESIGN SWITCHER
   ========================================================================== */
.config-section {
    padding: 120px 0;
    position: relative;
    z-index: 10;
    background-color: #000000;
}

.config-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

/* 1. Preview Pane styles */
.config-preview-pane {
    position: sticky;
    top: 100px;
    background: var(--bg-card-gray);
    border: 1px solid var(--border-color-muted);
    border-radius: 32px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 600px;
    overflow: hidden;
}

.config-ambient-backlight {
    position: absolute;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(var(--accent-color-rgb), 0.04) 0%, rgba(0,0,0,0) 70%);
    filter: blur(40px);
    top: 20%;
    left: 20%;
    z-index: 0;
    pointer-events: none;
    transition: background 0.8s ease;
}

.finish-title-tag {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 5;
}

.preview-img-container {
    width: 100%;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 5;
}

.config-preview-image {
    width: 90%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 25px 40px rgba(0,0,0,0.85));
    transition: transform var(--transition-medium);
}

.config-preview-pane:hover .config-preview-image {
    transform: scale(1.02);
}

/* Swatch Controllers */
.chassis-color-selector {
    display: flex;
    gap: 1.5rem;
    position: relative;
    z-index: 5;
}

.color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.color-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.swatch-spaceblack .color-dot { background-color: #0d0d0f; border: 1px solid #1c1c1f; }
.swatch-obsidian .color-dot { background-color: #515154; border: 1px solid #6e6e73; }
.swatch-titanium .color-dot { background-color: #e3e3e3; border: 1px solid #d1d1d6; }

.color-swatch:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.color-swatch:hover .color-dot {
    transform: scale(0.92);
}

.color-swatch.active {
    border-color: var(--accent-color);
}

/* 2. Custom Spec Panel styles */
.config-controls-pane {
    background: rgba(6, 6, 8, 0.4);
    border: 1px solid var(--border-color-muted);
    border-radius: 32px;
    padding: 3rem;
}

.config-group {
    margin-bottom: 3.5rem;
}

.config-group-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color-muted);
    padding-bottom: 0.5rem;
}

.config-options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-option {
    border: 1px solid var(--border-color-muted);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.005);
    transition: all var(--transition-medium);
}

.config-option:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border-color-hover);
}

.config-option.active {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.option-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.option-price-tag {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.option-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Interactive configuration total summary */
.price-summary-panel {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
}

.price-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.finance-tag {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.25rem 0.75rem;
    border-radius: 30px;
    color: var(--text-primary);
    font-weight: 500;
}

.price-val-container {
    display: flex;
    align-items: flex-start;
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.currency-symbol {
    font-size: 1.75rem;
    margin-top: 0.5rem;
    margin-right: 0.25rem;
}

.price-ticker {
    font-size: 3.5rem;
    line-height: 1;
}

.btn-purchase {
    width: 100%;
    background: var(--accent-gradient);
    color: #000000;
    display: flex;
    justify-content: center;
    padding: 1.25rem;
    font-size: 1.05rem;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.btn-purchase:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   PREMIUM FOOTER
   ========================================================================== */
.premium-footer {
    background: #000000;
    border-top: 1px solid var(--border-color-muted);
    padding: 80px 0 40px 0;
    position: relative;
    z-index: 10;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border-color-muted);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 4px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: block;
}

.footer-tagline {
    color: var(--text-secondary);
    max-width: 320px;
    font-size: 0.85rem;
}

.newsletter-heading {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.newsletter-sub {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
}

.newsletter-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color-muted);
    border-radius: 30px;
    padding: 0.9rem 1.5rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.newsletter-btn {
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 30px;
    padding: 0.9rem 2rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.newsletter-btn:hover {
    background: var(--text-secondary);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.newsletter-status-msg {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    min-height: 20px;
    transition: all var(--transition-fast);
}

.newsletter-status-msg.success { color: #10b981; }
.newsletter-status-msg.error { color: #ef4444; }

.footer-mid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color-muted);
}

.footer-links-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.col-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-links-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color var(--transition-fast);
}

.footer-links-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
}

.copyright-info {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

/* ==========================================================================
   SCROLL REVEAL STYLES (Intersection Observer)
   ========================================================================== */
.reveal-el {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-el.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   ANIMATIONS KEYFRAMES
   ========================================================================== */
@keyframes floatLeft {
    0% { transform: translateY(0) rotate(-0.5deg); }
    50% { transform: translateY(-10px) rotate(0.5deg); }
    100% { transform: translateY(0) rotate(-0.5deg); }
}

@keyframes floatRight {
    0% { transform: translateY(0) rotate(0.5deg); }
    50% { transform: translateY(-8px) rotate(-0.5deg); }
    100% { transform: translateY(0) rotate(0.5deg); }
}

@keyframes mouseScroll {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.3; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes soundWaves {
    0% { transform: scaleY(0.4); }
    100% { transform: scaleY(1.1); }
}

/* ==========================================================================
   RESPONSIVE STYLING (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 260px;
    }
    
    .bento-large {
        grid-column: span 2;
    }
    
    .bento-medium {
        grid-column: span 1;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .config-preview-pane {
        position: relative;
        top: 0;
        height: 480px;
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-mid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    
    .bento-large, .bento-medium, .bento-small {
        grid-column: span 1;
        grid-row: span 1;
        height: auto;
        min-height: 280px;
    }
    
    .bento-chip-media, .bento-thin-media {
        height: 180px;
    }

    .bento-retina-media,
    .bento-retina-canvas {
        min-height: 180px;
    }
    
    .bento-display-specs {
        margin: 2rem 0;
    }
    
    .spec-large-stat {
        font-size: 5rem;
    }
    
    .floating-spec-card {
        display: none; /* Hide spec cards on smaller viewports */
    }
    
    .lighting-interactive-panel {
        height: 380px;
    }
    
    .lighting-base-img {
        width: 95%;
    }
    
    .config-controls-pane {
        padding: 1.75rem;
    }
    
    .price-ticker {
        font-size: 2.75rem;
    }
}

/* ==========================================================================
   TECHNICAL SPECIFICATIONS DRAWER SYSTEM
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 1500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active {
    opacity: 1;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: auto;
}

.specs-drawer {
    position: fixed;
    top: 0;
    right: -500px; /* Fully hidden off-canvas */
    width: 500px;
    height: 100vh;
    background: rgba(8, 8, 10, 0.88);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-left: 1px solid var(--border-color-muted);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: -25px 0 50px rgba(0, 0, 0, 0.8);
    transition: right 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.specs-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid var(--border-color-muted);
}

.drawer-header h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.drawer-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.drawer-close-btn:hover {
    color: var(--text-primary);
}

.drawer-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Custom premium scrollbar for drawer content */
.drawer-content::-webkit-scrollbar {
    width: 6px;
}

.drawer-content::-webkit-scrollbar-track {
    background: transparent;
}

.drawer-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.drawer-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.spec-table-group h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.spec-table tr:last-child {
    border-bottom: none;
}

.spec-table td {
    padding: 0.9rem 0;
    font-size: 0.85rem;
}

.spec-table td:first-child {
    width: 35%;
    color: var(--text-secondary);
    font-weight: 500;
}

.spec-table td:last-child {
    width: 65%;
    color: var(--text-primary);
    font-weight: 400;
    text-align: right;
}

/* Responsive Drawer width adjustments */
@media (max-width: 600px) {
    .specs-drawer {
        width: 100vw;
        right: -100vw;
    }
}

/* ==========================================================================
   SCROLL FEATURE HIGHLIGHT CARD STYLES
   ========================================================================== */
.scroll-feature-highlight {
    position: absolute;
    bottom: 5%;
    left: 5%;
    width: 380px;
    z-index: 25;
    background: rgba(8, 8, 10, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color-muted);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none; /* Let clicks pass to canvas underneath if not active */
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s;
    will-change: transform, opacity;
}

.scroll-feature-highlight.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.feature-highlight-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.feature-highlight-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.feature-highlight-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    min-height: 50px; /* Keep height layout stable when content swaps */
}

.feature-highlight-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.feature-highlight-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.1s ease;
}

/* Hide floating spec cards on mobile and scale features highlights */
@media (max-width: 768px) {
    .scroll-feature-highlight {
        width: 90%;
        bottom: 3%;
        left: 5%;
    }
}

.scroll-feature-highlight span,
.scroll-feature-highlight h3,
.scroll-feature-highlight p {
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}


/* ==========================================================================
   APPLE INTELLIGENCE SECTION
   ========================================================================== */
.ai-section {
    position: relative;
    padding: 140px 0;
    background: #000;
    overflow: hidden;
}

/* Floating ambient orbs in background */
@keyframes aiOrbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(30px, -40px) scale(1.08); }
    66%  { transform: translate(-20px, 20px) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

.ai-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    animation: aiOrbFloat 14s ease-in-out infinite;
}
.ai-orb-1 {
    width: 600px; height: 600px;
    top: -150px; left: -200px;
    background: radial-gradient(circle, rgba(120, 80, 255, 0.18) 0%, transparent 70%);
    animation-delay: 0s;
}
.ai-orb-2 {
    width: 500px; height: 500px;
    top: 30%; right: -150px;
    background: radial-gradient(circle, rgba(60, 180, 255, 0.14) 0%, transparent 70%);
    animation-delay: -5s;
}
.ai-orb-3 {
    width: 400px; height: 400px;
    bottom: -100px; left: 40%;
    background: radial-gradient(circle, rgba(255, 80, 180, 0.10) 0%, transparent 70%);
    animation-delay: -9s;
}

/* Intro block */
.ai-intro {
    text-align: center;
    margin-bottom: 4.5rem;
    position: relative;
    z-index: 5;
}

/* Pill badge */
.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    border: 1px solid rgba(160, 100, 255, 0.35);
    background: rgba(120, 60, 255, 0.12);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(200, 160, 255, 0.95);
    margin-bottom: 1.75rem;
    backdrop-filter: blur(8px);
}

@keyframes aiBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(160, 80, 255, 0.5); }
    50%       { box-shadow: 0 0 0 6px rgba(160, 80, 255, 0); }
}
.ai-badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #a855f7;
    animation: aiBadgePulse 1.8s ease-in-out infinite;
}

/* Main headline */
.ai-headline {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 7vw, 6.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.ai-headline-line {
    color: #ffffff;
}

.ai-headline-gradient {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 35%, #38bdf8 65%, #e879f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: aiGradientShift 5s ease infinite;
}

@keyframes aiGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ai-subtext {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.75;
}

/* Feature card grid */
.ai-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    position: relative;
    z-index: 5;
}

/* Wide card spans 2 columns */
.ai-card-wide {
    grid-column: span 2;
}

/* Base card */
.ai-card {
    position: relative;
    border-radius: 24px;
    padding: 2rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: transform 0.45s cubic-bezier(0.16,1,0.3,1),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
    /* Reveal animation start state */
    opacity: 0;
    transform: translateY(30px);
}

.ai-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
                transform 0.65s cubic-bezier(0.16,1,0.3,1);
}

.ai-card:hover {
    transform: translateY(-6px);
    border-color: rgba(160, 80, 255, 0.25);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px rgba(120,60,255,0.07);
}

/* Ambient glow on hover */
.ai-card-glow {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(120,60,255,0.12) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.5s ease, height 0.5s ease;
}
.ai-card:hover .ai-card-glow {
    width: 400px; height: 400px;
}

.ai-card-glow-siri {
    background: radial-gradient(circle, rgba(56,189,248,0.12) 0%, transparent 70%);
}

/* Icon */
.ai-card-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(160, 80, 255, 0.12);
    border: 1px solid rgba(160, 80, 255, 0.2);
    color: #c084fc;
    flex-shrink: 0;
}

/* Card text */
.ai-card-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a855f7;
    margin-bottom: 0.3rem;
}

.ai-card-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.ai-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Wide card: row layout with content on left, visual on right */
.ai-card-wide {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.ai-card-wide .ai-card-icon { align-self: flex-start; }
.ai-card-wide .ai-card-content { flex: 1; }

/* ── WRITING TOOLS DEMO ── */
.ai-writing-demo {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 180px;
    padding: 1.25rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
}

@keyframes writingLineFill {
    0%   { width: 10%; opacity: 0.2; }
    100% { opacity: 0.5; }
}

.ai-writing-line {
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(90deg, #a855f7, #6366f1);
    animation: writingLineFill 2.5s ease-in-out infinite alternate;
}
.ai-writing-line-long   { width: 90%; animation-delay: 0s; }
.ai-writing-line-medium { width: 65%; animation-delay: 0.3s; }
.ai-writing-line-short  { width: 40%; animation-delay: 0.6s; }

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}
.ai-writing-cursor {
    width: 2px; height: 14px;
    background: #a855f7;
    border-radius: 2px;
    margin-top: 2px;
    animation: cursorBlink 0.9s ease-in-out infinite;
}

/* ── IMAGE PLAYGROUND PREVIEW ── */
.ai-image-preview {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    overflow: hidden;
}

@keyframes imgOrbDrift {
    0%   { transform: translate(0,0); }
    50%  { transform: translate(15px,-15px); }
    100% { transform: translate(0,0); }
}

.ai-img-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    animation: imgOrbDrift 6s ease-in-out infinite;
}
.ai-img-orb-1 { width:100px;height:100px; top:-20px;left:-20px; background:rgba(168,85,247,0.5); animation-delay:0s; }
.ai-img-orb-2 { width:80px;height:80px; top:10px;right:10px; background:rgba(56,189,248,0.4); animation-delay:-2s; }
.ai-img-orb-3 { width:70px;height:70px; bottom:-10px;left:40%; background:rgba(232,121,249,0.4); animation-delay:-4s; }

/* ── NOTIFICATION STACK ── */
.ai-notif-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

@keyframes notifSlideIn {
    0%   { opacity: 0; transform: translateX(-12px); }
    100% { opacity: 1; transform: translateX(0); }
}

.ai-notif {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.07);
    animation: notifSlideIn 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
.ai-notif-1 { animation-delay: 0.1s; }
.ai-notif-2 { animation-delay: 0.3s; }
.ai-notif-3 { animation-delay: 0.5s; }

.ai-notif-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #a855f7;
    flex-shrink: 0;
}

.ai-notif-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}

/* ── SIRI WAVEFORM ── */
.ai-siri-wave {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 70px;
    width: 160px;
}

@keyframes siriBarPulse {
    0%, 100% { height: var(--h); opacity: 0.5; }
    50%       { height: 100%;   opacity: 1;   }
}

.ai-siri-bar {
    width: 5px;
    border-radius: 4px;
    background: linear-gradient(180deg, #38bdf8 0%, #6366f1 100%);
    animation: siriBarPulse 1.2s ease-in-out infinite;
    animation-delay: var(--d);
}

/* Staggered reveal for cards */
.ai-card:nth-child(1) { transition-delay: 0.05s; }
.ai-card:nth-child(2) { transition-delay: 0.15s; }
.ai-card:nth-child(3) { transition-delay: 0.25s; }
.ai-card:nth-child(4) { transition-delay: 0.35s; }
.ai-card:nth-child(5) { transition-delay: 0.45s; }

/* Responsive */
@media (max-width: 900px) {
    .ai-grid { grid-template-columns: 1fr 1fr; }
    .ai-card-wide { grid-column: span 2; flex-direction: column; }
    .ai-writing-demo, .ai-siri-wave { width: 100%; }
}

@media (max-width: 600px) {
    .ai-grid { grid-template-columns: 1fr; }
    .ai-card-wide { grid-column: span 1; }
    .ai-headline { font-size: clamp(2.5rem, 10vw, 4rem); letter-spacing: -2px; }
}

/* ==========================================================================
   BENTO-INTEGRATED APPLE INTELLIGENCE CARDS
   ========================================================================== */
/* Apple Intelligence card — matches standard bento-card style */
.bento-ai-wide {
    grid-column: 1 / -1;
    grid-row: span 1;
    min-height: 360px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    /* Inherits background, border, border-radius, hover from .bento-card */
}

/* Subtle purple tint on the orbs — kept but toned down to match card palette */
.bento-ai-wide .ai-orb-1 {
    width: 350px; height: 350px;
    top: -100px; left: -100px;
    background: radial-gradient(circle, rgba(120,60,255,0.10) 0%, transparent 70%);
}
.bento-ai-wide .ai-orb-2 {
    width: 280px; height: 280px;
    top: 20%; right: -80px;
    background: radial-gradient(circle, rgba(56,189,248,0.07) 0%, transparent 70%);
    animation-delay: -5s;
}

/* Left column — matches standard card padding */
.bento-ai-left {
    flex: 0 0 300px;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    border-right: 1px solid var(--border-color-muted);
    position: relative;
    z-index: 5;
}

/* Headline matches .bento-card-header h3 sizing */
.bento-ai-headline {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -1px;
    color: #fff;
    margin: 0.3rem 0;
}

.bento-ai-gradient {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 40%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: aiGradientShift 5s ease infinite;
}

/* Description matches .bento-card-footer p */
.bento-ai-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Right column — matches standard card padding */
.bento-ai-right {
    flex: 1;
    padding: 1.5rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    justify-content: center;
    position: relative;
    z-index: 5;
    border-right: 1px solid var(--border-color-muted);
    overflow: hidden;
}

.bento-ai-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.bento-ai-feature:hover {
    background: rgba(168,85,247,0.07);
    border-color: rgba(168,85,247,0.18);
}

.bento-ai-feat-icon {
    width: 26px; height: 26px;
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(168,85,247,0.12);
    border: 1px solid rgba(168,85,247,0.2);
    color: #c084fc;
    flex-shrink: 0;
}

.bento-ai-feat-icon svg {
    width: 14px;
    height: 14px;
}

.bento-ai-feat-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.08rem;
}

.bento-ai-feat-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Visual column — matches standard card padding */
.bento-ai-visual {
    flex: 0 0 180px;
    padding: 2.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
}

.bento-ai-siri-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 50px;
    width: 100%;
}

.bento-ai-siri-wave .ai-siri-bar {
    width: 4px;
}

.bento-ai-shield {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 0;
}

@media (max-width: 900px) {
    .bento-ai-wide {
        flex-direction: column;
        min-height: auto;
        grid-column: 1 / -1;
    }
    .bento-ai-left,
    .bento-ai-right {
        border-right: none;
        border-bottom: 1px solid var(--border-color-muted);
        flex: none;
    }
    .bento-ai-visual { flex: 0 0 auto; width: 100%; flex-direction: row; }
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-color-muted);
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-credit {
    font-size: 0.88rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.footer-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.footer-github-link:hover {
    color: #a855f7;
}

/* ==========================================================================
   PREMIUM ENCLOSURE — STICKY SCROLL TRACK
   ========================================================================== */
.thin-scroll-track {
    position: relative;
    height: 300vh;          /* scroll room — animation plays over 2× viewport */
    background: #000;
    z-index: 5;
}

.thin-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 80px 6vw 40px;
    background: #000;
    box-sizing: border-box;
}

/* Left text block */
.thin-text-block {
    flex: 0 0 320px;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 5;
}

.thin-headline {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    color: #fff;
    margin: 0.4rem 0;
}

.thin-headline-accent {
    background: linear-gradient(135deg, #e0e0e0 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.thin-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 300px;
}

/* Right canvas */
.thin-canvas-wrap {
    flex: 1;
    height: 70vh;
    max-height: 600px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.bento-thin-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Lower bento section that follows */
.bento-section-lower {
    position: relative;
    z-index: 10;
    background: var(--bg-primary);
}

@media (max-width: 768px) {
    .thin-sticky-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 80px 1.5rem 2rem;
    }
    .thin-text-block {
        flex: none;
        width: 100%;
    }
    .thin-canvas-wrap {
        width: 100%;
        height: 45vw;
        min-height: 200px;
    }
}
