/* ==========================================================================
   RECURSED - GLOBAL CSS SYSTEM
   Brand-consistent styles for all pages
   ========================================================================== */

/* ==========================================================================
   CSS RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   DEVELOPMENT BANNER
   ========================================================================== */
.dev-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d);
    color: #000;
    padding: 8px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dev-banner-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Adjust body padding when dev banner is present */
body {
    padding-top: 70px; /* Nav height only */
}

/* Development banner removed - site is now live */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary-accent: #FDC56C;
    --primary-accent-dark: #FF7139;
    --primary-green: #22c55e;
    --primary-blue: #3b82f6;
    
    /* Brand Color RGB Values (for rgba usage) */
    --primary-accent-rgb: 253, 197, 108;
    --primary-accent-dark-rgb: 255, 113, 57;
    
    /* Text Colors - Pure grey text hierarchy */
    --text-primary: #f5f5f5;
    --text-secondary: #cccccc;
    --text-light: #999999;
    --text-muted: #666666;
    
    /* Background Colors - Lighter grey approach across all pages */
    --bg-primary: #1a1a1a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: #1a1a1a;
    
    /* Border Colors - True grey borders */
    --border-subtle: #333333;
    --border-light: #4a4a4a;
    
    /* Glass/Blur Effects - True grey glass effects */
    --glass-bg: rgba(26, 26, 26, 0.7);
    --glass-border: rgba(51, 51, 51, 0.8);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Glow Effects */
    --accent-glow: rgba(253, 197, 108, 0.2);
    --green-glow: rgba(34, 197, 94, 0.2);
    
    /* Layout */
    --nav-height: 70px;
    --container-max-width: 1200px;
    --container-padding: 40px;
    --container-padding-mobile: 24px;
    
    /* Spacing Scale */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    --space-3xl: 80px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================================================
   BASE TYPOGRAPHY
   ========================================================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 48px); }
h3 { font-size: clamp(24px, 3vw, 32px); }
h4 { font-size: clamp(20px, 2.5vw, 24px); }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
    color: var(--text-secondary);
    margin-bottom: 1em;
}

/* ==========================================================================
   BACKGROUND EFFECTS - True grey theme with subtle grid
   ========================================================================== */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.02;
    background-image: 
        linear-gradient(rgba(245, 245, 245, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 245, 245, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -1;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================================
   GLASS MORPHISM UTILITIES
   ========================================================================== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow);
}

/* ==========================================================================
   NAVIGATION COMPONENTS
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    padding: 0 var(--container-padding);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.85);
    box-shadow: var(--glass-shadow);
}

.nav-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-accent);
    text-decoration: none;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}


.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-normal);
    font-weight: 500;
    font-size: 14px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-accent);
    transition: width var(--transition-normal);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* ==========================================================================
   BUTTON COMPONENTS
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-accent);
    color: #1a1a1a;
}

.btn-primary:hover {
    background: var(--primary-accent);
    box-shadow: 0 10px 40px var(--accent-glow);
}

.btn-primary:focus,
.btn-primary:focus-visible {
    outline: none !important;
    box-shadow: 0 10px 40px var(--accent-glow) !important;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-secondary:focus,
.btn-secondary:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.btn-success {
    background: var(--primary-green);
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    box-shadow: 0 8px 25px var(--green-glow);
}

.btn-success:focus,
.btn-success:focus-visible {
    outline: none !important;
    box-shadow: 0 8px 25px var(--green-glow) !important;
}

/* CTA specific buttons */
.cta-primary {
    background: var(--primary-accent);
    color: #1a1a1a;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all var(--transition-normal);
    display: inline-block;
}

.cta-primary:hover {
    background: var(--primary-accent);
    box-shadow: 0 10px 40px var(--accent-glow);
}

.cta-primary:focus,
.cta-primary:focus-visible {
    outline: none !important;
    box-shadow: 0 10px 40px var(--accent-glow) !important;
}

.cta-secondary {
    background: transparent;
    color: var(--text-secondary);
    padding: 16px 32px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all var(--transition-normal);
    display: inline-block;
}

.cta-secondary:hover {
    background: var(--glass-bg);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.cta-secondary:focus,
.cta-secondary:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Navigation specific buttons */
.nav-cta {
    background: var(--primary-accent);
    color: #1a1a1a;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-normal);
}

.nav-cta:hover {
    background: var(--primary-accent);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.nav-cta:focus,
.nav-cta:focus-visible {
    outline: none !important;
    box-shadow: 0 10px 30px var(--accent-glow) !important;
}

.nav-patreon {
    background: linear-gradient(135deg, #FF424D, #FF6B35);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(255, 66, 77, 0.2);
}

.nav-patreon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.nav-patreon:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 66, 77, 0.3);
}

.nav-patreon:focus,
.nav-patreon:focus-visible {
    outline: none !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 66, 77, 0.3) !important;
}

