.er-hero--archive {
    min-height: 519px;
}

.er-hero--archive .er-crumbs {
    margin-bottom: 48px;
}

.er-hero--archive .er-title {
    margin-bottom: 40px;
}

.er-hero--archive .er-title span {
    display: block;
}

.er-hero--archive .er-text {
    max-width: 504px;
}

/*
 * Locations: one row that always fits on desktop, custom select below 1024px.
 * CSS scales font, gap and padding with the viewport, locations.js lowers --er-fit further if the row
 * still does not fit and falls back to the select when the text would become unreadable.
 */
.er-locations {
    --er-fit: 1;

    position: sticky;
    z-index: 40;
    top: var(--er-header-h);
    margin-top: 1px;
    background: var(--er-white);
}

.er-locations__inner {
    position: relative;
    padding-block: 10px;
}

.er-locations__toggle {
    display: none;
}

.er-locations__list {
    display: flex;
    gap: calc(clamp(4px, 0.463vw, 8px) * var(--er-fit));
    width: 100%;
}

.er-locations__list li {
    flex: 1 1 0;
    min-width: max-content;
}

.er-locations__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding-inline: max(4px, calc(clamp(8px, 1.4vw, 24px) * var(--er-fit) * var(--er-fit) * var(--er-fit) * var(--er-fit)));
    border-radius: 1px;
    background: var(--er-semi);
    color: var(--er-blue);
    font-size: calc(clamp(14px, 0.926vw, 16px) * var(--er-fit));
    font-variation-settings: "ROND" 12, "opsz" 64;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background-color var(--er-ease), color var(--er-ease);
}

.er-locations__link[aria-current="page"] {
    background: var(--er-blue);
    color: var(--er-white);
}

.er-locations__link[aria-current="page"]::after {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 16px;
    height: 8px;
    margin-left: -8px;
    background: var(--er-blue);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    content: "";
}

/* Compact state from the design. The margin keeps the page from jumping when the bar shrinks. */
.er-locations.is-stuck:not(.is-select) {
    margin-bottom: 14px;
}

.er-locations.is-stuck:not(.is-select) .er-locations__inner {
    padding-block: 8px;
}

.er-locations.is-stuck:not(.is-select) .er-locations__link {
    height: 38px;
}

/* Custom select */
.er-locations.is-select .er-locations__inner {
    padding-block: 8px;
}

.er-locations.is-select .er-locations__toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 60px;
    padding: 8px 8px 8px 16px;
    border-radius: 4px;
    background: var(--er-blue);
    color: var(--er-white);
    text-align: left;
}

.er-locations__label {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    line-height: 1;
}

.er-locations__caption {
    color: var(--er-line);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.er-locations__current {
    overflow: hidden;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.er-locations__chevron {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background: var(--er-semi);
}

.er-locations__chevron img {
    transform: rotate(90deg) scaleX(-1);
    transition: transform var(--er-ease);
}

.er-locations__toggle[aria-expanded="true"] .er-locations__chevron img {
    transform: rotate(-90deg) scaleX(-1);
}

.er-locations.is-select .er-locations__list {
    position: absolute;
    top: 100%;
    right: var(--er-gutter);
    left: var(--er-gutter);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: auto;
    max-height: var(--er-dropdown-h, 60vh);
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    border: 1px solid var(--er-line);
    border-radius: 6px;
    background: var(--er-white);
    box-shadow: 0 18px 40px -12px rgb(12 27 38 / 28%);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--er-ease), transform var(--er-ease), visibility 0s linear 200ms;
}

.er-locations.is-select.is-open .er-locations__list {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--er-ease), transform var(--er-ease), visibility 0s;
}

.er-locations.is-select li {
    min-width: 0;
}

.er-locations.is-select .er-locations__link {
    justify-content: space-between;
    height: 48px;
    padding-inline: 14px;
    border-radius: 3px;
    font-size: 16px;
}

.er-locations.is-select .er-locations__link[aria-current="page"]::after {
    position: static;
    width: 16px;
    height: 16px;
    margin: 0;
    background: url("../icons/check.svg") center / contain no-repeat;
    clip-path: none;
}

