/* ==========================================================================
   NIGHTFOX'S PIXELART FX STUDIO - MAIN LANDING PAGE STYLESHEET
   ========================================================================== 
   TABLE OF CONTENTS:
   1. Global Configuration & Color Tokens
   2. Reset & Typography
   3. Header & Navigation (Navbar, Logo & Language Switcher)
   4. Hero Section & Call To Actions (Status Badge & CTAs)
   5. Overview & Quick Stats
   6. Generator Module Families (The 4 Families & 15 Generators)
   7. Core Features & Technical Highlights
   8. Media Gallery (Screenshots & Lightbox)
   9. Video Teaser Section
   10. Engine & Tool Compatibility
   11. Footer & Back to Top Button
   12. Responsive Design (Tablets & Mobile Breakpoints)
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL CONFIGURATION & COLOR TOKENS
   ========================================================================== */
:root {
    /* -- Application Color Palette -- */
    --color-background: #12141a;          /* Deep main studio backdrop */
    --color-panel: #1a1d26;               /* Sub-section & header background */
    --color-surface: #222632;             /* Interactive cards & module containers */
    --color-surface-hover: #2b3040;       /* Card & button hover tone */
    --color-input: #101218;               /* Recessed input & badge background */
    --color-border: #2e3344;              /* Subtle border lines */
    --color-border-focus: #4e80f0;        /* Active / focused element outline */

    /* -- Accents & Branding -- */
    --color-primary: #4378ff;             /* Electric studio cobalt accent */
    --color-primary-hover: #598bff;       /* Hover state for primary buttons */
    --color-primary-glow: rgba(67, 120, 255, 0.25);
    --color-gold: #f59e0b;                /* Amber / Gold for badges and highlights */
    --color-gold-glow: rgba(245, 158, 11, 0.25);

    /* -- Typography Colors -- */
    --color-text: #e6ebf5;                /* High-contrast off-white body text */
    --color-text-muted: #8a94a6;          /* Muted descriptions and secondary text */
    --color-footer-background: #0d0f14;   /* Darkest tone for footer and hero blending */

    /* -- Typography Stacks -- */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Meiryo", Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "Consolas", "Courier New", monospace;
}

/* ==========================================================================
   2. RESET & TYPOGRAPHY
   ========================================================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html { 
    scroll-behavior: smooth; 
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body { 
    font-family: var(--font-sans); 
    background-color: var(--color-background); 
    color: var(--color-text); 
    line-height: 1.6; 
    overflow-x: hidden;
}

h1, h2, h3, h4 { 
    color: #ffffff; 
    font-weight: 700; 
    letter-spacing: -0.5px;
    line-height: 1.25;
}

h2 { 
    font-size: 2.25rem; 
    text-align: center; 
    margin-bottom: 0.75rem; 
}

h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--color-text-muted);
}

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

.container { 
    max-width: 1140px; 
    margin: 0 auto; 
    padding: 0 1.5rem; 
}

.content-section { 
    padding: 5.5rem 0; 
    border-bottom: 1px solid rgba(46, 51, 68, 0.4);
}

.section-subtitle {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

.gallery-subtitle-note {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #9cb8ff;
    margin-top: 0.35rem;
}

.keyword { 
    color: var(--color-primary); 
    font-weight: 600; 
}

.keyword-gold {
    color: var(--color-gold);
    font-weight: 600;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: rgba(21, 24, 32, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px; 
    padding: 0.5rem 1.5rem;
}

header ul {
    list-style: none;
    display: flex;
    align-items: center;
}

/* -- Logo & Language Switcher -- */
.logo-area {
    gap: 1.25rem; 
    flex-shrink: 0;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.brand-link:hover {
    color: var(--color-primary-hover);
}

.logo-glyph {
    color: var(--color-primary);
    font-size: 1.25rem;
}

.language-switcher a {
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-surface);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text); 
    text-decoration: none;
    transition: all 0.2s ease;
}

.language-switcher a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff; 
}

/* -- Navigation Links -- */
.nav-links {
    gap: 1.5rem;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
    padding: 0.25rem 0.25rem; 
}

