/* FlxOS Labs - Professional Design System */

:root {
    /* Colors - Dark Theme (Default) */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --accent: #8b5cf6;

    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-glass: rgba(15, 23, 42, 0.6);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-highlight: #e2e8f0;

    --border: rgba(148, 163, 184, 0.1);
    --border-hover: rgba(148, 163, 184, 0.2);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-text: linear-gradient(to right, #6366f1, #06b6d4);
    --gradient-glow: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

    /* Spacing & Sizes */
    --container: 1200px;
    --nav-height: 80px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Safe Area Insets for notched devices */
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);
    --safe-area-inset-left: env(safe-area-inset-left);
    --safe-area-inset-right: env(safe-area-inset-right);

    /* ─── Phase 1 & 5: Premium Additions ─────────────────────── */
    /* Display font for all headings — sharp, geometric character */
    --font-display: 'Outfit', sans-serif;

    /* Physics-based spring easing — fast start, natural deceleration */
    --spring: linear(
        0, 0.006, 0.025 2.5%, 0.101 5.1%, 0.539 15.1%, 0.721 19.6%,
        0.849 24%, 0.937 28.6%, 0.985 33.2%, 1.007 37.2%, 1.017 41.2%,
        1.018 44.5%, 1.013 50.3%, 0.997 63.5%, 0.994 68.5%, 0.998 80%,
        1
    );

    /* Layered depth shadow for premium card feel */
    --shadow-card:
        0 1px 2px rgba(0, 0, 0, 0.07),
        0 4px 8px rgba(0, 0, 0, 0.07),
        0 16px 32px rgba(0, 0, 0, 0.1);
    --shadow-card-hover:
        0 2px 4px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.1),
        0 24px 48px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(99, 102, 241, 0.12);
}

/* Light Mode Theme */
[data-theme="light"] {
    --bg-dark: #fffdf8;
    --bg-darker: #f7f2ea;
    --bg-card: rgba(248, 244, 238, 0.92);
    --bg-glass: rgba(255, 250, 244, 0.84);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-highlight: #1e293b;

    --border: rgba(15, 23, 42, 0.1);
    --border-hover: rgba(15, 23, 42, 0.2);

    --gradient-text: linear-gradient(to right, #4f46e5, #0891b2);
    --gradient-glow: radial-gradient(circle at center, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}

/* Smooth theme transition */
html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Improve text rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent font size adjustment on mobile */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Typography with fluid scaling — Outfit for display, Inter for body */
h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw + 0.5rem, 2.5rem);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

h3 {
    letter-spacing: -0.02em;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 max(24px, var(--safe-area-inset-left));
    padding-left: max(24px, var(--safe-area-inset-left));
    padding-right: max(24px, var(--safe-area-inset-right));
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Aurora shimmer for hero heading — the wow moment */
.aurora-text {
    background: linear-gradient(
        90deg,
        #6366f1 0%,
        #8b5cf6 25%,
        #06b6d4 50%,
        #8b5cf6 75%,
        #6366f1 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    animation: aurora-shift 6s ease infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .aurora-text {
        animation: none;
        background-position: 0% 50%;
    }
}

/* Skip to main content link for accessibility */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-to-main:focus {
    top: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.35s var(--spring);
    /* Ensure minimum touch target size */
    min-height: 44px;
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* Shimmer sweep effect on primary buttons */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.18) 50%,
        transparent 60%
    );
    animation: btn-shimmer 3.5s ease infinite;
    pointer-events: none;
}

@keyframes btn-shimmer {
    0%   { left: -100%; }
    30%  { left: 100%; }
    100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary::after { animation: none; }
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* Cursor Glow - Disabled on touch devices */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: var(--gradient-glow);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
    /* Hide on touch devices for performance */
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .cursor-glow {
        display: block;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .cursor-glow {
        display: none;
    }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

/* When lightbox is open (body overflow:hidden + padding-right), compensate navbar too */
body[style*="overflow: hidden"] .navbar {
    padding-right: var(--scrollbar-gutter, 0px);
}

.navbar.scrolled {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--gradient-main);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-icon::after {
    content: 'F';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.logo-icon.small {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.logo-icon.small::after {
    font-size: 13px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

/* Sliding underline — premium nav interaction */
.nav-links a:not(.github-link)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    border-radius: 2px;
    transition: width 0.3s var(--spring);
}

.nav-links a:not(.github-link):hover::after,
.nav-links a.active::after,
.nav-links a.section-active::after {
    width: 100%;
}

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

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-menu-btn.active {
    transform: rotate(90deg);
}

/* Theme Toggle */
#themeToggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

#themeToggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

/* GitHub Stats */
.github-stats {
    display: flex;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-highlight);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   Scroll Progress Bar
   ========================================= */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #06b6d4, #8b5cf6);
    background-size: 200% 100%;
    animation: progress-shimmer 2s linear infinite;
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

@keyframes progress-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* =========================================
   Animated Gradient Mesh Background
   ========================================= */
.hero-gradient-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orb-drift 20s ease-in-out infinite;
    will-change: transform;
}

.mesh-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
    animation-duration: 22s;
}

.mesh-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.14) 0%, transparent 70%);
    top: 20%;
    right: -150px;
    animation-delay: -7s;
    animation-duration: 18s;
}

.mesh-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    bottom: 10%;
    left: 30%;
    animation-delay: -14s;
    animation-duration: 25s;
}

@keyframes orb-drift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 30px) scale(0.97);
    }

    75% {
        transform: translate(40px, 20px) scale(1.03);
    }
}

[data-theme="light"] .mesh-orb-1 {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 70%);
}

