/* Five photographed models share a studio floor and a different colour field. */
[data-studio="cars"] {
  --wall: #b8b5a5;
  --sun: #eeecd9;
  --floor: #c7c8b6;
}
[data-studio="bikes"] {
  --wall: #bd9184;
  --sun: #eed6c2;
  --floor: #d6ad98;
}
[data-studio="jeeps"] {
  --wall: #849e90;
  --sun: #c5d3bf;
  --floor: #a8bbac;
}
[data-studio="scooters"] {
  --wall: #354d4c;
  --sun: #889e93;
  --floor: #526c68;
}
[data-studio="rockers-riders"] {
  --wall: #cab274;
  --sun: #f0e3b5;
  --floor: #e0ca93;
}
.ty-category .ty-card-image[data-studio],
.collection-cover__picture[data-studio] {
  isolation: isolate;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 80% -10%, var(--sun), transparent 71%),
    linear-gradient(180deg, var(--wall) 0%, var(--wall) 47%, var(--floor) 72%, var(--sun) 122%);
}
[data-studio]::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(116deg, transparent 16%, rgba(255,255,242,.14) 19%, rgba(255,255,242,.14) 31%, transparent 35%),
    linear-gradient(116deg, transparent 38%, rgba(255,255,246,.13) 41%, rgba(255,255,246,.13) 46%, transparent 51%);
  mask-image: linear-gradient(165deg, #000 5%, #0009 67%, transparent 87%);
  pointer-events: none;
}
.collection-cover__picture[data-studio]::after {
  content: none;
}
.ty-category .ty-card-image[data-studio] img {
  position: absolute;
  inset: auto var(--vehicle-right, 4%) var(--vehicle-bottom, 5%) auto;
  z-index: 1;
  width: var(--vehicle-width, 82%);
  height: var(--vehicle-height, 77%);
  object-fit: contain;
  object-position: right bottom;
  transform: none;
}

.ty-categories-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.24vw, 22px);
}
.ty-category {
  min-width: 0;
  display: grid;
  grid-column: span 2;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--ty-card-radius);
  color: #18261e;
}
.ty-category:nth-child(-n+2) { grid-column: span 3; }
.ty-category > * { grid-area: 1/1; }
.ty-category .ty-card-image[data-studio] {
  width: 100%;
  aspect-ratio: 1.49;
  border-radius: 0;
}
.ty-category:nth-child(-n+2) .ty-card-image { aspect-ratio: 1.98; }
.ty-category .ty-card-image[data-studio="cars"] {
  --vehicle-height: 85%; --vehicle-width: 79%; --vehicle-right: 10%; --vehicle-bottom: 6%;
}
.ty-category .ty-card-image[data-studio="bikes"] {
  --vehicle-height: 82%; --vehicle-width: 76%; --vehicle-right: 9%; --vehicle-bottom: 6%;
}
.ty-category .ty-card-image[data-studio="rockers-riders"] {
  --vehicle-height: 78%; --vehicle-right: 9%; --vehicle-bottom: 6%;
}
.ty-category .ty-cat-foot {
  position: relative;
  z-index: 2;
  align-self: stretch;
  align-items: start;
  padding: clamp(17px, 1.7vw, 30px);
  margin: 0;
  pointer-events: none;
}
.ty-category .ty-cat-foot h3 {
  color: #18261e;
  font-size: clamp(22px, 2.25vw, 38px);
  line-height: 1.04;
  font-weight: 570;
  letter-spacing: -.06em;
}
.ty-category .ty-cat-foot div > span {
  margin: 5px 0 0;
  color: #354238;
  font-size: clamp(11px, .83vw, 14px);
}
.ty-category .ty-card-arrow {
  position: absolute;
  left: clamp(12px, 1.7vw, 30px);
  bottom: clamp(12px, 1.7vw, 30px);
  display: grid;
  width: 31px;
  height: 31px;
  align-self: start;
  color: #1b2920;
  border: 1px solid rgba(21,37,27,.35);
  background: rgba(255,255,242,.12);
}
.ty-category:focus-visible { outline: 3px solid var(--ty-green); outline-offset: 3px; }
.ty-category.ty-branded-image {
  --ty-image-mark-ground: transparent;
}
.ty-category .ty-cat-foot > div {
  max-width: calc(100% - clamp(23px, 2vw, 38px));
}

