/*
 * Custom Blocks Builder — by Bluespider
 * Frontend Stylesheet
 * Version: 1.0.0
 *
 * Contents:
 *   1.  Design Tokens (CSS Variables — dark theme default)
 *   2.  Light Theme Override
 *   3.  Base / Reset
 *   4.  Typography Helpers
 *   5.  Shared Components (buttons, eyebrow, section titles)
 *   6.  Theme Toggle Button
 *   7.  Block: Hero
 *   8.  Block: Product Categories
 *   9.  Block: CTA Banner
 *  10.  Block: News & Updates
 *  11.  Block: Manufacturing / Image + Content
 *  12.  Responsive — Tablet (≤1024px)
 *  13.  Responsive — Mobile (≤640px)
 */


/* ══════════════════════════════════════════════════════════════
   1. DESIGN TOKENS — DARK (default)
══════════════════════════════════════════════════════════════ */

:root,
[data-theme="dark"] {
    /* Backgrounds */
    --cbb-bg:          #161616;
    --cbb-surface:     #1E1E1E;
    --cbb-surface2:    #252525;
    --cbb-black:       #111111;

    /* Borders */
    --cbb-border:      rgba(255, 255, 255, 0.08);

    /* Brand */
    --cbb-teal:        #00B4B4;
    --cbb-teal-dark:   #008A8A;
    --cbb-teal-dim:    rgba(0, 180, 180, 0.10);

    /* Text */
    --cbb-text:        #F5F5F5;
    --cbb-muted:       rgba(245, 245, 245, 0.45);

    /* Navigation */
    --cbb-nav-bg:      rgba(17, 17, 17, 0.96);
    --cbb-nav-border:  rgba(255, 255, 255, 0.08);
    --cbb-nav-shadow:  none;
    --cbb-nav-text:    rgba(245, 245, 245, 0.5);

    /* Sections */
    --cbb-feat-bg:     #111111;
    --cbb-mfg-bg:      #1E1E1E;
    --cbb-sp-bg:       #1A1A1A;
    --cbb-upd-bg:      #161616;
    --cbb-card-bg:     #1E1E1E;
    --cbb-card-hover:  #252525;
    --cbb-cell-bg:     #1E1E1E;

    /* Hero overlays */
    --cbb-hero-ol-l:   rgba(17, 17, 17, 0.82);
    --cbb-hero-ol-m:   rgba(17, 17, 17, 0.40);
    --cbb-hero-ol-r:   rgba(17, 17, 17, 0.15);
    --cbb-hero-ol-b:   rgba(17, 17, 17, 0.90);
    --cbb-hero-ol-t:   rgba(17, 17, 17, 0.60);

    /* Credential strip */
    --cbb-strip-bg:    rgba(0, 0, 0, 0.55);
    --cbb-strip-bdr:   rgba(255, 255, 255, 0.07);
    --cbb-strip-lbl:   rgba(245, 245, 245, 0.45);

    /* Manufacturing image */
    --cbb-mfg-ol:      linear-gradient(to right, transparent 60%, #1E1E1E 100%);
    --cbb-mfg-ol-mob:  linear-gradient(to bottom, transparent 60%, #1E1E1E 100%);

    /* CTA */
    --cbb-cta-title:   #111111;
    --cbb-cta-desc:    rgba(17, 17, 17, 0.60);

    /* Footer */
    --cbb-foot-bg:     #111111;
    --cbb-foot-text:   rgba(245, 245, 245, 0.45);
    --cbb-foot-bdr:    rgba(255, 255, 255, 0.08);

    /* Toggle */
    --cbb-toggle-bg:   rgba(255, 255, 255, 0.08);
}


/* ══════════════════════════════════════════════════════════════
   2. LIGHT THEME OVERRIDE
══════════════════════════════════════════════════════════════ */

[data-theme="light"] {
    --cbb-bg:          #F4F5F7;
    --cbb-surface:     #FFFFFF;
    --cbb-surface2:    #EAECF0;
    --cbb-black:       #0A0A0A;

    --cbb-border:      rgba(0, 0, 0, 0.09);

    --cbb-teal:        #00B4B4;
    --cbb-teal-dark:   #008A8A;
    --cbb-teal-dim:    rgba(0, 180, 180, 0.08);

    --cbb-text:        #1A1A1A;
    --cbb-muted:       rgba(26, 26, 26, 0.50);

    --cbb-nav-bg:      rgba(255, 255, 255, 0.97);
    --cbb-nav-border:  rgba(0, 0, 0, 0.09);
    --cbb-nav-shadow:  0 1px 24px rgba(0, 0, 0, 0.06);
    --cbb-nav-text:    rgba(26, 26, 26, 0.50);

    --cbb-feat-bg:     #FFFFFF;
    --cbb-mfg-bg:      #F4F5F7;
    --cbb-sp-bg:       #F4F5F7;
    --cbb-upd-bg:      #F4F5F7;
    --cbb-card-bg:     #FFFFFF;
    --cbb-card-hover:  #FFFFFF;
    --cbb-cell-bg:     #FFFFFF;

    --cbb-hero-ol-l:   rgba(10, 10, 10, 0.88);
    --cbb-hero-ol-m:   rgba(10, 10, 10, 0.50);
    --cbb-hero-ol-r:   rgba(10, 10, 10, 0.20);
    --cbb-hero-ol-b:   rgba(10, 10, 10, 0.92);
    --cbb-hero-ol-t:   rgba(10, 10, 10, 0.65);

    --cbb-strip-bg:    rgba(255, 255, 255, 0.12);
    --cbb-strip-bdr:   rgba(255, 255, 255, 0.12);
    --cbb-strip-lbl:   rgba(255, 255, 255, 0.60);

    --cbb-mfg-ol:      linear-gradient(to right, transparent 60%, #F4F5F7 100%);
    --cbb-mfg-ol-mob:  linear-gradient(to bottom, transparent 60%, #F4F5F7 100%);

    --cbb-cta-title:   #FFFFFF;
    --cbb-cta-desc:    rgba(255, 255, 255, 0.78);

    --cbb-foot-bg:     #1A1A1A;
    --cbb-foot-text:   rgba(255, 255, 255, 0.45);
    --cbb-foot-bdr:    rgba(255, 255, 255, 0.08);

    --cbb-toggle-bg:   rgba(0, 0, 0, 0.06);
}


/* ══════════════════════════════════════════════════════════════
   3. BASE / RESET
══════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--cbb-bg);
    color: var(--cbb-text);
    transition: background-color 0.4s ease, color 0.3s ease;
}


/* ══════════════════════════════════════════════════════════════
   4. TYPOGRAPHY HELPERS
══════════════════════════════════════════════════════════════ */

.cbb-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: var(--cbb-teal);
    margin-bottom: 16px;
}

.cbb-eyebrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 1px;
    background: var(--cbb-teal);
    flex-shrink: 0;
}

.cbb-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 0.97;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
    color: var(--cbb-text);
    transition: color 0.3s ease;
}

.cbb-section-desc {
    font-size: 16px;
    font-weight: 300;
    color: var(--cbb-muted);
    line-height: 1.7;
    max-width: 500px;
    transition: color 0.3s ease;
}


/* ══════════════════════════════════════════════════════════════
   5. SHARED COMPONENTS — BUTTONS
══════════════════════════════════════════════════════════════ */

.cbb-btn {
    display: inline-block;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 15px 34px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    cursor: pointer;
    border: none;
}

.cbb-btn--primary {
    color: #fff;
    background: var(--cbb-teal);
}
.cbb-btn--primary:hover {
    background: var(--cbb-teal-dark);
    color: #fff;
}

.cbb-btn--ghost {
    color: var(--cbb-text);
    background: transparent;
    border: 1px solid var(--cbb-border);
}
.cbb-btn--ghost:hover {
    border-color: var(--cbb-teal);
    color: var(--cbb-teal);
}

/* Ghost on dark backgrounds (hero) */
.cbb-btn--ghost-hero {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.30);
}
.cbb-btn--ghost-hero:hover {
    border-color: var(--cbb-teal);
    color: var(--cbb-teal);
}

