/* Inter Variable Font - Normal */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
}

/* Inter Variable Font - Italic */
@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('/assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
}

/* =========================================
   1. VARIABLES & THEME CONFIGURATION
   ========================================= */
:root {
    /* --- Dimensions --- */
    --max-width: 1264px;
    --nav-height: 70px;

    /* --- Base Palette (Dark Mode Default) --- */
    --bg-core: #050505;
    --bg-card: #0A0A0A;
    --bg-subtle: #111111;
    --bg-footer: #070707;

    --text-primary: #EDEDED;
    --text-secondary: #B0B0B0;
    /* Increased brightness for readability */
    --text-muted: #777777;
    --text-dark: #1a1a1a;

    --border-opacity: 0.1;
    --border-color: rgba(255, 255, 255, var(--border-opacity));

    /* --- Brand Accents (The River) --- */
    --brand-green-light: #e7f88f;
    --brand-green: #cbe54e;
    --brand-green-dim: #94b447;
    --brand-glow: rgba(203, 229, 78, 0.15);

    /* --- Typography --- */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --image-invert-dark: invert(0.7);
    --image-invert-light: invert(0);

    --display-dark: none;
    --display-light: block;

    --text-gradient-end: var(--brand-green-light);
}

/* --- Light Mode Overrides (Enterprise Cream) --- */
[data-theme="light"] {
    --bg-core: rgb(248, 246, 244);
    --bg-card: rgb(251, 251, 251);
    --bg-subtle: rgb(241, 236, 232);
    --bg-footer: rgb(248, 246, 244);

    --text-primary: #121309;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;

    --border-color: rgba(0, 0, 0, 0.08);

    /* In light mode, green accents need to be darker/richer to stand out */
    --brand-green: #5f6833;
    --brand-green-light: #94b447;
    --brand-glow: rgba(95, 104, 51, 0.1);

    --image-invert-dark: invert(0);
    --image-invert-light: invert(0.7);

    --display-dark: block;
    --display-light: none;

    --text-gradient-end: #39461b;
}

::selection,
::-moz-selection {
    background-color: var(--brand-green);
    color: #000;
}


.text-gradient::selection,
.text-gradient::-moz-selection {
    background-color: var(--brand-green);
    -webkit-text-fill-color: #fff;
    color: #fff;
}

[data-theme="light"] ::selection,
[data-theme="light"] ::-moz-selection {
    background-color: var(--brand-green-light);
    color: #fff;
}

[data-theme="light"] .text-gradient::selection,
[data-theme="light"] .text-gradient::-moz-selection {
    background-color: var(--brand-green-light);
    -webkit-text-fill-color: #000;
    color: #000;
}

/** Utilities **/

.bg-blur {
    backdrop-filter: blur(12px) !important;
}

.bg-core {
    background-color: var(--bg-core) !important;
}

.bg-card {
    background-color: var(--bg-card) !important;
}