/* Listing */
.er-archive {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(250px, 22vw, 352px);
    gap: clamp(20px, 4.4vw, 76px);
    padding-top: 27px;
    padding-bottom: clamp(56px, 8.74vw, 151px);
}

.er-designers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.er-designer {
    position: relative;
    display: grid;
    grid-template-areas:
        "media head"
        "media body";
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    gap: 12px clamp(18px, 1.62vw, 28px);
    padding: 16px 16px 24px;
    border-radius: 4px;
    background: var(--er-semi);
    box-shadow: inset 0 0 0 1px transparent;
    transition: background-color var(--er-ease), box-shadow var(--er-ease);
}

.er-designer__media {
    grid-area: media;
}

.er-designer__photo {
    display: block;
    overflow: hidden;
    width: 104px;
    height: 104px;
    border-radius: 2px;
}

.er-designer__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.er-designer__photo--top img {
    object-position: 50% 28%;
}

.er-designer__count {
    display: block;
    margin-top: 9px;
    font: 500 12px/1.38 "Montserrat", sans-serif;
    letter-spacing: -0.02em;
    text-align: center;
    text-decoration: underline;
}

.er-designer__head {
    grid-area: head;
    min-width: 0;
}

.er-designer__name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
}

.er-designer__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 8px;
}

.er-proven {
    display: flex;
    align-items: center;
    gap: 1px;
    height: 28px;
    padding: 2px 8px 2px 3px;
    color: var(--er-green);
    font-variation-settings: "ROND" 100;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.er-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}

.er-rating__stars {
    display: flex;
    gap: 4px;
}

.er-rating a {
    font-size: 14px;
    font-variation-settings: "ROND" 100;
    line-height: 1;
    letter-spacing: -0.02em;
    text-decoration: underline;
    white-space: nowrap;
}

.er-designer__body {
    grid-area: body;
    min-width: 0;
}

.er-designer__description {
    padding-right: clamp(0px, 4.5vw, 78px);
}

.er-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.er-tags li {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 11px;
    border: 1px solid var(--er-line);
    border-radius: 26px;
    font-variation-settings: "ROND" 100;
    line-height: 1;
    letter-spacing: -0.02em;
    transition: border-color var(--er-ease);
}

.er-designer__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.er-areas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    padding-block: 2px;
    font-size: 14px;
    line-height: 1;
    letter-spacing: -0.02em;
}

.er-areas__label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.er-areas__item {
    padding: 2px 8px;
    border-radius: 26px;
    background: var(--er-line);
    white-space: nowrap;
    transition: background-color var(--er-ease);
}

.er-profile {
    display: flex;
    align-items: center;
    flex: none;
    gap: 10px;
    height: 42px;
    margin-block: -12px -8px;
    font-variation-settings: "ROND" 100;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.er-profile__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    transition: background-color var(--er-ease);
}

@media (hover: hover) {
    .er-locations__link:not([aria-current="page"]):hover {
        background: var(--er-line);
    }

    .er-designer:hover {
        background: var(--er-white);
        box-shadow: inset 0 0 0 1px var(--er-line);
    }

    .er-designer:hover .er-tags li {
        border-color: var(--er-grey);
    }

    .er-designer:hover .er-areas__item {
        background: var(--er-semi);
    }

    .er-designer:hover .er-profile__icon {
        background: #0c1b26;
    }

    .er-designer:hover .er-profile__icon img {
        filter: brightness(0) invert(1);
    }
}

/* Promo */
.er-archive__aside {
    padding-top: 5px;
}

.er-promo {
    position: sticky;
    top: calc(var(--er-header-h) + 78px);
    display: block;
    width: 100%;
    max-width: 308px;
    height: 440px;
    padding: 3px;
    border: 1px solid var(--er-ink);
    border-radius: 4px;
    background: var(--er-white);
}

.er-promo__frame {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 1px;
    background: var(--er-blue);
}

.er-promo__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.er-promo__frame::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #33475b 0, rgb(11 25 35 / 64%) 31.522%, rgb(15 34 48 / 0%) 78.101%);
    content: "";
}

