.bates-home-pillars,
.bates-home-cooperation {
    box-sizing: border-box;
    overflow: clip;
}

.bates-home-pillars *,
.bates-home-pillars *::before,
.bates-home-pillars *::after,
.bates-home-cooperation *,
.bates-home-cooperation *::before,
.bates-home-cooperation *::after {
    box-sizing: border-box;
}

.bates-home-pillars {
    --pillars-navy: #13203c;
    --pillars-blue: #2457a7;
    --pillars-yellow: #f3bf2f;
    padding-block: clamp(64px, 8vw, 104px);
    background: #fff;
}

.bates-home-pillars__header {
    width: min(760px, 100%);
    margin: 0 auto clamp(30px, 4vw, 46px);
    text-align: center;
}

.bates-home-pillars__header h2 {
    margin: 9px 0 14px;
    color: var(--pillars-navy);
    font-size: clamp(2rem, 4.4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.bates-home-pillars__header p {
    max-width: 690px;
    margin: 0 auto;
    color: #5b687e;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.68;
}

.bates-home-pillars__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    min-width: 0;
}

.bates-home-pillar {
    display: flex;
    grid-column: span 2;
    min-width: 0;
    min-height: 284px;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 2.7vw, 34px);
    border: 1px solid #dce3ee;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(19, 32, 60, .06);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bates-home-pillar:nth-child(4),
.bates-home-pillar:nth-child(5) {
    grid-column: span 3;
    min-height: 246px;
}

.bates-home-pillar:hover {
    transform: translateY(-4px);
    border-color: #b9c8dd;
    box-shadow: 0 18px 42px rgba(19, 32, 60, .1);
}

.bates-home-pillar--primary {
    border-color: #1f386c;
    background: linear-gradient(145deg, #13203c, #1d3975);
    color: #fff;
}

.bates-home-pillar--portal {
    background: linear-gradient(145deg, #f3f7ff, #fff);
}

.bates-home-pillar__number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #edf3fc;
    color: var(--pillars-blue);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .05em;
}

.bates-home-pillar--primary .bates-home-pillar__number {
    background: var(--pillars-yellow);
    color: var(--pillars-navy);
}

.bates-home-pillar h3 {
    margin: 0 0 10px;
    color: var(--pillars-navy);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.2;
    letter-spacing: -.02em;
}

.bates-home-pillar--primary h3 { color: #fff; }

.bates-home-pillar p {
    margin: 0;
    color: #667287;
    line-height: 1.6;
}

.bates-home-pillar--primary p { color: #d8e1f1; }

.bates-home-pillar__links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 20px;
}

.bates-home-pillar__link,
.bates-home-pillar__links a {
    align-self: flex-start;
    color: var(--pillars-blue);
    font: inherit;
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
}

.bates-home-pillar--primary .bates-home-pillar__links a { color: var(--pillars-yellow); }

.bates-home-pillar__button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.bates-home-pillar__link:hover,
.bates-home-pillar__links a:hover { text-decoration: underline; }

.bates-home-pillar__link:focus-visible,
.bates-home-pillar__links a:focus-visible {
    outline: 3px solid rgba(36, 87, 167, .3);
    outline-offset: 4px;
    border-radius: 3px;
}

.bates-home-pillars__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px 28px;
    margin-top: clamp(28px, 4vw, 42px);
}

.bates-home-pillars__footer p { margin: 0; color: #667287; }

.bates-home-cooperation {
    --cooperation-navy: #13203c;
    --cooperation-yellow: #f3bf2f;
    position: relative;
    padding-block: clamp(64px, 8vw, 104px);
    background:
        radial-gradient(circle at 92% 4%, rgba(55, 95, 176, .32), transparent 30%),
        linear-gradient(145deg, #101c37, #172c59 62%, #1d3975);
    color: #fff;
}

.bates-home-cooperation__header {
    max-width: 780px;
    margin-bottom: clamp(34px, 5vw, 54px);
}

.bates-home-cooperation__header h2 {
    margin: 9px 0 14px;
    color: #fff;
    font-size: clamp(2rem, 4.4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.bates-home-cooperation__header p {
    max-width: 720px;
    margin: 0;
    color: #d3dced;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.68;
}

.bates-home-cooperation__steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bates-home-cooperation__step {
    position: relative;
    display: grid;
    min-width: 0;
    align-content: start;
    gap: 22px;
    padding: 0 clamp(18px, 2.4vw, 30px);
}

.bates-home-cooperation__step:first-child { padding-left: 0; }
.bates-home-cooperation__step:last-child { padding-right: 0; }

.bates-home-cooperation__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -2px;
    width: calc(100% - 70px);
    height: 1px;
    transform: translateX(50%);
    background: linear-gradient(90deg, rgba(243, 191, 47, .7), rgba(255, 255, 255, .18));
}

.bates-home-cooperation__number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(243, 191, 47, .72);
    border-radius: 50%;
    background: var(--cooperation-navy);
    color: var(--cooperation-yellow);
    font-size: .8rem;
    font-weight: 900;
}

.bates-home-cooperation__step h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    line-height: 1.3;
}

.bates-home-cooperation__step p {
    margin: 0;
    color: #c7d2e7;
    font-size: .92rem;
    line-height: 1.6;
}

.bates-home-cooperation__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px 28px;
    margin-top: clamp(38px, 5vw, 58px);
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.bates-home-cooperation__footer p { margin: 0; color: #d3dced; }
.bates-home-cooperation__footer strong { color: #fff; }

@media (max-width: 920px) {
    .bates-home-pillars__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bates-home-pillar,
    .bates-home-pillar:nth-child(4),
    .bates-home-pillar:nth-child(5) { grid-column: span 1; min-height: 250px; }
    .bates-home-pillar:last-child { grid-column: 1 / -1; min-height: 220px; }

    .bates-home-cooperation__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 24px; }
    .bates-home-cooperation__step,
    .bates-home-cooperation__step:first-child,
    .bates-home-cooperation__step:last-child { padding: 0; }
    .bates-home-cooperation__step:not(:last-child)::after { display: none; }
}

@media (max-width: 640px) {
    .bates-home-pillars,
    .bates-home-cooperation { padding-block: 54px; }
    .bates-home-pillars__grid,
    .bates-home-cooperation__steps { grid-template-columns: minmax(0, 1fr); }
    .bates-home-pillar,
    .bates-home-pillar:nth-child(4),
    .bates-home-pillar:nth-child(5),
    .bates-home-pillar:last-child { grid-column: auto; min-height: 0; }
    .bates-home-pillar { gap: 20px; padding: 24px 20px; border-radius: 18px; }
    .bates-home-pillars__footer,
    .bates-home-cooperation__footer { align-items: stretch; flex-direction: column; }
    .bates-home-pillars__footer { text-align: center; }
    .bates-home-pillars__footer .button,
    .bates-home-cooperation__footer .button { width: 100%; }
    .bates-home-cooperation__steps { gap: 0; }
    .bates-home-cooperation__step { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 0 0 28px; }
    .bates-home-cooperation__step:last-child { padding-bottom: 0; }
    .bates-home-cooperation__number { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .bates-home-pillar { transition: none; }
    .bates-home-pillar:hover { transform: none; }
}