.bg-subtle {
    background-color: var(--bg-subtle) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.border-color {
    border-color: var(--border-color) !important;
}

.image-invert-dark {
    filter: var(--image-invert-dark);
}

.image-invert-light {
    filter: var(--image-invert-light);
}

.display-dark {
    display: var(--display-dark);
}

.display-light {
    display: var(--display-light);
}

/* =========================================
   2. CORE ARCHITECTURE
   ========================================= */

@supports (-moz-appearance: none) {
    * {
        scrollbar-width: thin;
        scrollbar-color: #94b447 #f1ece8 !important;
    }
}

/* Chrome, Edge and Safari */
*::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

*::-webkit-scrollbar-track {
    border-radius: 4px;
    background-color: #f1ece8;
}

*::-webkit-scrollbar-track:hover {
    background-color: #f1ece8;
}

*::-webkit-scrollbar-track:active {
    background-color: #f1ece8;
}

*::-webkit-scrollbar-thumb {
    border-radius: 0px;
    background-color: #cbe54e;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #94b447;
}

*::-webkit-scrollbar-thumb:active {
    background-color: #94b447;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-core);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* The Grid Container (The Dam) */
.master-container {
    max-width: var(--max-width);
    margin: 0 auto;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.lead {
    font-weight: 400;
}

/* =========================================
   3. COMPONENTS
   ========================================= */
/* Badges */
.badge-pill {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--brand-green);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    font-weight: 500;
}

[data-theme="light"] .badge-pill {
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--brand-green);
    color: #000 !important;
    /* Force black text on green */
    border: 1px solid var(--brand-green);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

[data-theme="light"] .btn-primary {
    color: #fff !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--brand-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background: var(--bg-subtle);
}

/* Text Gradient */
@property --textgradient-x {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 10%;
}

:root {
    --textgradient-x: 10%;
}

.text-gradient {
    /* Your existing gradient setup */
    background: linear-gradient(120deg, var(--text-primary) var(--textgradient-x), var(--text-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Animation definition */
    animation: textgradient 6s ease infinite;
}

/* 2. Now you only need the start and the peak */
@keyframes textgradient {

    0%,
    100% {
        --textgradient-x: 10%;
    }

    50% {
        --textgradient-x: 60%;
    }
}


/* The Green Glow Spot */
.glow-spot {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--brand-glow) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

/* =========================================
   4. NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    /* Ensure Nav stays ON TOP of the mobile menu */
    z-index: 1001;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    height: var(--nav-height);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.nav-backdrop {
    display: none;
    transition: opacity 0.3s ease, visibility 0.4s step-end;
    opacity: 0;
    visibility: hidden;
}

.nav-backdrop.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Docs Dropdown */
.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
}

.dropdown-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: 6px;
    padding: 8px 16px;
}

.dropdown-item:hover {
    background-color: var(--bg-subtle);
    color: var(--text-primary);
}

/* Desktop State (Default behavior > 768px) */
@media (min-width: 768px) {
    .nav-menu-wrapper {
        display: flex !important;
        flex-direction: row;
        position: static;
        height: auto;
        width: auto;
        background: transparent;
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
        transition: none !important;
    }

    .border-end-md {
        border-right: 1px solid var(--border-color);
    }

    .nav-backdrop {
        display: none !important;
    }
}

/* Mobile State (< 768px) */
@media (max-width: 767.98px) {
    .nav-menu-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: fit-content;
        z-index: 1000;

        background-color: var(--bg-core);

        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 1.7rem;
        gap: 10px !important;

        transform: translateY(var(--nav-height));

        opacity: 0;
        visibility: hidden;

        transition: opacity 0s ease, visibility 0s step-end;
    }

    .nav-menu-wrapper.active {
        opacity: 1;
        visibility: visible;

        transition: opacity 0.2s ease, visibility 0s step-start;
    }

    .nav-group {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .nav-menu-wrapper .dropdown-menu {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        text-align: center;
        padding: 0;
        margin: 10px 0;
    }

    .border-end-md {
        border-right: none;
    }

    .dropdown-menu {
        position: relative !important;
        padding: 0px 8px !important;
        transform: none !important;
    }

    .dropdown-item {
        background-color: var(--bg-card);
        margin-bottom: 8px;
    }

    .nav-link,
    .dropdown {
        width: 100% !important;
        background-color: var(--bg-subtle);
        text-align: center;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    .nav-action {
        width: 100% !important;
        text-align: center;
    }

    .nav-link.dropdown-toggle {
        margin-bottom: 0px;
    }
}

/* =========================================
   5. HERO SECTION
   ========================================= */
#hero {
    position: relative;
    height: 800px;
}

/* The Orb Canvas */
.hero-background {
    position: absolute;

    background: url(/assets/images/background/hero.avif);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    width: 3200px;
    height: 100%;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;

    left: 90%;
    top: 50%;
    transform: translate(-50%, -50%);

    filter: blur(10px);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3em;
    width: 100%
}

/* Phone Mockup Floating */
.phone-mockup-container {
    perspective: 1000px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-mockup {
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
    filter: drop-shadow(0 5px 20px rgba(6, 23, 11, 0.1));
}

.phone-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}

#phone-demo {
    position: relative;
    z-index: 2;
    width: 280px;
    cursor: pointer;
}

#phone-try-overlay {
    top: 50%;
    left: 50%;
    pointer-events: none;
}

.phone-try-icon {
    width: 50px;
    height: 50px;
    box-shadow: 0 0 20px var(--brand-green);
}

/* Logo Marquee */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
}

.marquee-track {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: scroll 120s linear infinite;
}

.logo-item {
    display: inline-block;
    margin: 0 30px;
    filter: grayscale(100%) brightness(2);
    opacity: 0.7;
    transition: 0.3s;
}

.logo-item:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.33%);
        /** calculate based on items 100/3 **/
    }
}

@media (max-width: var(--max-width)) {
    #hero {
        overflow: hidden;
    }
}

@media (max-width: 992px) {
    #phone-demo {
        margin-bottom: -500px;
    }

    #phone-try-overlay {
        top: 35%;
    }

    .hero-background {
        width: 2500px;
        left: 50%;
        top: 50%;
    }
}

@media (max-width: 992px) and (max-height: 1000px) {
    #hero {
        height: 85vh;
        display: block !important;
        min-height: 650px;
        max-height: 768px;
    }

    .phone-mockup-container {
        margin-top: 40px;
    }

    #phone-try-overlay {
        top: 30%;
    }

    .phone-try-icon {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 992px) and (max-height: 800px) {
    #phone-try-overlay {
        top: 23%;
    }

    .phone-try-icon {
        width: 35px;
        height: 35px;
    }
}

/* =========================================
   PHASE 3: PHILOSOPHY STYLES
   ========================================= */
.timeline-col {
    transition: all 0.3s ease;
    min-height: 480px;
    border-right: 1px solid var(--border-color);
}

.timeline-col:last-child {
    border-right: none;
}

.timeline-col:hover {
    background-color: var(--glass-surface);
}

/* SVG Styling */
.visual-container svg {
    width: 100%;
    max-width: 220px;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.3));
}

