/* --- GLOBAL & TYPOGRAPHY --- */
:root {
    --bg-dark: #07090C;
    /* Darker, slightly blueish black */
    --bg-panel: rgba(21, 24, 33, 0.85);
    --border-dim: rgba(255, 255, 255, 0.08);
    /* Fainter borders */

    /* Reference Button Gradient */
    --gradient-btn: linear-gradient(135deg, #DD362BC0 0%, #B91C1C 100%);
    --gradient-btn-hover: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);

    --accent-amber: #F59E0B;
    --accent-cyan: #06B6D4;
    --text-main: #F3F4F6;
    --text-muted: #9CA3AF;

    --font-heading: 'Satoshi', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --section-pad: 6rem 0;
}

body {
    background-color: var(--bg-dark);
    /* Adding the texturized background */
    background-image: url('noir_texture_background_1770163044635.png');
    background-size: cover;
    background-attachment: fixed;
    background-blend-mode: overlay;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- UTILS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
    font-weight: 800;
    /* Bolder headers */
    letter-spacing: -0.02em;
    /* Cinematic tight tracking */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Lift from bg */
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.25rem;
    color: #D1D5DB;
    font-weight: 400;
    opacity: 0.9;
}

.text-amber {
    color: var(--accent-amber);
}

.text-cyan {
    color: var(--accent-cyan);
}

.text-secondary {
    color: var(--text-muted);
}

/* --- HERO SECTION --- */
.hero-section {
    padding-top: 120px;
    padding-bottom: 60px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-mockup-wrapper {
    position: relative;
    z-index: 10;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-mockup-wrapper:hover {
    transform: perspective(1000px) rotateY(0deg);
}

/* --- SECTIONS & GRIDS --- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media(max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }
}

/* --- CARDS & PANELS --- */
.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    padding: 2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent-amber);
    box-shadow: 0 0 30px rgba(255, 170, 0, 0.1);
    transform: translateY(-5px);
}

/* --- CHARACTER TRIPTYCH (New) --- */
.profile-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    /* Slightly tighter radius */
    border: 1px solid #333;
    transition: transform 0.3s ease;
    background: #000;
}

.profile-card:hover {
    transform: scale(1.02);
    z-index: 10;
    border-color: var(--accent-amber);
}

.profile-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 2rem 1.5rem 1.5rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    /* More blocky/industrial */
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    /* Deep red for CTA */
    color: #fff;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
    border: 1px solid #ff5252;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
}

.brand {
    font-family: 'Satoshi', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

/* --- FOOTER --- */
.site-footer {
    background: #020202;
    border-top: 1px solid #111;
    padding: 4rem 0 2rem;
    font-size: 0.9rem;
    color: #666;
}

.footer-cols {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-col a {
    display: block;
    color: #666;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: var(--accent-amber);
}

/* --- FAQ --- */
/* --- FAQ INTERACTIVITY --- */
.faq-item {
    border-bottom: 1px solid #222;
    padding: 1.5rem 0;
    transition: background 0.3s;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.faq-q {
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.faq-q i {
    transition: transform 0.3s ease;
}

.faq-a {
    color: #aaa;
    margin-top: 1rem;
    font-size: 0.95rem;
    display: none;
    line-height: 1.6;
}

.faq-item.active .faq-a {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.faq-item.active .faq-q i {
    transform: rotate(180deg);
    color: var(--accent-amber);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MOBILE STICKY --- */
.mobile-sticky-cta {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 999;
    display: none;
}

@media(max-width: 768px) {
    .mobile-sticky-cta {
        display: block;
    }

    .nav-links {
        display: none;
    }
}

/* --- SCROLL ANIMATIONS --- */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- SCROLLYTELLING SPLIT-VIEW --- */
#how-scrolly {
    position: relative;
    background: #050507;
    overflow: hidden;
    /* Prevent horizontal scroll */
}

/* Layout Grid */
.mobile-stack-reverse {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
}

/* Left: Scrolling Steps */
.steps-container {
    position: relative;
    z-index: 10;
    padding-bottom: 20vh;
    /* Space at end */
}

.scrolly-step {
    min-height: 80vh;
    /* Each step takes full screen height interaction time */
    display: flex;
    /* Center content vertically if desired, or top */
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0.3;
    /* Inactive state */
    transition: opacity 0.5s ease, transform 0.5s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    /* Guide line */
    margin-left: 1rem;
}

.scrolly-step.active {
    opacity: 1;
    border-left: 3px solid var(--accent-amber);
}

.step-kicker {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--accent-amber);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.step-title {
    font-size: 2rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: #fff;
}

.step-body {
    font-size: 1.1rem;
    color: #aaa;
    line-height: 1.6;
    max-width: 450px;
}

.step-micro {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #777;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Right: Sticky Panel */
.sticky-wrapper {
    position: relative;
    height: 100%;
    /* Follows container height */
}

.visual-panel-card {
    /* Dimensions handled by JS pinning, or CSS sticky */
    width: 100%;
    /* height: 60vh;  Removed fixed height, let content dictate or set in JS */
    background: rgba(18, 18, 22, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 20;
    transition: all 0.3s ease;
}

.badge-tech {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.float-card {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    min-width: 120px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    opacity: 0;
    /* Hidden by default, animated in */
    transition: all 0.5s ease;
}

.float-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.micro-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

/* Mobile Tweaks */
@media(max-width: 900px) {
    .mobile-stack-reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Make the visual panel sticky at bottom or top on mobile? 
       Usually for mobile scrollytelling, we stack: Visual (Sticky Top) -> Text (Scrolls below).
       Or Text scrolls over Visual.
    */

    /* --- MOBILE OPTIMIZATION --- */

    .mobile-visual {
        display: none;
        /* Hidden by default on desktop */
    }

    @media(max-width: 900px) {

        /* Hide the complex sticky panel on mobile */
        .sticky-wrapper {
            display: none !important;
        }

        .mobile-stack-reverse {
            grid-template-columns: 1fr;
            gap: 3rem;
            display: block;
            /* Flow naturally */
        }

        .steps-container {
            padding: 0 1rem;
        }

        /* Show the mobile-optimized visuals */
        .mobile-visual {
            display: block;
            width: 100%;
            height: 250px;
            margin-bottom: 1.5rem;
            border-radius: 8px;
            overflow: hidden;
            position: relative;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .mobile-visual img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            animation: pan-slow 20s infinite alternate linear;
        }

        .scrolly-step {
            /* Reset step styling for natural flow */
            min-height: auto;
            height: auto;
            background: transparent;
            backdrop-filter: none;
            border: none;
            padding: 0;
            margin-bottom: 5rem;
            opacity: 0.9;
        }

        .scrolly-step.active {
            border: none;
            opacity: 1;
        }

        /* Ensure text is readable */
        .step-title {
            font-size: 1.75rem;
            margin-bottom: 0.5rem;
        }
    }

    /* Visual Layers Logic */
    .vis-layer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transform: scale(0.95);
        transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        pointer-events: none;
    }

    .vis-layer.active {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
    }

    @keyframes scan {
        0% {
            top: 0%;
            opacity: 0;
        }

        10% {
            opacity: 1;
        }

        90% {
            opacity: 1;
        }

        100% {
            top: 100%;
            opacity: 0;
        }
    }