.collection-cover__picture[data-studio] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  --ty-image-mark-ground: transparent;
  gap: clamp(6px, .65vw, 10px);
  padding: clamp(22px, 2vw, 32px) clamp(16px, 2.2vw, 34px) clamp(10px, 1.2vw, 18px);
  background: var(--studio-surface);
}
.collection-cover__picture[data-studio="cars"] {
  --studio-surface: radial-gradient(ellipse at 58% 32%, #f1dfc5, transparent 72%),
    linear-gradient(155deg, #cda980, #ddbe98 68%, #d0af8c);
}
.collection-cover__picture[data-studio="bikes"] {
  --studio-surface: radial-gradient(ellipse at 57% 32%, #f4deca, transparent 72%),
    linear-gradient(155deg, #c69e88, #e0bea4 68%, #d1af94);
}
.collection-cover__picture[data-studio="rockers-riders"] {
  --studio-surface: radial-gradient(ellipse at 57% 32%, #f6e8ca, transparent 72%),
    linear-gradient(155deg, #d2b78f, #e6cfab 68%, #d5ba94);
}
.collection-cover__picture[data-studio]::before {
  content: none;
}
.collection-cover__subject {
  display: contents;
}
.collection-cover__picture[data-studio] .collection-cover__subject {
  display: block;
  position: relative;
  min-width: 0;
  min-height: 0;
}
.collection-cover__picture[data-studio] img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}
.collection-cover__picture[data-studio] .collection-cover__caption {
  position: relative;
  inset: auto;
  justify-self: end;
  align-self: end;
  max-width: 100%;
  z-index: 2;
  color: #203326;
  border-radius: 100px;
  background: rgba(250,248,238,.91);
  padding: .3em .8em;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ty-category:hover .ty-card-arrow { background: #edf2cf; border-color: #697760; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .ty-category .ty-cat-foot { padding: 14px; }
  .ty-category .ty-cat-foot h3 { font-size: clamp(19px, 2.5vw, 23px); }
  .ty-category .ty-card-arrow { width: 24px; height: 24px; }
}
@media (max-width: 640px) {
  .ty-categories-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .ty-category,.ty-category:nth-child(-n+2) { grid-column: span 1; }
  .ty-category:first-child { grid-column: 1/-1; }
  .ty-category .ty-card-image[data-studio] { aspect-ratio: .94; --vehicle-height: min(72%, calc(100% - 58px)); --vehicle-width: 86%; --vehicle-right: 7%; --vehicle-bottom: 8%; }
  .ty-category:first-child .ty-card-image[data-studio] { aspect-ratio: 1.95; --vehicle-height: 82%; --vehicle-width: 77%; --vehicle-right: 3%; }
  .ty-category .ty-card-image[data-studio="rockers-riders"] { --vehicle-width: 86%; --vehicle-right: 7%; }
  .ty-category .ty-card-image[data-studio="rockers-riders"] { --vehicle-height: min(62%, calc(100% - 70px)); }
  .ty-category .ty-cat-foot { padding: 13px 12px; }
  .ty-category .ty-cat-foot h3 { font-size: clamp(17px, 4.45vw, 25px); }
  .ty-category .ty-cat-foot div > span { font-size: 11px; margin-top: 3px; }
  .ty-category .ty-card-arrow { width: 23px; height: 23px; left: 10px; bottom: 9px; }
  .ty-category .ty-card-arrow .ty-icon { width: 12px; height: 12px; }
  .ty-category:first-child .ty-cat-foot h3 { font-size: clamp(25px,7vw,32px); }
  .collection-cover__picture[data-studio] {
    padding: 22px clamp(12px, 3vw, 18px) 9px;
    gap: 6px;
  }
  .collection-cover__picture[data-studio] .collection-cover__caption {
    justify-self: center;
    line-height: 1.22;
  }
}

/* These two studio photographs include their original floor and shadows.
   Feather only the empty margins. Both placements use the same lighting. */
[data-studio="jeeps"] {
  --studio-surface:
    linear-gradient(110deg, #ae795133, transparent 63%, #f3c9a12b),
    linear-gradient(#bd8a63, #d6a279 48%, #deb18c 76%, #d1a582);
  --studio-side-mask: linear-gradient(to right, transparent, black 7%, black 95%, transparent);
  --studio-floor-mask: linear-gradient(to bottom, transparent, black 12%, black 94%, transparent);
  --studio-detail-mask: radial-gradient(ellipse 80% 76% at 50% 55%, black 68%, transparent);
}
[data-studio="scooters"] {
  --studio-surface:
    radial-gradient(ellipse at 53% 38%, #efcba3, transparent 72%),
    linear-gradient(#c99c73, #d8ad86 55%, #d7b497);
  --studio-side-mask: linear-gradient(to right, transparent, black 21%, black 80%, transparent);
  --studio-floor-mask: linear-gradient(to bottom, transparent, black 11%, black 90%, transparent);
  /* The source carries a small mark. Use the fixed corner mark in both layouts. */
  --studio-detail-mask: radial-gradient(ellipse 15% 15% at 93% 5%, transparent 64%, black);
}
.ty-card-image:is([data-studio="jeeps"], [data-studio="scooters"])::before {
  content: none;
}
:is(.ty-category .ty-card-image, .collection-cover__picture):is([data-studio="jeeps"], [data-studio="scooters"]) img {
  mask-image: var(--studio-side-mask), var(--studio-floor-mask), var(--studio-detail-mask);
  mask-composite: intersect;
}

.ty-category .ty-card-image:is([data-studio="jeeps"], [data-studio="scooters"]) {
  background: var(--studio-surface);
  container-type: size;
}
.ty-category .ty-card-image:is([data-studio="jeeps"], [data-studio="scooters"]) img {
  /* Match the floor line of the neighbouring cutouts. Keep the photo in ratio. */
  inset: auto 8% 3% auto;
  width: min(80cqw, 129cqh);
  height: auto;
}
.ty-category .ty-card-image[data-studio="scooters"] img {
  right: 0;
  width: min(100cqw, 127cqh);
}

.collection-cover__picture:is([data-studio="jeeps"], [data-studio="scooters"]) {
  padding: clamp(8px, 1.1vw, 16px);
  gap: 0;
}
.collection-cover__picture:is([data-studio="jeeps"], [data-studio="scooters"]) .collection-cover__subject {
  container-type: size;
  display: grid;
  place-items: center;
}
.collection-cover__picture:is([data-studio="jeeps"], [data-studio="scooters"]) img {
  position: static;
  width: min(100cqw, 133.333cqh);
  height: auto;
  transform: none;
}

@media (max-width: 640px) {
  .ty-category .ty-card-image[data-studio="scooters"] img {
    inset: auto 0 4%;
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  /* Give the three smaller cards a clear heading band at tablet widths. */
  .ty-category:nth-child(n+3) .ty-card-image[data-studio] {
    aspect-ratio: 1.18;
    --vehicle-height: min(71%, calc(100% - 58px));
    --vehicle-right: 6%;
  }
  .ty-category .ty-card-image[data-studio="scooters"] img {
    width: min(100cqw, 111cqh);
  }
}
