.modules-page {
    --mod-blue: #1673e6;
    --mod-cyan: #74d4ee;
    --mod-orange: #f29b45;
    overflow: hidden;
}

.modules-hero {
    display: flex;
    min-height: calc(100svh - 78px);
    padding-top: 86px;
    align-items: center;
    background:
        radial-gradient(circle at 82% 30%, rgba(22, 115, 230, .16), transparent 31%),
        radial-gradient(circle at 93% 62%, rgba(242, 155, 69, .08), transparent 25%);
}

.modules-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, .82fr);
    align-items: center;
    gap: clamp(50px, 8vw, 110px);
}

.modules-hero-copy h1 {
    max-width: 800px;
    margin: 0;
    font-size: clamp(3.35rem, 6.8vw, 6.5rem);
    font-weight: 800;
    letter-spacing: -.072em;
    line-height: .93;
}

.modules-hero-copy > p:last-of-type {
    max-width: 690px;
    margin: 30px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.65vw, 1.24rem);
    line-height: 1.7;
}

.modules-hero-actions {
    display: flex;
    margin-top: 38px;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.modules-text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #d2d2d2;
    font-size: 13px;
    font-weight: 700;
}

.modules-text-link span {
    color: var(--mod-cyan);
}

.modules-brand-card {
    position: relative;
    padding: clamp(30px, 4vw, 46px);
    overflow: hidden;
    border: 1px solid rgba(116, 212, 238, .24);
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(22, 115, 230, .12), rgba(255, 255, 255, .035));
    box-shadow: 0 35px 80px rgba(0, 0, 0, .34);
}

.modules-brand-card::after {
    position: absolute;
    right: -90px;
    bottom: -110px;
    width: 280px;
    height: 280px;
    content: "";
    border-radius: 50%;
    background: var(--mod-blue);
    filter: blur(90px);
    opacity: .17;
}

.modules-brand-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #818181;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.modules-brand-card-top i {
    color: var(--mod-orange);
    font-style: normal;
}

.modules-brand-card img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    margin: 68px 0 45px;
}

