/* ==========================================================================
   VARIABLES.CSS - Design Tokens
   ========================================================================== */
:root {
    /* Retro Schematic Palette */
    --bg-paper: #f4ecd8;
    --olive-dark: #3b422a;
    --olive-light: #6b7a4f;
    --grid-line: rgba(59, 66, 42, 0.15);
    --bg-body: var(--bg-paper);
    --text-base: var(--olive-dark);

    /* Borders & Outlines */
    --border-thick: 3px solid var(--olive-dark);
    --border-thin: 1px solid var(--olive-dark);
    --shadow-solid: 6px 6px 0px var(--olive-dark);
    --shadow-solid-sm: 3px 3px 0px var(--olive-dark);

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --notebook-margin: 80px;
    --danger: #8e2d2d;
}

/* ==========================================================================
   BASE.CSS - Resets & Global Styles
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-paper);
    color: var(--olive-dark);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Graph Paper Effect */
    background-size: 20px 20px;
    background-image:
        linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: var(--notebook-margin);
    width: 2px;
    height: 100%;
    background: rgba(183, 28, 28, 0.2);
    /* Red notebook margin line */
    z-index: -1;
}

h1,
h2,
h3,
.ui-label {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.mono,
code,
input,
.stat-value,
.stat-row .value {
    font-family: var(--font-mono);
    font-weight: 500;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Notebook Spine Decoration */
.notebook-spine {
    position: fixed;
    left: 0;
    top: 0;
    width: 60px;
    height: 100%;
    background: var(--olive-dark);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 20px 0;
}

.spine-hole {
    width: 20px;
    height: 20px;
    background: var(--bg-paper);
    border-radius: 50%;
    box-shadow: inset 2px 2px 0px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   LAYOUT.CSS - Navigation & Sections
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-paper);
    border-bottom: var(--border-thick);
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    border: var(--border-thin);
    padding: 4px 12px;
    background: var(--olive-dark);
    color: var(--bg-paper);
    display: inline-block;
}

.logo .highlight {
    color: #c0ca33;
}

.nav-links {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 8px 14px;
    border: var(--border-thin);
    text-decoration: none;
    color: var(--olive-dark);
    background: var(--bg-paper);
    box-shadow: 3px 3px 0px var(--olive-dark);
    transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
    display: block;
}

.nav-links a:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--olive-dark);
    background: var(--olive-light);
    color: var(--bg-paper);
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Dropdown & User Menu Spacing Fix */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: var(--bg-paper);
    border: var(--border-thick);
    padding: 8px 16px;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 3px 3px 0px var(--olive-dark);
    max-width: 350px;
    /* Increased limit */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropbtn svg {
    flex-shrink: 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--bg-paper);
    min-width: 160px;
    box-shadow: var(--shadow-solid);
    border: var(--border-thick);
    z-index: 1000;
    margin-top: 10px;
    top: 100%;
}

/* Invisible bridge */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

.dropdown-content a {
    color: var(--olive-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: var(--border-thin);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--olive-dark);
    color: var(--bg-paper);
}

/* Global .nav-logout from global.css will handle this */

.dropdown:hover .dropdown-content {
    display: block;
}

/* Sections */
.hero {
    padding: 100px 0;
    border-bottom: var(--border-thin);
}

.features,
.demo-section,
.process-section {
    padding: 80px 0;
    border-bottom: var(--border-thin);
}

/* ==========================================================================
   COMPONENTS.CSS - UI Elements
   ========================================================================== */
/* Buttons */
.btn-primary,
.btn-cta-pill,
.btn-login,
.demo-pill,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--bg-paper);
    border: var(--border-thick);
    color: var(--olive-dark);
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-solid-sm);
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: var(--font-sans);
    line-height: 1;
}

.btn-primary:hover,
.btn-cta-pill:hover,
.demo-pill:hover:not(:disabled) {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0px var(--olive-dark);
    background: var(--olive-light);
    color: var(--bg-paper);
}

.btn-primary {
    background: var(--olive-dark);
    color: var(--bg-paper);
}

/* Cards */
.feature-card,
.process-card,
.demo-interface-wrapper {
    background: var(--bg-paper);
    border: var(--border-thick);
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow-solid);
    margin-bottom: 20px;
    transition: transform 0.1s, box-shadow 0.1s, background-color 0.2s;
}

.feature-card:hover,
.process-card:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0px var(--olive-dark);
    background-color: rgba(59, 66, 42, 0.03);
    cursor: default;
}