@media (max-width: 992px) {
    .timeline-col {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
        min-height: auto;
        padding: 3rem 1.5rem !important;
    }
}

/* =========================================
   PHASE 3.5: SCHEMATIC STYLES
   ========================================= */

.schematic-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Base Card Style */
.arch-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    z-index: 2;
}

.arch-card:hover {
    transform: translateX(2px);
    border-color: var(--text-secondary);
}

/* Input Cards */
.input-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    /* Text on left, icon on right */
}

/* The Motherboard (Center) */
.core-container {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

[data-theme="light"] .core-container {
    background: rgba(240, 240, 240, 0.8);
}

/* Module Boxes inside Core */
.module-box {
    background: var(--bg-core);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

/* Tech Badges */
.badge-tech {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: #222;
    color: #aaa;
    border: 1px solid #333;
    display: inline-block;
}

.badge-tech.bg-green {
    background: var(--brand-green);
    color: #000;
    border-color: var(--brand-green);
    box-shadow: 0 0 15px var(--brand-glow);
}

/* Text Sizes */
.text-xxs {
    font-size: 0.65rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* The Logic Cards (Col 3) */
.logic-card {
    line-height: normal;
}

/* Output Card */
.output-card {
    border-style: dashed;
    background: transparent;
}

/* Responsive */
@media (max-width: 992px) {
    .logic-card {
        line-height: 12px;
    }
}

#beam-path,
#future-gate {
    stroke: var(--brand-green);
}

/* =========================================
   VISUAL BUILDER / IDE STYLES
   ========================================= */

#builder {
    background-color: rgba(27, 32, 7, 0.05);

    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Create a subtle crosshatch pattern */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center;

}

/* The Green Glow Spot */
.visual-glow-spot {
    position: absolute;
    background: radial-gradient(circle at center bottom, rgba(203, 229, 78, 0.05) 30%, rgba(203, 229, 78, 0.1) 40%, rgba(0, 0, 0, 0) 70%);
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 1;
    width: 3080px;
    height: 150%;
    left: 50%;
    transform: translate(-50%, 0%);
    animation: glow 7s infinite;
}

@keyframes glow {
    0% {
        width: 3080px;
    }

    50% {
        width: 2880px;
    }

    100% {
        width: 3080px;
    }
}

/* --- 1. Main Container & Window --- */
.browser-window {
    background-color: #0f0f0f;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease;
    /* Hardware acceleration for smooth scaling */
    transform: translateZ(0);
    border-radius: 12px 12px 0px 0px;
}

.browser-header {
    border-radius: 12px 12px 0px 0px;
    border: 1px solid var(--border-color);
    border-bottom: none;
}

.browser-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* --- 2. Tabs & Controls --- */
.ide-tabs {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bg-subtle {
    background-color: rgba(255, 255, 255, 0.1);
}

.hover-text-white:hover {
    color: #fff !important;
}

/* --- 3. Slides & Animation --- */
.ide-slide {
    display: none;
    height: 100%;
    border: 1px solid var(--border-color);
}

.ide-slide.active {
    display: block;
    animation: fadeScale 0.5s ease forwards;
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- 4. Hotspots (Core Styles) --- */
.hotspot {
    position: absolute;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 20;
    /* Above video, below tooltips */
}

/* Slide 1 (Video) Hotspots: Hidden by default, shown via JS */
#slide-1 .hotspot {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    /* Prevent clicks when hidden */
}

#slide-1 .hotspot.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hotspot-dot {
    width: 10px;
    height: 10px;
    background-color: var(--brand-green);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px var(--brand-green);
    z-index: 2;
}

.hotspot-pulse {
    width: 100%;
    height: 100%;
    border: 1px solid var(--brand-green);
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    animation: hotspot-ping 2s infinite;
}

@keyframes hotspot-ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Hotspot Tooltips */
.hotspot-tooltip {
    position: absolute;
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 240px;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    text-align: center;
    z-index: 30;
}

.hotspot:hover .hotspot-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- 5. Video Player (Agent Studio) --- */
.video-wrapper {
    background: #000;
    width: 100%;
    height: auto;
}

/* Play/Pause Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 15;
    /* Below hotspots (20) but above video */
    pointer-events: none;
    /* Let clicks pass through to container */
}

/* Show overlay when parent has 'paused' class */
.video-wrapper.paused .video-overlay {
    opacity: 1;
}

.play-icon-circle {
    width: 60px;
    height: 60px;
    background: var(--brand-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(var(--brand-green-rgb), 0.4);
    transform: scale(0.8);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.video-wrapper:hover .play-icon-circle {
    transform: scale(1);
}

/* Timeline Control */
.video-timeline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 25;
    cursor: pointer;
    transition: height 0.2s ease;
}

.video-timeline:hover {
    height: 16px;
}

.timeline-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.timeline-progress {
    height: 100%;
    width: 0%;
    background: var(--brand-green-dim);
    position: relative;
}

.timeline-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(255, 255, 255, 0.5);
    z-index: 26;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 2px;
}

