
/* ===========================================================
   MACHINERIES MARKET — index.css

   GAP FIX EXPLANATION:
   ─────────────────────────────────────────────────────────
   header.css defines .nav-bar { position:fixed; height:80px }
   The dynamic header.html is injected into #header-holder
   which sits in normal document flow — the #header-holder div
   itself has zero height because its child (.nav-bar) is fixed.

   Therefore: body { padding-top:80px } creates a PHANTOM GAP
   because there is nothing in the flow to push content below.

   THE FIX:
     • body → NO padding-top (removed completely)
     • Hero uses .video-hero + .hero-frame (in-flow video; overlay inside frame)
   =========================================================== */


/* -----------------------------------------------------------
   1. ROOT VARIABLES
----------------------------------------------------------- */
:root {
    --mm-dark-bg:    #121212;
    --mm-panel:      #1e1e1e;
    --mm-border:     #333;
    --mm-blue:       #007BFF;
    --mm-accent:     #3b82f6;
    --mm-text-main:  #e0e0e0;
    --mm-text-muted: #b0b0b0;
    --mm-green:      #28a745;
    --scan-color:    #00f3ff;

    --font-primary:   'Orbitron', sans-serif;
    --font-secondary: 'Roboto', 'Segoe UI', sans-serif;
    --font-mono:      'Roboto Mono', monospace;
}


/* -----------------------------------------------------------
   2. BASE RESET
   ⚠️  NO padding-top on body — see gap fix above
----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    overflow-y: auto;
}

html, body {
    margin: 0;
    padding: 0;          /* ✅ NO padding-top here — gap fix */
    min-height: 100vh;
    background-color: var(--mm-dark-bg);
    color: var(--mm-text-main);
    font-family: var(--font-secondary);
    display: flex;
    flex-direction: column;
}

header, footer { flex: 0 0 auto; z-index: 10; position: relative; }
main, .home-main { flex: 1 1 auto; position: relative; z-index: 0; }

.home-main {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* =========================
   HERO: full-width video (LM reference — same rules & intent)
   • In-flow <video>: width 100%, height auto — full frame, no cover-crop
   • No fixed height on .video-hero — box height = intrinsic video ratio
   • Overlay + copy inside .hero-frame so absolute layers match video box
   ========================= */
.video-hero {
    position: relative;
    width: 100%;
    background: #000;
    overflow: visible;
    flex-shrink: 0; /* flex column parent must not shrink hero (clips odd-ratio video) */
}

/* Frame creates the centering context for both video and overlay */
.hero-frame {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    line-height: 0; /* remove stray gaps around media */
}

/* Show entire video frame without cropping (same as other project) */
#hero-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    min-width: 0;
}

/* Soft gradient overlay for legibility */
.video-overlay.weak {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.22) 0%,
        rgba(0, 0, 0, 0.1) 45%,
        rgba(0, 0, 0, 0.32) 100%
    );
    pointer-events: none;
}

/* Centered ad copy using only percentages (LM reference) */
.adcopy-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    padding-left: 5%;
    padding-right: 5%;
    pointer-events: none;
}

.adcopy-inner {
    width: 100%;
    max-width: 90%;
    text-align: center;
    color: #fff;
    line-height: 1.2;
    pointer-events: auto;
}

/* CLYDE: left-aligned copy + CTAs (LM centers #ad-title / #ad-sub) */
.adcopy-wrap.adcopy-wrap--clyde {
    place-items: center start;
    justify-items: start;
    padding: 120px 6% 72px;
}

.adcopy-inner--clyde {
    text-align: left;
    max-width: 900px;
}

/* -----------------------------------------------------------
   4. HERO OVERLAY TEXT — typography (inside .adcopy-inner)
----------------------------------------------------------- */

.hero-eyebrow {
    font-family: var(--font-primary);
    font-size: 0.72rem;
    letter-spacing: 4px;
    color: var(--mm-accent);
    text-transform: uppercase;
    margin: 0 0 14px 0;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(3rem, 6vw, 5.4rem);
    font-weight: 900;
    line-height: 1.05;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 18px 0;
    text-shadow: 0 6px 28px rgba(0, 0, 0, 0.55);
}

.hero-title span {
    color: var(--mm-accent);
}