.cbb-btn--dark {
    color: #fff;
    background: #111;
    white-space: nowrap;
}
.cbb-btn--dark:hover {
    background: #333;
    color: #fff;
}


/* ══════════════════════════════════════════════════════════════
   6. THEME TOGGLE BUTTON
══════════════════════════════════════════════════════════════ */

#cbb-theme-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--cbb-nav-bg);
    border: 1px solid var(--cbb-border);
    padding: 10px 18px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cbb-text);
    backdrop-filter: blur(16px);
    transition: border-color 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

#cbb-theme-toggle:hover {
    border-color: var(--cbb-teal);
    color: var(--cbb-teal);
}

.cbb-toggle-icon {
    font-size: 14px;
    transition: transform 0.4s ease;
}

#cbb-theme-toggle:hover .cbb-toggle-icon {
    transform: rotate(20deg);
}


/* ══════════════════════════════════════════════════════════════
   7. BLOCK: HERO
══════════════════════════════════════════════════════════════ */

.cbb-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--cbb-black);
}

/* Video */
.cbb-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

/* Gradient overlay */
.cbb-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to right,  var(--cbb-hero-ol-l) 0%, var(--cbb-hero-ol-m) 55%, var(--cbb-hero-ol-r) 100%),
        linear-gradient(to top,    var(--cbb-hero-ol-b) 0%, rgba(0,0,0,0.10) 40%, transparent 70%),
        linear-gradient(to bottom, var(--cbb-hero-ol-t) 0%, transparent 25%);
    transition: background 0.4s ease;
}