[data-theme="light"] .mesh-orb-2 {
    background: radial-gradient(circle, rgba(249, 115, 22, 0.05) 0%, transparent 70%);
}

[data-theme="light"] .mesh-orb-3 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.04) 0%, transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
    .mesh-orb {
        animation: none;
    }

    #scroll-progress {
        animation: none;
    }
}

/* =========================================
   Section Divider
   ========================================= */
.section-divider {
    line-height: 0;
    margin-bottom: -1px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.section-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

/* Terminal Window */
.hero-visual {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* =========================================
   3D Device Mockup (Phase 2B)
   ========================================= */
.device-mockup {
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 1200px;
}

.device-frame {
    background: linear-gradient(145deg, #1e2130, #0d1117);
    border-radius: 18px;
    border: 2px solid rgba(99, 102, 241, 0.35);
    padding: 10px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: rotateY(-5deg) rotateX(3deg);
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
    animation: none;
}

.device-mockup:hover .device-frame {
    transform: rotateY(0deg) rotateX(0deg);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 40px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(99, 102, 241, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes device-float {

    0%,
    100% {
        transform: rotateY(-5deg) rotateX(3deg) translateY(0px);
    }

    50% {
        transform: rotateY(-5deg) rotateX(3deg) translateY(-8px);
    }
}

.device-mockup:hover .device-frame {
    animation: none;
}

.device-screen {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    line-height: 0;
}

.device-screen img,
.device-screen .slide-img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    object-position: top;
    display: block;
    border-radius: 8px;
    image-rendering: auto;
}

.device-screen-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.08) 0%,
            transparent 50%);
    border-radius: 8px;
    pointer-events: none;
}

.device-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: device-glow-pulse 3s ease-in-out infinite;
}

@keyframes device-glow-pulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@media (prefers-reduced-motion: reduce) {
    .device-frame {
        animation: none;
    }

    .device-glow {
        animation: none;
    }
}

.code-window {
    background: #0d1117;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    font-family: 'JetBrains Mono', monospace;
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s ease;
}

.hero-visual:hover .code-window {
    transform: rotateY(0) rotateX(0);
}

.window-header {
    background: #161b22;
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.dots {
    position: absolute;
    left: 16px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.title {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.window-content {
    padding: 24px;
    font-size: 0.9rem;
    color: #e6edf3;
}

.code-line {
    margin-bottom: 8px;
    white-space: nowrap;
}

.prompt {
    color: var(--secondary);
    margin-right: 8px;
}

.output {
    color: var(--text-muted);
}

.success {
    color: #4ade80;
}

.highlight {
    color: var(--primary);
    font-weight: bold;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background: var(--text-muted);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.visual-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    z-index: -1;
}

/* Particle Canvas */
.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Features Section */
.features {
    padding: 120px 0;
    background: var(--bg-darker);
    position: relative;
    /* Performance: defer rendering of off-screen content */
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    cursor: default;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.feature-card:hover .icon-box {
    background: var(--primary);
    color: white;
    transform: rotate(5deg);
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-highlight);
}

/* Tech Stack */
.tech-stack {
    padding: 100px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.tech-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 60px;
    margin-top: 60px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    transition: all 0.3s ease;
    /* Minimum touch target */
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
}

.tech-item i {
    font-size: 3rem;
    transition: all 0.3s ease;
}

.tech-item span {
    font-weight: 500;
}

.tech-item:hover {
    color: var(--text-main);
}

.tech-item:hover i {
    color: var(--primary);
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* Roadmap */
.roadmap {
    padding: 120px 0;
    background: var(--bg-darker);
    content-visibility: auto;
    contain-intrinsic-size: auto 600px;
}

.roadmap-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--border));
}

.roadmap-item {
    position: relative;
    padding: 0 0 48px 32px;
}

.roadmap-item:last-child {
    padding-bottom: 0;
}

.roadmap-marker {
    position: absolute;
    left: -25px;
    top: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 1;
    transition: all 0.3s ease;
}

.roadmap-item.completed .roadmap-marker {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.roadmap-item.upcoming .roadmap-marker {
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-muted);
}

.roadmap-item:hover .roadmap-marker {
    transform: scale(1.15);
}

.roadmap-item.upcoming:hover .roadmap-marker {
    border-color: var(--primary);
    color: var(--primary);
}

.roadmap-content h3 {
    font-size: 1.25rem;
    color: var(--text-highlight);
    margin-bottom: 8px;
}

.roadmap-content p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Get Started */
.get-started {
    padding: 120px 0;
    content-visibility: auto;
    contain-intrinsic-size: auto 700px;
}

.start-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.prereqs {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--secondary);
}

.prereqs h4 {
    margin-bottom: 16px;
    color: var(--text-highlight);
}

.prereqs ul li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.prereqs ul li i {
    color: var(--secondary);
    font-size: 0.9rem;
}

.code-block-wrapper {
    background: #0f172a;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    min-width: 0;
}

.code-header {
    background: #1e293b;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.code-header span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.copy-btn:hover {
    color: white;
}

.code-block-wrapper pre {
    padding: 24px;
    margin: 0;
    overflow-x: auto;
}

.code-block-wrapper code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #e2e8f0;
}

/* Community Section */
.community {
    padding: 120px 0;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.community-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-main);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.community-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.community-card:hover::before {
    transform: scaleX(1);
}

.community-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.community-card:hover .community-icon {
    background: var(--primary);
    color: white;
    transform: rotate(5deg) scale(1.05);
}

.community-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-highlight);
}

.community-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.community-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap 0.3s ease;
}

.community-card:hover .community-link {
    gap: 12px;
}

/* Footer */
footer {
    padding: 60px 0 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
}

