/* Customer logos for Index.html (moving strip) and Customers.html (grid by sector).
   Logo files: Customers/<Name>.png, 200 x 150 px, transparent background,
   logo fitted to the width and centred, like the existing ones. */

:root {
    --cmtk-brand: #107080;
    --cmtk-ink: #102030;
}

/* A logo, or the company's name when the logo file is missing (customers.js swaps it in) */
.cust-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}
.cust-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cust-name {
    color: #495057;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-align: center;
}

/* ---------- Home page: moving strip ---------- */

.cust-strip-heading {
    color: var(--cmtk-ink);
    font-weight: 800;
    letter-spacing: -0.5px;
}
.cust-strip {
    overflow: hidden;
}
.cust-strip__list {
    display: flex;
    flex-wrap: wrap;            /* a still grid until customers.js starts the strip */
    justify-content: center;
    gap: 24px 40px;
    margin: 0;
    padding: 8px 0;
    list-style: none;
}
.cust-strip .cust-logo {
    flex: none;
    width: 120px;
    height: 90px;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.cust-strip .cust-logo:hover {
    opacity: 1;
    filter: none;
}
.cust-strip .cust-name {
    font-size: 1rem;
}

.is-moving .cust-strip {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.is-moving .cust-strip__track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: cust-scroll var(--cust-duration, 90s) linear infinite;
}
.is-moving .cust-strip__list {
    flex: none;
    flex-wrap: nowrap;
    gap: 40px;
}
.is-moving .cust-strip:hover .cust-strip__track,
.is-paused .cust-strip__track {
    animation-play-state: paused;
}
@keyframes cust-scroll {
    to { transform: translateX(calc(-50% - 20px)); }   /* one set of logos plus one gap */
}

.cust-strip-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 24px;
    margin-top: 24px;
}
.cust-strip-link {
    color: var(--cmtk-brand);
    font-weight: 600;
    text-decoration: none;
}
.cust-strip-link:hover {
    text-decoration: underline;
}
.cust-strip-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 1px solid #ced4da;
    border-radius: 999px;
    background: #fff;
    color: #495057;
    font-size: 0.875rem;
}
.cust-strip-toggle:hover {
    border-color: var(--cmtk-brand);
    color: var(--cmtk-brand);
}
.is-moving .cust-strip-toggle {
    display: inline-flex;
}

/* Visitors who have turned off motion in their system settings see the still grid */
@media (prefers-reduced-motion: reduce) {
    .is-moving .cust-strip {
        -webkit-mask-image: none;
                mask-image: none;
    }
    .is-moving .cust-strip__track {
        display: block;
        width: auto;
        animation: none;
    }
    .is-moving .cust-strip__list {
        flex-wrap: wrap;
        gap: 24px 40px;
    }
    .cust-strip__list[aria-hidden="true"],
    .is-moving .cust-strip-toggle {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) and (max-width: 575.98px) {
    .is-moving .cust-strip__list {
        gap: 16px 20px;
    }
    .cust-strip .cust-logo {
        width: 88px;
        height: 66px;
    }
}

/* ---------- Customers page: grid by sector ---------- */

.cust-hero {
    padding: 64px 0 40px;
    background: linear-gradient(to bottom, #ffffff, #f1f5f9);
    text-align: center;
}
.cust-hero h1 {
    color: var(--cmtk-ink);
    font-weight: 800;
    letter-spacing: -1px;
}
.cust-sector-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cust-sector-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    background: #fff;
    color: #212529;
    font-size: 0.9rem;
    text-decoration: none;
}
.cust-sector-nav a:hover {
    border-color: var(--cmtk-brand);
    color: var(--cmtk-brand);
}
.cust-sector {
    padding: 40px 0;
    scroll-margin-top: 80px;    /* keeps the heading clear of the sticky menu bar */
}
.cust-sector + .cust-sector {
    border-top: 1px solid #e9ecef;
}
.cust-sector h2 {
    margin-bottom: 20px;
    color: var(--cmtk-ink);
    font-size: 1.5rem;
    font-weight: 800;
}
.cust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cust-card {
    padding: 16px;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.cust-card .cust-logo {
    aspect-ratio: 4 / 3;
}
.cust-card .cust-name {
    font-size: 1.1rem;
}
@media (max-width: 575.98px) {
    .cust-grid {
        grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
        gap: 10px;
    }
    .cust-card {
        padding: 10px;
    }
    .cust-card .cust-name {
        font-size: 0.9rem;
    }
}