/* Top chrome */
.cbb-hero__top {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    padding: 32px 80px;
}

.cbb-hero__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: cbbFadeUp 0.9s ease 0.2s both;
}

.cbb-hero__eyebrow-line {
    width: 28px;
    height: 1px;
    background: var(--cbb-teal);
    flex-shrink: 0;
}

.cbb-hero__eyebrow span:last-child {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cbb-teal);
}

/* Body — bottom left */
.cbb-hero__body {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding: 0 80px 140px;
}

.cbb-hero__content {
    max-width: 680px;
}

.cbb-hero__headline {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(56px, 8vw, 110px);
    font-weight: 800;
    line-height: 0.93;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 28px;
    color: #fff;
    animation: cbbFadeUp 0.9s ease 0.35s both;
}

.cbb-hero__headline em {
    font-style: normal;
    color: var(--cbb-teal);
}

.cbb-hero__subheading {
    font-size: 17px;
    font-weight: 300;
    color: rgba(245, 245, 245, 0.70);
    max-width: 480px;
    line-height: 1.75;
    margin-bottom: 40px;
    animation: cbbFadeUp 0.9s ease 0.5s both;
}

.cbb-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: cbbFadeUp 0.9s ease 0.65s both;
}

/* Credential strip */
.cbb-hero__strip {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    display: flex;
    align-items: stretch;
    background: var(--cbb-strip-bg);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--cbb-strip-bdr);
    animation: cbbFadeUp 0.9s ease 0.8s both;
    transition: background 0.4s ease;
}

.cbb-hero__strip-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 36px;
    border-right: 1px solid var(--cbb-strip-bdr);
    flex: 1;
    transition: background 0.2s ease;
}

.cbb-hero__strip-item:last-child {
    border-right: none;
}

.cbb-hero__strip-item:hover {
    background: rgba(0, 180, 180, 0.07);
}

.cbb-hero__strip-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 30px;
    font-weight: 800;
    color: var(--cbb-teal);
    line-height: 1;
    flex-shrink: 0;
}

.cbb-hero__strip-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cbb-strip-lbl);
    line-height: 1.4;
}