.footer-container {
    display: flex;
    flex-direction: column;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.footer-brand-col .footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-highlight);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: center;
}

.copyright {
    color: rgba(148, 163, 184, 0.5);
    font-size: 0.9rem;
}

/* Prism.js Overrides */
.code-block-wrapper pre[class*="language-"],
.code-block-wrapper code[class*="language-"] {
    background: transparent !important;
    margin: 0 !important;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

/* Responsive Design */

/* Large tablets and small desktops (1024px - 1280px) */
@media (max-width: 1280px) {
    .container {
        max-width: 1024px;
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    h1 {
        font-size: clamp(1.875rem, 4vw + 0.5rem, 2.8rem);
    }

    .hero-container,
    .start-content {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .prereqs {
        text-align: left;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Mobile landscape and small tablets (640px - 768px) */
@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: min(320px, 85vw);
        height: calc(100vh - var(--nav-height));
        height: calc(100dvh - var(--nav-height));
        /* Dynamic viewport height */
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--border);
        flex-direction: column;
        padding: 40px 24px;
        gap: 24px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
        overscroll-behavior: contain;
        /* Smooth scrolling on iOS */
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 16px 12px;
        border-bottom: 1px solid var(--border);
        /* Ensure touch targets are 44x44px minimum */
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .github-link {
        justify-content: center;
        width: 100%;
    }

    .mobile-menu-btn {
        display: block;
        /* Ensure proper touch target */
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    body.menu-open {
        overflow: hidden;
        /* Prevent background scrolling */
        position: fixed;
        width: 100%;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 16px;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .code-window {
        transform: none;
        font-size: 0.85rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .window-content {
        padding: 16px;
        overflow-x: hidden;
    }

    .code-line {
        white-space: pre-wrap;
        word-break: break-all;
        font-size: 0.8rem;
    }
}

/* Small mobile (480px - 640px) */
@media (max-width: 640px) {
    .container {
        padding: 0 max(16px, var(--safe-area-inset-left));
        padding-left: max(16px, var(--safe-area-inset-left));
        padding-right: max(16px, var(--safe-area-inset-right));
    }

    h1 {
        font-size: clamp(1.75rem, 6vw, 2.2rem);
    }

    .card-grid,
    .features-grid,
    .community-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tech-grid {
        gap: 32px;
    }

    .tech-item i {
        font-size: 2.5rem;
    }

    .github-stats {
        justify-content: center;
        gap: 12px;
    }

    .stat-item {
        flex: 1;
        min-width: 0;
        padding: 10px 14px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Improve form inputs on mobile */
    input,
    button,
    select,
    textarea {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}

/* Extra small mobile (320px - 480px) */
@media (max-width: 480px) {
    :root {
        --nav-height: 64px;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .hero {
        padding: 80px 0 40px;
    }

    .badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .github-stats {
        flex-direction: column;
        width: 100%;
    }

    .stat-item {
        width: 100%;
    }

    .feature-card {
        padding: 28px 20px;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
}

/* Desktop hover optimizations */
@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px);
    }

    .nav-links a:hover {
        transform: translateX(4px);
    }
}

/* Ultra-wide displays (> 1920px) */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }

    .hero-container {
        gap: 100px;
    }
}

/* Footer responsive */
@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 640px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .footer-brand-col .footer-brand {
        justify-content: center;
    }

    .footer-col {
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-main);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* Hero Badges */
.hero-badges {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-badges .badge {
    margin-bottom: 0;
}

.badge.secondary {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--secondary);
}

/* Newsletter Section */
.newsletter {
    padding: 80px 0;
    position: relative;
}

.newsletter-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 60px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.newsletter-text {
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.newsletter-text h2 {
    margin-bottom: 12px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex-grow: 1;
    max-width: 450px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-message {
    color: #4ade80;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-error {
    color: #f87171;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 992px) {
    .newsletter-card {
        flex-direction: column;
        text-align: center;
        padding: 40px;
    }

    .newsletter-form {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }
}

/* Screenshots Gallery */
.screenshots {
    padding: 120px 0;
    background: var(--bg-dark);
    content-visibility: auto;
    contain-intrinsic-size: auto 1000px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay span {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03) translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: fit-content;
    max-width: min(90vw, 900px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    /* Keep tiny screenshots readable without stretching them beyond the viewport */
    width: auto;
    height: auto;
    max-width: min(90vw, 640px);
    max-height: 80vh;
    object-fit: contain;
    image-rendering: pixelated;
    /* keep pixel-art screenshots crisp */
    border-radius: var(--radius-md);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border);
    display: block;
}

.lightbox-caption {
    margin-top: 20px;
    text-align: center;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 2001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

@media (max-width: 768px) {
    .lightbox {
        padding: 20px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* =========================================
   Phase 3A — Bento Grid Features
   ========================================= */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: stretch;
    grid-auto-flow: dense;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--spring);
    box-shadow: var(--shadow-card);
    /* Spotlight glow vars — updated by JS on mousemove */
    --glow-x: 50%;
    --glow-y: 50%;
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        240px circle at var(--glow-x) var(--glow-y),
        rgba(99, 102, 241, 0.07),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

.bento-card > * {
    position: relative;
    z-index: 1;
}

.bento-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

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

/* Large card spans 2 columns on desktop */
.bento-large {
    grid-column: 1 / 3;
    grid-row: auto;
    display: flex;
    flex-direction: column;
}

.bento-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Medium spans 1 column — inherits base .bento-card styles */

/* Small spans 1 column */
.bento-small {
    padding: 28px;
}

.bento-accent {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.2);
}

.bento-future {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.06) 0%, rgba(99, 102, 241, 0.08) 100%);
}

.bento-card-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.bento-glow {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.bento-card:hover .bento-glow {
    opacity: 1;
}

.bento-card h3 {
    font-size: 1.3rem;
    color: var(--text-highlight);
    margin-bottom: 12px;
    margin-top: 16px;
}

.bento-card p {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Preview image inside large card — fixed height so card stays compact */
.bento-preview {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    flex: none;
    height: 160px;
}

.bento-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    image-rendering: auto;
    display: block;
}

/* Tag chips */
.bento-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.bento-tag {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Layer stack visual */
.bento-layers {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 16px;
}

.bento-layers .layer {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    transition: all 0.3s ease;
}

.bento-card:hover .bento-layers .layer {
    background: rgba(99, 102, 241, 0.15);
}

.coming-soon-badge {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--secondary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    vertical-align: middle;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-flow: row;
    }

    .bento-large {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-flow: row;
    }

    .bento-large {
        grid-column: 1;
        grid-row: auto;
    }
}

/* =========================================
   Phase 3B — Gallery Carousel
   ========================================= */
.screenshots {
    padding: 120px 0 60px;
    background: var(--bg-dark);
    overflow: hidden;
}

/* Featured hero shot */
.gallery-featured {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 24px;
}

.gallery-featured-device {
    position: relative;
    flex-shrink: 0;
}

.gf-frame {
    background: linear-gradient(145deg, #1e2130, #0d1117);
    border-radius: 16px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    padding: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.gf-frame img {
    width: 320px;
    height: auto;
    max-height: 240px;
    object-fit: cover;
    object-position: top;
    display: block;
    border-radius: 10px;
    image-rendering: pixelated;
}

.gf-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, transparent 55%);
    border-radius: 10px;
    pointer-events: none;
}

.gf-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.3) 0%, transparent 65%);
    z-index: -1;
    border-radius: 50%;
    animation: device-glow-pulse 3s ease-in-out infinite;
}

.gallery-featured-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--primary);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.gallery-featured-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--text-highlight);
    margin-bottom: 16px;
    line-height: 1.3;
}

.gallery-featured-text p {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Horizontal Carousel */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 70px;
}

.carousel-track-outer {
    overflow: hidden;
    flex: 1;
    border-radius: var(--radius-md);
}

.carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: center;
}