.timeline-marker:hover {
    background: var(--brand-green-light);
    transform: scaleY(1.5);
    box-shadow: 0 0 8px var(--brand-green);
}

.video-timeline:hover .timeline-marker {
    width: 6px;
}

/* =========================================
   PHASE 5: BENTO GRID & MODALS
   ========================================= */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-auto-rows: minmax(240px, auto);
    gap: 1.5rem;
}

@media (max-width: 992px) {
    .bento-grid {
        display: flex;
        gap: 1em;
        flex-direction: column;
    }
}

.bento-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
    grid-column: span 2;
}

/* Spanning Utilities */
.span-2 {
    grid-column: span 4;
}

.span-1-5 {
    grid-column: span 3;
}

.row-2 {
    grid-row: span 2;
}

/* Hover: Lift & Glow border */
.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.cursor-pointer {
    cursor: pointer;
}

/* Typography inside cards */
.bento-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Icon Box (Top Left of cards) */
.icon-box {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: 0.3s;
}

/* Maximize Button (Top Right - visible on hover) */
.maximize-btn {
    color: var(--text-secondary);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.05);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-card:hover .maximize-btn {
    opacity: 1;
    transform: scale(1);
}

.maximize-btn:hover {
    background: var(--brand-green);
    /* Brand Color */
    color: #000;
}

@media (max-width: 992px) {
    .bento-card .maximize-btn {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- 3. SPECIFIC CARD: DEPLOY EVERYWHERE (Circuit Style) --- */

.circuit-line {
    stroke: rgba(255, 255, 255, 0.1);
    transition: stroke 0.3s ease;
}

.bento-card:hover .circuit-line {
    stroke: rgba(255, 255, 255, 0.4);
}

.signal-dot {
    opacity: 0;
    offset-distance: 0%;
}

.signal-dot-left {
    offset-path: path("M200,120 L200,100 L-10,100 L-10,60");
}

.signal-dot-right {
    offset-path: path("M200,120 L200,100 L412,100 L412,60");
}

.signal-dot-center {
    offset-path: path("M200,120 L200,45");
}

.group:hover .signal-dot {
    opacity: 1;
    animation: travelPath 2.2s infinite linear;
}

@keyframes travelPath {
    0% {
        offset-distance: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    70% {
        offset-distance: 100%;
        opacity: 0;
    }

    /* Delay before restarting */
    100% {
        offset-distance: 100%;
        opacity: 0;
    }
}

/* The Iqra Logo (Center Hub) */
.logo-glow-container {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    background: #000;
}

.group:hover .logo-glow-container {
    box-shadow: 0 0 20px rgba(203, 229, 78, 0.4);
    border-color: var(--brand-green);
    transform: scale(1.1);
}

.channel-icon {
    transition: transform 0.3s ease;
}

.group:hover .phone-icon {
    transform: translateY(-2px);
}

.group:hover .phone-icon i {
    color: var(--brand-green);
}

.group:hover .web-icon {
    transform: translateY(-2px);
}

.group:hover .web-icon i {
    color: #3b82f6;
}

.group:hover .app-icon {
    transform: translateY(-2px);
}

.group:hover .app-icon i {
    color: #14b8a6;
}

.badge-label {
    font-size: 16px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: monospace;
    opacity: 0;
    transform: translateY(5px);
    transition: 0.3s;
}

.group:hover .badge-label {
    opacity: 1;
    transform: translateY(0);
}

/* --- Card Animation: Deterministic Logic --- */

/* 1. The Brain Orb */
.ai-orb {
    transition: all 0.3s ease;
    background: #fff;
}

.group:hover .ai-orb {
    background: var(--brand-green);
    box-shadow: 0 0 20px var(--brand-green);
    transform: scale(1.2);
}

/* 2. Logic Nodes */
.logic-node {
    transition: all 0.3s ease;
    opacity: 0.6;
}

.group:hover .logic-node {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* 3. The Particle Path */
.logic-dot {
    opacity: 0;
    offset-path: path("M 235 6 L 235 60 L 20 60 L 20 110 L 447 110 L 447 60 L 235 60 L 235 6");
}

.group:hover .logic-dot {
    opacity: 1;
    animation: logicTravel 4.7s infinite linear;
}

@keyframes logicTravel {
    0% {
        offset-distance: 0%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    70% {
        offset-distance: 100%;
        opacity: 0;
    }

    100% {
        offset-distance: 100%;
        opacity: 0;
    }
}

/* --- Multilingual Card Animation --- */

.language-rack {
    perspective: 1000px;
}

.lang-row {
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        background 0.4s ease,
        border-color 0.4s ease;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}


/* --- 2. LAYOUT & POSITIONING (The Fix) --- */

/* Container for the status elements */
.status-area {
    position: relative;
    width: 60px;
    /* Fixed width to hold both elements */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align content to right */
}

/* Overlap them using absolute positioning */
.status-area .eq-visualizer,
.status-area .badge-status {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    /* Vertically center */
    white-space: nowrap;
}

/* Initial States */
.eq-visualizer {
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.badge-status {
    opacity: 1;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.active-glow {
    opacity: 0;
    transition: opacity 0.5s ease;
}


/* --- 3. ANIMATION TIMING (The 9s Loop) --- */

/* ENGLISH ROW (Starts at 0s) */
.group:hover #lang-row-en {
    animation: rowHighlightBlue 9s infinite;
}

.group:hover #lang-row-en .eq-visualizer {
    animation: fadeIN_EQ 9s infinite;
}

.group:hover #lang-row-en .badge-status {
    animation: fadeOUT_Badge 9s infinite;
}

.group:hover #lang-row-en .active-glow {
    animation: showGlow 9s infinite;
}

/* ARABIC ROW (Starts at 3s) */
.group:hover #lang-row-ar {
    animation: rowHighlightGreen 9s infinite 3s;
}

.group:hover #lang-row-ar .eq-visualizer {
    animation: fadeIN_EQ 9s infinite 3s;
}

.group:hover #lang-row-ar .badge-status {
    animation: fadeOUT_Badge 9s infinite 3s;
}

