/**
 * Samurai Labs - Main Stylesheet
 * Comprehensive CSS with variables for consistency across all pages
 */

/* =============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================= */

:root {
    /* === BRAND COLORS === */
    --color-brand-green: #10B981;
    --color-brand-blue: #3B82F6;
    --color-brand-purple: #8B5CF6;
    --color-brand-dark-green: #0F766E;
    
    /* === GRAYSCALE COLORS === */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    --color-black: #000000;
    
    /* === FUNCTIONAL COLORS === */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;
    
    /* === GRADIENTS === */
    --gradient-brand: linear-gradient(135deg, #10B981 0%, #3B82F6 50%, #8B5CF6 100%);
    --gradient-brand-reverse: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 50%, #10B981 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    
    /* === TYPOGRAPHY === */
    --font-family-primary: 'Inter', 'ui-sans-serif', 'system-ui', '-apple-system', 'BlinkMacSystemFont', sans-serif;
    --font-family-mono: 'ui-monospace', 'SFMono-Regular', 'SF Mono', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    
    /* Font Sizes */
    --font-size-xs: 0.75rem;     /* 12px */
    --font-size-sm: 0.875rem;    /* 14px */
    --font-size-base: 1rem;      /* 16px */
    --font-size-lg: 1.125rem;    /* 18px */
    --font-size-xl: 1.25rem;     /* 20px */
    --font-size-2xl: 1.5rem;     /* 24px */
    --font-size-3xl: 1.875rem;   /* 30px */
    --font-size-4xl: 2.25rem;    /* 36px */
    --font-size-5xl: 3rem;       /* 48px */
    --font-size-6xl: 3.75rem;    /* 60px */
    --font-size-7xl: 4.5rem;     /* 72px */
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* === SPACING === */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    --space-24: 6rem;      /* 96px */
    --space-32: 8rem;      /* 128px */
    
    /* === BORDER RADIUS === */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.375rem;  /* 6px */
    --radius-lg: 0.5rem;    /* 8px */
    --radius-xl: 0.75rem;   /* 12px */
    --radius-2xl: 1rem;     /* 16px */
    --radius-3xl: 1.5rem;   /* 24px */
    --radius-full: 9999px;
    
    /* === SHADOWS === */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* === TRANSITIONS === */
    --transition-fast: 150ms ease-out;
    --transition-normal: 200ms ease-out;
    --transition-slow: 300ms ease-out;
    --transition-slower: 500ms ease-out;
    
    /* === Z-INDEX === */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 1080;
    
    /* === GLASS MORPHISM VARIABLES === */
    --glass-blur: 32px;
    --glass-sat: 1.8;
    --glass-alpha: 0.15;
    --glass-r: 255;
    --glass-g: 255;
    --glass-b: 255;
    --glass-border-light: rgba(255,255,255,0.1);
    --glass-border-dark: rgba(0,0,0,0.1);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
    
    /* === LAYOUT === */
    --container-max-width: 80rem; /* 1280px */
    --container-padding: 1rem;
    --nav-height: 4rem;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --glass-alpha: 0.25;
        --glass-r: 16;
        --glass-g: 20;
        --glass-b: 18;
        --glass-border-light: rgba(255,255,255,0.1);
        --glass-border-dark: rgba(0,0,0,0.2);
        --glass-shadow: 0 8px 30px rgba(0,0,0,0.2);
    }
}

/* =============================================
   RESET & BASE STYLES
   ============================================= */

/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-family-primary);
    line-height: var(--line-height-normal);
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

/* Remove gap above nav */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family-primary);
    background-color: var(--color-white);
    color: var(--color-gray-900);
    line-height: var(--line-height-normal);
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

/* Text Gradients */
.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-enhanced {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: textGradientShift 4s ease infinite;
}

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