.slide-device {
    background: linear-gradient(145deg, #1a1f2e, #0d1117);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    line-height: 0;
}

.slide-device img {
    width: 188px;
    height: 141px;
    object-fit: cover;
    object-position: top;
    border-radius: 8px;
    image-rendering: pixelated;
    display: block;
}

.carousel-slide:hover .slide-device {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(99, 102, 241, 0.2);
    transform: translateY(-4px) scale(1.02);
}

.carousel-slide.active .slide-device {
    border-color: rgba(99, 102, 241, 0.85);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55), 0 0 24px rgba(99, 102, 241, 0.28);
    transform: translateY(-4px) scale(1.02);
}

.slide-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: center;
    transition: color 0.3s ease;
}

.slide-why {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 190px;
}

.carousel-slide:hover .slide-label {
    color: var(--text-highlight);
}

.carousel-slide.active .slide-label {
    color: var(--text-highlight);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.carousel-btn-prev {
    left: 5px;
}

.carousel-btn-next {
    right: 5px;
}

/* Pagination dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
    padding: 0 24px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary);
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

@media (max-width: 768px) {
    .gallery-featured {
        flex-direction: column;
        text-align: center;
        margin: 40px auto;
        gap: 32px;
    }

    .gf-frame img {
        width: 240px;
    }

    .carousel-wrapper {
        padding: 0 52px;
    }

    .carousel-slide {
        flex: 0 0 150px;
    }

    .slide-device img {
        width: 138px;
        height: 104px;
    }
}

/* =========================================
   Phase 3C — Tech Logo Cloud
   ========================================= */
.tech-logo-cloud {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 48px;
    margin-top: 64px;
}

.tech-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
    cursor: default;
    animation: tech-float 6s ease-in-out infinite;
    max-width: 220px;
    text-align: center;
}

.tech-logo-item:nth-child(1) {
    animation-delay: 0s;
    animation-duration: 6s;
}

.tech-logo-item:nth-child(2) {
    animation-delay: -1.2s;
    animation-duration: 7s;
}

.tech-logo-item:nth-child(3) {
    animation-delay: -2.4s;
    animation-duration: 5.5s;
}

.tech-logo-item:nth-child(4) {
    animation-delay: -3.6s;
    animation-duration: 6.5s;
}

.tech-logo-item:nth-child(5) {
    animation-delay: -4.8s;
    animation-duration: 5s;
}

@keyframes tech-float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tech-logo-item {
        animation: none;
    }
}

.tech-logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.tech-logo-circle svg {
    width: 56px;
    height: 56px;
}

.tech-logo-item:hover .tech-logo-circle {
    transform: scale(1.12);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.2);
}

.tech-logo-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.tech-logo-item:hover span {
    color: var(--text-highlight);
}

.tech-rationale {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 22ch;
}

.tech-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--bg-darker);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    max-width: 260px;
    white-space: normal;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.tech-logo-item:hover .tech-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 640px) {
    .tech-logo-cloud {
        gap: 28px;
    }

    .tech-logo-circle {
        width: 64px;
        height: 64px;
        border-radius: 14px;
    }

    .tech-logo-circle svg {
        width: 44px;
        height: 44px;
    }
}

/* =========================================
   Phase 3D — Horizontal Roadmap Timeline
   ========================================= */
.roadmap {
    padding: 120px 0;
    background: var(--bg-darker);
    overflow: hidden;
}