.group:hover #lang-row-ar .active-glow {
    animation: showGlow 9s infinite 3s;
}

/* CHINESE ROW (Starts at 6s) */
.group:hover #lang-row-zh {
    animation: rowHighlightRed 9s infinite 6s;
}

.group:hover #lang-row-zh .eq-visualizer {
    animation: fadeIN_EQ 9s infinite 6s;
}

.group:hover #lang-row-zh .badge-status {
    animation: fadeOUT_Badge 9s infinite 6s;
}

.group:hover #lang-row-zh .active-glow {
    animation: showGlow 9s infinite 6s;
}


/* --- KEYFRAMES (Smoother Transitions) --- */

/* 
   Logic: 
   0% - 5%: Fade Transition (Crossfade)
   5% - 28%: Active State (Hold)
   28% - 33%: Fade Transition (Crossfade back)
   33% - 100%: Idle State
*/

@keyframes fadeIN_EQ {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    /* Slow fade in */
    28% {
        opacity: 1;
    }

    /* Stay visible */
    33% {
        opacity: 0;
    }

    /* Slow fade out */
    100% {
        opacity: 0;
    }
}

@keyframes fadeOUT_Badge {
    0% {
        opacity: 1;
    }

    5% {
        opacity: 0;
    }

    /* Slow fade out */
    28% {
        opacity: 0;
    }

    /* Stay hidden */
    33% {
        opacity: 1;
    }

    /* Slow fade in */
    100% {
        opacity: 1;
    }
}

@keyframes showGlow {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 0.15;
    }

    28% {
        opacity: 0.15;
    }

    33% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Row Borders */
@keyframes rowHighlightBlue {

    0%,
    33% {
        border-color: rgba(59, 130, 246, 0.5);
        background: rgba(59, 130, 246, 0.05);
    }

    38%,
    100% {
        border-color: var(--border-color);
        background: rgba(255, 255, 255, 0.02);
    }
}

@keyframes rowHighlightGreen {

    0%,
    33% {
        border-color: var(--brand-green);
        background: rgba(203, 229, 78, 0.05);
    }

    38%,
    100% {
        border-color: var(--border-color);
        background: rgba(255, 255, 255, 0.02);
    }
}

@keyframes rowHighlightRed {

    0%,
    33% {
        border-color: rgba(239, 68, 68, 0.5);
        background: rgba(239, 68, 68, 0.05);
    }

    38%,
    100% {
        border-color: var(--border-color);
        background: rgba(255, 255, 255, 0.02);
    }
}

/* EQ Bar Bounce */
.eq-bar {
    width: 3px;
    background-color: currentColor;
    /* Ensures animation runs but is hidden by parent opacity */
    animation: eqBounce 0.6s infinite ease-in-out alternate;
}

.eq-bar:nth-child(1) {
    height: 40%;
    animation-delay: 0s;
}

.eq-bar:nth-child(2) {
    height: 80%;
    animation-delay: 0.2s;
}

.eq-bar:nth-child(3) {
    height: 50%;
    animation-delay: 0.4s;
}

@keyframes eqBounce {
    0% {
        height: 30%;
        opacity: 0.7;
    }

    100% {
        height: 100%;
        opacity: 1;
    }
}

/* --- Card Animation: Secure Sessions --- */

.data-field {
    white-space: nowrap;
}

/* 1. The Layers */
.raw-data {
    opacity: 0.5;
    transition: opacity 0.3s;
}

.redacted-data {
    /* Hidden initially via clip-path (clipped 100% from the right) */
    clip-path: inset(0 100% 0 0);
    z-index: 2;
    letter-spacing: 3.2px;
    line-height: 30px;
}

.scanner-line {
    /* Starts at left edge */
    left: 0;
    z-index: 3;
    opacity: 0;
}

.secure-badge {
    transition: opacity 0.3s 0.6s;
    /* Delay showing badge until scan done */
}

/* 2. Hover Animation */