/* ==========================================================================
   STANDARDIZED HOVER ANIMATIONS
   ========================================================================== */
.hover-lift {
    transition: all var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hover-lift-subtle {
    transition: all var(--transition-normal);
}

.hover-lift-subtle:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   CARD COMPONENTS - Using standardized hover effects
   ========================================================================== */
/* Standard card - using standardized hover */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.card:hover {
    border-color: var(--border-light);
}

/* Enhanced card with orange glow */
.card.orange-glow:hover {
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.25),
        0 0 20px rgba(var(--primary-accent-rgb), 0.2),
        0 0 40px rgba(var(--primary-accent-rgb), 0.05);
    border-color: var(--primary-accent);
    transform: translateY(-2px);
}

/* CGBoost-inspired stacked cards with layered hover effect */
.card-stacked {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0;
    transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    cursor: pointer;
}

.card-stacked::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: calc(var(--radius-lg) - 4px);
    z-index: -1;
    opacity: 0;
    transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-stacked::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: calc(var(--radius-lg) - 8px);
    z-index: -2;
    opacity: 0;
    transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-stacked:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border-color: var(--border-light);
}

.card-stacked:hover::before {
    opacity: 1;
    transform: translateY(4px);
}

.card-stacked:hover::after {
    opacity: 0.6;
    transform: translateY(8px);
}

.card-stacked-content {
    position: relative;
    z-index: 2;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

/* Stacked card image handling */
.card-stacked-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-stacked:hover .card-stacked-image {
    transform: translateY(-2px);
}

.card-stacked-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-stacked:hover .card-stacked-image img {
    transform: scale(1.05);
}

.card-stacked-placeholder {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

/* Course Cards with standardized hover */
.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.course-card:hover {
    border-color: var(--border-light);
}

.course-card-banner {
    height: 160px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card-content {
    padding: var(--space-lg);
    position: relative;
    z-index: 2;
    background: var(--bg-card);
}

.course-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    display: block;
}

.course-level {
    color: var(--primary-accent);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.course-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.course-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    font-size: 16px;
}

.course-modules {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   FORM COMPONENTS
   ========================================================================== */
.form-group {
    margin-bottom: var(--space-md);
}

.form-input {
    width: 100%;
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 16px;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ==========================================================================
   BADGE COMPONENTS
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-primary {
    background: rgba(253, 197, 108, 0.1);
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
}

.badge-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

/* ==========================================================================
   TRUST/STATS COMPONENTS
   ========================================================================== */
.trust-bar {
    background: var(--bg-tertiary);
    padding: 50px var(--container-padding);
    border-bottom: 1px solid var(--border-subtle);
}

.trust-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    text-align: center;
}

.trust-stat:hover {
    /* Uses hover-lift-subtle class */
}

.trust-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-accent);
    display: block;
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.trust-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   SOCIAL LINKS
   ========================================================================== */
.social-links {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    transition: all var(--transition-normal);
    z-index: 2;
    position: relative;
}

.social-link:hover {
    /* Uses hover-lift-subtle class for movement, plus brand colors below */
}

/* Brand-specific social link hovers */
.social-link.youtube:hover { background: #FF0000; border-color: #FF0000; color: white; }
.social-link.discord:hover { background: #5865F2; border-color: #5865F2; color: white; }
.social-link.github:hover { background: #333; border-color: #333; color: white; }
.social-link.itch:hover { background: #FA5C5C; border-color: #FA5C5C; color: white; }
.social-link.patreon:hover { background: #FF424D; border-color: #FF424D; color: white; }
.social-link.twitter:hover { background: #1DA1F2; border-color: #1DA1F2; color: white; }
.social-link.bluesky:hover { background: #0085ff; border-color: #0085ff; color: white; }
.social-link.twitch:hover { background: #9146FF; border-color: #9146FF; color: white; }
.social-link.instagram:hover { 
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    border-color: #e6683c; 
    color: white; 
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    padding: var(--space-2xl) var(--container-padding) var(--space-xl);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-brand h3 {
    font-size: 24px;
    color: var(--primary-accent);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--primary-accent);
}

.footer-bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-subtle);
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.highlight {
    background: linear-gradient(135deg, var(--primary-accent), var(--primary-accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: var(--container-padding-mobile);
    }
    
    .nav-links {
        gap: var(--space-sm);
    }
    
    /* Keep Projects link visible on mobile */
    .nav-link:not(.nav-cta):not(.nav-patreon):not([href*="projects"]) {
        display: none;
    }
    
    .nav-patreon {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .container {
        padding: 0 var(--container-padding-mobile);
    }
    
    .trust-container {
        gap: var(--space-lg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-2xl);
    }
    
    /* Fix newsletter popup on mobile */
    .newsletter-popup {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        margin: 1rem;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .popup-close {
        width: 44px;
        height: 44px;
        font-size: 24px;
        top: 1rem;
        right: 1rem;
    }
    
    /* Fix button sizes for mobile */
    .btn, .nav-link, .nav-patreon, .nav-cta {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    /* Fix content overflow */
    body {
        overflow-x: hidden;
    }
    
    .container {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* ==========================================================================
   ENHANCED VISUAL EFFECTS
   ========================================================================== */

/* Orange Ember Particles */
.ember-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.ember {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-accent);
    border-radius: 50%;
    opacity: 0;
    animation: ember-float 12s infinite linear;
    box-shadow: 0 0 6px var(--primary-accent);
}

.ember:nth-child(2) { animation-delay: -2s; left: 20%; }
.ember:nth-child(3) { animation-delay: -4s; left: 40%; }
.ember:nth-child(4) { animation-delay: -6s; left: 60%; }
.ember:nth-child(5) { animation-delay: -8s; left: 80%; }
.ember:nth-child(6) { animation-delay: -10s; left: 15%; }

@keyframes ember-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    15% {
        opacity: 0.8;
        transform: translateY(85vh) scale(1);
    }
    85% {
        opacity: 0.4;
        transform: translateY(-10vh) scale(0.8);
    }
    100% {
        transform: translateY(-20vh) scale(0);
        opacity: 0;
    }
}

/* Enhanced Hover Effects */
.enhanced-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.enhanced-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-accent-rgb), 0.1), transparent);
    transition: left 0.5s ease;
    z-index: -1;
}

.enhanced-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(var(--primary-accent-rgb), 0.2);
}

.enhanced-hover:hover::before {
    left: 100%;
}

/* Orange Glow Effect */
.orange-glow {
    transition: all 0.3s ease;
}

.orange-glow:hover {
    box-shadow: 
        0 0 20px rgba(var(--primary-accent-rgb), 0.3),
        0 0 40px rgba(var(--primary-accent-rgb), 0.1);
    border-color: var(--primary-accent);
}

/* Success Animation */
.success-burst {
    position: relative;
    overflow: hidden;
}

.success-burst.animate::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary-accent) 0%, transparent 70%);
    border-radius: 50%;
    animation: success-burst 0.6s ease-out;
}

@keyframes success-burst {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
        transform: translate(-50%, -50%);
    }
    50% {
        width: 100px;
        height: 100px;
        opacity: 0.4;
        transform: translate(-50%, -50%);
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
        transform: translate(-50%, -50%);
    }
}

/* Code Block Enhancements */
.code-enhanced {
    position: relative;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.code-enhanced::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    width: 3px;
    height: 0;
    background: var(--primary-accent);
    transition: height 0.3s ease;
}

.code-enhanced:hover {
    background: rgba(var(--primary-accent-rgb), 0.05);
    border-left-color: var(--primary-accent);
}

.code-enhanced:hover::before {
    height: 100%;
}

/* Progressive Reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.revealed.underline-effect::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-accent);
    animation: underline-grow 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes underline-grow {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Orange Pulse Effect */
.orange-pulse {
    animation: orange-pulse 2s ease-in-out infinite;
}

@keyframes orange-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-accent-rgb), 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(var(--primary-accent-rgb), 0);
    }
}

/* ==========================================================================
   NEWSLETTER POPUP SYSTEM
   ========================================================================== */
.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: var(--space-lg);
}

