/* index.html — Trusted Partners / brands marquee */

#brands.index-brands-section {
    position: relative;
    isolation: isolate;
    padding: 5rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    overflow: hidden;
}

#brands.index-brands-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 20% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(16, 185, 129, 0.07) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

html.dark #brands.index-brands-section {
    background: linear-gradient(180deg, #0f172a 0%, #111827 50%, #0f172a 100%);
}

html.dark #brands.index-brands-section::before {
    background:
        radial-gradient(ellipse 55% 45% at 20% 0%, rgba(59, 130, 246, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 80% 100%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}

@media (min-width: 1024px) {
    #brands.index-brands-section {
        padding: 6rem 0;
    }
}

#brands .container {
    position: relative;
    z-index: 1;
}

/* Header */
.index-brands-head {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.index-brands-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.875rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 999px;
}

html.dark .index-brands-eyebrow {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(96, 165, 250, 0.35);
}

.index-brands-title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #0f172a;
}

html.dark .index-brands-title {
    color: #f8fafc;
}

.index-brands-title-accent {
    background: linear-gradient(135deg, #2563eb 0%, #059669 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

html.dark .index-brands-title-accent {
    background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.index-brands-lead {
    margin: 0 auto;
    max-width: 520px;
    font-size: 1rem;
    line-height: 1.65;
    color: #64748b;
}

html.dark .index-brands-lead {
    color: #94a3b8;
}

/* Marquee */
.index-brands-marquee {
    position: relative;
    overflow: hidden;
    padding: 1.75rem 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

html.dark .index-brands-marquee {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.index-brands-marquee::before,
.index-brands-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    z-index: 2;
    width: min(100px, 12vw);
    height: 100%;
    pointer-events: none;
}

.index-brands-marquee::before {
    left: 0;
    background: linear-gradient(to right, #fff 0%, transparent 100%);
}

.index-brands-marquee::after {
    right: 0;
    background: linear-gradient(to left, #fff 0%, transparent 100%);
}

html.dark .index-brands-marquee::before {
    background: linear-gradient(to right, #1e293b 0%, transparent 100%);
}

html.dark .index-brands-marquee::after {
    background: linear-gradient(to left, #1e293b 0%, transparent 100%);
}

.index-brands-track {
    display: flex;
    width: max-content;
    animation: index-brands-scroll 40s linear infinite;
}

.index-brands-track:hover {
    animation-play-state: paused;
}

.index-brands-set {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 0 1.25rem;
}

@media (min-width: 768px) {
    .index-brands-set {
        gap: 3.5rem;
        padding: 0 1.75rem;
    }
}

#brands .index-brands-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 72px;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

/* Light cards in dark theme so coloured SVG logos stay readable */
html.dark #brands .index-brands-item {
    background: #f8fafc;
    border-color: #cbd5e1;
}

#brands .index-brands-item:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    background: #fff;
}

html.dark #brands .index-brands-item:hover {
    border-color: rgba(96, 165, 250, 0.45);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

#brands .index-brands-item img {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: filter 0.3s ease, opacity 0.3s ease;
}

#brands .index-brands-item:hover img {
    filter: grayscale(0%) opacity(1);
}

html.dark #brands .index-brands-item img {
    filter: grayscale(0%) opacity(1);
}

html.dark #brands .index-brands-item:hover img {
    filter: grayscale(0%) opacity(1);
}

@keyframes index-brands-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .index-brands-track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 1rem;
    }

    .index-brands-set[aria-hidden='true'] {
        display: none;
    }

    #brands .index-brands-item:hover {
        transform: none;
    }
}
