/* TILES 1 */

.tiles-1 {
  background: var(--color-bg);
  background:transparent;
  padding: 0 var(--page-gutter) 2.5rem;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tiles-1__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: var(--page-max);
  margin: 0.85rem auto 0;
  padding-top: 1.75rem;
  overflow: visible;
}

.tiles-1__card {
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: visible;
}

.tiles-1__card[data-accent="blue"] > .flow-shape__bg {
  background: var(--color-blue);
}

.tiles-1__card[data-accent="green"] > .flow-shape__bg {
  background: var(--color-green);
}

.tiles-1__card[data-accent="orange"] > .flow-shape__bg {
  background: var(--color-orange);
}

.tiles-1__card[data-accent="pink"] > .flow-shape__bg {
  background: var(--color-pink);
}

.tiles-1__sticker {
  --sticker-rotate: 0deg;
  --sticker-oy: -22%;
  --sticker-oy: 0%;
  --sticker-w: 64%;
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 auto;
  align-self: center;
  width: var(--sticker-w);
  max-width: calc(100% - 1.2rem);
  margin: 0 auto;
  margin-top: var(--sticker-oy);
  min-height: 0;
  aspect-ratio: 1 / 1;
  transform: rotate(var(--sticker-rotate));
  transform-origin: center center;
}

.tiles-1__sticker > .flow-shape__bg {
  background-color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.tiles-1__card > .tiles-1__sticker > .flow-shape__bg > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.tiles-1__sticker[data-media="1"] {
  --sticker-rotate: -6deg;
  --sticker-oy: -12%;
  --sticker-w: 58%;
  aspect-ratio: 1 / 1;
}
.tiles-1__sticker[data-media="1"] > .flow-shape__bg {
  clip-path: url("#shape-1x1-2");
  -webkit-clip-path: url("#shape-1x1-2");
}

.tiles-1__sticker[data-media="2"] {
  --sticker-rotate: 5deg;
  --sticker-oy: -12%;
  --sticker-w: 53%;
  aspect-ratio: 1 / 1;
}
.tiles-1__sticker[data-media="2"] > .flow-shape__bg {
  clip-path: url("#shape-1x1-3");
  -webkit-clip-path: url("#shape-1x1-3");
}

.tiles-1__sticker[data-media="3"] {
  --sticker-rotate: -3deg;
  --sticker-oy: -22%;
  --sticker-w: 62%;
  aspect-ratio: 1 / 1;
}
.tiles-1__sticker[data-media="3"] > .flow-shape__bg {
  clip-path: url("#shape-1x1-4");
  -webkit-clip-path: url("#shape-1x1-4");
}

.tiles-1__sticker[data-media="4"] {
  --sticker-rotate: 7deg;
  --sticker-oy: -24%;
  --sticker-w: 60%;
  aspect-ratio: 1 / 1;
}
.tiles-1__sticker[data-media="4"] > .flow-shape__bg {
  clip-path: url("#shape-1x1-5");
  -webkit-clip-path: url("#shape-1x1-5");
}

.tiles-1__sticker[data-media="5"],
.tiles-1__sticker[data-media="6"],
.tiles-1__sticker[data-media="7"] {
  --sticker-oy: calc(var(--sticker-w) / -6 + var(--sticker-w) / 20);
  aspect-ratio: 2 / 1;
}

.tiles-1__sticker[data-media="5"] {
  --sticker-rotate: -5deg;
  --sticker-w: 86%;
}
.tiles-1__sticker[data-media="5"] > .flow-shape__bg {
  clip-path: url("#shape-2x1-1");
  -webkit-clip-path: url("#shape-2x1-1");
}

.tiles-1__sticker[data-media="6"] {
  --sticker-rotate: 4deg;
  --sticker-w: 84%;
}
.tiles-1__sticker[data-media="6"] > .flow-shape__bg {
  clip-path: url("#shape-2x1-2");
  -webkit-clip-path: url("#shape-2x1-2");
}

.tiles-1__sticker[data-media="7"] {
  --sticker-rotate: -7deg;
  --sticker-w: 88%;
}
.tiles-1__sticker[data-media="7"] > .flow-shape__bg {
  clip-path: url("#shape-2x1-3");
  -webkit-clip-path: url("#shape-2x1-3");
}

.tiles-1__sticker[data-media="8"] {
  --sticker-rotate: 2deg;
  --sticker-oy: -20%;
  --sticker-w: 58%;
  aspect-ratio: 1 / 1;
}
.tiles-1__sticker[data-media="8"] > .flow-shape__bg {
  clip-path: url("#shape-1x1-1");
  -webkit-clip-path: url("#shape-1x1-1");
}

.tiles-1__card > .flow-shape__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.65rem 0.75rem calc(0.9rem + 10px);
  text-align: center;
  gap: 0;
}