.newsletter-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.newsletter-popup {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: var(--space-2xl);
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(255, 215, 0, 0.05);
}

.newsletter-popup-overlay.show .newsletter-popup {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.popup-content {
    text-align: center;
}

.popup-headline {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.popup-subheadline {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: var(--space-lg);
    line-height: 1.5;
}

.popup-benefits {
    list-style: none;
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.popup-benefits li {
    padding: var(--space-sm) 0;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.popup-benefits li::before {
    content: "✓";
    color: var(--primary-accent);
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.popup-form .form-group {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.popup-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s ease;
}

.popup-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    background: rgba(0, 0, 0, 0.5);
}

.popup-submit {
    padding: 14px 28px;
    background: var(--primary-accent);
    color: #0a0a0a;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.popup-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    background: #ffdb8b;
    box-shadow: 0 10px 30px rgba(253, 197, 108, 0.3);
}

.popup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.popup-success {
    padding: var(--space-md);
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    color: #4CAF50;
    font-weight: 500;
    margin-top: var(--space-md);
}

.popup-error {
    padding: var(--space-md);
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    color: #f44336;
    margin-top: var(--space-md);
}

.popup-trust {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: var(--space-md);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .newsletter-popup {
        padding: var(--space-xl);
        margin: var(--space-md);
    }
    
    .popup-form .form-group {
        flex-direction: column;
    }
    
    .popup-input,
    .popup-submit {
        width: 100%;
    }
    
    .popup-headline {
        font-size: 24px;
    }
    
    .popup-subheadline {
        font-size: 14px;
    }
}