.nav-links a:hover {
    color: var(--color-text);
}

/* ==========================================================================
   4. HERO SECTION & CALL TO ACTIONS (CTAs)
   ========================================================================== */
#hero { 
    min-height: 92vh; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    text-align: center; 
    position: relative; 
    background-color: var(--color-background);
    background-image: 
        radial-gradient(circle at 50% 30%, rgba(67, 120, 255, 0.16) 0%, transparent 65%),
        linear-gradient(to bottom, rgba(18, 20, 26, 0.72) 0%, rgba(18, 20, 26, 0.96) 100%),
        url('images/hero_bg.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    padding: 8rem 0 5.5rem 0; 
}

.hero-content { 
    position: relative; 
    z-index: 2; 
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem; /* Safe lateral gutters preventing edge clipping */
}

/* -- Coming Soon Status Pill Badge -- */
.status-badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.status-badge-bullet {
    width: 6px;
    height: 6px;
    background-color: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 8px #f59e0b;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

#hero h1 { 
    font-size: 3.8rem; 
    font-weight: 800;
    margin-bottom: 1rem; 
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, #9cb8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle { 
    font-size: 1.4rem; 
    margin-bottom: 1.5rem; 
    color: var(--color-text);
    font-weight: 400;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 720px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

/* -- Primary & Disabled CTA Buttons -- */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.9rem 2rem;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px var(--color-primary-glow);
    transition: all 0.25s ease;
}

.cta-button:hover:not(.cta-disabled) {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(67, 120, 255, 0.4);
}

.cta-button.cta-disabled,
.cta-button[aria-disabled="true"] {
    background-color: rgba(34, 38, 50, 0.7);
    border-color: var(--color-border);
    color: #626b7d;
    box-shadow: none;
    cursor: not-allowed;
    user-select: none;
    opacity: 0.85;
    transform: none !important;
}

.cta-button.cta-disabled .logo-glyph,
.cta-button.cta-disabled span {
    color: #626b7d;
}

/* -- Secondary Featured CTA (Website Development Follow) -- */
.secondary-cta-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cta-button-featured {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.85rem 1.75rem;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    background-color: rgba(67, 120, 255, 0.15);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(67, 120, 255, 0.2);
    transition: all 0.25s ease;
}

.cta-button-featured:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(67, 120, 255, 0.4);
}

/* ==========================================================================
   5. OVERVIEW & QUICK STATS
   ========================================================================= */
.overview-box {
    background-color: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 3.5rem;
}

.overview-box p {
    font-size: 1.15rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.overview-box p:last-child {
    margin-bottom: 0;
}

/* -- Quick Highlights Grid -- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ==========================================================================
   6. GENERATOR MODULE FAMILIES (4 FAMILIES & 15 GENERATORS)
   ========================================================================== */
#modules {
    background-color: var(--color-panel);
}

.families-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.family-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.family-card:hover {
    border-color: #3b455b;
    transform: translateY(-3px);
}

.family-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.family-icon {
    font-size: 1.6rem;
    color: var(--color-primary);
}

.family-title {
    font-size: 1.35rem;
    color: #ffffff;
    margin-bottom: 0;
}

.family-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.generators-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
}

.generator-pill {
    background-color: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
}

/* ==========================================================================
   7. CORE FEATURES & TECHNICAL HIGHLIGHTS
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.feature-item {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.75rem;
    border-top: 3px solid var(--color-primary);
    transition: all 0.2s ease;
}

.feature-item:hover {
    background-color: var(--color-surface-hover);
    border-top-color: var(--color-primary-hover);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.feature-item p {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--color-text-muted);
}

/* ==========================================================================
   8. MEDIA GALLERY (SCREENSHOTS & LIGHTBOX)
   ========================================================================== */
#gallery {
    background-color: var(--color-panel);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-image-wrapper {
    background-color: var(--color-input);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    transition: transform 0.25s ease;
}

.gallery-image-wrapper:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
}

