.unoptix-home {
    margin: 0;
    color: #4a4a4a;
    background: #fff;
}

.home-main {
    overflow-x: clip;
}

.section-spacing {
    padding: 56px 0;
}

.home-about {
    padding-top: 75px;
}

.home-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 320px;
    background: #031a24;
    display: flex;
    align-items: flex-start;
}

/* The picture sits on its own layer so it can drift slowly (transform only, no
   repaints). The canvas with the travelling lights is a child of it, so the
   lights drift together with the strands they run along. */
.hero-bg {
    position: absolute;
    inset: -3%;
    z-index: -3;
    background: url('../../images/slider_unoptix.webp?v=2') center / cover no-repeat;
    animation: heroImageDrift 48s ease-in-out infinite alternate;
    will-change: transform;
}

.hero-pulses {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.home-hero > .container {
    position: relative;
    z-index: 2;
}

/* Decorative light and particles between the picture and the headline */
.hero-fx {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.hero-light {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

.hero-light-a {
    width: 52%;
    aspect-ratio: 1;
    top: -60%;
    left: -10%;
    background: radial-gradient(closest-side, rgba(14, 214, 224, 0.42), rgba(14, 214, 224, 0) 70%);
    animation: heroLightA 26s ease-in-out infinite alternate;
}

.hero-light-b {
    width: 38%;
    aspect-ratio: 1;
    top: -30%;
    right: -8%;
    background: radial-gradient(closest-side, rgba(120, 245, 255, 0.3), rgba(120, 245, 255, 0) 70%);
    animation: heroLightB 34s ease-in-out infinite alternate;
}

.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

@keyframes heroImageDrift {
    from { transform: translate3d(-1.2%, 0.8%, 0) scale(1); }
    to   { transform: translate3d(1.2%, -0.8%, 0) scale(1.05); }
}

@keyframes heroLightA {
    0%   { transform: translate3d(0, 0, 0); opacity: 0.35; }
    50%  { opacity: 0.9; }
    100% { transform: translate3d(95%, 38%, 0); opacity: 0.45; }
}

@keyframes heroLightB {
    0%   { transform: translate3d(0, 0, 0); opacity: 0.85; }
    100% { transform: translate3d(-120%, 30%, 0); opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg,
    .hero-light {
        animation: none;
    }
}

.home-hero h1 {
    margin: 230px 0 0;
    color: #fff;
    font-family: Roboto, sans-serif;
    font-size: 40px;
    line-height: 1;
    text-transform: uppercase;
    font-weight: 700;
}

.home-about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
    align-items: center;
}

.home-about-content h2,
.section-title-center,
.home-banner-content h2 {
    margin: 0 0 18px;
    font-weight: 600;
    font-size: 32px;
    line-height: 1.1;
    color: #0f2430;
}

.home-about-content p {
    margin: 0 0 16px;
    text-align: justify;
    font-size: 16px;
}

.video-frame {
    border-radius: 12px;
    overflow: hidden;
    background: #f4f7f8;
    box-shadow: 0 10px 35px rgba(20, 44, 60, 0.12);
}

.video-frame iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}

/* The Vimeo player is only loaded when the poster is clicked (assets/js/index.js) */
.video-facade {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #072e3f;
    color: #fff;
}

.video-facade img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    margin: -36px 0 0 -36px;
    border-radius: 50%;
    background: rgba(14, 214, 224, 0.92);
    box-shadow: 0 0 0 0 rgba(14, 214, 224, 0.35), 0 4px 18px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-play svg {
    margin-left: 3px;
}

/* the global a:hover colour must not turn the white arrow cyan */
.video-facade,
.video-facade:hover,
.video-facade:focus {
    color: #fff;
}

.video-facade img {
    transition: transform 0.6s ease, filter 0.6s ease;
}

.video-facade:hover img,
.video-facade:focus-visible img {
    transform: scale(1.035);
    filter: brightness(1.08);
}

.video-facade:hover .video-play,
.video-facade:focus-visible .video-play {
    transform: scale(1.06);
    box-shadow: 0 0 0 12px rgba(14, 214, 224, 0.22), 0 6px 26px rgba(0, 0, 0, 0.35);
}

.section-title-center {
    text-align: center;
}

.home-categories {
    padding-top: 24px;
    padding-bottom: 90px;
}

.home-browse-divider {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 640px;
    margin: 0 auto 40px;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.home-browse-divider::before,
.home-browse-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e3ecf0;
}

/* the cable photo is big and dark next to the modules */
.home-category-card--cables .home-category-image img {
    max-width: 250px;
}


.home-category-grid {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 44px 32px;
}

.home-category-card {
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

/* 3 cards on the first row, 2 wider ones below */
.home-category-card:nth-child(n+4) {
    grid-column: span 3;
}

.home-category-image {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 600 / 386;   /* every picture box is equally tall, so the titles line up */
}

.home-category-image img {
    width: 100%;
    max-width: 340px;
    height: auto;
}

.home-category-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 4px 16px 0;
    text-align: center;
    align-items: center;
}

.home-category-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 4px;
}

.home-category-head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #0f2430;
}