.feature-card::before,
.process-card::before {
    content: attr(data-id);
    position: absolute;
    top: -14px;
    left: 15px;
    background: var(--olive-dark);
    color: var(--bg-paper);
    padding: 2px 10px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    border: none;
    text-transform: uppercase;
}

.feature-card::after {
    content: "X:" attr(data-x) " Y:" attr(data-y);
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    opacity: 0.5;
}


/* ==========================================================================
   SHOWCASE CARDS GRID — 3-Card Feature Panels
   ========================================================================== */
.showcase-cards-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    width: 100%;
}

.showcase-beautiful-card {
    background: var(--bg-paper);
    border: var(--border-thick);
    box-shadow: var(--shadow-solid);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.15s, box-shadow 0.15s;
    height: 460px;
    width: 100%;
}

.showcase-beautiful-card:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0px var(--olive-dark);
}

.card-text-content {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.card-text-content h3 {
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--olive-dark);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    max-width: 80%;
    margin: 0;
}

.expand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid var(--olive-dark);
    color: var(--olive-dark);
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.15s;
}

.showcase-beautiful-card:hover .expand-icon {
    opacity: 0.8;
}

.expand-icon svg {
    opacity: 1;
}

.card-image-content {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px 20px 0 20px;
    overflow: hidden;
    position: relative;
}

/* Base image styling */
.card-image-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: bottom;
    border: 2px solid rgba(59, 66, 42, 0.15);
    border-bottom: none;
}

/* Mobile mockup sizing */
.mobile-mockup-img {
    max-width: 75% !important;
}

/* Expand icon — button reset */
button.expand-icon {
    background: none;
    padding: 0;
    cursor: pointer;
}

/* ==========================================================================
   IMAGE LIGHTBOX OVERLAY
   ========================================================================== */
.img-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.img-lightbox-overlay.active {
    display: flex;
}

.img-lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: var(--border-thick);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    background: var(--bg-paper);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.8rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
}

.lightbox-close:hover {
    border-color: #fff;
    color: #fff;
}



/* ==========================================================================
   CLOSING CTA BAND — "Ready to File?"
   ========================================================================== */
.cta-band {
    background: var(--olive-dark);
    color: var(--bg-paper);
    position: relative;
    padding: 60px 0;
    overflow: hidden;
}

.cta-band-stripe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--olive-light);
}

.cta-band-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.cta-band-text {
    flex: 1;
}

.cta-band-label {
    font-size: 0.7rem;
    opacity: 0.6;
    display: block;
    margin-bottom: 12px;
    letter-spacing: 0.08em;
}

.cta-band-headline {
    font-size: 2.8rem;
    line-height: 1.1;
    color: var(--bg-paper);
    margin-bottom: 14px;
}

.cta-band-sub {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.7;
    max-width: 420px;
}

.cta-band-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    flex-shrink: 0;
}

.cta-band-btn-primary {
    display: inline-block;
    background: var(--bg-paper);
    color: var(--olive-dark);
    padding: 14px 36px;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.08em;
    border: 3px solid var(--bg-paper);
    box-shadow: 6px 6px 0px rgba(244, 236, 216, 0.25);
    transition: transform 0.1s, box-shadow 0.1s;
}

.cta-band-btn-primary:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0px rgba(244, 236, 216, 0.25);
}

.cta-band-btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--bg-paper);
    padding: 12px 30px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.06em;
    border: 2px solid rgba(244, 236, 216, 0.4);
    transition: border-color 0.2s, background 0.2s;
}

.cta-band-btn-secondary:hover {
    border-color: var(--bg-paper);
    background: rgba(244, 236, 216, 0.08);
}

.cta-band-meta {
    font-size: 0.6rem;
    opacity: 0.35;
    margin-top: 4px;
    letter-spacing: 0.04em;
}


/* Demo Interface Specifics */
.window-controls {
    border-bottom: var(--border-thick);
    background: var(--olive-dark);
    color: var(--bg-paper);
    padding: 10px 20px;
}

.demo-body {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    border-top: none;
}

.demo-chat-panel {
    border-right: var(--border-thick);
    display: flex;
    flex-direction: column;
    background: rgba(59, 66, 42, 0.02);
}

.demo-stats-panel {
    background: rgba(59, 66, 42, 0.05);
}

/* Chat Messages - Highlighted Schematic Style */
.demo-messages {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    background: var(--olive-dark);
    color: var(--bg-paper);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.7rem;
    border: var(--border-thin);
    flex-shrink: 0;
}

