/* ===================================
   Vibe Engineering - Custom Styles
   ================================== */

/* Base Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* ===================================
   Logo & Branding
   ================================== */

/* Logo responsive sizing and optimization */
.logo-image {
    width: 2rem;
    height: 2rem;
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
    /* Optimize for crisp rendering */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Ensure proper display on all devices */
    max-width: none;
    flex-shrink: 0;
}

/* Logo hover effects */
.logo-link {
    display: inline-block;
    opacity: 0.5;
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
    /* Prevent layout shift on hover */
    will-change: opacity, transform;
}

.logo-link:hover {
    opacity: 0.7;
    transform: scale(1.05);
}

.logo-link:focus {
    opacity: 0.8;
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Footer logo specific styling */
.footer-logo {
    width: 1.25rem;
    height: 1.25rem;
    opacity: 0.4;
    flex-shrink: 0;
}

/* Mobile logo optimizations */
@media (max-width: 640px) {
    .logo-image {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    /* Ensure logo stays visible on small screens */
    .logo-link {
        opacity: 0.6;
    }
    
    .logo-link:hover,
    .logo-link:focus {
        opacity: 0.8;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-image {
        /* Ensure crisp rendering on retina displays */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===================================
   Animations & Transitions
   ================================== */

/* Logo fade animation */
.logo-fade {
    animation: logoFade 1s ease-out;
}

@keyframes logoFade {
    from { opacity: 0; }
    to { opacity: 0.5; }
}

/* Content fade animation */
.content-fade {
    animation: contentFade 1.2s ease-out;
}

@keyframes contentFade {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Hero section fade animation */
.hero-fade {
    animation: heroFade 2s ease-out;
}

@keyframes heroFade {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Subtle pulse animation */
.pulse-subtle {
    animation: subtlePulse 3s infinite;
}

@keyframes subtlePulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
    }
}

/* ===================================
   Typography & Content Styling
   ================================== */

/* Manifesto quote styling */
.manifesto-quote {
    position: relative;
}

.manifesto-quote::before {
    content: '"';
    position: absolute;
    left: -1.5rem;
    top: -0.5rem;
    font-size: 3rem;
    color: #e5e7eb;
    font-family: Georgia, serif;
}

/* ===================================
   Form Overrides
   ================================== */

/* Kit.com form styling overrides */
.formkit-form * {
    font-family: 'Inter', -apple-system, sans-serif !important;
}

/* Force Kit forms to match design */
.formkit-form input,
.formkit-form button {
    border-radius: 0.5rem !important;
}

/* ===================================
   Prose Content Styling (Blog/Manifesto)
   ================================== */

.prose h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.prose h3 {
    font-size: 1.125rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #374151;
    letter-spacing: -0.015em;
}

.prose p {
    margin-bottom: 1.5rem;
    line-height: 1.625;
}

/* Note: Main list styling is below in "List improvements" section */

.prose li {
    margin-bottom: 1rem;
    line-height: 1.625;
}

/* Improve spacing for strong text within paragraphs */
.prose p strong {
    font-weight: 600;
}

/* Note: List spacing rules are in "List improvements" section below */

.prose code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.prose pre {
    background-color: #111827;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
}

.prose blockquote {
    border-left: 4px solid #d1d5db;
    padding-left: 1rem;
    font-style: italic;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.prose a {
    color: #111827;
    text-decoration: underline;
}

.prose a:hover {
    text-decoration: none;
}

.prose strong {
    font-weight: 500;
}

.prose img {
    border-radius: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.prose hr {
    margin-top: 3rem;
    margin-bottom: 3rem;
    border-color: #d1d5db;
}

/* ===================================
   Header & Navigation
   ================================== */

/* Mobile menu positioning and behavior */
.mobile-menu {
    /* Ensure menu appears above all content */
    z-index: 100;
    /* Smooth transitions */
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    /* Prevent scroll when menu is open */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Header positioning fixes */
header {
    /* Ensure header stays above content and horizontal rules */
    z-index: 50;
    /* Ensure proper background that covers everything */
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Ensure header extends fully across viewport */
    width: 100%;
    /* Add subtle shadow to separate from content */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* Fixed header specific styles */
header.fixed {
    /* Ensure fixed header has proper background */
    border-bottom: 1px solid rgba(229, 231, 235, 0.3);
}

/* Mobile menu button styling */
.mobile-menu-button {
    /* Ensure button is always accessible */
    z-index: 60;
    /* Proper touch target size */
    min-width: 44px;
    min-height: 44px;
    /* Center the icon */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile menu animations */
@media (max-width: 768px) {
    .mobile-menu:not(.hidden) {
        animation: slideDown 0.2s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Prevent body scroll when mobile menu is open */
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    /* Ensure mobile menu doesn't interfere with horizontal rules */
    .mobile-menu {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    }
}

/* ===================================
   Mobile Responsive Adjustments
   ================================== */

/* Ensure minimum touch target sizes for mobile */
@media (max-width: 768px) {
    /* Improve button touch targets */
    button, .btn, a[class*="bg-"], a[class*="border"] {
        min-height: 44px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    /* Better form field sizing on mobile */
    input[type="email"], input[type="text"], textarea {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Improve spacing for mobile layout */
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better spacing for hero section on mobile */
    .min-h-screen {
        min-height: calc(100vh - 4rem);
        padding-top: 2rem;
    }
    
    /* Improve card layouts on mobile */
    .bg-white.p-8 {
        padding: 1.5rem;
    }
}

/* Mobile typography improvements */
@media (max-width: 640px) {
    .manifesto-quote::before {
        left: -1rem;
        font-size: 2rem;
    }
    
    /* Better text scaling for very small screens */
    .text-xl {
        font-size: 1.125rem;
        line-height: 1.6;
    }
    
    .text-3xl {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    /* Ensure manifesto titles are readable on mobile */
    .manifesto-content h2 {
        font-size: 1.375rem;
        line-height: 1.4;
    }
    
    /* Improve manifesto readability on mobile */
    .manifesto-content .prose {
        max-width: 100%;
    }
    
    .manifesto-content h2 {
        margin-top: 2.5rem;
        padding-top: 1.5rem;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .manifesto-content h2:first-of-type {
        margin-top: 1rem;
        padding-top: 0;
    }
    
    /* Maintain good spacing on mobile */
    .manifesto-content .prose p {
        margin-bottom: 1.5rem;
        line-height: 1.7;
    }
    
    .manifesto-content .prose ul, 
    .manifesto-content .prose ol {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .manifesto-content .prose li {
        margin-bottom: 0.5rem;
    }
}

/* ===================================
   Page-Specific Styling
   ================================== */

/* Pattern page improvements - Clean and readable */
.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

/* Pattern page - enhanced code styling (overrides basic prose code) */
.prose code {
    background-color: #111827;
    color: #34d399;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 500;
}

.prose pre {
    background-color: #111827;
    color: #f3f4f6;
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    border: 1px solid #1f2937;
    font-size: 0.9375rem;
    line-height: 1.7;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    color: #f3f4f6;
    font-weight: 400;
}

/* Enhanced blockquotes for pattern key insights */
.prose blockquote {
    border-left: 4px solid #111827;
    padding-left: 2rem;
    background-color: #f9fafb;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    font-size: 1.25rem;
    line-height: 1.6;
    font-style: italic;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.prose blockquote p {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.prose blockquote strong {
    color: #111827;
    font-weight: 600;
}

/* Section separators using horizontal rules */
.prose hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db, transparent);
    margin-top: 3rem;
    margin-bottom: 3rem;
}

/* ===================================
   Table Styling for Rubrics
   ================================== */

.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    background: white;
    border: 2px solid #e5e7eb;
}

.prose table thead {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 4px solid #0f172a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.prose table th {
    padding: 2rem 2.5rem;
    text-align: left;
    font-weight: 700;
    color: #ffffff;
    border-right: 2px solid #475569;
    vertical-align: top;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.prose table th:last-child {
    border-right: none;
}

.prose table th:first-child {
    border-top-left-radius: 8px;
}

.prose table th:last-child {
    border-top-right-radius: 8px;
}

.prose table tbody tr {
    border-bottom: 2px solid #f1f5f9;
    transition: all 0.2s ease;
}

.prose table tbody tr:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.prose table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.prose table td {
    padding: 2rem 2.5rem;
    vertical-align: top;
    border-right: 2px solid #e2e8f0;
    line-height: 1.6;
    position: relative;
}

.prose table td:last-child {
    border-right: none;
}

/* First column (dimension names) styling */
.prose table td:first-child {
    font-weight: 700;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    min-width: 220px;
    color: #1e293b;
    border-right: 3px solid #cbd5e1;
    font-size: 0.95rem;
}

/* Weight column styling with enhanced visual indicators */
.prose table td:nth-child(2) {
    font-weight: 700;
    white-space: nowrap;
    text-align: left;
    min-width: 100px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-right: 3px solid #cbd5e1;
}

/* Description column */
.prose table td:last-child {
    max-width: 450px;
    word-wrap: break-word;
    color: #475569;
    line-height: 1.7;
    font-size: 0.9rem;
}

/* Enhanced weight color indicators with badges */
.prose table td:nth-child(2):contains("High") {
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    position: relative;
}

.prose table td:nth-child(2):contains("Medium") {
    color: #ffffff;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    position: relative;
}

.prose table td:nth-child(2):contains("Low") {
    color: #ffffff;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    position: relative;
}

/* Add subtle border radius to weight cells for badge effect */
.prose table td:nth-child(2) {
    position: relative;
}

.prose table td:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    border-radius: 6px;
    z-index: -1;
}

/* Bullet point styling in description cells */
.prose table td:last-child ul {
    margin: 0;
    padding-left: 1rem;
}

.prose table td:last-child li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .prose table {
        font-size: 0.8rem;
    }
    
    .prose table th,
    .prose table td {
        padding: 1.25rem 1rem;
    }
    
    .prose table td:first-child {
        min-width: 150px;
    }
    
    .prose table td:nth-child(2) {
        min-width: 70px;
    }
}

/* Pattern-specific enhancements - Refined hierarchy */
.prose h2 {
    font-size: 1.25rem;
    font-weight: 500;
    color: #111827;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    letter-spacing: -0.025em;
}

.prose h2:first-of-type {
    margin-top: 2rem;
    padding-top: 0;
}

/* Better spacing for pattern content */
.prose p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.prose p strong {
    color: #111827;
    font-weight: 600;
}

/* Enhanced vertical rhythm for readability */
.prose > p:first-of-type {
    margin-top: 0;
}

.prose > p:last-of-type {
    margin-bottom: 0;
}

/* Extra breathing room around horizontal rules */
.prose hr {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

/* List improvements */
.prose ul,
.prose ol {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.prose ul li,
.prose ol li {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Ensure bullet points display */
.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.prose ul li {
    display: list-item;
}

.prose ul ul {
    list-style-type: circle;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraph spacing after lists */
.prose ul + p,
.prose ol + p {
    margin-top: 2rem;
}

.prose p + ul,
.prose p + ol {
    margin-top: 1rem;
}

/* Numbered list styling - traditional */
.prose ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
}

.prose ol > li {
    display: list-item;
    padding-left: 0.5rem;
}

/* Checklist styling - Simple and reliable */
.prose input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    vertical-align: top;
}

/* Before/After comparison styling - GitHub Pages compatible */
/* Note: Use classes .before-tdd and .after-tdd on ul elements for styling */
.prose ul.before-tdd {
    background-color: #fef2f2;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid #fca5a5;
}

.prose ul.after-tdd {
    background-color: #f0fdf4;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid #4ade80;
}

/* Manifesto page improvements */
.manifesto-content {
    /* Ensure good reading experience */
    line-height: 1.7;
}

.manifesto-content .prose {
    /* Increase max width for better readability */
    max-width: 65ch;
}

.manifesto-content h2 {
    /* Add subtle visual separation for major sections */
    border-top: 1px solid #f3f4f6;
    padding-top: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.manifesto-content h2:first-of-type {
    /* Remove border from first section */
    border-top: none;
    padding-top: 0;
    margin-top: 1.5rem;
}

/* More generous spacing for manifesto paragraphs */
.manifesto-content .prose p {
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Better list spacing in manifesto */
.manifesto-content .prose ul,
.manifesto-content .prose ol {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.manifesto-content .prose li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* Improve readability for section intros */
.manifesto-content p:first-of-type {
    font-size: 1.125rem;
    color: #4b5563;
}

/* Style for the "Old Rule/New Reality" sections and section intros */
/* Note: Use class .section-intro on p elements for styling */
.manifesto-content p.section-intro {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Add space before sections that start with strong text */
.manifesto-content p + p strong:first-child {
    margin-top: 2rem;
}

/* ===================================
   Image Performance Optimization
   ================================== */

/* Lazy loading for images */
img[loading="lazy"] {
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

/* Optimize image rendering */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimize-contrast;
}

/* Responsive images by default */
.responsive-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Image blur-up technique placeholder */
.blur-up {
    filter: blur(5px);
    transition: filter 0.3s ease-in-out;
}

.blur-up.loaded {
    filter: blur(0);
}

/* Critical images should load immediately */
.critical-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===================================
   Utility Classes
   ================================== */

/* Custom utility for hero text sizing */
.hero-text-large {
    font-size: 2.25rem; /* Start smaller on mobile */
    line-height: 1.1;
}

@media (min-width: 640px) {
    .hero-text-large {
        font-size: 3rem;
    }
}

@media (min-width: 768px) {
    .hero-text-large {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-text-large {
        font-size: 4rem;
    }
}

/* Smooth transitions for interactive elements */
.smooth-transition {
    transition: all 0.2s ease-in-out;
}

/* Focus states for accessibility */
.focus-ring:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile landscape orientation adjustments */
@media (max-width: 926px) and (orientation: landscape) {
    /* Reduce hero section height on landscape mobile */
    .min-h-screen {
        min-height: 80vh;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    /* Smaller hero text on landscape mobile */
    .hero-text-large {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    /* Compact sections on landscape */
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* ===================================
   Performance Optimizations
   ================================== */

/* Reduce repaints and reflows */
.optimized-animations {
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* GPU acceleration for smooth scrolling */
.smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Optimize form elements */
input, textarea, select {
    will-change: auto;
}

input:focus, textarea:focus, select:focus {
    will-change: border-color, box-shadow;
}

/* Contain layout changes */
.layout-contained {
    contain: layout style;
}

/* Optimize CSS containment for large lists */
.pattern-card, .blog-post-card {
    contain: layout style paint;
}

/* Reduce paint area for hover effects */
.hover-optimized:hover {
    transform: translateZ(0);
}

/* Critical CSS for above-the-fold content */
.above-fold {
    contain: layout style;
    will-change: auto;
}

/* Defer non-critical animations */
.deferred-animation {
    animation-play-state: paused;
}

.deferred-animation.in-view {
    animation-play-state: running;
}

/* ===================================
   Print Styles
   ================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .prose h2 {
        page-break-after: avoid;
    }
}

/* ===================================
   Challenge Page Styles
   ================================== */

/* Challenge Color Palette */
:root {
    --deep-space: #0a0e27;
    --space-blue: #1e3a8a;
    --bright-blue: #3b82f6;
    --alert-orange: #f97316;
    --terminal-green: #10b981;
    --error-red: #ef4444;
    --glow-blue: #60a5fa;
}

/* Starfield Background */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: var(--deep-space);
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

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

/* Starfield Logo */
.starfield-logo {
    position: absolute;
    top: 15%;
    left: 75%;
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
    transition: top 2s ease-in-out, left 2s ease-in-out;
}

.starfield-logo-img {
    width: 80px;
    height: 80px;
    opacity: 0.8;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.2));
    transition: all 0.3s ease;
}

.starfield-logo-img.glitching {
    animation: logoGlitch 0.3s;
}

/* Challenge Container */
.challenge-container {
    position: relative;
    z-index: 1;
    background: transparent;
    min-height: 100vh;
}

/* Ensure no logos appear anywhere on challenge page except starfield */
body[data-page="challenge"] header,
body[data-page="challenge"] .logo-link,
body[data-page="challenge"] .logo-image,
body[data-page="challenge"] .logo-fade,
body[data-page="challenge"] .footer-logo,
body[data-page="challenge"] footer img {
    display: none !important;
}

/* Also hide any logos that might appear elsewhere */
.challenge-container header,
.challenge-container .logo-link,
.challenge-container .logo-image,
.challenge-container .logo-fade,
.challenge-container footer img {
    display: none !important;
}

/* Challenge Logo - Removed (now using starfield logo only) */

/* Logo Glitch Effect */
@keyframes logoGlitch {
    0%, 100% { 
        transform: translate(0);
        filter: hue-rotate(0deg) drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
    }
    20% { 
        transform: translate(-2px, 2px);
        filter: hue-rotate(90deg) drop-shadow(0 0 25px rgba(249, 115, 22, 0.5));
    }
    40% { 
        transform: translate(-2px, -2px);
        filter: hue-rotate(180deg) drop-shadow(0 0 25px rgba(16, 185, 129, 0.5));
    }
    60% { 
        transform: translate(2px, 2px);
        filter: hue-rotate(270deg) drop-shadow(0 0 25px rgba(239, 68, 68, 0.5));
    }
    80% { 
        transform: translate(2px, -2px);
        filter: hue-rotate(360deg) drop-shadow(0 0 25px rgba(96, 165, 250, 0.5));
    }
}

.challenge-logo.glitching {
    animation: logoGlitch 0.3s;
}

/* Challenge Typography - Removed (no title/tagline anymore) */

/* Terminal Style Access Field */
.access-terminal {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--terminal-green);
    border-radius: 12px;
    padding: 0;
    margin: 2rem auto;
    width: 700px;
    max-width: 90vw;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.access-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--terminal-green), transparent);
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(200px); }
}

.terminal-header {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.terminal-dot.red { background: var(--error-red); }
.terminal-dot.yellow { background: var(--alert-orange); }
.terminal-dot.green { background: var(--terminal-green); }

.terminal-body {
    padding: 2rem;
}

.access-prompt {
    color: var(--terminal-green);
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    opacity: 0.9;
}

.access-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
}

.prompt-symbol {
    color: var(--terminal-green);
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
}

.access-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    outline: none;
    caret-color: var(--terminal-green);
}

.access-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.access-input.success {
    color: var(--terminal-green);
}

.hint-text {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
    margin-top: 1rem;
    font-family: 'Courier New', monospace;
}

.error-message, .success-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    display: none;
}

.error-message {
    color: var(--error-red);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.success-message {
    color: var(--terminal-green);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Email Capture Challenge Style */
.email-capture-challenge {
    animation: revealForm 1s forwards;
    width: 700px;
    max-width: 90vw;
    margin: 0 auto;
}

@keyframes revealForm {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes implode {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

@keyframes expandFromCenter {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.email-capture-challenge h2 {
    color: var(--alert-orange);
}

.imploding {
    animation: implode 0.8s ease-in forwards;
}

.expanding {
    animation: expandFromCenter 1s ease-out forwards;
}

/* Success State */
.success-state {
    background: transparent;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Footer Hint */
.footer-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    transition: color 0.3s ease;
    cursor: default;
}

.footer-hint:hover {
    color: rgba(255, 255, 255, 0.6);
}

.footer-hint.unlocked {
    animation: randomHover 8s infinite;
}

@keyframes randomHover {
    0%, 85%, 100% { color: rgba(255, 255, 255, 0.2); }
    5%, 15% { color: rgba(255, 255, 255, 0.6); }
    25%, 35% { color: rgba(255, 255, 255, 0.6); }
    55%, 65% { color: rgba(255, 255, 255, 0.6); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile Responsive for Challenge */
@media (max-width: 768px) {
    .access-terminal {
        margin: 1rem;
    }

    .terminal-body {
        padding: 1.5rem;
    }

    .access-input {
        font-size: 1rem;
    }

    .starfield-logo {
        top: 10%;
        left: 85%;
        opacity: 0.05;
    }

    .starfield-logo-img {
        width: 60px;
        height: 60px;
    }
}

/* ===================================
   Home Page Redesign - Geometric Styles
   ================================== */

/* Quote Highlight - Geometric left border treatment */
.quote-highlight {
    position: relative;
    padding-left: 2rem;
    border-left: 4px solid #1e40af;
}

.quote-highlight::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #1e40af 0%, #0891b2 100%);
}

/* Section label styling (uppercase tracking) */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0891b2;
}

/* Geometric card hover effects */
.geo-card {
    transition: all 0.2s ease;
    border: 2px solid #e2e8f0;
}

.geo-card:hover {
    border-color: #1e40af;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.1);
    transform: translateY(-2px);
}

/* Stats number styling */
.stat-number-large {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

/* Live indicator pulse */
.live-indicator {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    animation: livePulse 2s infinite;
}

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

/* Geometric separator */
.geo-separator {
    width: 4rem;
    height: 4px;
    background: linear-gradient(90deg, #1e40af 0%, #0891b2 100%);
    border-radius: 2px;
}

/* Enhanced link styling for brand colors */
a.brand-link {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.2s ease;
}

a.brand-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Button enhancements */
.btn-primary {
    background-color: #1e40af;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background-color: white;
    color: #1e40af;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 2px solid #1e40af;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #dbeafe;
}