.home-category-head h2 a {
    color: inherit;
    text-decoration: none;
}

.home-category-head h2 a:hover {
    color: #0ed6e0;
}

.home-category-body p {
    margin: 10px 0 14px;
    font-size: 15px;
    line-height: 1.55;
    color: #5b6770;
}

.home-category-body p.home-category-count {
    margin: -4px 0 12px;
    font-size: 13px;
    color: #94a3b8;
}

.home-category-more {
    font-size: 15px;
    font-weight: 600;
    color: #0ed6e0;
    text-decoration: none;
}

.home-category-more:hover {
    color: #0bbfc8;
}

.home-category-more span {
    display: inline-block;
    transition: transform 0.15s ease;
}

.home-category-more:hover span {
    transform: translateX(3px);
}

.home-category-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.home-category-chip {
    display: inline-block;
    padding: 8px 16px;
    border: 1.5px solid rgba(14, 214, 224, 0.7);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #0ed6e0;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.home-category-chip:hover {
    background: #0ed6e0;
    color: #fff;
}

.home-features {
    padding-top: 75px;
    padding-bottom: 75px;
    background: #fafafa;
}

.home-features-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.feature-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0 14px;
    text-align: center;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #0ed6e0;
    font-size: 50px;
    line-height: 1;
    margin-bottom: 0;
}

.feature-card h3 {
    margin: 15px 0;
    font-size: 22px;
    color: #4a4a4a;
    font-weight: 600;
}

.feature-card p {
    margin: 0;
    font-size: 14px;
    line-height: 24px;
}

.home-banner {
    background-image: linear-gradient(90deg, #072e3f 0%, #0ed6e0 100%);
    padding-top: 75px;
    padding-bottom: 75px;
}

.home-banner-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    color: #fff;
}

.home-banner-content h2,
.home-banner-content p {
    color: #fff;
}

.home-banner-content p {
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.7rem;
}

.home-banner-content h2 {
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 40px;
    line-height: 1.2;
}

.home-banner .home-cta {
    border: 2px solid #ffffff;
    color: #ffffff;
    display: inline-block;
    padding: 15px 40px;
    margin: 35px auto 0;
    line-height: 1.42;
    border-radius: 30px;
}

.home-banner .home-cta:hover {
    background-color: #ffffff;
    color: #4a4a4a;
    border-color: #ffffff;
}