.hero-sub {
    max-width: 720px;
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    color: #dbe4ee;
    line-height: 1.75;
    margin: 0 0 28px 0;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-primary,
.btn-ghost {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: 0.82rem;
    letter-spacing: 2px;
    text-decoration: none;
    text-transform: uppercase;
    padding: 14px 30px;
    border: 2px solid var(--mm-accent);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--mm-accent);
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.35);
    color: #fff;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-ghost:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.35);
}

/* -----------------------------------------------------------
   5. PROMO BANNER  (index.html — centered video overlay)
----------------------------------------------------------- */
.promo-banner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 90%;
    max-width: 900px;
    display: none !important;
}
.promo-banner h1 {
    font-family: var(--font-primary);
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    margin-bottom: 0.5em;
    color: #fff;
    display: none !important;
}
.promo-banner p {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    color: var(--mm-text-muted);
    display: none !important;
}

@media (max-width: 600px) {
    .machine-title { font-size: 1.5rem; }
    .machine-desc  { font-size: 0.95rem; }

    .adcopy-wrap.adcopy-wrap--clyde {
        padding: 110px 5% 48px;
        place-items: end start;
    }

    .hero-title {
        font-size: clamp(2.1rem, 9vw, 3rem);
        line-height: 1.08;
    }

    .hero-sub {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .hero-actions {
        gap: 10px;
    }

    .btn-primary,
    .btn-ghost {
        width: 100%;
        max-width: 260px;
        text-align: center;
    }

    #ai-panel   { width: calc(100vw - 16px); right: 8px; bottom: 88px; }
    #ai-fab     { right: 16px; bottom: 18px; }
    #ai-fab-tip { right: 82px; }
}
/* -----------------------------------------------------------
   6. CATEGORY NAV BAR
   sticky top = 80px to sit flush below fixed header
----------------------------------------------------------- */
.cat-nav {
    background: #111827;
    border-bottom: 2px solid #1e2d40;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    position: sticky;
    top: 80px;
    z-index: 99;
}
.cat-nav a {
    font-family: var(--font-primary);
    font-size: 0.63rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #9ca3af;
    text-decoration: none;
    padding: 15px 20px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.cat-nav a:hover,
.cat-nav a.active {
    color: var(--mm-accent);
    border-bottom-color: var(--mm-accent);
}


/* -----------------------------------------------------------
   7. FEATURES STRIP
----------------------------------------------------------- */
.features-strip {
    background: #111827;
    border-bottom: 1px solid #1e2d40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.feature-item {
    padding: 34px 20px;
    border-right: 1px solid #1e2d40;
    text-align: center;
}
.feature-item:last-child { border-right: none; }
.feature-icon { font-size: 1.7rem; margin-bottom: 10px; }
.feature-item h4 {
    font-family: var(--font-primary);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 7px 0;
    color: #f9fafb;
}
.feature-item p {
    font-size: 0.77rem;
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 900px) {
    .features-strip { grid-template-columns: repeat(2, 1fr); }
    .feature-item:nth-child(2) { border-right: none; }
    .feature-item:nth-child(1),
    .feature-item:nth-child(2) { border-bottom: 1px solid #1e2d40; }
}
@media (max-width: 480px) {
    .features-strip { grid-template-columns: 1fr; }
    .feature-item   { border-right: none; border-bottom: 1px solid #1e2d40; }
}


/* -----------------------------------------------------------
   8. SECTION HEADER
----------------------------------------------------------- */
.section-header { text-align: center; padding: 60px 20px 30px; }
.section-header h2 {
    font-family: var(--font-primary);
    font-size: clamp(1.2rem, 3vw, 1.9rem);
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #f9fafb;
    margin: 0;
}
.section-header p { color: #9ca3af; margin: 10px 0 0; font-size: 0.92rem; }
.section-divider {
    width: 54px; height: 3px;
    background: var(--mm-accent);
    margin: 12px auto 0;
}


/* -----------------------------------------------------------
   9. PRODUCT SECTION
----------------------------------------------------------- */
.dark-product-section {
    padding: 80px 0;
    background-color: var(--mm-dark-bg);
}
.product-row-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--section-pad-x);
}
.machine-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 100px;
    background-color: var(--mm-panel);
    border: 1px solid var(--mm-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
    min-height: 600px;
}
.machine-row:hover {
    transform: translateY(-5px);
    border-color: var(--mm-blue);
}
.machine-row:nth-child(even) { flex-direction: row-reverse; }


/* -----------------------------------------------------------
   10. BLUEPRINT LASER SCAN
----------------------------------------------------------- */
.machine-visual {
    flex: 1.2;
    position: relative;
    background: #000;
    overflow: hidden;
    display: block;
    cursor: pointer;
}
.visual-inner { width: 100%; height: 100%; position: relative; }

.visual-inner .img-standard,
.visual-inner .img-blueprint {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 20px;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}
.visual-inner .img-standard { z-index: 1; opacity: 1; }
.visual-inner .img-blueprint {
    z-index: 2;
    background: #000;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    animation: scan-reveal 4s ease-in-out infinite alternate;
}
.visual-inner .laser-scan {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--scan-color);
    box-shadow: 0 0 10px var(--scan-color), 0 0 20px var(--scan-color);
    z-index: 10;
    pointer-events: none;
    animation: scan-move 4s ease-in-out infinite alternate;
}

@keyframes scan-reveal {
    0%   { clip-path: polygon(0 0, 100% 0, 100% 0,    0 0);    }
    100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
}
@keyframes scan-move {
    0%   { top: 0%;               opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: calc(100% - 3px); opacity: 0; }
}

.machine-visual:hover .visual-inner .img-blueprint {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    animation-play-state: paused;
    opacity: 1;
}
.machine-visual:hover .visual-inner .img-standard { opacity: 0.15; }
.machine-visual:hover .visual-inner .laser-scan {
    animation-play-state: paused;
    opacity: 1;
    box-shadow: 0 0 15px var(--scan-color), 0 0 30px var(--scan-color), 0 0 50px var(--scan-color);
}


/* -----------------------------------------------------------
   11. MACHINE DETAILS
----------------------------------------------------------- */
.machine-details {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.machine-title {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    color: #fff;
    margin: 0 0 20px 0;
    border-bottom: 2px solid var(--mm-blue);
    padding-bottom: 15px;
    display: inline-block;
    width: fit-content;
}
.machine-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--mm-text-muted);
    margin-bottom: 35px;
}
.spec-table {
    background-color: #222;
    border: 1px solid #444;
    padding: 35px 30px;
    border-radius: 8px;
    margin-bottom: 35px;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    display: block;
}
.spec-table::before {
    content: "Specifications:";
    display: block;
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}
.spec-table tbody { display: block; width: 100%; }
.spec-table tr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}
.spec-table tr:last-child { border-bottom: none; }
.spec-label { font-weight: 700; color: #888; font-size: 0.95rem; }
.spec-value { text-align: right; color: #fff; font-family: var(--font-secondary); }

.action-btn {
    display: inline-block;
    background-color: var(--mm-green);
    color: #fff;
    border: none;
    padding: 16px 0;
    width: 100%;
    max-width: 300px;
    font-family: var(--font-primary);
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    border-radius: 6px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.action-btn:hover {
    background-color: #218838;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.4);
}


/* -----------------------------------------------------------
   12. AI AGENT — FLOATING BUTTON (FAB)
----------------------------------------------------------- */
#ai-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 8000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 22px rgba(37, 99, 235, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
#ai-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 32px rgba(37, 99, 235, 0.75);
}
#ai-fab svg { width: 26px; height: 26px; fill: #fff; }
#ai-fab::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--mm-accent);
    animation: fab-pulse 2.2s ease-out infinite;
}
@keyframes fab-pulse {
    0%   { transform: scale(1);    opacity: 0.7; }
    100% { transform: scale(1.65); opacity: 0;   }
}

#ai-fab-tip {
    position: fixed;
    bottom: 42px;
    right: 98px;
    z-index: 8000;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #93c5fd;
    font-family: var(--font-primary);
    font-size: 0.58rem;
    letter-spacing: 2px;
    padding: 6px 12px;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.2s, transform 0.2s;
}
#ai-fab:hover + #ai-fab-tip { opacity: 1; transform: translateX(0); }