/* Responsive Container */
.container-responsive {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container-responsive {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container-responsive {
        padding: 0 var(--space-8);
    }
}

/* =============================================
   COMPONENT STYLES
   ============================================= */

/* === NAVIGATION === */
.nav-glass {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    background: var(--nav-tint);
    border-bottom: 1px solid rgba(0,0,0,.08);
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
}

/* drop shadow only AFTER scroll */
.nav-glass:not(.scrolled) { 
    box-shadow: none; 
}

.nav-glass.scrolled {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

.nav-glass.scrolled.on-dark {
    box-shadow: 0 10px 28px rgba(0,0,0,.25);
}

/* active underline that survives light/dark */
.nav-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #34d399, #3b82f6, #8b5cf6);
    border-radius: 9999px;
    opacity: 0;
    will-change: transform, width;
    transition: all var(--transition-normal);
}

/* reduce bleed from page particles inside nav */
.nav-glass .noise { 
    opacity: .04; 
}
.nav-glass.on-dark .noise { 
    opacity: .02; 
}

/* sticky overlap compensation for ALL pages */
html, body { 
    scroll-padding-top: var(--nav-height, 72px); 
}

/* tone down CTA on light surfaces; keep punchy on dark */
.nav-glass .btn-cta { 
    filter: saturate(.9) brightness(.98); 
}
.nav-glass.on-dark .btn-cta { 
    filter: none; 
}

.nav-inner {
    max-width: fit-content;
    margin: 0 auto;
    padding: var(--space-3) var(--space-6);
    position: relative;
    isolation: isolate;
    border-radius: var(--radius-3xl);
    overflow: hidden;
}

/* Enhanced nav item styles */
.nav-item {
    position: relative;
    overflow: hidden;
    padding: var(--space-2) var(--space-4);
    color: var(--color-gray-800);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.nav-item:hover {
    color: var(--color-gray-900);
    background: rgba(255, 255, 255, 0.2);
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.nav-item:hover::before {
    left: 100%;
}

/* Nav underline animation */
.nav-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(to right, var(--color-brand-green), var(--color-brand-blue), var(--color-brand-purple));
    border-radius: var(--radius-full);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all var(--transition-normal);
    pointer-events: none;
}

/* Logo styles */
.logo {
    height: 2rem;
    width: auto;
    transition: transform var(--transition-normal);
}

.logo:hover {
    transform: scale(1.05);
}

/* Mobile menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--color-gray-200);
    border-bottom: 1px solid var(--color-gray-200);
    padding: var(--space-6) var(--space-4);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
}

.mobile-menu:not(.hidden) {
    display: block !important; /* Show when not hidden */
}

@media (min-width: 1024px) {
    .mobile-menu {
        display: none !important; /* Always hidden on desktop */
    }
}

.mobile-menu-item {
    display: block;
    padding: var(--space-3) var(--space-4);
    color: var(--color-gray-800);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.mobile-menu-item:hover {
    background: var(--color-gray-100);
    color: var(--color-brand-blue);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-brand);
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    border: 2px solid var(--color-brand-blue);
    color: var(--color-brand-blue);
    background: transparent;
}

.btn-secondary:hover {
    background: var(--color-brand-blue);
    color: var(--color-white);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-lg);
}

/* Enhanced CTA button with shimmer effect */
.btn-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-brand-green), var(--color-brand-blue), var(--color-brand-purple));
    background-size: 200% 200%;
    color: var(--color-white);
    animation: gradientShift 3s ease infinite;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-cta:hover {
    color: var(--color-white);
}

/* === CARDS === */
.card {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-gradient {
    background: var(--gradient-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border-light);
}

/* === SECTIONS === */
.section {
    padding: var(--space-20) 0;
}

.section-hero {
    padding: var(--space-20) 0 var(--space-32) 0;
    background: linear-gradient(to bottom right, var(--color-gray-50), var(--color-white));
}

.section-dark {
    background: var(--color-gray-900);
    color: var(--color-white);
}

/* === TABBED SERVICES === */
.tabbed-services {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0E1714;
}

.tab-button {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    transition: all var(--transition-normal);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-gray-400);
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tab-button[aria-selected="true"] {
    color: #34d399;
    background: rgba(255, 255, 255, 0.1);
}

.tab-panel {
    opacity: 0;
    transform: translateY(12px);
    display: none;
    transition: all var(--transition-normal);
}

.tab-panel.active {
    opacity: 1;
    transform: translateY(0);
    display: grid;
}

/* Tech cards in tabbed services */
.tech-card {
    position: relative;
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-4) var(--space-5);
    box-shadow: 0 1px 0 0 rgba(255,255,255,0.05) inset, 0 20px 40px -20px rgba(0,0,0,0.5);
}

.tech-item {
    position: relative;
    border-radius: var(--radius-xl);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-3);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.tech-item:hover {
    border-color: rgba(52, 211, 153, 0.4);
    transform: translateY(-2px) scale(1.02);
}

/* Avatar badges */
.avatar-badge {
    position: absolute;
    top: -24px;
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border: 2px solid #0e1714;
    animation: bounceIn 0.6s ease-out;
}

/* === FAQ === */
.faq-item {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-gray-200);
    margin-bottom: var(--space-4);
}