.bubble {
    padding: 12px 16px;
    border: var(--border-thick);
    background: var(--bg-paper);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    position: relative;
    box-shadow: var(--shadow-solid-sm);
    max-width: 80%;
}

.message.bot .bubble {
    background: #fff9c4;
    /* Soft yellow highlight */
    border-left: 8px solid var(--olive-dark);
    /* Bold accent border */
}

.message.user .bubble {
    background: var(--olive-dark);
    color: var(--bg-paper);
    box-shadow: -4px 4px 0px var(--olive-light);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--olive-dark);
    padding: 8px 0;
}

.stat-row.highlight {
    border-bottom: none;
    background: var(--olive-dark);
    color: var(--bg-paper);
    padding: 12px;
    margin-top: 10px;
}

/* Schematic Hero Visual */
.schematic-diagram {
    border: var(--border-thin);
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.schematic-node {
    border: var(--border-thick);
    padding: 15px;
    background: var(--bg-paper);
    z-index: 2;
    box-shadow: var(--shadow-solid-sm);
}

.schematic-line {
    position: absolute;
    border-top: 2px dashed var(--olive-dark);
    width: 60%;
    top: 50%;
    z-index: 1;
}

/* Ecosystem Diagram */
.ecosystem-section {
    padding: 80px 0;
    border-bottom: var(--border-thin);
    overflow: hidden;
}

.eco-heading-block {
    max-width: 800px;
    margin: 0 auto 50px auto;
    text-align: center;
}

.eco-heading-block h2 {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    line-height: 1.3;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: var(--olive-dark);
    text-transform: none;
    /* Override standard uppercase heading */
    margin: 0;
}

.eco-heading-block h2 span {
    font-weight: 500;
    color: rgba(59, 66, 42, 0.7);
    /* Muted olive for the subtitle part */
}

.eco-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px;
    background: rgba(59, 66, 42, 0.02);
    border: var(--border-thick);
    box-shadow: var(--shadow-solid);
}

.eco-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8%;
    min-height: 350px;
    width: 100%;
}

.eco-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2;
}

.eco-node {
    background: var(--bg-paper);
    border: var(--border-thick);
    padding: 12px 20px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    box-shadow: var(--shadow-solid-sm);
    color: var(--olive-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    min-width: 180px;
}

.eco-node:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0px var(--olive-dark);
    background-color: var(--olive-light);
    color: var(--bg-paper);
}

.eco-engine {
    background: var(--olive-dark);
    color: var(--bg-paper);
    padding: 40px 30px;
    box-shadow: 8px 8px 0px #c0ca33;
    flex-direction: column;
}

.eco-engine h3 {
    margin-top: 15px;
    font-size: 1.2rem;
    font-family: var(--font-sans);
}

.eco-grid-container {
    background: var(--bg-paper);
    border: var(--border-thick);
    padding: 15px;
    box-shadow: var(--shadow-solid-sm);
}

.eco-grid-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: var(--border-thick);
    padding-bottom: 5px;
    margin-bottom: 10px;
    text-align: center;
}

.eco-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.eco-grid-item {
    width: 32px;
    height: 32px;
    border: var(--border-thin);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.7rem;
    opacity: 0.6;
}

/* SVG Line Animations */
.eco-svg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

@keyframes ecoDash {
    to {
        stroke-dashoffset: -20;
    }
}

.eco-path {
    stroke-dasharray: 6, 6;
    animation: ecoDash 1s linear infinite;
}

/* Mobile Toggle */
.hamburger-menu {
    display: none !important;
    background: var(--bg-paper);
    border: var(--border-thick);
    padding: 8px;
    cursor: pointer;
}

.logout-link {
    color: var(--danger) !important;
    background: transparent !important;
    border: 1px solid var(--danger) !important;
    box-shadow: 3px 3px 0px var(--danger) !important;
    text-decoration: none;
}

/* Perfect fill for desktop dropdown */
.dropdown-content .logout-link {
    border: none !important;
    box-shadow: none !important;
    width: 100%;
    padding: 10px 15px !important;
    display: flex !important;
    align-items: center;
    background: transparent !important;
}

.logout-link:hover,
.dropdown-content .logout-link:hover {
    color: var(--bg-paper) !important;
    background: var(--danger) !important;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px var(--danger) !important;
}

.dropdown-content .logout-link:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Mobile Sidebar Specifics */
.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-links .nav-item {
    width: 100%;
    text-align: center;
}

