@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-main: #ececec;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-canvas: #fafafa;

    --border-color: #e2e8f0;
    --border-color-dark: #cbd5e1;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-on-dark: #ffffff;

    --primary: #000000;
    /* Sleek dark accents */
    --primary-hover: #1e293b;
    --brand-blue: #000000;
    --brand-blue-light: #f4f4f5;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   Header & Dropdown Navigation
   ========================================================================== */
header.app-header {
    height: 60px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text-main);
}

.logo-icon {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb-sep {
    color: var(--border-color-dark);
}

.breadcrumb-active {
    font-weight: 500;
    color: var(--text-main);
}

.badge-draft {
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #ffffff;
    color: #111111;
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Nav Menu & Hover Dropdowns */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-link:hover,
.nav-item:hover .nav-link {
    color: var(--text-main);
    background-color: #f1f5f9;
}

.chevron-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.nav-item:hover .chevron-icon {
    transform: translateY(1px);
}

/* Mega Dropdown Menu (Matches Screenshot 2) */
.dropdown-menu {
    position: absolute;
    top: calc(100% - 4px);
    right: 50%;
    transform: translateX(50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 480px;
    padding: 24px;
    display: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1000;
}

.nav-item:hover .dropdown-menu {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.dropdown-header {
    margin-bottom: 20px;
}

.dropdown-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.dropdown-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dropdown-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
}

.dropdown-card:hover {
    border-color: var(--border-color-dark);
    background-color: var(--bg-main);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.dropdown-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.dropdown-card-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.dropdown-card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   App Shell Layout (Dashboard/Editor)
   ========================================================================== */
.app-shell {
    margin-top: 60px;
    height: calc(100vh - 60px);
    display: flex;
    flex: 1;
}

/* Left Sidebar (Vertical icon navigation) */
.left-sidebar {
    width: 64px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 20px;
}

.sidebar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: transparent;
    cursor: pointer;
}

.sidebar-icon-btn:hover {
    color: var(--text-main);
    background-color: #f1f5f9;
}

.sidebar-icon-btn.active {
    color: #ffffff;
    background-color: #111111;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-icon {
    width: 20px;
    height: 20px;
}

/* Sub-Sidebar / Control Panel (Width: 320px) */
.control-sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px 0 16px;
    gap: 8px;
}

.tab-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--radius-pill) var(--radius-pill) 0 0;
    cursor: pointer;
    text-align: center;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--text-main);
    background-color: #f1f5f9;
    border-radius: var(--radius-pill);
}

.tab-content {
    padding: 20px;
    flex: 1;
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glassmorphic AI Builder Card (Matches Image 1) */
.ai-builder-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: var(--shadow-md);
}

.ai-card-banner {
    height: 120px;
    background: linear-gradient(135deg, #a7f3d0 0%, #fef08a 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-card-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    color: #064e3b;
}

.ai-card-body {
    padding: 16px;
}

.ai-card-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 16px;
}

.ai-card-actions {
    display: flex;
    gap: 8px;
}

.ai-card-actions .btn-pill-dark,
.ai-card-actions .btn-pill-light {
    flex: 1;
}

/* Button & Pill Styles */
.btn-pill-dark {
    font-family: var(--font-sans);
    background-color: #111111;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-pill-dark:hover {
    background-color: #0f172a;
}

.btn-pill-light {
    font-family: var(--font-sans);
    background-color: #f1f5f9;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-pill-light:hover {
    background-color: #e2e8f0;
}

/* Form & Input Groups */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Custom drag & drop upload zone */
.upload-zone {
    border: 1.5px dashed var(--border-color-dark);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background-color: #fafbfc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-zone:hover {
    border-color: var(--brand-blue);
    background-color: #f8fafc;
}

.upload-icon {
    font-size: 2rem;
}

.upload-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.upload-subtext {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Custom Inputs Styling */
input[type="file"] {
    display: none;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-pill);
    background: #e2e8f0;
    outline: none;
    transition: background 0.15s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-main);
    cursor: pointer;
    border: 2px solid var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.range-val {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

/* Color Picker Container */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-preview-box {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color-dark);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.color-input-hidden {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.color-hex-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Button Options */
.toggle-options {
    display: flex;
    background: #f1f5f9;
    padding: 3px;
    border-radius: var(--radius-sm);
}

.toggle-option-btn {
    flex: 1;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    background: none;
    padding: 6px 12px;
    border-radius: calc(var(--radius-sm) - 2px);
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.toggle-option-btn.active {
    background: #ffffff;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Main Canvas Workspace Area (Matches Image 1 Canvas)
   ========================================================================== */
.canvas-area {
    flex: 1;
    background-color: var(--bg-canvas);
    background-image: radial-gradient(#e2e8f0 1.5px, transparent 1.5px);
    background-size: 20px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 24px;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

/* Canvas Toolbar */
.canvas-toolbar {
    position: absolute;
    top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 48px);
    max-width: 900px;
    z-index: 10;
}

.toolbar-group-left {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.toolbar-tab {
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-tab.active {
    background: #f1f5f9;
    color: var(--text-main);
}

.toolbar-tab-icon {
    width: 14px;
    height: 14px;
}

.toolbar-group-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon-action {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.btn-icon-action:hover:not(:disabled) {
    color: var(--text-main);
    background-color: #f1f5f9;
}

.btn-icon-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Canvas Frame wrapper */
.canvas-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 16px;
    max-width: 100%;
    max-height: 80vh;
    position: relative;
}

.canvas-frame canvas {
    max-width: 100%;
    max-height: calc(80vh - 32px);
    display: block;
    border-radius: var(--radius-md);
    background-color: #ffffff;
}

/* Status / Alert Indicator */
.status-indicator {
    position: absolute;
    bottom: 24px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 400px;
    text-align: center;
    z-index: 10;
}

.status-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

/* Video trimmer specific styling */
.trim-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fdfaf2;
    border: 1px dashed #e2b83b;
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 10px;
}

.trim-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #854d0e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trim-range-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #854d0e;
}

/* ==========================================================================
   Home Landing Page Styles (index.html)
   ========================================================================== */
.home-container {
    max-width: 1000px;
    margin: 100px auto 40px auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.home-hero {
    text-align: center;
    margin-bottom: 48px;
    max-width: 600px;
}

.home-hero-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-blue);
    background-color: var(--brand-blue-light);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    display: inline-block;
}

.home-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
    line-height: 1.1;
}

.home-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 48px;
}

.engine-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.engine-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.engine-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color-dark);
}