.roadmap-h-timeline {
    position: relative;
    margin-top: 80px;
    padding: 0 20px;
}

.roadmap-h-track {
    position: absolute;
    top: 28px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(to right, var(--primary), rgba(99, 102, 241, 0.15));
}

.roadmap-h-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.roadmap-h-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.roadmap-h-marker {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.roadmap-h-item.completed .roadmap-h-marker {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2),
        0 0 20px rgba(99, 102, 241, 0.4);
}

.roadmap-h-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulse-ring 2s ease-out infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.9);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .roadmap-h-pulse {
        animation: none;
    }
}

.roadmap-h-item.upcoming .roadmap-h-marker {
    background: var(--bg-card);
    border: 2px solid var(--border);
    color: var(--text-muted);
}

.roadmap-h-item.upcoming:hover .roadmap-h-marker {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.1);
}

.roadmap-h-card {
    padding: 20px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    width: 100%;
}

.roadmap-h-item.completed .roadmap-h-card {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.05);
}

.roadmap-h-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.roadmap-h-version {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.roadmap-h-card h3 {
    font-size: 1.05rem;
    color: var(--text-highlight);
    margin-bottom: 8px;
}

.roadmap-h-card p {
    font-size: 0.88rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .roadmap-h-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .roadmap-h-track {
        display: none;
    }
}

@media (max-width: 560px) {
    .roadmap-h-items {
        grid-template-columns: 1fr;
    }

    .roadmap-h-item {
        align-items: flex-start;
        text-align: left;
        flex-direction: row;
        gap: 16px;
    }

    .roadmap-h-marker {
        margin-bottom: 0;
        flex-shrink: 0;
    }
}

/* =========================================
   Phase 3E — Community Social Proof
   ========================================= */
.community-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin: 0 auto 60px;
    padding: 40px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.community-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.community-star-glow {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.community-star-glow .fas.fa-star {
    font-size: 2.5rem;
    color: #fbbf24;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.6));
    animation: star-pulse 2.5s ease-in-out infinite;
}

@keyframes star-pulse {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.9));
    }
}

@media (prefers-reduced-motion: reduce) {
    .community-star-glow .fas.fa-star {
        animation: none;
    }
}

.community-star-count {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-highlight);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.community-star-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.community-contributors {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.contributor-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.contributor-avatars {
    display: flex;
    align-items: center;
}

.contributor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
    margin-left: -10px;
    overflow: hidden;
    background: var(--bg-card);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.contributor-avatar:first-child {
    margin-left: 0;
}

.contributor-avatar:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 2;
}

.contributor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.contributor-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.contributor-cta {
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap 0.3s ease;
}

.contributor-cta:hover {
    opacity: 0.8;
}

@media (max-width: 700px) {
    .community-hero {
        flex-direction: column;
        text-align: center;
        gap: 32px;
        padding: 32px 24px;
    }

    .community-contributors {
        align-items: center;
    }
}

/* =========================================
   Phase 3F — Animated Step-by-Step Get Started
   ========================================= */
.get-started {
    padding: 120px 0;
    background: var(--bg-dark);
}

.build-story {
    padding: 40px 0 120px;
    background:
        radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.12), transparent 35%),
        radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.1), transparent 32%),
        var(--bg-dark);
}

.build-story-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: center;
    padding: 40px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(2, 6, 23, 0.92));
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-card-hover);
    overflow: hidden;
    position: relative;
}

.build-story-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.08), transparent 35%, rgba(6, 182, 212, 0.08));
    pointer-events: none;
}

.build-story-copy,
.build-story-terminal {
    position: relative;
    z-index: 1;
}

.build-story-copy p {
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 58ch;
}

.build-story-points {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.build-story-point {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.build-story-point strong {
    color: var(--text-highlight);
    font-size: 0.95rem;
}

.build-story-point span {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.build-story-terminal {
    transform: none;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.build-story-terminal .window-content {
    min-height: 280px;
}

.steps-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 60px;
}

.steps-sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 100px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid transparent;
}

.step-indicator:hover,
.step-indicator.active {
    background: var(--bg-card);
    border-color: rgba(99, 102, 241, 0.2);
}

.step-indicator.active .step-num {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.step-info-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-highlight);
}

.step-info-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.step-connector {
    width: 2px;
    height: 28px;
    background: var(--border);
    margin-left: 37px;
}

.steps-code {
    min-height: 240px;
}

.step-panel {
    display: none;
    animation: step-fade-in 0.4s ease;
}

.step-panel.active {
    display: block;
}

@keyframes step-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prereqs-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
    background: rgba(6, 182, 212, 0.06);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.prereqs-pill i {
    color: var(--secondary);
}

.prereqs-pill strong {
    color: var(--secondary);
}

@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .steps-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .step-indicator {
        flex: unset;
        min-width: unset;
    }

    .step-connector {
        display: none;
    }

    .build-story-shell {
        grid-template-columns: 1fr;
        padding: 28px;
    }
}

@media (max-width: 500px) {
    .steps-sidebar {
        grid-template-columns: 1fr;
    }

    .build-story-shell {
        padding: 22px;
        border-radius: 22px;
    }
}

/* =========================================
   Phase 3G — Dramatic Newsletter CTA
   ========================================= */
.newsletter {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
}

.newsletter-bg-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.newsletter-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.newsletter-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    top: -150px;
    left: -100px;
}

.newsletter-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    bottom: -100px;
    right: -80px;
}