/* -----------------------------------------------------------
   13. AI AGENT — GLASSMORPHISM CHAT PANEL
   ✅ Transparent background — background shows through
----------------------------------------------------------- */
#ai-panel {
    position: fixed;
    bottom: 102px;
    right: 30px;
    z-index: 8001;
    width: 390px;
    max-height: 580px;
    display: flex;
    flex-direction: column;
    background: rgba(8, 14, 30, 0.55);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-top: 3px solid var(--mm-accent);
    box-shadow: 0 10px 44px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    border-radius: 3px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#ai-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.ap-hdr {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    flex-shrink: 0;
}
.ap-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--mm-accent), #1d4ed8);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.ap-info { flex: 1; min-width: 0; }
.ap-name { font-family: var(--font-primary); font-size: 0.66rem; letter-spacing: 1.5px; color: #f9fafb; }
.ap-status { font-size: 0.64rem; color: #22c55e; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.ap-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.ap-close {
    background: none; border: none; color: #9ca3af;
    font-size: 1.1rem; cursor: pointer; padding: 4px 6px;
    line-height: 1; transition: color 0.15s;
}
.ap-close:hover { color: #f9fafb; }

.ap-msgs {
    flex: 1; overflow-y: auto; padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
    scroll-behavior: smooth;
}
.ap-msgs::-webkit-scrollbar { width: 3px; }
.ap-msgs::-webkit-scrollbar-thumb { background: rgba(59, 130, 246, 0.3); border-radius: 3px; }

.msg { max-width: 90%; font-size: 0.84rem; line-height: 1.65; padding: 10px 13px; }
.msg.bot {
    background: rgba(15, 29, 48, 0.75);
    border-left: 3px solid var(--mm-accent);
    align-self: flex-start; color: #cbd5e1;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.msg.user {
    background: rgba(29, 78, 216, 0.75);
    align-self: flex-end; color: #fff;
    border-right: 3px solid #93c5fd;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.msg.err {
    background: rgba(26, 10, 10, 0.75);
    border-left: 3px solid #ef4444;
    align-self: flex-start; color: #fca5a5; font-size: 0.8rem;
}

.msg-sources { margin-top: 10px; border-top: 1px solid rgba(59, 130, 246, 0.2); padding-top: 8px; }
.src-label {
    font-family: var(--font-primary); font-size: 0.56rem;
    letter-spacing: 2px; color: #9ca3af; text-transform: uppercase; margin-bottom: 6px;
}
.src-chip {
    display: inline-block; font-size: 0.68rem;
    background: rgba(10, 21, 37, 0.65);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd; padding: 3px 9px; margin: 2px 3px 2px 0;
}
.src-score { color: #9ca3af; font-size: 0.64rem; margin-left: 3px; }

.msg.typing {
    display: flex; gap: 5px; align-items: center;
    background: rgba(15, 29, 48, 0.75);
    border-left: 3px solid var(--mm-accent);
    align-self: flex-start; padding: 14px 16px;
}
.msg.typing span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--mm-accent); animation: tdot 1.2s infinite; flex-shrink: 0;
}
.msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes tdot {
    0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
    40%            { transform: translateY(-6px); opacity: 1;   }
}

.ap-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    background: rgba(8, 14, 30, 0.4); flex-shrink: 0;
}
.chip {
    font-size: 0.62rem; font-family: var(--font-primary);
    letter-spacing: 1px; border: 1px solid rgba(59, 130, 246, 0.35);
    color: #60a5fa; background: rgba(59, 130, 246, 0.08);
    padding: 5px 10px; cursor: pointer; white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { background: rgba(59, 130, 246, 0.85); color: #fff; border-color: var(--mm-accent); }

.ap-input-row { display: flex; border-top: 1px solid rgba(59, 130, 246, 0.2); flex-shrink: 0; }
.ap-input-row input {
    flex: 1; background: rgba(8, 14, 24, 0.65); border: none;
    color: #f9fafb; font-family: var(--font-secondary);
    font-size: 0.84rem; padding: 13px 14px; outline: none;
}
.ap-input-row input::placeholder { color: #4b5563; }
.ap-send {
    background: var(--mm-accent); border: none; color: #fff;
    padding: 0 18px; font-size: 1rem; cursor: pointer;
    flex-shrink: 0; transition: background 0.2s;
}
.ap-send:hover    { background: #1d4ed8; }
.ap-send:disabled { background: rgba(30, 58, 95, 0.6); cursor: not-allowed; }


/* -----------------------------------------------------------
   14. RESPONSIVE
----------------------------------------------------------- */
@media (max-width: 992px) {
    .machine-row,
    .machine-row:nth-child(even) { flex-direction: column; height: auto; }
    .machine-visual  { height: 400px; }
    .machine-details { padding: 30px; }
    .img-standard, .img-blueprint { padding: 10px; }
}

@media (max-width: 600px) {
    .machine-title { font-size: 1.5rem; }
    .machine-desc  { font-size: 0.95rem; }
    #ai-panel   { width: calc(100vw - 16px); right: 8px; bottom: 88px; }
    #ai-fab     { right: 16px; bottom: 18px; }
    #ai-fab-tip { right: 82px; }
}
/* -----------------------------------------------------------
   15. CATEGORY HUB GRID  (index.html)
   Full-width grid — scales to any screen size
   Section header: pure CSS, same dark panel as features-strip
----------------------------------------------------------- */

/* ── Outer section wrapper ── */
.cat-hub-section {
    width: 100%;
    background-color: var(--mm-dark-bg);
    padding-bottom: 60px;
}

/* ── Section Header Bar — same bg as .features-strip ── */
.cat-hub-header {
    width: 100%;
    background: #111827;
    border-bottom: 1px solid #1e2d40;
    border-top: 1px solid #1e2d40;
}

.cat-hub-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 5%;
    gap: 40px;
}

/* Left: text block */
.cat-hub-header-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;       /* centers eyebrow, title, subtitle */
    text-align: center;        /* centres the subtitle text flow */
}

.cat-hub-eyebrow {
    font-family: var(--font-primary);
    font-size: 0.6rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--mm-accent);
    margin: 0;
}

.cat-hub-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3.5rem);   /* LARGE — scales with screen */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #f9fafb;
    margin: 0;
    line-height: 1.05;
}

