/**
 * O6 Toolkit - Custom Styling
 * Project-specific styles that ship with the plugin.
 * Add new sections below as needed.
 */


/* ═══════════════════════════════════════════════════════════
   LOGO BAR
   Structural layout for [data-section="logo-bar"].
   Marquee animation handled by GSAP in gsap-init.js.
   ═══════════════════════════════════════════════════════════ */

[data-section="logo-bar"] {
    overflow: hidden !important;
}

[data-section="logo-bar"] > .oxy-container {
    overflow: visible !important;
    margin-left: var(--o6tk-space-8);
    margin-right: var(--o6tk-space-8);
}

.c-logo-bar__item {
    flex-shrink: 0;
}

.c-logo-bar__item img {
    filter: none !important;
    opacity: 1 !important;
    display: block;
    height: 40px;
    width: auto;
    object-fit: contain;
}


/* ═══════════════════════════════════════════════════════════
   BENTO GRID
   3-column layout with spanning cards inspired by Sync SaaS.
   Card A spans 2 cols, Card B spans 2 rows.
   ═══════════════════════════════════════════════════════════ */

/* Inner container spacing */
[data-section="bento-grid"] > .oxy-container {
    margin-left: var(--o6tk-space-8);
    margin-right: var(--o6tk-space-8);
}

/* Grid layout */
.l-bento-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto auto;
    grid-auto-flow: dense;
    gap: var(--o6tk-space-8);
}

/* Card base */
.c-bento__card {
    position: relative;
    overflow: hidden;
    border-radius: var(--o6tk-radius-lg, 12px);
    min-height: 280px;
}

/* Card: featured (2 cols wide, row 1) */
.c-bento__card--featured {
    grid-column: 1 / 3;
    grid-row: 1;
    min-height: 340px;
}

/* Card: tall (spans 2 rows, left column) */
.c-bento__card--tall {
    grid-column: 1;
    grid-row: 2 / 4;
}

/* Card: wide (spans 2 cols) */
.c-bento__card--wide {
    grid-column: span 2;
}

/* Card: CTA */
.c-bento__card--cta {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--o6tk-primary, #4f46e5);
}

/* Background image */
.c-bento__bg {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    z-index: 0;
}

/* Dark overlay for text readability */
.c-bento__card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.1) 60%);
    z-index: 1;
    pointer-events: none;
}

.c-bento__card--cta::after {
    display: none;
}

/* Content overlay */
.c-bento__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: var(--o6tk-space-8);
}

/* Typography */
.c-bento__title {
    color: #fff;
    font-size: var(--o6tk-h4, 1.5rem);
    font-weight: 700;
    margin: 0 0 var(--o6tk-space-2, 8px);
    line-height: 1.2;
}

.c-bento__card--featured .c-bento__title {
    font-size: var(--o6tk-h2, 2.25rem);
}

.c-bento__desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--o6tk-text-sm, 0.875rem);
    line-height: 1.55;
    margin: 0;
    max-width: 40ch;
}

.c-bento__card--cta .c-bento__title {
    color: #fff;
    font-size: var(--o6tk-h3, 1.75rem);
}

.c-bento__card--cta .c-bento__desc {
    color: rgba(255, 255, 255, 0.7);
}

.c-bento__card--cta .c-bento__content {
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Hover: subtle zoom on bg image */
.c-bento__card .c-bento__bg {
    transition: transform 0.6s var(--o6tk-ease-default, ease);
}

.c-bento__card:hover .c-bento__bg {
    transform: scale(1.05);
}

/* Responsive: stack on mobile */
@media (max-width: 767px) {
    .l-bento-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }

    .c-bento__card--featured,
    .c-bento__card--tall,
    .c-bento__card--wide,
    .c-bento__card--cta {
        grid-column: auto;
        grid-row: auto;
    }

    .c-bento__card {
        min-height: 240px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .l-bento-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .c-bento__card--featured,
    .c-bento__card--wide,
    .c-bento__card--cta {
        grid-column: 1 / 3;
    }

    .c-bento__card--tall {
        grid-column: auto;
        grid-row: auto;
    }
}


/* ═══════════════════════════════════════════════════════════
   PARALLAX SHOWCASE
   Demo section for [data-section="parallax-showcase"].
   ═══════════════════════════════════════════════════════════ */

[data-section="parallax-showcase"] {
    position: relative;
    overflow: hidden;
}

/* Inner container spacing */
[data-section="parallax-showcase"] > .oxy-container {
    margin-left: var(--o6tk-space-8);
    margin-right: var(--o6tk-space-8);
}

/* ── Hero block: full-width bg image + overlay text ────── */
.s-parallax__hero {
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.s-parallax__bg-wrap {
    position: absolute;
    inset: -15% 0;
    z-index: 0;
    overflow: hidden;
}

.s-parallax__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.s-parallax__hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.s-parallax__hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.s-parallax__hero-content h2 {
    color: #fff;
    font-size: var(--o6tk-hero, clamp(2.5rem, 6vw, 5rem));
    font-weight: 800;
    line-height: 1.05;
    margin: 0 0 var(--o6tk-space-6, 20px);
    letter-spacing: -0.02em;
}

.s-parallax__hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--o6tk-text-lg, 1.125rem);
    line-height: 1.65;
    margin: 0 0 var(--o6tk-space-8, 32px);
    max-width: 50ch;
}

