/* ============================================
   THLB Genie - Dark Forest Theme
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Colors - Deep Forest */
    --bg-darkest: #060d06;
    --bg-dark: #0a1a0d;
    --bg-medium: #132914;
    --bg-light: #1a3a1d;
    
    /* Accent Colors */
    --moss-green: #4a7c59;
    --moss-light: #6b9b7a;
    --bark-brown: #6b4423;
    --bark-light: #8b6243;
    --amber: #c9a227;
    --amber-light: #e0be4d;
    --amber-glow: rgba(201, 162, 39, 0.15);
    
    /* Text Colors */
    --text-primary: #e8f0e8;
    --text-secondary: #a8c0a8;
    --text-muted: #6b8b6b;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --section-padding: 6rem 2rem;
    --container-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-darkest);
}

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

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--amber);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--amber-light);
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--moss-green), var(--amber));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all var(--transition-medium);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--amber), var(--bark-light));
    color: var(--bg-darkest);
    box-shadow: 0 4px 20px var(--amber-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(201, 162, 39, 0.3);
    color: var(--bg-darkest);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--moss-green);
}

.btn-secondary:hover {
    background: var(--moss-green);
    color: var(--bg-darkest);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all var(--transition-medium);
}

.nav.scrolled {
    background: rgba(6, 13, 6, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--amber);
}