/* -- Lightbox Modal (Pixel-Perfect Strict Integer Multipliers: Base 256x144) -- */
#lightbox { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(8, 10, 15, 0.88); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000; 
    display: none; 
    justify-content: center; 
    align-items: center; 
    cursor: pointer; 
    padding: 1.5rem;
}

#lightbox-image { 
    /* Default: Factor x4 (1024 x 576 px) */
    width: 1024px;
    height: 576px;
    max-width: 90vw;
    max-height: 85vh;
    aspect-ratio: 16 / 9;
    object-fit: contain; 
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 8px; 
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95);
    border: 1px solid var(--color-border);
}

/* Factor x3: 768 x 432 px */
@media (max-width: 1140px) {
    #lightbox-image {
        width: 768px;
        height: 432px;
    }
}

/* Factor x2: 512 x 288 px */
@media (max-width: 840px) {
    #lightbox-image {
        width: 512px;
        height: 288px;
    }
}

/* Factor x1: 256 x 144 px */
@media (max-width: 560px) {
    #lightbox-image {
        width: 256px;
        height: 144px;
    }
}

/* ==========================================================================
   9. VIDEO TEASER SECTION
   ========================================================================== */
.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background-color: #000000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   10. ENGINE & TOOL COMPATIBILITY
   ========================================================================== */
.compat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 920px;
    margin: 0 auto;
}

.compat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.75rem;
}

.compat-card h3 {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.compat-card p {
    font-size: 0.95rem;
    line-height: 1.55;
}

/* ==========================================================================
   11. FOOTER & BACK TO TOP BUTTON
   ========================================================================== */
footer { 
    background-color: var(--color-footer-background);
    border-top: 1px solid var(--color-border); 
    padding: 3rem 0; 
    text-align: center; 
    color: var(--color-text-muted); 
    font-size: 0.95rem; 
}

footer a { 
    color: var(--color-primary); 
    font-weight: 600; 
    text-decoration: none; 
    transition: color 0.2s ease; 
}

footer a:hover { 
    color: var(--color-primary-hover);
    text-decoration: underline; 
}

footer p {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    color: var(--color-text-muted);
}

.footer-meta {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    color: #64748b;
}

/* -- Back to Top Button -- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 46px;
    height: 46px;
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    outline: none;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

/* ==========================================================================
   12. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* -- Intermediate Desktop & Large Tablets (max-width: 1024px) -- */
@media (max-width: 1024px) {
    header nav {
        padding: 0.5rem 1rem;
    }

    .brand-link {
        font-size: 1.05rem;
    }

    .nav-links {
        gap: 1.1rem;
    }

    .nav-links a {
        font-size: 0.88rem;
    }
}

/* -- Medium Screens & Tablets (max-width: 900px) -- */
@media (max-width: 900px) {
    header nav { 
        height: auto;
        min-height: auto;
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.65rem;
    }

    .logo-area {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        width: 100%;
        gap: 1.25rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    #hero {
        padding: 9.5rem 0 4.5rem 0;
    }

    #hero h1 { 
        font-size: 3rem; 
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .families-container {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .compat-grid {
        grid-template-columns: 1fr;
    }
}

/* -- Mobile Devices (max-width: 640px) -- */
@media (max-width: 640px) {
    header nav { 
        padding: 0.75rem 0.5rem;
        gap: 0.5rem;
    }

    .brand-link {
        font-size: 0.98rem;
    }

    .nav-links {
        gap: 0.75rem;
        font-size: 0.82rem;
    }

    #hero {
        padding: 8.5rem 0 3.5rem 0;
    }

    .hero-content {
        padding: 0 1.25rem; /* Guarantees safe margin to viewport edges */
    }

    #hero h1 { 
        font-size: 2.1rem; 
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    /* Mobile CTA Buttons: centered, breathing room and scaled proportions */
    .cta-button,
    .cta-button-featured {
        width: 100%;
        max-width: 380px;
        padding: 0.85rem 1rem;
        font-size: 0.92rem;
        justify-content: center;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .secondary-cta-container {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .overview-box {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    footer p {
        flex-direction: column;
        gap: 0.5rem;
    }

    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}