/* Reveal Redacted Data */
.group:hover .redacted-data {
    animation: revealRedaction 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* Move Scanner Line */
.group:hover .scanner-line {
    opacity: 1;
    animation: scanLine 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

/* Hide Raw Data slightly */
.group:hover .raw-data {
    opacity: 0.2;
}

/* Show "ENCRYPTED" badge at end */
.group:hover .secure-badge {
    opacity: 1;
}

/* KEYFRAMES */

@keyframes revealRedaction {
    0% {
        clip-path: inset(0 100% 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }

    /* Fully visible */
}

@keyframes scanLine {
    0% {
        left: 0;
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 205px;
        opacity: 0;
    }

    /* Fade out at end */
}

/* --- Card Animation: Smart Turn Taking --- */

/* 1. AGENT WAVE BARS */
.wave-bar {
    width: 4px;
    height: 100%;
    border-radius: 2px;
    transform: scaleY(0.7);
}

.group:hover .wave-bar {
    animation: scenarioWave 8s infinite linear;
}

/* Specific delays per bar to keep the wave looking organic even during scenario */
.group:hover .wave-bar:nth-child(1) {
    animation-delay: 0.0s;
}

.group:hover .wave-bar:nth-child(2) {
    animation-delay: 0.1s;
}

.group:hover .wave-bar:nth-child(3) {
    animation-delay: 0.2s;
}

.group:hover .wave-bar:nth-child(4) {
    animation-delay: 0.6s;
}

.group:hover .wave-bar:nth-child(5) {
    animation-delay: 0.4s;
}

.group:hover .wave-bar:nth-child(6) {
    animation-delay: 0.5s;
}

.group:hover .wave-bar:nth-child(7) {
    animation-delay: 0.3s;
}

.group:hover .wave-bar:nth-child(8) {
    animation-delay: 0.7s;
}

.group:hover .wave-bar:nth-child(9) {
    animation-delay: 0.3s;
}

.group:hover .wave-bar:nth-child(10) {
    animation-delay: 0.2s;
}

/* Specific delays per bar to keep the wave looking organic even during scenario */
.group .wave-bar:nth-child(1) {
    transform: scaleY(0.6);
}

.group .wave-bar:nth-child(2) {
    transform: scaleY(0.8);
}

.group .wave-bar:nth-child(3) {
    transform: scaleY(0.7);
}

.group .wave-bar:nth-child(4) {
    transform: scaleY(0.2);
}

.group .wave-bar:nth-child(5) {
    transform: scaleY(0.5);
}

.group .wave-bar:nth-child(6) {
    transform: scaleY(0.9);
}

.group .wave-bar:nth-child(7) {
    transform: scaleY(0.8);
}

.group .wave-bar:nth-child(8) {
    transform: scaleY(0.5);
}

.group .wave-bar:nth-child(9) {
    transform: scaleY(0.8);
}

.group .wave-bar:nth-child(10) {
    transform: scaleY(0.4);
}

/* KEYFRAMES: THE SCENARIO LOGIC */
@keyframes scenarioWave {

    /* 0% - 30%: Speaking Normal (High Amplitude) */
    0% {
        transform: scaleY(0.8);
        opacity: 1;
    }

    5% {
        transform: scaleY(0.3);
        opacity: 1;
    }

    15% {
        transform: scaleY(0.5);
        opacity: 1;
    }

    20% {
        transform: scaleY(0.8);
        opacity: 1;
    }

    25% {
        transform: scaleY(0.6);
        opacity: 1;
    }

    /* 30% - 35%: Backchannel Dip (Lower Amplitude) */
    32% {
        transform: scaleY(0.3);
        opacity: 0.5;
    }

    35% {
        transform: scaleY(0.8);
        opacity: 1;
    }

    40% {
        transform: scaleY(0.5);
        opacity: 1;
    }

    45% {
        transform: scaleY(0.3);
        opacity: 1;
    }

    50% {
        transform: scaleY(0.7);
        opacity: 1;
    }

    55% {
        transform: scaleY(0.9);
        opacity: 1;
    }

    60% {
        transform: scaleY(0.4);
        opacity: 1;
    }

    65% {
        transform: scaleY(0.8);
        opacity: 1;
    }

    /* 70% - 100%: BARGE IN (Silence / Flatline) */
    70% {
        transform: scaleY(0.1);
        opacity: 0.2;
    }

    /* Instant Cut */
    100% {
        transform: scaleY(0.1);
        opacity: 0.2;
    }

    /* Stay Silent */
}


/* 3. USER EVENTS (Dots) */
.event-dot {
    width: 8px;
    height: 8px;
    opacity: 0.3;
    transition: 0.2s;
}

.event-label {
    opacity: 0;
    transition: 0.2s;
    transform: translate(-50%, 5px);
}

/* Trigger User Events at specific times */
.group:hover .backchannel .event-dot {
    animation: userPulse 8s infinite;
    animation-delay: 2.5s;
    /* Triggers just before dip */
}

.group:hover .backchannel .event-label {
    animation: labelPop 8s infinite;
    animation-delay: 2.5s;
}

.group:hover .barge-in .event-dot {
    animation: userPulse 8s infinite;
    animation-delay: 5.5s;
    /* Triggers just before cut */
}

.group:hover .barge-in .event-label {
    animation: labelPop 8s infinite;
    animation-delay: 5.5s;
}

/* User Dot Pulse */
@keyframes userPulse {
    0% {
        transform: scale(1);
        opacity: 0.3;
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }

    10% {
        transform: scale(1.5);
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }

    20% {
        transform: scale(1);
        opacity: 0.3;
    }

    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

@keyframes labelPop {
    0% {
        opacity: 0;
        transform: translate(-50%, 5px);
    }

    10% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    30% {
        opacity: 0;
        transform: translate(-50%, -5px);
    }

    100% {
        opacity: 0;
    }
}

/* --- 4. Modal System Styles --- */

/* 1. Backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    width: calc(100% - 10px);
    height: 100%;
    background: radial-gradient(circle at center bottom, rgba(203, 229, 78, 0.01) 10%, rgba(203, 229, 78, 0.03) 20%, rgba(0, 0, 0, 0) 50%);
    background-position: center bottom;
    z-index: 2000;
    backdrop-filter: blur(8px) opacity(0);
    pointer-events: none;
    transition: backdrop-filter 0.6s ease;
}

.modal-backdrop.active {
    pointer-events: all;
    backdrop-filter: blur(8px) opacity(1);
}

/* 2. The Container */
.modal-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2001;

    /* Layout */
    display: flex;
    align-items: flex-start;
    justify-content: center;

    /* Scroll Behavior */
    overflow-y: auto;
    padding: 2rem 1rem;

    /* Interaction Logic */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-container.active {
    opacity: 1;
    pointer-events: all;
}

/* 3. The Dialog */
.modal-dialog {
    /* Layout & Positioning */
    position: relative;
    width: 100%;
    max-width: var(--max-width, 1000px);
    margin: auto;

    /* Layering */
    z-index: 2002;
    pointer-events: auto;
    isolation: isolate;

    /* Visuals */
    background: var(--bg-core);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.3);

    /* Content Layout */
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Animation */
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-container.active .modal-dialog {
    transform: translateY(0);
}

/* 4. The Close Button */
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;

    z-index: 9999;
    /* Must be higher than header content */

    /* Dimensions */
    width: 36px;
    height: 36px;
    border-radius: 50%;

    /* Visuals */
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    color: #fff;

    /* Interaction */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #fff;
    color: #000;
    transform: rotate(90deg);
    border-color: #fff;
}

/* 6. Content Styles */
#modal-content-area {
    width: 100%;
}

.modal-article-layout {
    height: auto;
}

.modal-header-section {
    position: relative;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.06), transparent);
    padding: 3rem;
    border-bottom: 1px solid var(--border-color);
    z-index: 1;
}