.sidebar-auth {
    margin-top: 30px;
    padding-top: 30px;
    border-top: var(--border-thin);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-auth .dropdown {
    width: 100%;
}

.sidebar-auth .dropbtn {
    width: 100%;
    justify-content: center;
    margin-bottom: 5px;
}

.sidebar-auth .dropdown-content {
    position: relative;
    /* Push layout */
    top: 0;
    width: 100%;
    display: none;
    /* Controlled by .dropdown-active */
    box-shadow: none;
    border-style: dashed;
    background: rgba(59, 66, 42, 0.05);
}

.sidebar-auth .dropdown-content.dropdown-active {
    display: block;
}

.sidebar-auth .dropdown-content a {
    text-align: center;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(59, 66, 42, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    display: block !important;
    /* Override global.css display:none !important */
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    /* Start off-screen */
    width: 85vw;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-paper);
    border-left: var(--border-thick);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 60px 20px;
    /* Right padding increased to 28px for box-shadow room (3px shadow + gutter) */
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
}

.no-scroll {
    overflow: hidden !important;
}

@media (min-width: 901px) {

    .mobile-sidebar,
    .sidebar-overlay {
        display: none !important;
    }
}


/* ========================================================== */
/* Workflow Showcase Section (Stripe-Esque Flow) */
/* ========================================================== */

.showcase-section {
    padding: 80px 0;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-paper);
    /* Explicit fallback to retro palette */
}

/* Base Layout Container for System Specifications */
.features {
    padding: 100px 0;
    border-bottom: var(--border-thin);
    position: relative;
}

.showcase-container-relative {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    perspective: 1500px;
    padding: 80px 0;
}

.showcase-image-wrapper {
    position: relative;
    transform: rotateY(-18deg) rotateX(8deg) rotateZ(1deg);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 25px 25px 0px rgba(59, 66, 42, 0.15);
    /* Deep thematic shadow */
    border: var(--border-thick);
    background: var(--bg-paper);
    padding: 4px;
    border-radius: 4px;
    z-index: 2;
}

.showcase-image-wrapper:hover {
    transform: rotateY(-8deg) rotateX(2deg) rotateZ(0deg);
}

.showcase-main-img {
    width: 100%;
    height: auto;
    display: block;
    outline: var(--border-thin);
}