.modules-brand-card p {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.modules-brand-card > a {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 25px;
    align-items: center;
    gap: 10px;
    color: var(--mod-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    letter-spacing: .05em;
}

.modules-section-heading {
    display: grid;
    margin-bottom: 48px;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .55fr);
    align-items: end;
    gap: clamp(40px, 8vw, 120px);
}

.modules-section-heading .eyebrow {
    margin-bottom: 24px;
}

.modules-section-heading h2,
.modules-custom-copy h2 {
    max-width: 790px;
    margin: 0;
    font-size: clamp(2.55rem, 5.2vw, 4.9rem);
    font-weight: 800;
    letter-spacing: -.064em;
    line-height: .98;
}

.modules-section-heading > p,
.modules-custom-copy > p:last-of-type {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.modules-category-grid,
.modules-product-grid,
.modules-quality-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.modules-category-card,
.modules-product-card,
.modules-quality-grid article {
    position: relative;
    overflow: hidden;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.modules-category-card {
    min-height: 280px;
    padding: clamp(28px, 3vw, 38px);
}

.modules-category-card:hover,
.modules-product-card:hover {
    color: inherit;
    border-color: rgba(116, 212, 238, .42);
    background: rgba(255, 255, 255, .075);
    transform: translateY(-4px);
}

.modules-category-card > span,
.modules-quality-grid article > span {
    color: var(--mod-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
}

.modules-category-card > i {
    position: absolute;
    top: 28px;
    right: 28px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--mod-cyan);
    border: 1px solid rgba(116, 212, 238, .3);
    border-radius: 50%;
    font-style: normal;
}

.modules-category-card h3,
.modules-quality-grid h3 {
    margin: 46px 0 14px;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    letter-spacing: -.035em;
}

.modules-category-card p,
.modules-product-card p,
.modules-quality-grid p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.modules-category-card:nth-child(5) {
    grid-column: span 2;
}

.modules-product-card {
    display: flex;
    min-height: 310px;
    padding: clamp(28px, 3.5vw, 42px);
    flex-direction: column;
}

.modules-product-card > span {
    color: var(--mod-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.modules-product-card > b {
    position: absolute;
    top: 30px;
    right: 32px;
    color: var(--mod-cyan);
    font-size: 18px;
}

.modules-product-card h3 {
    margin: auto 0 14px;
    padding-top: 48px;
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    letter-spacing: -.04em;
}

.modules-products-more {
    display: flex;
    margin-top: 30px;
    justify-content: center;
}

.modules-products-more .button-secondary {
    background: rgba(255, 255, 255, .04);
}

.modules-custom {
    scroll-margin-top: 78px;
}

.modules-custom-panel {
    position: relative;
    display: grid;
    min-height: 470px;
    padding: clamp(36px, 6vw, 74px);
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr);
    align-items: center;
    gap: 50px;
    border: 1px solid rgba(116, 212, 238, .25);
    border-radius: 32px;
    background:
        radial-gradient(circle at 82% 42%, rgba(22, 115, 230, .22), transparent 28%),
        linear-gradient(135deg, rgba(22, 115, 230, .09), rgba(242, 155, 69, .045));
}

.modules-custom-copy {
    position: relative;
    z-index: 2;
}

.modules-custom-copy .eyebrow {
    margin-bottom: 24px;
}

.modules-custom-copy > p:last-of-type {
    max-width: 680px;
    margin-top: 26px;
}

.modules-custom-copy .button {
    margin-top: 32px;
}

.modules-custom-mark {
    position: relative;
    z-index: 1;
    display: flex;
    width: 205px;
    height: 205px;
    margin-inline: auto;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #111;
    border-radius: 48px;
    background: linear-gradient(135deg, var(--mod-cyan), var(--mod-blue) 66%, var(--mod-orange));
    box-shadow: 0 28px 70px rgba(0, 0, 0, .34);
    transform: rotate(5deg);
}

.modules-custom-mark span {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 42px;
    font-weight: 900;
}

.modules-custom-mark small {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.modules-custom-steps {
    display: grid;
    margin-top: 54px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 54px;
}

.modules-custom-steps article {
    position: relative;
    display: flex;
    min-height: 260px;
    padding: clamp(28px, 3vw, 38px);
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.modules-custom-steps article::after {
    position: absolute;
    top: 50%;
    right: -43px;
    display: grid;
    width: 32px;
    height: 32px;
    content: "→";
    place-items: center;
    color: var(--mod-cyan);
    font-size: 22px;
    transform: translateY(-50%);
}

.modules-custom-steps article:last-child::after {
    display: none;
}

.modules-custom-steps article > span {
    color: var(--mod-cyan);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -.08em;
}

.modules-custom-steps article > div {
    margin-top: auto;
}

.modules-custom-steps h3 {
    margin: 34px 0 12px;
    font-size: 21px;
    letter-spacing: -.035em;
}

.modules-custom-steps p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.modules-quality-grid article {
    min-height: 285px;
    padding: clamp(28px, 3.5vw, 40px);
}

.modules-quality-grid h3 {
    margin-top: 46px;
}

.modules-cta-actions {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.modules-cta-actions .button {
    margin-top: 34px;
}

.modules-cta-contact {
    color: #111;
    border-color: rgba(0, 0, 0, .28);
    background: rgba(255, 255, 255, .2);
}

@media (max-width: 980px) {
    .modules-hero-grid,
    .modules-custom-panel {
        grid-template-columns: 1fr;
    }

    .modules-hero {
        min-height: auto;
    }

    .modules-brand-card {
        width: min(100%, 680px);
    }

    .modules-category-grid,
    .modules-product-grid,
    .modules-quality-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modules-category-card:nth-child(5),
    .modules-quality-grid article:last-child {
        grid-column: 1 / -1;
    }

    .modules-custom-mark {
        display: none;
    }

    .modules-custom-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modules-custom-steps article:nth-child(2)::after {
        display: none;
    }

    .modules-custom-steps article:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .modules-hero {
        padding-top: 64px;
    }

    .modules-hero-copy h1 {
        font-size: clamp(3rem, 15vw, 4.8rem);
    }

    .modules-hero-actions,
    .modules-hero-actions .button {
        width: 100%;
    }

    .modules-brand-card {
        border-radius: 20px;
    }

    .modules-brand-card img {
        margin: 48px 0 35px;
    }

    .modules-section-heading,
    .modules-category-grid,
    .modules-product-grid,
    .modules-quality-grid,
    .modules-custom-steps {
        grid-template-columns: 1fr;
    }

    .modules-section-heading {
        gap: 24px;
    }

    .modules-category-card:nth-child(5),
    .modules-quality-grid article:last-child,
    .modules-custom-steps article:last-child {
        grid-column: auto;
    }

    .modules-category-card,
    .modules-product-card,
    .modules-quality-grid article,
    .modules-custom-steps article {
        border-radius: 18px;
    }

    .modules-custom-panel {
        min-height: 0;
        border-radius: 22px;
    }

    .modules-custom-steps {
        gap: 54px;
    }

    .modules-custom-steps article,
    .modules-custom-steps article:last-child {
        min-height: 235px;
        grid-column: auto;
    }

    .modules-custom-steps article::after,
    .modules-custom-steps article:nth-child(2)::after {
        top: auto;
        right: auto;
        bottom: -43px;
        left: 50%;
        display: grid;
        content: "↓";
        transform: translateX(-50%);
    }

    .modules-custom-steps article:last-child::after {
        display: none;
    }

    .modules-cta-actions,
    .modules-cta-actions .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modules-category-card,
    .modules-product-card {
        transition: none;
    }
}