[data-theme="light"] .modal-header-section {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.06), transparent);
}

.modal-body {
    position: relative;
    padding: 3rem;
    z-index: 1;
}

/* =========================================
   PHASE 5.5: INTEGRATION GRID
   ========================================= */

.integration-grid {
    display: grid;
    /* Responsive columns: auto-fill based on min width */
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1px;
    /* The gap creates the border effect if we use background color properly, or we can use border */
    background: var(--border-color);
    /* Lines between items */
    border: 1px solid var(--border-color);
    /* Outer border */
    max-width: 900px;
    margin: 0 auto;
}

.int-card {
    background: var(--bg-card);
    /* Cover the grid background */
    aspect-ratio: 1/1;
    /* Perfect square */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.int-card img {
    height: 70%;
    width: 70%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.8);
    transition: all 0.3s ease;
    max-width: 60px;
    max-height: 60px;
}

.int-card img.img-dark {
    filter: invert(0.7) grayscale(100%) opacity(0.8);
}

/* Hover State */
.int-card:hover {
    background: var(--bg-card);
    z-index: 2;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .int-card:hover {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.int-card:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.int-card:hover img.img-dark-with-hover {
    filter: invert(1) grayscale(0%) opacity(1);
}

/* Tooltip */
.int-tooltip {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    opacity: 0;
    transition: 0.2s;
    white-space: nowrap;
    pointer-events: none;
}

.int-card:hover .int-tooltip {
    opacity: 1;
    bottom: 10px;
}

/* Filtering Logic */
.int-card.dimmed {
    opacity: 0.1;
    pointer-events: none;
}

/* Filter Buttons */
.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--brand-green);
    color: #000;
    border-color: var(--brand-green);
}

[data-theme="light"] .filter-btn.active {
    color: #fff;
}

.int-card.view-all-card {
    text-decoration: none;
    background: var(--bg-subtle);
    transition: all 0.3s ease;
}

.int-card.view-all-card:hover {
    background: var(--bg-card);
    border-color: var(--brand-green);
    box-shadow: 0 0 15px var(--brand-glow);
}