.er-promo__content {
    position: absolute;
    z-index: 1;
    top: 24px;
    right: 8px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--er-white);
    line-height: 1;
}

.er-promo__title {
    font-size: clamp(21px, 1.7vw, 24px);
    font-variation-settings: "ROND" 12;
    font-weight: 500;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.er-promo__title span {
    display: block;
}

.er-promo__text {
    margin-top: 12px;
    color: var(--er-line);
    letter-spacing: -0.02em;
}

.er-promo__button {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 2px;
    background: var(--er-orange);
    letter-spacing: 0.02em;
}

@media (max-width: 1199px) {
    .er-designer {
        grid-template-areas:
            "media head"
            "body body";
        grid-template-columns: 88px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .er-designer__photo {
        width: 88px;
        height: 88px;
    }

    .er-designer__count {
        margin-top: 6px;
    }

    .er-designer__head {
        align-self: center;
    }

    .er-designer__name {
        line-height: 1.15;
    }

    .er-designer__description {
        padding: 0;
    }

    .er-tags li {
        font-size: 14px;
    }

    .er-designer__foot {
        flex-direction: column;
        align-items: stretch;
        margin-top: 12px;
    }

    .er-profile {
        justify-content: space-between;
        height: 48px;
        margin: 4px 0 0;
        padding: 4px 5px 4px 16px;
        border: 1px solid var(--er-line);
        border-radius: 4px;
        background: var(--er-white);
    }

    .er-profile__icon {
        background: var(--er-semi);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .er-designer__foot {
        flex-direction: row;
        align-items: flex-end;
    }

    .er-profile {
        width: 180px;
    }
}

@media (max-width: 1023px) {
    .er-hero--archive {
        min-height: 0;
    }

    .er-archive {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        padding-top: 12px;
    }

    .er-archive__aside {
        padding: 0;
    }

    .er-promo {
        position: static;
        max-width: none;
        height: 280px;
    }

    .er-promo__video {
        left: auto;
        width: 50%;
        object-position: 50% 68%;
    }

    .er-promo__frame::after {
        left: 50%;
        background: linear-gradient(90deg, #33475b 0, rgb(51 71 91 / 20%) 45%, rgb(15 34 48 / 0%) 100%);
    }

    .er-promo__content {
        top: 50%;
        right: 50%;
        left: 28px;
        transform: translateY(-50%);
    }
}

@media (max-width: 767px) {
    .er-hero--archive .er-crumbs {
        margin-bottom: 24px;
    }

    .er-hero--archive .er-title {
        margin-bottom: 20px;
    }

    .er-locations.is-select .er-locations__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .er-designer {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
        padding: 14px 14px 16px;
    }

    .er-designer__photo {
        width: 76px;
        height: 76px;
    }

    .er-designer__name {
        font-size: 17px;
    }

    .er-designer__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        margin-top: 4px;
    }

    .er-proven {
        height: auto;
        min-height: 24px;
        padding: 0;
        font-size: 14px;
        white-space: normal;
    }

    .er-rating {
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .er-rating__stars {
        gap: 2px;
    }

    .er-rating__stars img {
        width: 16px;
        height: 16px;
    }

    .er-tags {
        gap: 6px;
    }

    .er-tags li {
        padding-inline: 9px;
        font-size: 13px;
    }

    .er-promo {
        height: 420px;
    }

    .er-promo__video {
        left: 0;
        width: 100%;
    }

    .er-promo__frame::after {
        left: 0;
        background: linear-gradient(180deg, #33475b 0, rgb(11 25 35 / 64%) 31.522%, rgb(15 34 48 / 0%) 78.101%);
    }

    .er-promo__content {
        top: 24px;
        right: 12px;
        left: 20px;
        transform: none;
    }
}

/* Without JavaScript the list wraps instead of turning into a select. */
@media (max-width: 1023px) {
    .er-locations:not(.is-select) {
        position: static;
    }

    .er-locations:not(.is-select) .er-locations__list {
        flex-wrap: wrap;
    }
}
