.home-brands {
  --home-brands-ink: #1a1510;
  --home-brands-muted: #74695e;
  --home-brands-bronze: #986f3d;
  --home-brands-border: rgba(65, 50, 37, 0.13);
  --home-brands-ivory: #fcfaf6;
  --home-brands-surface: #f7f0e7;
  --home-brands-media: #e9dfd3;
  position: relative;
  scroll-margin-top: 120px;
  padding: 104px 0;
  background: var(--home-brands-ivory);
  color: var(--home-brands-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.home-brands *,
.home-brands *::before,
.home-brands *::after {
  box-sizing: border-box;
}

.home-brands__inner {
  width: min(1312px, calc(100% - 96px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 32px;
  align-items: end;
}

.home-brands__header {
  min-width: 0;
  max-width: 680px;
}

.home-brands__eyebrow,
.home-brands__title,
.home-brands__intro,
.home-brands__label,
.home-brands__copy,
.home-brands__expertise,
.home-brands__brand-body p,
.home-brands__index p {
  margin: 0;
}

.home-brands__eyebrow {
  margin-bottom: 12px;
  color: var(--home-brands-bronze);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.16em;
}

.home-brands__title {
  color: var(--home-brands-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(36px, 2.8vw, 40px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.home-brands__intro {
  margin-top: 12px;
  color: var(--home-brands-muted);
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.6;
}

.home-brands__all {
  color: var(--home-brands-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  text-decoration: none;
}

.home-brands__all {
  min-height: 44px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.3;
}

.home-brands__all span,
.home-brands__cta span {
  transition: transform 200ms ease;
}

.home-brands__all:hover span,
.home-brands__featured:hover .home-brands__cta span,
.home-brands__brand-card:hover .home-brands__cta span {
  transform: translateX(4px);
}

.home-brands__all:focus-visible,
.home-brands__index a:focus-visible {
  outline: 2px solid var(--home-brands-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.home-brands__layout {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 790px) minmax(420px, 1fr);
  gap: 20px;
}

.home-brands__featured,
.home-brands__brand-card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--home-brands-border);
  background: var(--home-brands-surface);
  transition: border-color 200ms ease, background-color 200ms ease;
}

.home-brands__featured {
  height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 420px) minmax(0, 190px);
  overflow: hidden;
  border-radius: 20px;
}

.home-brands__featured-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--home-brands-media);
  isolation: isolate;
}

.home-brands__editorial-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-brands__editorial-image--beauty-of-joseon {
  object-position: 50% 44%;
}

.home-brands__editorial-image--cosrx {
  object-position: 50% 48%;
}

.home-brands__editorial-image--anua {
  object-position: 50% 49%;
}

.home-brands__editorial-image--torriden {
  object-position: 50% 51%;
}

.home-brands__media-fallback {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  place-items: center;
  color: rgba(49, 39, 30, 0.34);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.home-brands img.is-image-error {
  display: none;
}

.home-brands__featured-media.is-media-error .home-brands__media-fallback,
.home-brands__brand-media.is-media-error .home-brands__media-fallback {
  display: grid;
}

.home-brands__featured-body {
  position: static;
  min-width: 0;
  padding: 22px 30px;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) auto;
  grid-template-rows: repeat(4, auto);
  align-content: center;
  align-items: center;
  column-gap: 24px;
  row-gap: 4px;
  background: #f8f2ea;
}

.home-brands__logo {
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.home-brands__logo img {
  display: block;
  max-width: 100%;
  object-fit: contain;
}

.home-brands__logo--featured {
  width: 122px;
  height: 62px;
  margin: 0;
  grid-column: 1;
  grid-row: 1 / 5;
}

.home-brands__logo--featured img {
  width: 122px;
  height: 62px;
}

.home-brands__logo-fallback {
  display: none;
  color: var(--home-brands-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.home-brands__logo.is-logo-error img,
.home-brands__index a.is-logo-error img {
  display: none;
}

.home-brands__logo.is-logo-error .home-brands__logo-fallback,
.home-brands__index a.is-logo-error .home-brands__logo-fallback {
  display: block;
}

.home-brands__label {
  grid-column: 2;
  grid-row: 1;
  color: var(--home-brands-bronze);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.13em;
}

.home-brands__featured-body h3 {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: var(--home-brands-ink);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 29px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.home-brands__copy {
  grid-column: 2;
  grid-row: 3;
  max-width: 48ch;
  margin-top: 2px;
  color: #5f554b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.62;
}

.home-brands__expertise {
  grid-column: 2;
  grid-row: 4;
  margin-top: 2px;
  color: #675847;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.home-brands__cta {
  position: static;
  z-index: 4;
  min-height: 44px;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--home-brands-ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.home-brands__featured-body > .home-brands__cta {
  grid-column: 3;
  grid-row: 1 / 5;
  align-self: center;
  margin-top: 0;
  white-space: nowrap;
}

.home-brands__card-link {
  position: absolute;
  z-index: 5;
  inset: 0;
  border-radius: inherit;
}

.home-brands__supporting {
  min-width: 0;
  height: 610px;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
}

.home-brands__supporting > li {
  min-width: 0;
  min-height: 0;
}

.home-brands__brand-card {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 58%);
  overflow: hidden;
  border-radius: 16px;
}

.home-brands__brand-media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #ece3d8;
}

.home-brands__brand-card--cosrx .home-brands__brand-media {
  background: #e8e9e5;
}

.home-brands__brand-card--anua .home-brands__brand-media {
  background: #e8e4d8;
}

.home-brands__brand-card--torriden .home-brands__brand-media {
  background: #e4eaE7;
}

.home-brands__brand-body {
  position: static;
  min-width: 0;
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #faf6ef;
}

.home-brands__logo--cosrx {
  width: 104px;
  height: 24px;
}

.home-brands__logo--anua,
.home-brands__logo--torriden {
  width: 94px;
  height: 38px;
}

.home-brands__logo--cosrx img,
.home-brands__logo--anua img,
.home-brands__logo--torriden img {
  width: 100%;
  height: 100%;
}

.home-brands__logo--anua img {
  transform: scale(1.18);
}

.home-brands__brand-body p {
  margin-top: 12px;
  color: #655b50;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.home-brands__cta--compact {
  min-height: 44px;
  margin-top: auto;
  font-size: 11.5px;
}

.home-brands__featured:has(.home-brands__card-link:focus-visible),
.home-brands__brand-card:has(.home-brands__card-link:focus-visible) {
  outline: 2px solid var(--home-brands-ink);
  outline-offset: 3px;
}

.home-brands__card-link:focus-visible {
  outline: none;
}

.home-brands__index {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 28px;
  padding: 12px 16px 12px 22px;
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1.55fr);
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(65, 50, 37, 0.1);
  border-radius: 14px;
  background: #f2eae0;
}

.home-brands__index p {
  color: #7a6a59;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.home-brands__index ul {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
}

.home-brands__index li {
  min-width: 0;
  border-left: 1px solid rgba(65, 50, 37, 0.1);
}

.home-brands__index a {
  min-width: 0;
  min-height: 64px;
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--home-brands-ink);
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.home-brands__index img {
  display: block;
  width: auto;
  max-width: 142px;
  height: 28px;
  object-fit: contain;
  opacity: 0.68;
  filter: grayscale(1) contrast(1.05);
  transition: opacity 180ms ease, filter 180ms ease;
}

.home-brands__index li:nth-child(2) img {
  height: 42px;
  max-width: 112px;
}

.home-brands__index li:nth-child(3) img {
  height: 30px;
  max-width: 118px;
}

.home-brands__index li:nth-child(4) img {
  height: 24px;
  max-width: 154px;
}

.home-brands__skeleton {
  display: block;
  border: 1px solid rgba(65, 50, 37, 0.08);
  border-radius: 16px;
  background: #eee6dc;
}

.home-brands__skeleton--featured {
  height: 610px;
  border-radius: 20px;
}

.home-brands__skeleton--supporting {
  height: 191px;
}

.home-brands__skeleton--index {
  height: 90px;
  border-radius: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .home-brands__featured:hover,
  .home-brands__brand-card:hover {
    border-color: rgba(65, 50, 37, 0.25);
  }

  .home-brands__featured:hover .home-brands__editorial-image,
  .home-brands__brand-card:hover .home-brands__editorial-image {
    transform: scale(1.018);
  }

  .home-brands__index a:hover {
    background: rgba(255, 253, 249, 0.54);
  }

  .home-brands__index a:hover img {
    opacity: 1;
    filter: none;
  }
}

.home-brands__featured:active,
.home-brands__brand-card:active {
  background: #f0e7dc;
  transition-duration: 80ms;
}

@media (max-width: 1199px) {
  .home-brands {
    padding: 96px 0;
  }

  .home-brands__inner {
    width: min(1120px, calc(100% - 64px));
  }

  .home-brands__layout {
    grid-template-columns: 1fr;
  }

  .home-brands__featured {
    height: 560px;
    grid-template-rows: minmax(0, 370px) minmax(0, 190px);
  }

  .home-brands__supporting {
    height: 214px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 16px;
  }

  .home-brands__skeleton--featured {
    height: 560px;
  }

  .home-brands__skeleton--supporting {
    height: 214px;
  }

  .home-brands__brand-card {
    grid-template-columns: minmax(0, 40%) minmax(0, 60%);
  }

  .home-brands__brand-body {
    padding: 18px 16px 16px;
  }

  .home-brands__brand-body p {
    font-size: 12.5px;
  }

  .home-brands__cta--compact {
    font-size: 10.5px;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  .home-brands__inner {
    width: calc(100% - 48px);
  }

  .home-brands__featured {
    height: 550px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 360px) minmax(0, 190px);
  }

  .home-brands__skeleton--featured {
    height: 550px;
    aspect-ratio: auto;
  }

  .home-brands__skeleton--supporting {
    height: 204px;
  }

  .home-brands__supporting {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, 204px);
  }

  .home-brands__supporting > li:last-child {
    grid-column: 1 / -1;
  }

  .home-brands__supporting > li:last-child .home-brands__brand-card {
    grid-template-columns: minmax(0, 30%) minmax(0, 70%);
  }

  .home-brands__index {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .home-brands__index a {
    padding-inline: 18px;
  }
}

@media (max-width: 767px) {
  .home-brands {
    scroll-margin-top: 86px;
    padding: 64px 0 68px;
  }

  .home-brands__inner {
    width: calc(100% - 32px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .home-brands__header,
  .home-brands__all,
  .home-brands__layout,
  .home-brands__index {
    grid-column: 1;
  }

  .home-brands__title {
    font-size: clamp(28px, 8.2vw, 32px);
    line-height: 1.12;
  }

  .home-brands__intro {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.55;
  }

  .home-brands__all {
    grid-row: 4;
    margin-top: 24px;
    justify-self: start;
    justify-content: flex-start;
    font-size: 13px;
  }

  .home-brands__layout {
    grid-row: 2;
    margin-top: 30px;
    display: block;
  }

  .home-brands__featured {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
  }

  .home-brands__skeleton--featured {
    height: auto;
    aspect-ratio: 0.66;
  }

  .home-brands__skeleton--supporting {
    height: 258px;
  }

  .home-brands__featured-media {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .home-brands__featured-body {
    min-height: 292px;
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .home-brands__logo--featured {
    width: 94px;
    height: 48px;
    margin-bottom: 18px;
    display: flex;
  }

  .home-brands__featured-body > .home-brands__cta {
    margin-top: auto;
    white-space: normal;
  }

  .home-brands__logo--featured img {
    width: 94px;
    height: 48px;
  }

  .home-brands__featured-body h3 {
    margin-top: 9px;
    font-size: 24px;
  }

  .home-brands__copy {
    margin-top: 11px;
    font-size: 13.5px;
    line-height: 1.55;
  }

  .home-brands__expertise {
    margin-top: 13px;
    font-size: 10px;
  }

  .home-brands__supporting {
    width: calc(100% + 16px);
    height: auto;
    margin-top: 24px;
    margin-right: -16px;
    padding: 3px 16px 6px 0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-brands__supporting::-webkit-scrollbar,
  .home-brands__index ul::-webkit-scrollbar {
    display: none;
  }

  .home-brands__supporting > li {
    flex: 0 0 min(340px, 82vw);
    height: 258px;
    scroll-snap-align: start;
  }

  .home-brands__brand-card {
    grid-template-columns: minmax(0, 48%) minmax(0, 52%);
    border-radius: 14px;
  }

  /* height:100% on the image resolved to auto here, so the picture stopped at
     its intrinsic ratio and left the media panel's background showing as a
     cream band under it. Pinning the image to the (position:relative) media box
     gives it a definite height whatever the ratio is. */
  .home-brands__brand-media {
    align-self: stretch;
  }

  .home-brands__brand-media .home-brands__editorial-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .home-brands__brand-body {
    padding: 18px 16px 16px;
  }

  .home-brands__brand-body p {
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.45;
  }

  .home-brands__cta--compact {
    font-size: 11px;
  }

  .home-brands__index {
    grid-row: 3;
    margin-top: 26px;
    padding: 16px 0 12px 16px;
    display: block;
    overflow: hidden;
  }

  .home-brands__index p {
    margin-bottom: 8px;
  }

  .home-brands__index ul {
    display: flex;
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .home-brands__index li {
    flex: 0 0 174px;
    border-left: 0;
    border-right: 1px solid rgba(65, 50, 37, 0.1);
    scroll-snap-align: start;
  }

  .home-brands__index a {
    min-height: 64px;
    padding: 9px 22px;
  }
}

@media (max-width: 359px) {
  .home-brands__inner {
    width: calc(100% - 28px);
  }

  .home-brands__featured-body {
    padding-inline: 17px;
  }

  .home-brands__supporting {
    width: calc(100% + 14px);
    margin-right: -14px;
    padding-right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-brands__featured,
  .home-brands__brand-card,
  .home-brands__editorial-image,
  .home-brands__all span,
  .home-brands__cta span,
  .home-brands__index a,
  .home-brands__index img {
    transition: none;
  }

  .home-brands__featured:hover .home-brands__editorial-image,
  .home-brands__brand-card:hover .home-brands__editorial-image,
  .home-brands__all:hover span,
  .home-brands__featured:hover .home-brands__cta span,
  .home-brands__brand-card:hover .home-brands__cta span {
    transform: none;
  }
}
