/* ============================================
   YOLI STUDIO — BANNER
   Rotating slides from a Studio banner placement.
   Slides stack in ONE grid cell so the banner is as tall as its tallest slide (no jumping).
   Per-slide look comes from the feed as data attributes (tone, shade, align, buttonStyle, layout)
   and the accent color as --ysb-accent.
   ============================================ */

.ysb { display: block; }
.ysb[hidden] { display: none; }
.ysb__inner {
  width: 100%;
  margin-inline: auto;
  max-width: var(--ysb-max, 1440px);
  padding-top: var(--ysb-pt, 0);
  padding-bottom: var(--ysb-pb, 0);
  padding-inline: var(--ysb-px, 0);
}
.ysb__viewport { position: relative; overflow: hidden; border-radius: var(--ysb-radius, 0); background: var(--clr-primary, #161716); }
.ysb__track { display: grid; }

/* ---------- Slide ---------- */
.ysb__slide {
  grid-area: 1 / 1;
  position: relative;
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}
.ysb__slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.5s ease; z-index: 1; }
a.ysb__slide:focus-visible { outline: 3px solid var(--clr-white, #fff); outline-offset: -6px; }
@media (prefers-reduced-motion: reduce) {
  .ysb__slide, .ysb__slide.is-active { transition: none; }
}

/* Media */
.ysb__media { position: absolute; inset: 0; overflow: hidden; background: var(--clr-primary, #161716); }
.ysb__media img,
.ysb__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ysb__shade { position: absolute; inset: 0; pointer-events: none; }
.ysb__slide[data-shade="soft"] .ysb__shade {
  background: linear-gradient(90deg, rgb(0 0 0 / 52%) 0%, rgb(0 0 0 / 28%) 55%, rgb(0 0 0 / 8%) 100%);
}
.ysb__slide[data-shade="soft"][data-align="center"] .ysb__shade { background: rgb(0 0 0 / 38%); }
.ysb__slide[data-tone="dark"][data-shade="soft"] .ysb__shade {
  background: linear-gradient(90deg, rgb(255 255 255 / 60%) 0%, rgb(255 255 255 / 30%) 55%, rgb(255 255 255 / 0%) 100%);
}

/* Big overlay word */
.ysb__word {
  position: absolute;
  right: 4%;
  bottom: -0.12em;
  z-index: 1;
  font-family: var(--font-primary);
  font-size: clamp(72px, 14vw, 220px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.16;
  pointer-events: none;
  white-space: nowrap;
}

/* Text block */
.ysb__text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-sm, 12px);
  height: 100%;
  padding: var(--space-xl, 32px) var(--space-lg, 24px);
  max-width: 640px;
}
.ysb__slide[data-align="center"] .ysb__text { align-items: center; text-align: center; margin-inline: auto; max-width: 760px; }
.ysb__slide[data-tone="light"] { color: var(--clr-white, #fff); }
.ysb__slide[data-tone="dark"] { color: var(--clr-primary, #161716); }
.ysb__eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-xs, 12px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ysb-accent, var(--clr-secondary, #E5AC40));
}
.ysb__headline {
  margin: 0;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: inherit;
}
.ysb__headline em { font-style: italic; color: var(--ysb-accent, var(--clr-secondary, #E5AC40)); }
.ysb__sub {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base, 16px);
  line-height: 1.5;
  color: inherit;
  opacity: 0.92;
}
.ysb__date {
  margin: 0;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 var(--space-xs, 6px);
  padding: var(--space-xs, 6px) var(--space-md, 16px);
  font-family: var(--font-body);
  font-size: var(--font-size-xs, 12px);
  border: 1px solid currentColor;
  border-radius: 999px;
}
.ysb__date strong { font-weight: 700; }

/* CTA (the whole slide is the link; this is the visual button) */
.ysb__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--space-xs, 6px);
  padding: var(--space-sm, 10px) var(--space-lg, 24px);
  font-family: var(--font-body);
  font-size: var(--font-size-sm, 14px);
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid transparent;
}
.ysb__slide[data-button="gold"] .ysb__cta { background: var(--ysb-accent, var(--clr-secondary, #E5AC40)); color: #161716; }
.ysb__slide[data-button="light"] .ysb__cta { background: #fff; color: #161716; }
.ysb__slide[data-button="dark"] .ysb__cta { background: #161716; color: #fff; border-color: #161716; }
a.ysb__slide:hover .ysb__cta { opacity: 0.88; }

/* ---------- Layouts ---------- */
/* overlay + image: media fills, text sits on top. Desktop 16:5, mobile 4:5. */
.ysb__slide[data-layout="overlay"],
.ysb__slide[data-layout="image"] { aspect-ratio: 4 / 5; min-height: 380px; display: flex; }
@media (min-width: 768px) {
  .ysb__slide[data-layout="overlay"],
  .ysb__slide[data-layout="image"] { aspect-ratio: 16 / 5; min-height: 260px; }
}
.ysb__slide[data-layout="overlay"] .ysb__text { width: 100%; }
@media (max-width: 767px) { .ysb__slide[data-layout="overlay"] .ysb__text { justify-content: flex-end; } }

/* split: text panel + media side by side (stacked on mobile) */
.ysb__slide[data-layout="split"] { display: grid; grid-template-columns: 1fr; }
.ysb__slide[data-layout="split"] .ysb__media { position: relative; inset: auto; order: -1; aspect-ratio: 4 / 3; }
.ysb__slide[data-layout="split"][data-tone="light"] { background: #161716; }
.ysb__slide[data-layout="split"][data-tone="dark"] { background: #fff; }
.ysb__slide[data-layout="split"] .ysb__word { right: auto; left: 4%; }
@media (min-width: 768px) {
  .ysb__slide[data-layout="split"] { grid-template-columns: 1fr 1fr; min-height: 300px; }
  .ysb__slide[data-layout="split"] .ysb__media { order: 0; aspect-ratio: auto; }
  .ysb__slide[data-layout="split"] .ysb__text { padding: var(--space-2xl, 48px); max-width: none; }
}
.ysb__slide[data-layout="split"] .ysb__shade { display: none; }
/* Media never sets the split slide's height: it fills whatever the text side + min-height give it. */
.ysb__slide[data-layout="split"] .ysb__media img,
.ysb__slide[data-layout="split"] .ysb__media video { position: absolute; inset: 0; }
@media (min-width: 768px) {
  .ysb__slide[data-layout="split"] { min-height: clamp(320px, 30vw, 440px); }
}
.ysb__slide[data-layout="image"] .ysb__text { display: none; }

/* ---------- Dots ---------- */
.ysb__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--space-sm, 12px);
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 4px;
  pointer-events: none;
}
.ysb__dot {
  pointer-events: auto;
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ysb__dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: rgb(255 255 255 / 55%);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 25%);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.ysb__dot[aria-current="true"]::after { background: #fff; transform: scale(1.25); }
.ysb__dot:focus-visible { outline: 2px solid #fff; outline-offset: 0; border-radius: 50%; }

.ysb__live {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ysb__editor-note {
  margin: var(--space-sm, 12px) 0 0;
  padding: var(--space-sm, 10px) var(--space-md, 16px);
  border: 1px dashed var(--clr-border-dark, #bbb);
  border-radius: var(--radius-base, 8px);
  font-family: var(--font-body);
  font-size: var(--font-size-xs, 12px);
  color: var(--clr-text-secondary, #555);
}