.newsletter-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.newsletter-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.newsletter-headline {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.newsletter-subtext {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}

.newsletter-form-v2 {
    display: flex;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto 24px;
}

.newsletter-input-wrap {
    position: relative;
    flex: 1;
}

.newsletter-input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.newsletter-input-v2 {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-input-v2:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-newsletter-cta {
    white-space: nowrap;
    padding: 14px 28px;
}

.newsletter-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.newsletter-trust span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.newsletter-trust i {
    color: var(--primary);
    font-size: 0.8rem;
}

/* Confetti canvas */
#confettiCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    display: none;
}

@media (max-width: 600px) {
    .newsletter-form-v2 {
        flex-direction: column;
        align-items: stretch;
    }

    .newsletter-input-v2,
    .btn-newsletter-cta {
        width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
}

/* =========================================
   Phase 4A — Scroll-Reveal Animation System
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for child elements */
.reveal-stagger>*:nth-child(1) {
    transition-delay: 0s;
}

.reveal-stagger>*:nth-child(2) {
    transition-delay: 0.08s;
}

.reveal-stagger>*:nth-child(3) {
    transition-delay: 0.16s;
}

.reveal-stagger>*:nth-child(4) {
    transition-delay: 0.24s;
}

.reveal-stagger>*:nth-child(5) {
    transition-delay: 0.32s;
}

.reveal-stagger>*:nth-child(6) {
    transition-delay: 0.40s;
}

/* Scale-up variant for gallery items */
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* =========================================
   Scroll-Driven Animations (2026)
   ========================================= */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .section-header,
        .gallery-featured,
        .community-hero,
        .hw-photo-card,
        .testimonial-card,
        .why-statement,
        .compare-col,
        .build-story-shell {
            animation: scroll-fade-up linear both;
            animation-timeline: view();
            animation-range: entry 5% cover 25%;
        }

        .bento-card,
        .community-card,
        .tech-logo-item,
        .step-panel,
        .build-story-point {
            animation: scroll-scale-in linear both;
            animation-timeline: view();
            animation-range: entry 0% cover 20%;
        }

        .roadmap-h-item:nth-child(odd) {
            animation: scroll-slide-right linear both;
            animation-timeline: view();
            animation-range: entry 10% cover 30%;
        }

        .roadmap-h-item:nth-child(even) {
            animation: scroll-slide-left linear both;
            animation-timeline: view();
            animation-range: entry 10% cover 30%;
        }

        .hw-photo-card img {
            animation: scroll-parallax linear both;
            animation-timeline: view();
            animation-range: cover 0% cover 100%;
        }
    }
}