.faq-button {
    width: 100%;
    padding: var(--space-6);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

.faq-button:hover {
    background: var(--color-gray-50);
}

.faq-icon {
    width: 20px;
    height: 20px;
    transform: rotate(0deg);
    transition: transform var(--transition-normal);
    color: var(--color-gray-500);
}

.faq-content {
    padding: 0 var(--space-6) var(--space-6);
    color: var(--color-gray-600);
}

/* =============================================
   ANIMATIONS
   ============================================= */

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

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

@keyframes bounceIn {
    0% { transform: scale(0) translateY(10px); opacity: 0; }
    60% { transform: scale(1.1) translateY(-2px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shardFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes sparkleAnimation {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.5) rotate(360deg) translateY(-50px); opacity: 0; }
}

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

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

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

/* New H1 and H2 animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUpDelayed {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    50% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* H1 and H2 animation classes */
.hero-title {
    animation: fadeInUp 0.8s ease-out forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.hero-subtitle {
    animation: fadeInUpDelayed 1.2s ease-out forwards;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* Fallback for browsers that don't support animations */
@supports not (animation: fadeInUp 0.8s ease-out forwards) {
    .hero-title,
    .hero-subtitle {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll ticker animation */
.scroll-ticker {
    animation: scroll 30s linear infinite;
}

.scroll-ticker:hover {
    animation-play-state: paused;
}

/* Floating particle animation */
.floating-particle {
    animation: float 6s ease-in-out infinite;
}

/* Sparkle animation for decorative elements */
.animate-sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

/* Accent shard animation */
.accent-shard {
    animation: shardFloat 3s ease-in-out infinite;
}

/* Pointer animation */
.pointer {
    animation: pulse 2s infinite;
}

/* =============================================
   INTERACTIVE PROMPT BAR & CTA STYLES
   ============================================= */

/* Prompt Bar Container */
.prompt-text {
    font-family: 'Inter', 'ui-sans-serif', 'system-ui', 'sans-serif';
    line-height: 1.4;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cursor Animation */
.cursor-blink {
    animation: blink 1s infinite;
    background: linear-gradient(to bottom, #111827, #374151, #111827);
    border-radius: 2px;
    position: relative;
}


@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}



/* Prompt Bar Responsive Design */
@media (max-width: 640px) {
    .prompt-text {
        font-size: 1.125rem;
        min-height: 3rem;
        padding: 0 1rem;
    }
    
    .cursor-blink {
        height: 1.5rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .prompt-text {
        font-size: 1.25rem;
        min-height: 2.75rem;
    }
}

/* Enhanced glow effect for the prompt bar */
.bg-gray-900 {
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(16, 185, 129, 0.1),
        0 0 60px rgba(59, 130, 246, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Prompt bar inner glow effect */
.bg-gray-900::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(59, 130, 246, 0.3), rgba(139, 92, 246, 0.3));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}

/* Enhanced cursor with gradient */
.cursor-blink {
    background: linear-gradient(to bottom, #111827, #374151, #111827);
    border-radius: 2px;
    position: relative;
}

.cursor-blink::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(17, 24, 39, 0.8), transparent);
    border-radius: 2px;
}

/* Smooth transitions for all interactive elements */
.prompt-text,
.cursor-blink,
.talk-to-samurai-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.talk-to-samurai-btn:focus {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

/* Enhanced button glow effect */
.talk-to-samurai-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-brand-green), var(--color-brand-blue), var(--color-brand-purple));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    box-shadow: 
        0 0 30px rgba(16, 185, 129, 0.3), 
        0 0 60px rgba(59, 130, 246, 0.2), 
        0 0 90px rgba(139, 92, 246, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.talk-to-samurai-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 0 40px rgba(16, 185, 129, 0.4), 
        0 0 80px rgba(59, 130, 246, 0.3), 
        0 0 120px rgba(139, 92, 246, 0.2),
        0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Shimmer effect for the button */
.talk-to-samurai-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.talk-to-samurai-btn:hover::before {
    left: 100%;
}

/* Hover text change animation */
.talk-to-samurai-btn:hover span {
    animation: textChange 0.3s ease-in-out;
}

@keyframes textChange {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* Prompt Bar Responsive Design */
@media (max-width: 640px) {
    .prompt-text {
        font-size: 1.125rem;
        min-height: 3rem;
        padding: 0 1rem;
    }
    
    .cursor-blink {
        height: 1.5rem;
    }
    
    .bg-gray-900 {
        margin: 0 1rem;
        padding: 1rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .prompt-text {
        font-size: 1.25rem;
        min-height: 2.75rem;
    }
    
    .bg-gray-900 {
        margin: 0 2rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cursor-blink {
        animation: none;
        opacity: 1;
    }
    
    .talk-to-samurai-btn {
        animation: none;
        background-size: 100% 100%;
    }
    
    .talk-to-samurai-btn:hover {
        transform: none;
    }
    
    .prompt-text {
        transition: none;
    }
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

/* Mobile First Approach */
@media (max-width: 639px) {
    .nav-inner {
        margin: 0 auto;
        padding: var(--space-2) var(--space-4);
    }
    
    .container-responsive {
        padding: 0 var(--space-4);
    }
    
    .section {
        padding: var(--space-16) 0;
    }
    
    .section-hero {
        padding: var(--space-16) 0 var(--space-20) 0;
    }
}

/* Tablet */
@media (min-width: 640px) and (max-width: 1023px) {
    .nav-inner {
        padding: var(--space-3) var(--space-5);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .nav-inner {
        padding: var(--space-3) var(--space-6);
    }
}

/* =============================================
   REDUCED MOTION
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .nav-underline,
    .nav-item,
    .tab-panel,
    .avatar-badge,
    .pointer,
    .accent-shard,
    .scroll-ticker,
    .floating-particle,
    .animate-sparkle,
    .hero-title,
    .hero-subtitle {
        animation: none;
        transition: none;
    }
    
    .nav-item::before {
        transition: none;
    }
}

/* =============================================
   HIGH CONTRAST MODE
   ============================================= */

@media (prefers-contrast: high) {
    .nav-item:focus-visible {
        outline: 3px solid currentColor;
        outline-offset: 2px;
    }
    
    .nav-underline {
        background: currentColor;
    }
}

/* =============================================
   PRINT STYLES
   ============================================= */

@media print {
    .nav-glass {
        position: static;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-gray-300);
        box-shadow: none;
    }
    
    .mobile-menu,
    .glass-dropdown {
        display: none !important;
    }
    
    .btn {
        border: 1px solid var(--color-gray-400);
        background: transparent !important;
        color: var(--color-gray-900) !important;
    }
}

/* =============================================
   ANIMATED PROMPT BAR STYLES
   ============================================= */

/* White prompt bar container */
.prompt-bar-container {
    background: var(--color-white);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-gray-100);
    position: relative;
    overflow: hidden;
}

/* Prompt bar glow effect for better visibility on light backgrounds */
.prompt-bar-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
}

/* Helper label styling */
.prompt-helper-label {
    color: var(--color-gray-500);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Prompt text container */
.prompt-text-container {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-height: 3.75rem;
    max-width: 60%;
}

/* Animated prompt text */
.prompt-text {
    color: var(--color-gray-900);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    transition: all 0.3s ease;
}

/* CTA button inside prompt bar */
.prompt-cta-button {
    background: var(--gradient-brand);
    color: var(--color-white);
    border-radius: 9999px;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.prompt-cta-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.prompt-cta-button:focus {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

/* Button glow effect */
.prompt-cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-brand);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 9999px;
}

.prompt-cta-button:hover::before {
    opacity: 1;
}

.prompt-cta-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-brand);
    opacity: 0.2;
    filter: blur(1.5rem);
    transform: scale(1.5);
    transition: all 0.5s ease;
    border-radius: 9999px;
}

.prompt-cta-button:hover::after {
    opacity: 0.4;
    transform: scale(1.2);
}

/* Responsive design for prompt bar */
@media (max-width: 640px) {
    .prompt-text {
        font-size: var(--font-size-lg);
        min-height: 3rem;
    }
    
    .prompt-cta-button {
        font-size: var(--font-size-base);
        padding: 0.625rem 1.25rem;
        margin-left: 0.5rem;
    }
    
    .prompt-helper-label {
        font-size: var(--font-size-xs);
    }
    
    .prompt-bar-container {
        padding: 1rem;
    }
    
    .prompt-text-container {
        min-height: 3rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .prompt-text {
        font-size: var(--font-size-xl);
        min-height: 3.5rem;
    }
    
    .prompt-cta-button {
        margin-left: 0.5rem;
    }
}

/* Ensure the prompt bar maintains proper spacing on very small screens */
@media (max-width: 480px) {
    .prompt-bar-container {
        padding: 0.75rem;
    }
    
    .prompt-cta-button {
        padding: 0.5rem 1rem;
        font-size: var(--font-size-sm);
        margin-left: 0.25rem;
    }
    
    .prompt-text {
        font-size: var(--font-size-base);
    }
    
    .prompt-text-container {
        min-height: 2.5rem;
    }
}

/* Ensure the prompt bar has proper contrast on all backgrounds */
.prompt-bar-container {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
}

/* Enhanced focus states for accessibility */
.prompt-cta-button:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Smooth transitions for all prompt bar elements */
.prompt-bar-container,
.prompt-text,
.prompt-cta-button,
.prompt-helper-label {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure the prompt bar stands out on gradient backgrounds */
.prompt-bar-container {
    position: relative;
    z-index: 10;
}

/* Add a subtle inner shadow for depth */
.prompt-bar-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Ensure prompt bar is readable on gradient backgrounds */
.prompt-bar-container {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Enhanced shadow for better contrast */
.prompt-bar-container {
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Hide cursor when JavaScript is disabled */
noscript .cursor-blink {
    display: none;
}

/* Ensure proper text wrapping for fallback */
noscript .prompt-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Hide JavaScript version when noscript is active */
.no-js-prompt-content {
    display: none;
}

/* Show noscript version only when JavaScript is disabled */
noscript .no-js-prompt-content {
    display: flex;
}