/* =========================================
   PHASE 7: DEPLOYMENT STYLES
   ========================================= */

/* Terminal Window */
.terminal-window {
    background: #0D0D0D;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.terminal-header {
    background: #1a1a1a;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.terminal-header .circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal-header .red {
    background: #ff5f56;
}

.terminal-header .yellow {
    background: #ffbd2e;
}

.terminal-header .green {
    background: #27c93f;
}

.terminal-body {
    padding: 20px;
    color: #ccc;
    line-height: 1.5;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* =========================================
   WHITELABELING
   ========================================= */


/* Whitelabel Card */
.whitelabel-card {
    transition: transform 0.3s ease;
}

.whitelabel-card:hover {
    transform: translateY(-5px);
    border-color: var(--text-secondary);
}

.skeleton-line {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
}

@media (max-width: 992px) {
    .terminal-window-container {
        border-right: none !important;
    }
}

@media (max-width: 500px) {
    .github-btn {
        margin-bottom: 0.6em;
        width: 100%;
    }

    .community-btn {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .whitelabeling-left-container {
        border-right: none !important;
    }
}

/* =========================================
    MISSION
   ========================================= */

#mission {
    /* Use a deep dark green/black base instead of flat green */
    background-color: var(--bg-core);
}

/* 1. The Geometric Pattern (Abstract Islamic Star/Grid) */
/* 1. The Container (The Window) */
.pattern-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Crucial: Hides the edges of the rotating layers */
    z-index: 0;

    /* We move the actual image logic to the pseudo-elements below */
    opacity: 0.4;
    /* Overall opacity of the effect */
}

/* 2. Shared Styles for Both Layers */
.pattern-grid::before,
.pattern-grid::after {
    content: "";
    position: absolute;

    top: -50%;
    left: -50%;
    width: 200%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);

    background-image: url('/assets/images/background/arabic-geometric.svg');
    background-color: var(--brand-green-dim);
    background-blend-mode: color-dodge;
    background-repeat: repeat;

    /* Adjust the size as needed */
    background-size: 250px auto;

    background-position: center;

    filter: blur(5px);
}

/* 3. Layer 1: Rotates Clockwise + Subtle Pulse */
.pattern-grid::before {
    opacity: 0.3;
    animation: fractal-spin-cw 360s linear infinite;
}

/* 4. Layer 2: Rotates Counter-Clockwise + Different Scale */
.pattern-grid::after {
    opacity: 0.3;
    /* Starts slightly scaled up to create depth */
    transform: scale(1.1);
    animation: fractal-spin-ccw 450s linear infinite;
}

/* --- ANIMATIONS --- */

@keyframes fractal-spin-cw {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        /* Breathe out (Zoom in) */
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes fractal-spin-ccw {
    0% {
        transform: rotate(0deg) scale(1.1);
    }

    50% {
        /* Breathe in (Zoom out) */
        transform: rotate(-180deg) scale(0.9);
    }

    100% {
        transform: rotate(-360deg) scale(1.1);
    }
}

/* 2. The Aurora Blobs */
.aurora-blob {
    position: absolute;
    width: 1300px;
    height: 1300px;
    background: radial-gradient(circle, rgba(160, 185, 32, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    top: 0%;
    left: 0%;
    transform: translate(-50%, -50%);
    filter: blur(60px);
    animation: aurora-float 10s infinite alternate ease-in-out;
}

/* 3. Animations */
@keyframes aurora-float {
    0% {
        top: 0%;
        left: 0%;
    }

    100% {
        top: 15%;
        left: 15%;

        width: 1500px;
        height: 1500px;
    }
}

blockquote {
    font-style: italic;
    color: var(--text-secondary);
    margin: 0;
}

blockquote strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Ensure figcaption aligns with the new design */
.blockquote-footer {
    color: var(--text-muted);
}

/* =========================================
   PHASE 8: FINAL CTA STYLES
   ========================================= */

#ready {
    background-color: rgba(14, 24, 1, 0.1);
}

/* The Pulsing Background */
.ignition-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    min-width: 1500px;
    height: 100%;
    background: url(/assets/images/background/cta.avif);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: blur(10px);
    opacity: 0.03;
}

@media (max-width: var(--max-width)) {
    #ready {
        overflow: hidden;
    }
}

/* Button Shine Effect */
.shine-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* Specific text tweaks for this section */
#ready h2 {
    letter-spacing: -0.04em;
    text-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] #ready h2 {
    text-shadow: 0 0 50px rgba(0, 0, 0, 0.1);
}

/* =========================================
   FOOTER
   ========================================= */

footer {
    background: var(--bg-footer);
}

/* Footer Slogan */
.footer-slogan {
    font-size: min(10vw, 140px);
    line-height: 0.8;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: var(--text-primary);
}

.text-stroke {
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px var(--brand-green);
}

.footer-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-link:hover {
    color: var(--brand-green);
    transform: translateX(5px);
}

.social-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: 0.2s;
}

.social-icon:hover {
    background: var(--text-primary);
    color: #000;
}