@media (max-width: 1199px) {
    .home-about-grid {
        grid-template-columns: 1fr;
    }

    .home-about-media {
        max-width: 840px;
        width: 100%;
    }

    .home-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-category-card,
    .home-category-card:nth-child(n+4) {
        grid-column: span 1;
    }

    .home-category-card:last-child {
        grid-column: 1 / -1;
    }

    .home-features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .section-spacing {
        padding: 36px 0;
    }

    .home-hero {
        min-height: 150px;
    }

    .home-hero h1 {
        margin-top: 90px;
        font-size: 20px;
        line-height: 1.2;
    }

    .home-about-content h2,
    .section-title-center,
    .home-banner-content h2 {
        font-size: 26px;
    }

    .home-banner {
        min-height: auto;
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .home-banner-content h2 {
        line-height: 1.35;
    }

    .home-about-content p,
    .home-banner-content p {
        font-size: 15px;
    }

    .home-features-grid {
        grid-template-columns: 1fr;
    }

    .home-search {
        padding-top: 44px;
    }

    .home-search-title {
        font-size: 19px;
    }

    .home-categories {
        padding-top: 8px;
        padding-bottom: 40px;
    }

    .home-browse-divider {
        margin-bottom: 22px;
    }

    /* compact rows: small picture on the left, name, count and button on the right */
    .home-category-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .home-category-card,
    .home-category-card:nth-child(n+4),
    .home-category-card:last-child {
        grid-column: auto;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 12px 0;
        border-bottom: 1px solid #edf2f5;
    }

    .home-category-card:last-child {
        border-bottom: 0;
    }

    .home-category-image {
        flex: 0 0 112px;
        width: 112px;
        align-self: auto;
    }

    .home-category-image img,
    .home-category-card--cables .home-category-image img {
        max-width: 112px;
    }

    .home-category-body {
        flex: 1;
        min-width: 0;
        padding: 0;
        text-align: left;
        align-items: flex-start;
    }

    .home-category-head {
        justify-content: flex-start;
        gap: 4px 8px;
    }

    .home-category-head h2 {
        font-size: 16px;
    }

    .home-category-body p {
        display: none;
    }

    .home-category-links {
        justify-content: flex-start;
        margin-top: 10px;
        gap: 6px;
    }

    .home-category-chip {
        padding: 6px 12px;
        font-size: 13px;
    }

    .home-category-card:last-child {
        grid-column: auto;
    }

    .feature-card h3 {
        font-size: 22px;
    }

    .home-banner .home-cta {
        margin-top: 28px;
    }

    .footer-wrapper {
        margin-top: 100px;
        padding: 0 16px;
    }

    .footer-wrapper .row > [class*='col-'] {
        margin-bottom: 18px;
    }
}

/* Search above the category cards ------------------------------------- */
.home-search {
    padding-top: 80px;
}

.home-search-form {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.home-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
    margin: 0 0 26px;
    font-size: 13px;
    color: #64748b;
}

.home-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.home-search-sub {
    margin: -6px 0 16px;
    font-size: 15px;
    color: #64748b;
}

.home-search-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 500;
    color: #0f2430;
}

.home-search-title strong {
    font-weight: 700;
    color: #0ed6e0;
}

/* How it works --------------------------------------------------------- */
.home-steps {
    background: #f5f9fb;
}

.home-steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.home-steps-list li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.home-step-icon {
    display: inline-flex;
    margin-bottom: 14px;
    font-size: 40px;
    color: #0ed6e0;
}

.home-steps-list h3 {
    margin: 0 0 6px;
    font-size: 19px;
    font-weight: 600;
    color: #0f2430;
}

.home-steps-list p {
    margin: 0;
    max-width: 280px;
    font-size: 15px;
    line-height: 1.55;
    color: #5b6770;
}

@media (max-width: 767px) {
    .home-steps-list {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .home-steps-list li {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 16px;
    }

    .home-step-icon {
        flex: 0 0 auto;
        margin: 2px 0 0;
        font-size: 32px;
    }

    .home-steps-list p {
        max-width: none;
    }

    /* one line on a phone: the three points never wrap, they only get tighter */
    .home-trust {
        flex-wrap: nowrap;
        font-size: clamp(10px, 3.1vw, 12px);
        gap: 4px clamp(8px, 3vw, 12px);
        white-space: nowrap;
    }
}