.nav-logo:hover {
    color: var(--amber-light);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 400;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--amber);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(74, 124, 89, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(107, 68, 35, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darkest) 100%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.tree-silhouette {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath fill='%23060d06' d='M0,200 L0,180 L30,180 L30,120 L35,120 L20,80 L40,80 L25,40 L45,40 L35,0 L45,0 L55,40 L75,40 L60,80 L80,80 L65,120 L70,120 L70,180 L100,180 L100,150 L105,150 L95,110 L110,110 L100,70 L115,70 L105,30 L120,30 L110,0 L120,0 L130,30 L145,30 L135,70 L150,70 L140,110 L155,110 L145,150 L150,150 L150,180 L200,180 L200,140 L205,140 L190,100 L210,100 L195,60 L215,60 L200,20 L220,20 L210,0 L220,0 L230,20 L250,20 L235,60 L255,60 L240,100 L260,100 L245,140 L250,140 L250,180 L350,180 L350,160 L355,160 L345,130 L360,130 L350,100 L365,100 L355,70 L370,70 L360,40 L375,40 L365,10 L380,10 L375,0 L385,0 L390,10 L405,10 L395,40 L410,40 L400,70 L415,70 L405,100 L420,100 L410,130 L425,130 L415,160 L420,160 L420,180 L500,180 L500,120 L505,120 L490,80 L510,80 L495,40 L515,40 L505,0 L515,0 L525,40 L545,40 L530,80 L550,80 L535,120 L540,120 L540,180 L600,180 L600,180 L650,180 L650,140 L655,140 L640,100 L660,100 L645,60 L665,60 L650,20 L670,20 L660,0 L670,0 L680,20 L700,20 L685,60 L705,60 L690,100 L710,100 L695,140 L700,140 L700,180 L800,180 L800,170 L805,170 L795,140 L810,140 L800,110 L815,110 L805,80 L820,80 L810,50 L825,50 L815,20 L830,20 L825,0 L835,0 L840,20 L855,20 L845,50 L860,50 L850,80 L865,80 L855,110 L870,110 L860,140 L875,140 L865,170 L870,170 L870,180 L950,180 L950,130 L955,130 L940,90 L960,90 L945,50 L965,50 L950,10 L970,10 L960,0 L970,0 L980,10 L1000,10 L985,50 L1005,50 L990,90 L1010,90 L995,130 L1000,130 L1000,180 L1100,180 L1100,150 L1105,150 L1090,110 L1110,110 L1095,70 L1115,70 L1100,30 L1120,30 L1110,0 L1120,0 L1130,30 L1150,30 L1135,70 L1155,70 L1140,110 L1160,110 L1145,150 L1150,150 L1150,180 L1200,180 L1200,200 Z'/%3E%3C/svg%3E") bottom center / 100% 200px no-repeat;
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero-logo {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
    filter: drop-shadow(0 4px 20px rgba(201, 162, 39, 0.3));
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--amber) 50%, var(--moss-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

/* ============================================
   About Section
   ============================================ */
.about {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.about-card {
    background: linear-gradient(145deg, var(--bg-medium), var(--bg-dark));
    border: 1px solid rgba(74, 124, 89, 0.2);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    transition: all var(--transition-medium);
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--moss-green);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.about-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: var(--amber);
}

.about-icon svg {
    width: 100%;
    height: 100%;
}

.about-card h3 {
    color: var(--amber);
    font-size: 1.75rem;
}

.about-subtitle {
    color: var(--text-muted);
    font-size: 0.9375rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.about-card p:last-child {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: var(--section-padding);
    background: 
        radial-gradient(ellipse at 80% 50%, rgba(74, 124, 89, 0.08) 0%, transparent 50%),
        var(--bg-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(19, 41, 20, 0.5);
    border: 1px solid rgba(74, 124, 89, 0.15);
    border-radius: 8px;
    padding: 2rem;
    transition: all var(--transition-medium);
}

.feature-card:hover {
    background: rgba(26, 58, 29, 0.6);
    border-color: rgba(74, 124, 89, 0.4);
    transform: translateY(-3px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.25rem;
    color: var(--moss-light);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* ============================================
   Workflow Section
   ============================================ */
.workflow {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-dark) 100%);
}

.workflow-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.workflow-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
    padding: 1.5rem;
    background: rgba(10, 26, 13, 0.6);
    border: 1px solid rgba(74, 124, 89, 0.2);
    border-radius: 8px;
    transition: all var(--transition-medium);
}

.workflow-step:hover {
    background: rgba(19, 41, 20, 0.8);
    border-color: var(--moss-green);
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--moss-green), var(--bg-light));
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(74, 124, 89, 0.3);
}

.step-content h3 {
    color: var(--amber);
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.workflow-connector {
    width: 3px;
    height: 30px;
    background: linear-gradient(180deg, var(--moss-green), rgba(74, 124, 89, 0.3));
    border-radius: 2px;
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery {
    padding: var(--section-padding);
    background: var(--bg-darkest);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-dark);
    border: 1px solid rgba(74, 124, 89, 0.2);
    transition: all var(--transition-medium);
    cursor: pointer;
}

.gallery-item:hover {
    border-color: var(--moss-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover .gallery-image-wrapper::after {
    opacity: 1;
}

.gallery-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-medium);
}

.gallery-image-wrapper::after {
    content: 'Click to enlarge';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 26, 13, 0.7);
    color: var(--amber);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

.gallery-caption {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
    background: rgba(10, 26, 13, 0.5);
}

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxFadeIn 0.3s ease-out;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 1rem;
}

.lightbox-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color var(--transition-fast);
}

.lightbox-close:hover {
    color: var(--amber);
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Placeholder Styles */
.gallery-item.placeholder .placeholder-content {
    aspect-ratio: 4/3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    border: 2px dashed rgba(74, 124, 89, 0.4);
    border-radius: 6px;
    margin: 1rem;
    color: var(--text-muted);
    background: rgba(19, 41, 20, 0.3);
}

.gallery-item.placeholder .placeholder-content svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.gallery-item.placeholder .placeholder-content span {
    font-size: 0.9375rem;
}

.gallery-item.placeholder .placeholder-size {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ============================================
   Get Started Section
   ============================================ */
.get-started {
    padding: var(--section-padding);
    background: 
        radial-gradient(ellipse at 50% 100%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.requirement-card {
    background: rgba(19, 41, 20, 0.4);
    border: 1px solid rgba(74, 124, 89, 0.2);
    border-radius: 8px;
    padding: 2rem;
}

.requirement-card h3 {
    color: var(--amber);
    margin-bottom: 1.25rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.requirement-card ul {
    list-style: none;
    padding: 0;
}

.requirement-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.requirement-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--moss-green);
}

.cta-section {
    text-align: center;
    padding: 2rem;
    background: rgba(10, 26, 13, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(74, 124, 89, 0.2);
}

.cta-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    padding: 2rem;
    background: var(--bg-darkest);
    border-top: 1px solid rgba(74, 124, 89, 0.15);
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.footer-note {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-logo {
        max-width: 320px;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    
    .workflow-step {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .step-number {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.25rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .about-card,
    .feature-card,
    .requirement-card {
        padding: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}