/* Scroll hint */
.cbb-hero__scroll-hint {
    position: absolute;
    right: 48px;
    bottom: 80px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: cbbFadeUp 0.9s ease 1s both;
}

.cbb-hero__scroll-hint span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    letter-spacing: 0.20em;
    text-transform: uppercase;
    color: rgba(245, 245, 245, 0.30);
    writing-mode: vertical-rl;
}

.cbb-hero__scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--cbb-teal), transparent);
    animation: cbbScrollPulse 2s ease-in-out infinite;
}

/* Animations */
@keyframes cbbFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes cbbScrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(0.6); }
}


/* ══════════════════════════════════════════════════════════════
   8. BLOCK: PRODUCT CATEGORIES
══════════════════════════════════════════════════════════════ */

.cbb-product-categories {
    background: var(--cbb-feat-bg);
    border-bottom: 1px solid var(--cbb-border);
    padding: 96px 80px;
    transition: background 0.4s ease;
}

.cbb-product-categories__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 52px;
}

/* Mosaic grid */
.cbb-product-categories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 380px 280px;
    gap: 3px;
}

/* Featured tile — first child spans 2 cols */
.cbb-pcat:nth-child(1) { grid-column: span 2; }
.cbb-pcat:nth-child(2) { grid-column: span 1; }
.cbb-pcat:nth-child(3),
.cbb-pcat:nth-child(4),
.cbb-pcat:nth-child(5) { grid-column: span 1; }

.cbb-pcat {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
}

.cbb-pcat__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s ease, filter 0.4s ease;
    filter: brightness(0.45);
}

.cbb-pcat:hover .cbb-pcat__bg {
    transform: scale(1.06);
    filter: brightness(0.30);
}

.cbb-pcat__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.98) 0%,
        rgba(10, 10, 10, 0.60) 40%,
        rgba(10, 10, 10, 0.10) 100%
    );
    transition: background 0.4s ease;
}

.cbb-pcat:hover .cbb-pcat__overlay {
    background: linear-gradient(
        to top,
        rgba(10, 10, 10, 0.99) 0%,
        rgba(10, 10, 10, 0.75) 50%,
        rgba(10, 10, 10, 0.30) 100%
    );
}

.cbb-pcat::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--cbb-teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: 4;
}

.cbb-pcat:hover::after {
    transform: scaleX(1);
}

.cbb-pcat__content {
    position: relative;
    z-index: 3;
    padding: 32px;
}

.cbb-pcat__num {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.20em;
    color: rgba(0, 180, 180, 0.80);
    margin-bottom: 8px;
}

.cbb-pcat__name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 26px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 10px;
    color: #fff;
}

.cbb-pcat--featured .cbb-pcat__name {
    font-size: 34px;
}

.cbb-pcat__desc {
    font-size: 14px;
    font-weight: 300;
    color: rgba(245, 245, 245, 0.65);
    line-height: 1.6;
    max-width: 480px;
    margin-bottom: 0;
}

/* Product list — slides up on hover */
.cbb-pcat__products {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.4s ease;
}

.cbb-pcat:hover .cbb-pcat__products {
    max-height: 200px;
    opacity: 1;
    margin-top: 16px;
}

.cbb-pcat__products li {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.07em;
    color: rgba(245, 245, 245, 0.50);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cbb-pcat__products li::before {
    content: '›';
    color: var(--cbb-teal);
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.cbb-pcat__arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--cbb-teal);
    margin-top: 20px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cbb-pcat:hover .cbb-pcat__arrow {
    opacity: 1;
    transform: translateY(0);
}


/* ══════════════════════════════════════════════════════════════
   9. BLOCK: CTA BANNER
══════════════════════════════════════════════════════════════ */

.cbb-cta-banner {
    background: var(--cbb-teal);
    padding: 72px 80px;
}

.cbb-cta-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.cbb-cta-banner__text {}

.cbb-cta-banner__headline {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(32px, 4vw, 58px);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--cbb-cta-title);
    line-height: 1;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

.cbb-cta-banner__desc {
    font-size: 16px;
    font-weight: 300;
    color: var(--cbb-cta-desc);
    max-width: 420px;
    line-height: 1.7;
    margin-top: 10px;
    transition: color 0.3s ease;
}


/* ══════════════════════════════════════════════════════════════
   10. BLOCK: NEWS & UPDATES
══════════════════════════════════════════════════════════════ */

.cbb-news-updates {
    background: var(--cbb-upd-bg);
    border-bottom: 1px solid var(--cbb-border);
    padding: 96px 80px;
    transition: background 0.4s ease;
}

.cbb-news-updates__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 48px;
}