.tiles-1__titles {
  order: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  text-align: center;
  overflow: hidden;
}

.tiles-1__card > .flow-shape__content > .btn-pill {
  order: 2;
  flex-shrink: 0;
  align-self: center;
  width: min(100%, 12rem);
  margin: 0.75rem auto 0;
  background: #fff;
}

.tiles-1__titles > .tiles-1__badge {
  display: block;
  order: 1;
  font-weight: 900;
  font-size: calc(var(--text-subheading) * 0.9);
  line-height: var(--text-subheading-line);
  text-wrap: balance;
  text-align: center;
  max-width: 95%;
}

.tiles-1__titles > .tiles-1__tagline {
  order: 2;
  margin: 0;
  font-size: calc(var(--text-script) * 0.9);
  line-height: var(--text-script-line);
  text-wrap: balance;
  text-align: center;
}

.tiles-1__titles > .tiles-1__tagline.script-title,
.tiles-1__card[data-template="3"] .tiles-1__titles > .tiles-1__badge {
  line-height: var(--text-script-line);
}

.script-title {
  font-family: var(--font-script);
}
.tiles-1__sub {
  display: block;
  margin-top: 0.15rem;
  font-size: var(--text-p-smaller);
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.tiles-1__card[data-template="1"] .tiles-1__titles > .tiles-1__badge {
  color: #111;
}

.tiles-1__card[data-template="1"] .tiles-1__titles > .tiles-1__tagline {
  color: #fff;
}

.tiles-1__card[data-template="2"] .tiles-1__titles > .tiles-1__badge {
  display: none;
}

.tiles-1__card[data-template="2"] .tiles-1__titles > .tiles-1__tagline {
  color: #fff;
}

.tiles-1__card[data-template="3"] .tiles-1__titles > .tiles-1__badge {
  order: 1;
  color: #fff;
  font-family: var(--font-script);
  font-weight: var(--text-script-weight);
  font-size: calc(var(--text-script) * 0.9);
  line-height: var(--text-script-line);
}

.tiles-1__card[data-template="3"] .tiles-1__titles > .tiles-1__tagline {
  order: 2;
  color: #111;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: calc(var(--text-subheading) * 0.9);
  line-height: var(--text-subheading-line);
}


/* CONTAINERS 1 */

@container page (min-width: 768px) {
  .tiles-1__inner {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
  }

  .tiles-1__card > .flow-shape__content {
    padding: 0.75rem 0.9rem calc(1rem + 10px);
  }
}

@container page (min-width: 1200px) {
  .tiles-1 {
    padding-bottom: 3.25rem;
    overflow-x: visible;
  }

  .tiles-1__inner {
    margin-top: -3.75rem;
    position: relative;
    z-index: 2;
    padding: 1.75rem 1.25rem 0;
    gap: 1rem;
  }

  .tiles-1__card > .flow-shape__bg {
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.28));
  }
}

@container page (max-width: 1199px) {
  .page-shell > .tiles-1 {
    overflow-x: auto;
  }

  .tiles-1 .tiles-1__inner {
    width: 58rem;
    max-width: none;
    min-width: 58rem;
    grid-template-columns: repeat(4, minmax(13.25rem, 1fr));
    padding-right: var(--page-gutter);
  }

  .tiles-1__card {
    min-width: 13.25rem;
  }

  .tiles-1__titles > .tiles-1__badge,
  .tiles-1__card[data-template="3"] .tiles-1__titles > .tiles-1__tagline {
    font-size: clamp(0.8rem, 3.2cqi, calc(var(--text-subheading) * 0.9));
  }

  .tiles-1__titles > .tiles-1__tagline,
  .tiles-1__card[data-template="3"] .tiles-1__titles > .tiles-1__badge {
    font-size: clamp(0.85rem, 3.4cqi, calc(var(--text-script) * 0.9));
  }
}