.cat-hub-subtitle {
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    color: #9ca3af;
    line-height: 1.65;
    margin: 4px 0 0;
    max-width: 600px;
}

/* Right: decorative accent */
.cat-hub-header-accent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.accent-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--mm-accent), transparent);
}

.accent-count {
    font-family: var(--font-primary);
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--mm-accent);
    white-space: nowrap;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ── Grid: full-width, 3 columns, percentage-based ── */
.cat-hub-grid {
    width: 100%;
    padding: 40px 3% 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8%;
    box-sizing: border-box;
}

/* ── Card shell ── */
.cat-hub-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--mm-panel);
    border: 1px solid var(--mm-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.cat-hub-card:hover {
    transform: translateY(-6px);
    border-color: var(--mm-accent);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

/* ── Visual area with blueprint laser scan ── */
.cat-hub-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.cat-hub-visual .img-standard,
.cat-hub-visual .img-blueprint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s ease;
    background: #000;
}

.cat-hub-visual .img-standard {
    z-index: 1;
    opacity: 1;
}

.cat-hub-visual .img-blueprint {
    z-index: 2;
    background: #000;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    animation: scan-reveal 4s ease-in-out infinite alternate;
}

.cat-hub-visual .laser-scan {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    background: var(--scan-color);
    box-shadow: 0 0 10px var(--scan-color), 0 0 20px var(--scan-color);
    z-index: 10;
    pointer-events: none;
    animation: scan-move 4s ease-in-out infinite alternate;
}

/* Hover: freeze, show blueprint */
.cat-hub-card:hover .cat-hub-visual .img-blueprint {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    animation-play-state: paused;
    opacity: 1;
}
.cat-hub-card:hover .cat-hub-visual .img-standard { opacity: 0.12; }
.cat-hub-card:hover .cat-hub-visual .laser-scan {
    animation-play-state: paused;
    opacity: 1;
    box-shadow: 0 0 15px var(--scan-color), 0 0 30px var(--scan-color), 0 0 50px var(--scan-color);
}

/* ── Label area ── */
.cat-hub-label {
    padding: 20px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}
.cat-hub-label h3 {
    font-family: var(--font-primary);
    font-size: clamp(0.75rem, 1.1vw, 1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #f9fafb;
    margin: 0;
    transition: color 0.2s;
}
.cat-hub-card:hover .cat-hub-label h3 { color: var(--mm-accent); }

.cat-hub-label p {
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    color: #9ca3af;
    line-height: 1.55;
    margin: 0;
}
.cat-hub-cta {
    display: inline-block;
    margin-top: 8px;
    font-family: var(--font-primary);
    font-size: clamp(0.55rem, 0.65vw, 0.65rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--mm-accent);
    transition: letter-spacing 0.2s;
}
.cat-hub-card:hover .cat-hub-cta { letter-spacing: 4px; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .cat-hub-grid { grid-template-columns: repeat(2, 1fr); padding: 30px 4% 0; gap: 3%; }
    .cat-hub-header-accent { display: none; }
    .cat-hub-title { font-size: clamp(1.8rem, 5vw, 2.8rem); }
}
@media (max-width: 560px) {
    .cat-hub-grid { grid-template-columns: 1fr; padding: 20px 5% 0; gap: 4%; }
    .cat-hub-header-inner { padding: 32px 5%; }
}