.cbb-news-updates__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--cbb-border);
    border: 1px solid var(--cbb-border);
}

.cbb-news-card {
    background: var(--cbb-card-bg);
    padding: 32px;
    text-decoration: none;
    color: var(--cbb-text);
    display: block;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.cbb-news-card:hover {
    background: var(--cbb-card-hover);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.cbb-news-card__date {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cbb-teal);
    margin-bottom: 12px;
}

.cbb-news-card__tag {
    display: inline-block;
    background: var(--cbb-teal-dim);
    border: 1px solid rgba(0, 180, 180, 0.20);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cbb-teal);
    padding: 3px 9px;
    margin-bottom: 12px;
}

.cbb-news-card__title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.15;
    margin-bottom: 10px;
    color: var(--cbb-text);
    transition: color 0.3s ease;
}

.cbb-news-card__excerpt {
    font-size: 15px;
    font-weight: 300;
    color: var(--cbb-muted);
    line-height: 1.65;
    margin-bottom: 0;
}


/* ══════════════════════════════════════════════════════════════
   11. BLOCK: MANUFACTURING / IMAGE + CONTENT
══════════════════════════════════════════════════════════════ */

.cbb-manufacturing {
    background: var(--cbb-mfg-bg);
    border-bottom: 1px solid var(--cbb-border);
    overflow: hidden;
    transition: background 0.4s ease;
}

.cbb-manufacturing > .cbb-manufacturing__image,
.cbb-manufacturing > .cbb-manufacturing__content {
    /* handled by grid below */
}

/* Two-column layout via CSS grid on the block itself */
.cbb-manufacturing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 680px;
}

/* Image column */
.cbb-manufacturing__image {
    position: relative;
    overflow: hidden;
}

.cbb-manufacturing__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(0.82);
    transition: transform 0.8s ease;
}

.cbb-manufacturing__image:hover img {
    transform: scale(1.03);
}

.cbb-manufacturing__image-overlay {
    position: absolute;
    inset: 0;
    background: var(--cbb-mfg-ol);
    transition: background 0.4s ease;
}

.cbb-manufacturing__image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: var(--cbb-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--cbb-muted);
    letter-spacing: 0.10em;
}

.cbb-manufacturing__caption {
    position: absolute;
    bottom: 32px;
    left: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(245, 245, 245, 0.45);
}

/* Content column */
.cbb-manufacturing__content {
    padding: 80px 72px 80px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Feature grid */
.cbb-manufacturing__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--cbb-border);
    border: 1px solid var(--cbb-border);
    margin-top: 44px;
}

.cbb-manufacturing__feat {
    background: var(--cbb-cell-bg);
    padding: 24px 22px;
    transition: background 0.4s ease;
}

.cbb-manufacturing__feat strong {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--cbb-text);
    margin-bottom: 6px;
    transition: color 0.3s ease;
}

.cbb-manufacturing__feat p {
    font-size: 14px;
    font-weight: 300;
    color: var(--cbb-muted);
    line-height: 1.5;
    margin: 0;
    transition: color 0.3s ease;
}

/* Stats */
.cbb-manufacturing__stats {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid var(--cbb-border);
}