.engine-card:hover::before {
    opacity: 1;
}

.engine-icon {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 24px;
    transition: all 0.2s;
}

.engine-card:hover .engine-icon {
    background-color: var(--brand-blue-light);
}

.engine-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.engine-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    flex: 1;
}

/* Footer / Info Panel */
.home-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsiveness overrides */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-title {
        font-size: 2.2rem;
    }

    .dropdown-menu {
        width: 320px;
        padding: 16px;
    }

    .dropdown-grid {
        grid-template-columns: 1fr;
    }

    .dropdown-card {
        height: 110px;
    }
}

/* Extracted from index.php */
/* Bento Grid — production styles */
.bento-section {
    max-width: 1180px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
        "tall wide  wide"
        "tall sq-1  sq-2";
    gap: 20px;
    margin-top: 40px;
}

.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s cubic-bezier(.4, 0, .2, 1), border-color .3s ease;
}

.bento-card:hover {
    border-color: var(--border-color-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-tall {
    grid-area: tall;
}

.card-wide {
    grid-area: wide;
}

.card-sq-1 {
    grid-area: sq-1;
}

.card-sq-2 {
    grid-area: sq-2;
}

.bento-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.55;
}

/* ---------- Small icon chip ---------- */
.icon-chip {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--brand-blue-soft);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.icon-chip svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Image styling for the tall card */
.card-image {
    width: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: auto;
}

.card-tall .card-body {
    margin-top: 16px;
}

/* stat card keeps its number as the visual focus, icon chip sits above it, centered */
.card-sq-1 {
    align-items: center;
    text-align: center;
}

.card-sq-1 .icon-chip {
    margin: 0 auto;
}

.stat-figure {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--brand-blue);
    line-height: 1;
}

.stat-label {
    font-weight: 700;
    font-size: .98rem;
}

/* New video-card styles */
.video-card {
    position: relative;
    width: 350px;
    aspect-ratio: 3/4;
    overflow: hidden;
    cursor: pointer;
    background: #ddd;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.video-card video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .35s ease;
}

.video-default {
    opacity: 1;
    z-index: 1;
}

.video-hover {
    opacity: 0;
    z-index: 2;
}

.video-card:hover .video-hover {
    opacity: 1;
}

/* Overlay */
.overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 22px;
    color: #fff;
    background: linear-gradient(to top,
            rgba(0, 0, 0, .7),
            rgba(0, 0, 0, .25),
            transparent);
    opacity: 0;
    transform: translateY(15px);
    transition: .35s ease;
    pointer-events: none;
}

.video-card:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}

.overlay h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.overlay p {
    font-size: 14px;
    opacity: .85;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Testimonials hover */
.testimonial-card:hover {
    border-color: var(--border-color-dark) !important;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Responsive */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "tall  tall"
            "wide  wide"
            "sq-1  sq-2";
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "tall"
            "wide"
            "sq-1"
            "sq-2";
    }

    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---- Stats Row ---- */
.stats-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 48px;
    padding: 20px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-blue);
    line-height: 1.1;
}

.stat-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border-color);
}

/* ---- Feature Tags on Engine Cards ---- */
.engine-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.feature-tag {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-blue);
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.2px;
}

/* ---- Footer ---- */
.page-footer {
    width: 100%;
    margin-top: 80px;
    padding: 32px 0 24px;
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-links a {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* ---- Hero Title Gradient ---- */
.home-title {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--brand-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Brand Blue Soft (for icon-chip) ---- */
.icon-chip {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* ---- Responsive Stats Row ---- */
@media (max-width: 600px) {
    .stats-row {
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px 20px;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        flex: 1;
        min-width: 70px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}


/* --- New Neumorphic Pill UI --- */
.pill-container {
    background: #ffffff;
    border-radius: 40px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

.pill-item {
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    color: #666666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.pill-item.active {
    background: #111111;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.pill-item:hover:not(.active) {
    color: #000000;
    background: rgba(0, 0, 0, 0.03);
}

.pill-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: #f4f4f4;
    color: #444444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.pill-icon.active {
    background: #111111;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.pill-icon:hover:not(.active) {
    background: #ebebeb;
    color: #000000;
}