@keyframes scroll-fade-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scroll-scale-in {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes scroll-slide-right {
    from { opacity: 0; transform: translateX(-48px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scroll-slide-left {
    from { opacity: 0; transform: translateX(48px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scroll-parallax {
    from { transform: translateY(-15px); }
    to { transform: translateY(15px); }
}

@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

[data-theme="light"] .code-window,
[data-theme="light"] .code-block-wrapper {
    background: #0d1117;
    border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .code-header,
[data-theme="light"] .window-header {
    background: #161b22;
}

/* =========================================
   Phase 4B — Card 3D Tilt System
   ========================================= */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.12s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.3s ease;
    will-change: transform;
}

@media (hover: none),
(prefers-reduced-motion: reduce) {
    .tilt-card {
        transform: none !important;
    }
}

/* =========================================
   Phase 4C — Magnetic Button
   ========================================= */
.btn-primary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.1s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

/* =========================================
   Phase 4D — Link Underline Grow (left→right)
   ========================================= */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

/* Footer link underline */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

footer a:hover::after {
    transform: scaleX(1);
}

/* =========================================
   Phase 4E — Nav Active Section Indicator
   ========================================= */
.nav-links a.section-active {
    color: var(--text-highlight);
    font-weight: 600;
}

.nav-links a.section-active::after {
    transform: scaleX(1);
}

/* =========================================
   Phase 4F — Page-Load Content Cascade
   ========================================= */
body.page-loading main>section,
body.page-loading footer {
    opacity: 0;
    transform: translateY(16px);
}

body.page-ready main>section,
body.page-ready footer {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
        transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Stagger each section */
body.page-ready main>section:nth-child(1) {
    transition-delay: 0.05s;
}

body.page-ready main>section:nth-child(2) {
    transition-delay: 0.12s;
}

body.page-ready main>section:nth-child(3) {
    transition-delay: 0.18s;
}

body.page-ready main>section:nth-child(4) {
    transition-delay: 0.24s;
}

body.page-ready main>section:nth-child(5) {
    transition-delay: 0.28s;
}

body.page-ready main>section:nth-child(6) {
    transition-delay: 0.32s;
}

body.page-ready main>section:nth-child(7) {
    transition-delay: 0.35s;
}

body.page-ready footer {
    transition-delay: 0.38s;
}

@media (prefers-reduced-motion: reduce) {

    body.page-loading main>section,
    body.page-loading footer,
    body.page-ready main>section,
    body.page-ready footer {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =========================================
   Phase 5C — Bottom-Sheet Mobile Nav
   Fully replaces the right-slide behavior
   ========================================= */
@media (max-width: 768px) {
    .nav-links {
        /* Explicit fixed position for bottom sheet */
        position: fixed !important;
        /* Cancel all right-slide positioning */
        right: unset !important;
        left: 0 !important;
        /* Position as bottom sheet */
        top: unset !important;
        bottom: 0 !important;
        width: 100% !important;
        height: auto !important;
        max-height: 85dvh;
        /* Style the sheet */
        border-left: none !important;
        border-right: none !important;
        border-top: 1px solid var(--border) !important;
        border-radius: 24px 24px 0 0;
        padding: 8px 32px 40px !important;
        /* Hidden state: translated off below viewport */
        transform: translateY(105%) !important;
        /* Override conflicting right-slide transition */
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
            visibility 0s linear 0.4s !important;
        box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.4) !important;
        z-index: 998 !important;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        /* Ensure it doesn't interfere with layout when hidden */
        pointer-events: none;
        visibility: hidden !important;
    }

    .nav-links.active {
        transform: translateY(0) !important;
        pointer-events: all;
        visibility: visible !important;
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
            visibility 0s linear 0s !important;
    }

    /* Drag handle pill at top of sheet */
    .nav-links::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: var(--border-hover);
        border-radius: 2px;
        margin: 12px auto 24px;
    }

    /* Fix body.menu-open: use overflow:hidden instead of position:fixed
     * (position:fixed causes layout shift; bottom-sheet doesn't need it) */
    body.menu-open {
        overflow: hidden;
        position: static;
        width: auto;
    }
}

/* =========================================
   Phase 5D — Frosted Glass Menu Backdrop
   ========================================= */
.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

body.menu-open .menu-backdrop {
    opacity: 1;
    pointer-events: all;
}

@media (min-width: 769px) {
    .menu-backdrop {
        display: none;
    }
}

/* =========================================
   Phase 5F — Mobile Typography Floor
   ========================================= */
@media (max-width: 480px) {

    /* Ensure no text below 16px on small screens */
    body {
        font-size: 16px;
    }

    p,
    li,
    label,
    input,
    textarea,
    select {
        font-size: 1rem;
    }

    .text-sm,
    .badge,
    small,
    .bento-tag,
    .roadmap-h-version,
    .step-info-sub,
    .prereqs-pill,
    .newsletter-trust span,
    .contributor-label,
    .contributor-cta,
    .slide-label,
    .tech-tooltip,
    .newsletter-eyebrow {
        font-size: 0.875rem;
    }

    /* Ensure nav links are large enough on mobile */
    .nav-links a {
        font-size: 1.05rem !important;
    }
}

/* =========================================
   TRILLION-DOLLAR UPGRADE — v5 Appended Styles
   ========================================= */

/* ── Aurora Gradient Text Animation ── */
@keyframes aurora-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.aurora-text {
    background: linear-gradient(135deg, #6366f1, #a78bfa, #06b6d4, #8b5cf6, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: aurora-shift 6s ease infinite;
    display: inline-block;
}

/* ── Hero Trust Strip ── */
.hero-trust-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-trust-strip>span {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    white-space: nowrap;
}

.trust-tech-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.trust-badge:hover {
    border-color: var(--primary);
    color: var(--text-highlight);
    background: rgba(99, 102, 241, 0.08);
}

/* ── Platform Cycler ── */
.platform-word {
    display: inline-block;
    color: var(--secondary);
    font-weight: 700;
    transition: opacity 0.25s ease, transform 0.25s ease;
    min-width: 80px;
}

.platform-word.fade-out {
    opacity: 0;
    transform: translateY(-6px);
}

/* ── Hero Device Slideshow ── */
.device-screen .slide-img {
    display: none;
}

.device-screen .slide-img.active {
    display: block;
}

/* ── Section Eyebrow / Overline ── */
.section-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 12px;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
}

/* =========================================
   Hardware Gallery Section (Real Device Photos)
   ========================================= */
.hardware-gallery {
    padding: 100px 0;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.hardware-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
}

.hw-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.hw-photo-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: zoom-in;
    aspect-ratio: 4/3;
}

.hw-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.hw-photo-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.hw-photo-card:hover img {
    transform: scale(1.05);
}

.hw-photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 16px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hw-photo-card:hover .hw-photo-label {
    opacity: 1;
}

.hw-device-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(99, 102, 241, 0.85);
    backdrop-filter: blur(8px);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* =========================================
   Why FlxOS Section
   ========================================= */
.why-section {
    padding: 120px 0;
    background: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

.why-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.why-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.why-lead-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.why-lead-text strong {
    color: var(--text-highlight);
    font-weight: 600;
}

.why-cta-row {
    margin-top: 32px;
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.compare-col {
    padding: 32px 28px;
    background: var(--bg-card);
}

.compare-col.compare-flxos {
    background: rgba(99, 102, 241, 0.06);
    border-left: 2px solid var(--primary);
    position: relative;
}

.compare-col.compare-flxos::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-main);
}

.compare-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.compare-col.compare-flxos h4 {
    color: var(--primary);
}

.compare-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compare-col ul li {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.compare-col.compare-flxos ul li {
    color: var(--text-highlight);
}

.compare-icon-no {
    color: #f87171;
    flex-shrink: 0;
    margin-top: 2px;
}

.compare-icon-yes {
    color: #4ade80;
    flex-shrink: 0;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .why-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 600px) {
    .comparison-table {
        grid-template-columns: 1fr;
    }

    .compare-col.compare-flxos {
        border-left: none;
        border-top: 2px solid var(--primary);
    }
}

/* =========================================
   Testimonials Section
   ========================================= */
.testimonials {
    padding: 120px 0;
    background: var(--bg-dark);
    position: relative;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-main);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.testimonial-card:hover::before {
    opacity: 1;
}

.testimonial-quote-mark {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--primary);
    opacity: 0.25;
    font-family: Georgia, serif;
    margin-bottom: -12px;
}

.testimonial-text {
    font-size: 0.96rem;
    line-height: 1.7;
    color: var(--text-muted);
    font-style: italic;
    flex: 1;
}

.testimonial-text strong {
    color: var(--text-highlight);
    font-style: normal;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-avatar-initials {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.t-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.25);
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-highlight);
    margin-bottom: 2px;
}

.testimonial-handle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.testimonial-handle a {
    color: var(--primary);
    text-decoration: none;
}

.testimonial-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   Command Palette
   ========================================= */
.cmd-palette {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cmd-palette.open {
    opacity: 1;
    pointer-events: all;
}

.cmd-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cmd-modal {
    position: relative;
    z-index: 1;
    width: min(600px, 90vw);
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1), 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.15);
    overflow: hidden;
    transform: scale(0.96) translateY(-8px);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.cmd-palette.open .cmd-modal {
    transform: scale(1) translateY(0);
}

[data-theme="light"] .cmd-modal {
    background: rgba(255, 255, 255, 0.97);
}

.cmd-search-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.cmd-search-wrap i {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

#cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

#cmd-input::placeholder {
    color: var(--text-muted);
}

.cmd-esc-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

.cmd-results {
    max-height: 340px;
    overflow-y: auto;
    padding: 8px;
}

.cmd-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.cmd-result-item:hover,
.cmd-result-item.cmd-active {
    background: rgba(99, 102, 241, 0.12);
}

.cmd-result-item i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.cmd-result-label {
    font-size: 0.95rem;
    color: var(--text-main);
    flex: 1;
}

.cmd-result-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.cmd-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    align-items: center;
}

.cmd-footer-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cmd-footer-hint kbd {
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1px 5px;
    font-family: 'JetBrains Mono', monospace;
}

/* K-hint in navbar */
.nav-k-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary);
    border-radius: 6px;
    padding: 2px 7px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 4px;
    text-decoration: none;
}

.nav-k-hint:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* =========================================
   Footer Social Icons
   ========================================= */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.25s ease;
    text-decoration: none;
}

.footer-social-link:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

/* =========================================
   About — Solo Founder Card
   ========================================= */
.founder-section {
    padding: 80px 0;
    background: var(--bg-dark);
}

.founder-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 48px;
    max-width: 780px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.founder-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-main);
}