.cbb-manufacturing__stat {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.cbb-manufacturing__stat-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 56px;
    font-weight: 800;
    color: var(--cbb-teal);
    line-height: 1;
    min-width: 110px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.cbb-manufacturing__stat strong {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 19px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cbb-text);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.cbb-manufacturing__stat p {
    font-size: 15px;
    font-weight: 300;
    color: var(--cbb-muted);
    line-height: 1.6;
    margin: 0;
    transition: color 0.3s ease;
}


/* ══════════════════════════════════════════════════════════════
   12. RESPONSIVE — TABLET (≤ 1024px)
══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {

    /* Hero */
    .cbb-hero__top  { padding: 24px; }
    .cbb-hero__body { padding: 0 24px 120px; }
    .cbb-hero__headline { font-size: clamp(50px, 10vw, 80px); }
    .cbb-hero__scroll-hint { display: none; }
    .cbb-hero__strip-item { padding: 14px 20px; }
    .cbb-hero__strip-num  { font-size: 24px; }

    /* Product Categories */
    .cbb-product-categories { padding: 72px 32px; }
    .cbb-product-categories__header { flex-direction: column; align-items: flex-start; }
    .cbb-product-categories__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .cbb-pcat:nth-child(1) { grid-column: span 2; }
    .cbb-pcat:nth-child(2),
    .cbb-pcat:nth-child(3),
    .cbb-pcat:nth-child(4),
    .cbb-pcat:nth-child(5) { grid-column: span 1; }

    /* CTA Banner */
    .cbb-cta-banner { padding: 56px 32px; }

    /* News & Updates */
    .cbb-news-updates { padding: 72px 32px; }
    .cbb-news-updates__header { flex-direction: column; align-items: flex-start; }
    .cbb-news-updates__grid { grid-template-columns: 1fr 1fr; }

    /* Manufacturing */
    .cbb-manufacturing {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .cbb-manufacturing__image { height: 360px; }
    .cbb-manufacturing__image-overlay {
        background: var(--cbb-mfg-ol-mob);
    }
    .cbb-manufacturing__content { padding: 56px 32px; }

    /* Toggle */
    #cbb-theme-toggle { bottom: 20px; right: 20px; }
}


/* ══════════════════════════════════════════════════════════════
   13. RESPONSIVE — MOBILE (≤ 640px)
══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {

    /* Hero */
    .cbb-hero__top  { padding: 20px; }
    .cbb-hero__body { padding: 0 20px 110px; }
    .cbb-hero__headline { font-size: clamp(42px, 12vw, 60px); }
    .cbb-hero__subheading { font-size: 14px; }
    .cbb-hero__actions { flex-direction: column; }
    .cbb-hero__actions .cbb-btn { text-align: center; }
    .cbb-hero__strip { flex-wrap: wrap; }
    .cbb-hero__strip-item {
        flex: 1 1 45%;
        border-bottom: 1px solid var(--cbb-strip-bdr);
        padding: 14px 16px;
    }

    /* Product Categories */
    .cbb-product-categories { padding: 60px 20px; }
    .cbb-product-categories__grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .cbb-pcat:nth-child(1),
    .cbb-pcat:nth-child(2),
    .cbb-pcat:nth-child(3),
    .cbb-pcat:nth-child(4),
    .cbb-pcat:nth-child(5) { grid-column: span 1; }
    .cbb-pcat { min-height: 280px; }

    /* CTA Banner */
    .cbb-cta-banner { padding: 48px 20px; }
    .cbb-cta-banner__inner { flex-direction: column; align-items: flex-start; gap: 28px; }

    /* News & Updates */
    .cbb-news-updates { padding: 60px 20px; }
    .cbb-news-updates__grid { grid-template-columns: 1fr; }

    /* Manufacturing */
    .cbb-manufacturing__image   { height: 280px; }
    .cbb-manufacturing__content { padding: 48px 20px; }
    .cbb-manufacturing__features { grid-template-columns: 1fr; }
    .cbb-manufacturing__stat-num { font-size: 44px; min-width: 86px; }

    /* Toggle */
    #cbb-theme-toggle { padding: 9px 14px; font-size: 10px; }
}