.s-parallax__cta {
    display: inline-block;
    padding: 14px 32px;
    background: #fff;
    color: var(--o6tk-dark, #101010);
    font-size: var(--o6tk-text-sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--o6tk-radius-md, 6px);
    transition: background 0.3s ease, transform 0.3s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.s-parallax__cta:hover {
    background: var(--o6tk-primary, #4f46e5);
    color: #fff;
    transform: translateY(-2px);
}

/* ── Feature columns: image + text cards ───────────────── */
.l-parallax-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--o6tk-space-10, 40px);
    padding: var(--o6tk-ss-lg, 80px) 0;
}

.c-parallax-card {
    position: relative;
}

.c-parallax-card__img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: var(--o6tk-radius-lg, 12px);
    margin-bottom: var(--o6tk-space-6, 20px);
    aspect-ratio: 4 / 5;
}

.c-parallax-card__img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    position: absolute;
    top: -10%;
    left: 0;
}

.c-parallax-card h3 {
    font-size: var(--o6tk-h4, 1.5rem);
    font-weight: 700;
    margin: 0 0 var(--o6tk-space-3, 12px);
    color: var(--o6tk-dark, #101010);
}

.c-parallax-card p {
    font-size: var(--o6tk-text-base, 1rem);
    color: var(--o6tk-muted-color, #6b7280);
    line-height: 1.6;
    margin: 0;
    max-width: 40ch;
}

@media (max-width: 767px) {
    .s-parallax__hero {
        min-height: 60vh;
    }

    .l-parallax-grid {
        grid-template-columns: 1fr;
        gap: var(--o6tk-space-8, 32px);
    }

    .c-parallax-card__img-wrap {
        aspect-ratio: 16 / 9;
    }
}


/* ═══════════════════════════════════════════════════════════
   HORIZONTAL SCROLL SHOWCASE
   Pinned horizontal scroll section for [data-section="horizontal"].
   Track width and pin set by JS (gsap-init.js initHorizontalScroll).
   ═══════════════════════════════════════════════════════════ */

[data-section="horizontal"] {
    overflow: hidden;
}

[data-section="horizontal"] > .oxy-container {
    margin-left: var(--o6tk-space-8);
    margin-right: var(--o6tk-space-8);
}

/* Track (flex row, JS sets inline width) */
.horizontal-track {
    display: flex;
    flex-wrap: nowrap;
    will-change: transform;
    contain: layout paint;
}

/* Each panel: full viewport width (JS overrides inline) */
.c-h-panel {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    padding: var(--o6tk-ss-md, 48px) var(--o6tk-space-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Panel 1: Parallax needs relative parent */
.c-h-panel:first-child {
    position: relative;
    overflow: hidden;
}

/* Parallax image wrapper inside panels */
.c-h-panel .s-parallax__bg-wrap,
.c-h-panel [data-parallax] {
    position: absolute;
    inset: -15% 0;
    overflow: hidden;
    width: 100%;
}

.c-h-panel [data-parallax] img,
.c-h-panel .s-parallax__bg {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 130%;
    object-fit: cover;
}

/* Panel 2: Stats grid */
.c-h-panel .l-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--o6tk-space-8);
}

/* Panel 4: Gallery grid */
.c-h-panel .l-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--o6tk-space-4);
}

/* Mobile: stack panels vertically */
@media (max-width: 767px) {
    .horizontal-track {
        flex-direction: column;
    }

    .c-h-panel {
        width: 100% !important;
        min-height: auto;
        padding: var(--o6tk-space-12, 48px) var(--o6tk-space-8);
    }
}