.founder-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.founder-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.founder-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
    display: block;
    object-fit: cover;
    background: var(--gradient-main);
}

.founder-avatar-initial {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.35);
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
}

.founder-badge {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: var(--gradient-main);
    color: white;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.founder-info h3 {
    font-size: 1.4rem;
    color: var(--text-highlight);
    margin-bottom: 4px;
}

.founder-title {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.founder-bio {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 20px;
}

.founder-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.founder-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.founder-link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 640px) {
    .founder-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 32px 24px;
        gap: 24px;
    }

    .founder-avatar-wrap {
        margin: 0 auto;
    }

    .founder-links {
        justify-content: center;
    }
}

/* =========================================
   Reveal animations for new sections
   ========================================= */
.testimonial-card.reveal,
.compare-col.reveal,
.why-statement.reveal,
.founder-card.reveal,
.hw-photo-card.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.testimonial-card.visible,
.compare-col.visible,
.why-statement.visible,
.founder-card.visible,
.hw-photo-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-card:nth-child(1) {
    transition-delay: 0s;
}

.testimonial-card:nth-child(2) {
    transition-delay: 0.1s;
}

.testimonial-card:nth-child(3) {
    transition-delay: 0.2s;
}

.hw-photo-card:nth-child(1) {
    transition-delay: 0s;
}

.hw-photo-card:nth-child(2) {
    transition-delay: 0.07s;
}

.hw-photo-card:nth-child(3) {
    transition-delay: 0.14s;
}

.hw-photo-card:nth-child(4) {
    transition-delay: 0.21s;
}

/* ===========================================
   PHASE 1 & 3 & 5: Premium Additions
   =========================================== */

/* ── By the Numbers Strip ─────────────────── */
.numbers-strip {
    padding: 72px 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.numbers-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 20% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 80% 50%, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    position: relative;
}

.number-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    border-right: 1px solid var(--border);
    transition: transform 0.3s var(--spring);
}

.number-item:last-child {
    border-right: none;
}

.number-item:hover {
    transform: translateY(-3px);
}

.number-value {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}

.number-unit {
    font-size: 0.55em;
    font-weight: 700;
    vertical-align: super;
    letter-spacing: 0;
    opacity: 0.8;
}

.number-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .numbers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1px;
        background: var(--border);
    }

    .number-item {
        background: var(--bg-darker);
        border-right: none;
        padding: 20px 12px;
    }

    .numbers-grid .number-item:nth-child(4),
    .numbers-grid .number-item:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .numbers-grid .number-item:last-child {
        grid-column: span 2;
    }
}

/* ── Skeleton shimmer for loading states ──── */
.stat-skeleton {
    display: inline-block;
    width: 36px;
    height: 1.5rem;
    background: linear-gradient(
        90deg,
        var(--bg-card) 25%,
        rgba(99, 102, 241, 0.12) 50%,
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s ease infinite;
    border-radius: 6px;
    vertical-align: middle;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Roadmap progress bars ─────────────────── */
.roadmap-h-progress {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.roadmap-h-bar {
    flex: 1;
    height: 4px;
    background: rgba(148, 163, 184, 0.12);
    border-radius: 4px;
    overflow: hidden;
}

.roadmap-h-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient-main);
    transition: width 1s var(--spring);
    animation: roadmap-fill-in 1.2s var(--spring) both;
    animation-timeline: view();
    animation-range: entry 20% cover 40%;
}

@supports not (animation-timeline: view()) {
    .roadmap-h-fill {
        animation: none;
    }
}

@keyframes roadmap-fill-in {
    from { width: 0 !important; }
}

.roadmap-h-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
    opacity: 0.75;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.01em;
}

/* ── Section eyebrow label ─────────────────── */
.numbers-eyebrow {
    text-align: center;
    margin-bottom: 40px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    opacity: 0.85;
}