/* ── Blank Page builder — layout ─────────────────────────────── */
.loom-section { width: 100%; }
.loom-section__col { min-width: 0; }
.loom-page-content { width: 100%; }

/* Automatic responsive stacking for Loom sections.
   Inline style has grid-template-columns set explicitly.
   !important overrides it at each breakpoint. */
@media (min-width: 769px) and (max-width: 1024px) {
    .loom-section__inner {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
    }
}
@media (max-width: 768px) {
    .loom-section__inner {
        grid-template-columns: 1fr !important;
    }
    .loom-nav { padding: 12px 20px !important; }
    .loom-menu__list, .loom-nav__menu { flex-direction: column; gap: 10px; }
}

/* Responsive spacing via CSS custom properties (set in inline styles by PHP renderer).
   These selectors fire when the element has the corresponding CSS var in its style attr. */
@media (max-width: 768px) {
    [style*="--loom-mob-p"] { padding: var(--loom-mob-p) !important; }
    [style*="--loom-mob-m"] { margin:  var(--loom-mob-m) !important; }
    [style*="--loom-mob-fs"] { font-size: var(--loom-mob-fs) !important; }
    [style*="--loom-mob-ta"] { text-align: var(--loom-mob-ta) !important; }
    [style*="--loom-mob-w"] { width: var(--loom-mob-w) !important; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    [style*="--loom-tab-p"] { padding: var(--loom-tab-p) !important; }
    [style*="--loom-tab-m"] { margin:  var(--loom-tab-m) !important; }
    [style*="--loom-tab-fs"] { font-size: var(--loom-tab-fs) !important; }
    [style*="--loom-tab-ta"] { text-align: var(--loom-tab-ta) !important; }
    [style*="--loom-tab-w"] { width: var(--loom-tab-w) !important; }
}


/* ── Blank Page — Hover effects ─────────────────────────────── */
/* All hover effects use CSS transitions. The loom-hover-block
   class enables the transition; specific classes provide the effect. */

.loom-hover-block {
    transition: transform 0.25s ease, box-shadow 0.25s ease,
                opacity 0.25s ease, border-color 0.25s ease,
                filter 0.25s ease;
    position: relative;
}
/* Override speed via inline --loom-hover-speed custom property */
[style*="--loom-hover-speed"] { transition-duration: var(--loom-hover-speed, 0.25s) !important; }

/* Lift — float up */
.loom-hover-lift:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

/* Scale — grow slightly */
.loom-hover-scale:hover { transform: scale(1.02); }

/* Glow — coloured shadow */
.loom-hover-glow:hover { box-shadow: 0 0 0 3px var(--loom-hover-color, #0d8dd4), 0 4px 16px rgba(13,141,212,0.25); }

/* Dim — reduce opacity */
.loom-hover-dim:hover { opacity: 0.75; }

/* Brighten — increase brightness */
.loom-hover-brighten:hover { filter: brightness(1.08); }

/* Shadow — deepen existing shadow */
.loom-hover-shadow:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.18); }

/* Outline — coloured border appears */
.loom-hover-outline:hover { outline: 2px solid var(--loom-hover-color, #0d8dd4); outline-offset: 3px; }

/* Accent bar — bottom sliding bar */
.loom-hover-accentBar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: var(--loom-hover-bar-h, 3px);
    background: var(--loom-hover-color, #0d8dd4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--loom-hover-speed, 0.25s) ease;
    border-radius: 0 0 2px 2px;
    z-index: 10;
}
.loom-hover-accentBar:hover::after { transform: scaleX(1); }

/* Accent bar — top */
.loom-hover-accentBarTop::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: var(--loom-hover-bar-h, 3px);
    background: var(--loom-hover-color, #0d8dd4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--loom-hover-speed, 0.25s) ease;
    border-radius: 2px 2px 0 0;
    z-index: 10;
}
.loom-hover-accentBarTop:hover::before { transform: scaleX(1); }

/* ── Blank Page — nav/menu link colors ──────────────────────── */
.loom-nav__menu,.loom-menu__list{display:flex;gap:20px;list-style:none;margin:0;padding:0;}
.loom-nav__menu a,.loom-menu__list a{text-decoration:none;transition:color 0.2s;}


/* ── Mobile background overlay ───────────────────────────────── */
/* An absolutely-positioned div rendered inside sections with mobile bg.
   Hidden on desktop, shown on mobile. Sits at z-index:2, above desktop
   background (video/image at z-index:0) but below overlay+content (z-index:3). */
.loom-mob-bg-overlay {
    display: none !important;
}
@media (max-width: 768px) {
    .loom-mob-bg-overlay {
        display: block !important;
        z-index: 2 !important;
    }
    /* Push section inner content above the mobile overlay */
    .loom-has-mob-bg .loom-section__inner {
        position: relative;
        z-index: 3;
    }
    /* Hide desktop video bg on mobile when a mobile bg is set */
    .loom-has-mob-bg .loom-desktop-bg-video {
        display: none !important;
    }
}


/* ── Blank Page — Mobile responsiveness ─────────────────────── */

/* Images */
@media (max-width: 768px) {
    .loom-block img { max-width: 100%; height: auto; }
    .loom-image-block img { width: 100% !important; height: auto !important; }
    /* Carousels and galleries stay full width */
    .loom-carousel { width: 100%; }
    .loom-gallery { gap: 6px !important; }
    /* Nav collapses */
    .loom-nav__logo-area { flex: 1; }
    /* Hover tiles stack gracefully */
    .loom-hovertile { height: auto !important; min-height: 260px; }
    /* Sections: remove min-height constraints on mobile */
    .loom-section[style*="min-height"] { min-height: 0 !important; }
    /* Button blocks: full-width friendly */
    .loom-button-wrap { flex-wrap: wrap; }
    /* Counters: reduce font size on mobile unless overridden */
    .loom-counter > div:first-child { font-size: clamp(32px, 10vw, 56px); }
    /* Social icons: center on mobile */
    .loom-social { justify-content: center !important; }
}

/* Hover tile mobile — disable hover, show content stacked */
@media (max-width: 768px) {
    .loom-hovertile .lht-inner { transform: none !important; }
    .loom-hovertile .lht-reveal {
        transform: none !important;
        opacity: 1 !important;
        padding: 0 16px 20px !important;
        background: transparent;
    }
    .loom-hovertile .lht-icon-abs { max-height: none !important; opacity: 1 !important; }
    .loom-hovertile .lht-inner { padding-bottom: 0 !important; }
}

/* Typography: base mobile scale (overridden by --loom-mob-fs if set) */
@media (max-width: 768px) {
    .loom-block h1:not([style*="--loom-mob-fs"]) { font-size: clamp(28px, 7vw, 48px); }
    .loom-block h2:not([style*="--loom-mob-fs"]) { font-size: clamp(22px, 5.5vw, 36px); }
    .loom-block h3:not([style*="--loom-mob-fs"]) { font-size: clamp(18px, 4.5vw, 28px); }
    .loom-block p  { word-break: break-word; }
}

/* Gallery: 2 cols on tablet, 1 on mobile */
@media (max-width: 768px) {
    .loom-gallery { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
    .loom-gallery { grid-template-columns: 1fr !important; }
    .loom-section__inner { gap: 16px !important; }
}

/* ── Nested section indentation fix ─────────────────────────── */
/* Sections inside columns must fill the full column width */
.loom-section__col .loom-section { 
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.loom-section__col .loom-section .loom-section__inner {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── Element width setting ───────────────────────────────────── */
/* Applied via inline style --loom-block-width custom property */
[style*="--loom-bw"] {
    width: var(--loom-bw) !important;
    max-width: var(--loom-bw) !important;
    box-sizing: border-box;
}

/* ── Nested section: ensure full column width with no indent ─── */
.loom-section__col > .loom-section,
.loom-section__col .loom-section {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* The outer section wrapper must stretch fully */
.loom-section__col > div > .loom-section {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