/* Floating Callout Cards */
.showcase-card {
    position: absolute;
    background: var(--bg-paper);
    border: var(--border-thick);
    box-shadow: 8px 8px 0px var(--olive-dark);
    padding: 20px;
    width: 290px;
    z-index: 5;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.showcase-card:hover {
    transform: translateY(-5px);
}

.showcase-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: var(--olive-dark);
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.showcase-card p {
    font-size: 0.8rem;
    color: var(--text-base);
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: 500;
}

.showcase-card .sc-output {
    background: var(--olive-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 14px;
    font-size: 0.75rem;
    border-left: 4px solid var(--olive-light);
    border-radius: 0 4px 4px 0;
    letter-spacing: 0.3px;
}

/* Card Absolute Positions */
.sc-top-left {
    top: 20px;
    left: -120px;
    animation: float1 7s ease-in-out infinite;
}

.sc-bottom-left {
    bottom: -30px;
    left: -80px;
    animation: float2 5s ease-in-out infinite alternate;
}

.sc-bottom-right {
    bottom: 50px;
    right: -130px;
    animation: float3 6s ease-in-out infinite;
}

@keyframes float1 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes float2 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

@keyframes float3 {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .eco-wrapper {
        padding: 40px 15px;
        overflow: hidden;
    }

    .eco-heading-block h2 {
        font-size: 1.5rem;
    }

    .eco-content {
        flex-direction: column;
        gap: 60px;
        /* Space between layers vertically */
        align-items: center;
    }

    /* Force a rigid 2-column mathematical grid to guarantee absolute centering */
    #col-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        width: 100%;
        max-width: 380px;
    }

    .eco-col {
        width: 100%;
        align-items: center;
    }

    /* Target all nodes */
    .eco-node {
        min-width: unset;
        font-size: 0.75rem;
        padding: 10px 15px;
    }

    .eco-node.feature-node {
        width: 100%;
        max-width: unset;
        height: 52px;
        /* Force strict uniform height */
        padding: 8px 5px;
        font-size: 0.7rem;
        text-align: center;
        justify-content: center;
        margin: 0;
    }

    /* Force the 5th odd child to span both grid columns but remain centered with the size of a single column */
    #col-2 .feature-node:nth-child(5) {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - 7px);
        transform: translateX(3px);
        /* node center line  */
    }

    .eco-node.eco-engine {
        padding: 25px 20px;
    }

    .demo-body {
        grid-template-columns: 1fr;
    }

    .demo-chat-panel {
        border-right: none;
        border-bottom: var(--border-thick);
    }

    /* Showcase Section Mobile Reset */
    .showcase-section {
        padding: 50px 0;
    }

    .showcase-container-relative {
        padding: 20px 15px;
        perspective: none;
        /* Turn off 3D plane */
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .showcase-image-wrapper {
        transform: none !important;
        box-shadow: 10px 10px 0px rgba(59, 66, 42, 0.15);
        /* Flat shadow */
    }

    .showcase-card {
        display: none !important;
    }

    /* Showcase Cards — 2 columns on tablet */
    .showcase-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* CTA Band — Stack on tablet */
    .cta-band-inner {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .cta-band-sub {
        margin: 0 auto;
    }

    .cta-band-actions {
        align-items: center;
    }
}

@media (max-width: 900px) {
    :root {
        --notebook-margin: 20px;
    }

    .container {
        padding: 0 20px;
    }

    .notebook-spine {
        display: none;
    }

    .desktop-only {
        display: none !important;
    }

    .hamburger-menu {
        display: block !important;
    }

    .hero-content-split {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 20px !important;
    }

    /* Showcase Cards — Single column on mobile */
    .showcase-cards-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .showcase-beautiful-card {
        height: 400px;
    }

    .card-text-content {
        padding: 20px 20px 0 20px;
    }

    .card-text-content h3 {
        font-size: 0.8rem;
    }

    /* CTA Band Mobile */
    .cta-band {
        padding: 45px 0;
    }

    .cta-band-headline {
        font-size: 2rem;
    }

    .cta-band-inner {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .cta-band-sub {
        margin: 0 auto;
    }

    .cta-band-actions {
        align-items: center;
    }

    /* Mobile Spacing Optimizations */
    .sidebar-links {
        gap: 10px;
    }

    .sidebar-auth {
        margin-top: 20px;
        padding-top: 20px;
        gap: 10px;
    }

    .sidebar-auth .ui-label {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }

    /* Demo Section Mobile Fixes */
    .demo-interface-wrapper {
        box-shadow: 6px 6px 0px var(--olive-dark);
    }

    .demo-stats-panel {
        padding: 20px !important;
    }

    .demo-messages {
        padding: 15px !important;
        height: 250px !important;
    }

    .demo-interaction-area {
        padding: 15px !important;
    }

    .demo-pill {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .demo-input-fake {
        font-size: 0.75rem;
        padding: 8px !important;
        flex-wrap: wrap;
    }

    .demo-input-fake .input-prompt {
        margin-right: 5px !important;
        font-size: 0.65rem;
    }

    #demo-typing-area {
        word-break: break-all;
    }

    /* Hero Image Mobile Fix */
    .hero-visual-wrapper img {
        width: 100% !important;
        transform: none !important;
        margin-top: 20px;
    }

    .hero-text-wrapper-left h1 {
        font-size: 2.5rem !important;
    }
}

/* Extra Small Devices (iPhone SE, etc.) */
@media (max-width: 380px) {
    .mobile-sidebar {
        width: 90vw;
    }

    .sidebar-content {
        padding: 15px 15px 50px 15px;
    }

    .sidebar-links li {
        margin-bottom: 10px !important;
    }

    .nav-item {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .sidebar-auth {
        margin-top: 15px;
        padding-top: 15px;
    }

    .sidebar-header {
        padding: 15px !important;
    }
}

/* =========================================
   URDU LOCALIZATION STYLES
   ========================================= */
[lang="ur"] {
    text-align: right;
    font-family: 'Segoe UI', Tahoma, 'Arial Unicode MS', 'Simplified Arabic', 'Traditional Arabic', sans-serif !important;
    font-weight: 600;
    line-height: 1.9;
    letter-spacing: 0px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

[lang="ur"] .nav-links,
[lang="ur"] .auth-buttons,
[lang="ur"] .footer-links,
[lang="ur"] .demo-controls,
[lang="ur"] .stats-grid,
[lang="ur"] .hero-content-split {
    /* Keep LTR layout - no direction change */
}

/* Fix for icons/arrows in RTL */
[lang="ur"] .dropbtn svg,
[lang="ur"] .back-btn svg {
    margin-right: 10px;
    margin-left: 0;
}

[lang="ur"] .logo {
    letter-spacing: 0;
}