/**
 * AestheticSlider – frontend styles
 * @author drek124 <https://github.com/drek124>
 * @license GPL-2.0-or-later
 */

.aesl {
  --aesl-accent: #7c5cff;
  --aesl-nav: #fff;
  --aesl-nav-ink: #0d1020;
  --aesl-ease: cubic-bezier(.2, .8, .2, 1);
  position: relative;
  width: 100%;
  margin-inline: auto;
  color: #fff;
  font-family: var(--aesl-font, inherit);
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}

.aesl *, .aesl *::before, .aesl *::after { box-sizing: border-box; }
.aesl:focus { outline: none; }
.aesl:focus-visible { outline: 2px solid var(--aesl-accent); outline-offset: 3px; }

.aesl--boxed { max-width: var(--aesl-maxw, 1280px); }
.aesl--boxed .aesl-viewport { border-radius: var(--aesl-radius, 0); }
.aesl--fullscreen { width: 100%; }

.aesl-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: var(--aesl-ratio, 2 / 1);
  background: var(--aesl-bg, #0b0d18);
  box-shadow: var(--aesl-shadow, none);
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- Slides ---------- */
.aesl-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  z-index: 1;
}

.aesl:not(.aesl-ready) .aesl-slide:first-child,
.aesl-slide.is-active,
.aesl-slide.is-in,
.aesl-slide.is-out { visibility: visible; }

.aesl-slide.is-active { z-index: 2; }
.aesl-slide.is-out { z-index: 2; }
.aesl-slide.is-in { z-index: 3; }
.aesl-slide.is-pre .aesl-layer { visibility: hidden; }

.aesl-slide-link { position: absolute; inset: 0; z-index: 1; }

.aesl-bg { position: absolute; inset: 0; overflow: hidden; container-type: size; will-change: transform; }
.aesl-bg-media {
  position: absolute;
  inset: 0;
  background-color: var(--aesl-slide-bg, transparent);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transform-origin: 50% 50%;
}
.aesl-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aesl-bg .aesl-embed { position: absolute; inset: 0; background: none; cursor: default; pointer-events: none; }
.aesl-bg .aesl-embed::before, .aesl-bg .aesl-embed::after { display: none; }
.aesl-bg .aesl-embed iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  transform: translate(-50%, -50%);
  border: 0;
}
.aesl-bg-overlay { position: absolute; inset: 0; pointer-events: none; }

/* ---------- Canvas & layers ---------- */
.aesl-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: var(--aesl-cw, 1280px);
  height: var(--aesl-ch, 640px);
  transform: translate(-50%, -50%) scale(var(--aesl-scale, 1));
  transform-origin: 50% 50%;
  pointer-events: none;
}

.aesl-layer {
  position: absolute;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0) rotate(var(--rot, 0deg));
  transform-origin: 50% 50%;
  pointer-events: auto;
}
.aesl-layer.is-masked { overflow: hidden; }
.aesl-layer[data-action], .aesl-layer a { cursor: pointer; }
.aesl-gfx, .aesl-anim, .aesl-loop { position: relative; width: 100%; height: 100%; transform-origin: 50% 50%; }

.aesl .aesl-inner {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0 solid transparent;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  text-shadow: none;
  box-shadow: none;
  overflow-wrap: break-word;
}
.aesl .aesl-inner p { margin: 0 0 .6em; }
.aesl .aesl-inner p:last-child { margin-bottom: 0; }
.aesl .aesl-inner a { color: inherit; }
.aesl .aesl-inner strong, .aesl .aesl-inner b { font-weight: 800; }
.aesl .aesl-hl {
  background: linear-gradient(100deg, var(--aesl-accent), #ff6ad5 60%, #ffb36b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.aesl .has-hover .aesl-inner { transition: transform var(--h-dur, .45s) var(--aesl-ease), color .3s, background .35s, border-color .3s, box-shadow .35s, opacity .3s, filter .35s; }

.aesl-t-button .aesl-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  white-space: nowrap;
  cursor: pointer;
}
.aesl-t-button .aesl-btn-icon { display: inline-flex; width: 1.1em; height: 1.1em; transition: transform .35s var(--aesl-ease); }
.aesl-t-button .aesl-btn-icon svg { width: 100%; height: 100%; }
.aesl-t-button:hover .aesl-btn-icon { transform: translateX(3px); }

.aesl-t-image .aesl-inner { overflow: hidden; }
.aesl-t-image img { display: block; width: 100%; height: 100%; object-fit: var(--aesl-fit, cover); border-radius: inherit; -webkit-user-drag: none; }

.aesl-t-icon .aesl-inner { display: flex; align-items: center; justify-content: center; }
.aesl svg.aesl-icon { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: var(--aesl-icon-stroke, 1.8); stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

.aesl-t-counter .aesl-inner { font-variant-numeric: tabular-nums; white-space: nowrap; }

.aesl-t-video .aesl-inner { overflow: hidden; background: #000; }
.aesl-t-video video { display: block; width: 100%; height: 100%; object-fit: cover; }

.aesl-embed {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: #000 center / cover no-repeat;
  cursor: pointer;
}
.aesl-embed::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform .35s var(--aesl-ease), background .3s;
}
.aesl-embed::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -12px 0 0 -7px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
}
.aesl-embed:hover::before { transform: scale(1.1); background: var(--aesl-accent); }
.aesl-embed.is-playing::before, .aesl-embed.is-playing::after { display: none; }
.aesl-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Split text */
.aesl-w { display: inline-block; white-space: nowrap; }
.aesl-c { display: inline-block; white-space: pre; }
.aesl-mask { overflow: hidden; vertical-align: top; padding: 0 .04em .12em; margin: 0 -.04em -.12em; }
.aesl-ln { display: block; }
.aesl-lni { display: block; }
.aesl-ln:not(.aesl-mask) > .aesl-lni { display: inline-block; }
.aesl-typing::after {
  content: "";
  display: inline-block;
  width: .07em;
  height: .95em;
  margin-left: .06em;
  vertical-align: -.08em;
  background: currentColor;
  animation: aesl-caret .8s steps(1) infinite;
}
@keyframes aesl-caret { 50% { opacity: 0; } }

/* Transition helpers */
.aesl-fx { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.aesl-fx-cell { position: absolute; inset: 0; }
.aesl-fx-cell > .aesl-bg { position: absolute; inset: 0; }
.aesl .aesl-viewport > .aesl-slide.aesl-fx-slide { visibility: visible; z-index: 6; pointer-events: none; }
.aesl.is-busy .aesl-layer { pointer-events: none; }

/* ---------- Navigation ---------- */
.aesl-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: -27px 0 0;
  padding: 0;
  color: var(--aesl-nav);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .45s var(--aesl-ease), background .3s, color .3s, opacity .35s, box-shadow .3s;
}
.aesl-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--aesl-ease); }
.aesl-arrow--prev { left: 24px; }
.aesl-arrow--next { right: 24px; }
.aesl-arrow:disabled { opacity: .3; cursor: default; }
.aesl-arrow--prev:hover svg { transform: translateX(-2px); }
.aesl-arrow--next:hover svg { transform: translateX(2px); }

.aesl-arrow--glass {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .28);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.aesl-arrow--glass:hover { background: rgba(255, 255, 255, .26); transform: scale(1.07); }
.aesl-arrow--solid { background: var(--aesl-nav); color: var(--aesl-nav-ink); box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .45); }
.aesl-arrow--solid:hover { background: var(--aesl-accent); color: #fff; transform: scale(1.07); }
.aesl-arrow--square { border-radius: 14px; background: rgba(10, 12, 24, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.aesl-arrow--square:hover { background: var(--aesl-accent); }
.aesl-arrow--minimal { width: 64px; height: 64px; margin-top: -32px; }
.aesl-arrow--minimal svg { width: 40px; height: 40px; stroke-width: 1.4; }
.aesl-arrow--minimal:hover { transform: scale(1.12); }
.aesl-arrow--gradient { background: linear-gradient(135deg, var(--aesl-accent), #ff5fb7); color: #fff; box-shadow: 0 16px 36px -14px var(--aesl-accent); }
.aesl-arrow--gradient:hover { transform: scale(1.08) rotate(-4deg); }

.aesl-arrows-hover .aesl-arrow { opacity: 0; }
.aesl-arrows-hover .aesl-arrow--prev { transform: translateX(-16px); }
.aesl-arrows-hover .aesl-arrow--next { transform: translateX(16px); }
.aesl-arrows-hover.is-hover .aesl-arrow, .aesl-arrows-hover:focus-within .aesl-arrow { opacity: 1; transform: none; }

.aesl-nav-dark { --aesl-nav: #12142a; --aesl-nav-ink: #fff; }
.aesl-nav-dark .aesl-arrow--glass { background: rgba(255, 255, 255, .55); border-color: rgba(0, 0, 0, .06); }

.aesl-bullets {
  position: absolute;
  z-index: 20;
  bottom: 28px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}
.aesl-bullets.aesl-pos-bottom-left { left: 36px; transform: none; }
.aesl-bullets.aesl-pos-bottom-right { left: auto; right: 36px; transform: none; }
.aesl-bullets.aesl-pos-right { top: 50%; right: 28px; bottom: auto; left: auto; flex-direction: column; transform: translateY(-50%); }
.aesl-bullets.aesl-pos-left { top: 50%; left: 28px; bottom: auto; flex-direction: column; transform: translateY(-50%); }

.aesl-bullet {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--aesl-nav);
  cursor: pointer;
}

.aesl-bullets--dots .aesl-bullet { width: 10px; height: 10px; border-radius: 10px; background: color-mix(in srgb, var(--aesl-nav) 42%, transparent); transition: width .5s var(--aesl-ease), background .3s; }
.aesl-bullets--dots .aesl-bullet:hover { background: color-mix(in srgb, var(--aesl-nav) 75%, transparent); }
.aesl-bullets--dots .aesl-bullet.is-active { width: 30px; background: var(--aesl-nav); }
.aesl-pos-right.aesl-bullets--dots .aesl-bullet.is-active, .aesl-pos-left.aesl-bullets--dots .aesl-bullet.is-active { width: 10px; height: 30px; }

.aesl-bullets--lines .aesl-bullet { width: 46px; height: 18px; }
.aesl-bullets--lines .aesl-bullet::before, .aesl-bullets--lines .aesl-bullet i {
  content: "";
  position: absolute;
  top: 7.5px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--aesl-nav) 30%, transparent);
}
.aesl-bullets--lines .aesl-bullet i { display: block; background: var(--aesl-nav); transform-origin: left; transform: scaleX(0); }
.aesl-bullets--lines .aesl-bullet.is-active i { transform: scaleX(var(--p, 0)); }
.aesl-pos-right.aesl-bullets--lines .aesl-bullet, .aesl-pos-left.aesl-bullets--lines .aesl-bullet { width: 18px; height: 40px; }
.aesl-pos-right.aesl-bullets--lines .aesl-bullet::before, .aesl-pos-right.aesl-bullets--lines .aesl-bullet i,
.aesl-pos-left.aesl-bullets--lines .aesl-bullet::before, .aesl-pos-left.aesl-bullets--lines .aesl-bullet i { top: 0; bottom: 0; left: 7.5px; width: 3px; height: auto; transform-origin: top; }
.aesl-pos-right.aesl-bullets--lines .aesl-bullet.is-active i, .aesl-pos-left.aesl-bullets--lines .aesl-bullet.is-active i { transform: scaleY(var(--p, 0)); }

.aesl-bullets--numbers { gap: 22px; }
.aesl-bullets--numbers .aesl-bullet { padding: 6px 0; font: 600 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .08em; opacity: .55; transition: opacity .3s; }
.aesl-bullets--numbers .aesl-bullet::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--aesl-nav); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--aesl-ease); }
.aesl-bullets--numbers .aesl-bullet.is-active { opacity: 1; }
.aesl-bullets--numbers .aesl-bullet.is-active::after { transform: scaleX(var(--p, 0)); transition: none; }

.aesl-bullets--pills { padding: 8px 10px; gap: 8px; border-radius: 99px; background: rgba(10, 12, 24, .32); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .14); }
.aesl-bullets--pills .aesl-bullet { width: 8px; height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .45); overflow: hidden; transition: width .5s var(--aesl-ease), background .3s; }
.aesl-bullets--pills .aesl-bullet i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.aesl-bullets--pills .aesl-bullet.is-active { width: 40px; background: rgba(255, 255, 255, .3); }
.aesl-bullets--pills .aesl-bullet.is-active i { transform: scaleX(var(--p, 0)); }

.aesl-thumbs { position: absolute; z-index: 20; display: flex; gap: 10px; bottom: 24px; left: 50%; transform: translateX(-50%); }
.aesl-has-thumbs .aesl-bullets:not(.aesl-pos-right):not(.aesl-pos-left) { bottom: 100px; }
.aesl-thumbs--below { position: relative; bottom: auto; left: auto; justify-content: center; margin-top: 14px; transform: none; flex-wrap: wrap; }
.aesl-has-thumbs-below .aesl-bullets:not(.aesl-pos-right):not(.aesl-pos-left) { bottom: 28px; }
.aesl-thumb {
  position: relative;
  width: 86px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #1b1f33;
  overflow: hidden;
  cursor: pointer;
  opacity: .55;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55);
  transition: opacity .3s, transform .45s var(--aesl-ease), box-shadow .3s;
}
.aesl-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid transparent; transition: border-color .3s; }
.aesl-thumb:hover { opacity: .9; transform: translateY(-3px); }
.aesl-thumb.is-active { opacity: 1; transform: translateY(-3px); }
.aesl-thumb.is-active::after { border-color: var(--aesl-accent); }
.aesl-thumb-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.aesl-thumb-title { position: absolute; left: 6px; right: 6px; bottom: 5px; color: #fff; font: 600 10px/1.2 system-ui, sans-serif; text-align: left; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.aesl-progress { position: absolute; left: 0; right: 0; z-index: 21; height: 3px; background: rgba(255, 255, 255, .14); pointer-events: none; }
.aesl-progress--bottom { bottom: 0; }
.aesl-progress--top { top: 0; }
.aesl-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--aesl-accent), #ff6ad5); transform-origin: left; transform: scaleX(0); box-shadow: 0 0 14px var(--aesl-accent); }

.aesl-counter { position: absolute; z-index: 20; left: 36px; bottom: 24px; display: flex; align-items: baseline; gap: 10px; color: var(--aesl-nav); font: 500 14px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .06em; font-variant-numeric: tabular-nums; pointer-events: none; }
.aesl-counter b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.aesl-counter span { width: 34px; height: 1px; background: currentColor; opacity: .5; align-self: center; }
.aesl-counter em { font-style: normal; opacity: .6; }
.aesl-bullets.aesl-pos-bottom-left ~ .aesl-counter { left: auto; right: 36px; }

.aesl-timer { position: absolute; z-index: 20; right: 24px; bottom: 20px; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(10, 12, 24, .28); color: var(--aesl-nav); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.aesl-timer svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.aesl-timer-ring { transform: rotate(-90deg); fill: none; stroke-width: 2.4; }
.aesl-timer-ring circle { stroke: color-mix(in srgb, var(--aesl-nav) 22%, transparent); }
.aesl-timer-ring .aesl-timer-fill { stroke: var(--aesl-nav); stroke-linecap: round; stroke-dasharray: 106.8; stroke-dashoffset: calc(106.8 * (1 - var(--p, 0))); }
.aesl-timer .aesl-i-play, .aesl-timer .aesl-i-pause { inset: 13px; width: 20px; height: 20px; fill: currentColor; }
.aesl-timer .aesl-i-play { display: none; }
.aesl.is-paused .aesl-timer .aesl-i-play { display: block; }
.aesl.is-paused .aesl-timer .aesl-i-pause { display: none; }
.aesl-bullets.aesl-pos-bottom-right ~ .aesl-timer { right: auto; left: 24px; }

.aesl[data-device="mobile"] .aesl-arrow { width: 40px; height: 40px; margin-top: -20px; }
.aesl[data-device="mobile"] .aesl-arrow svg { width: 18px; height: 18px; }
.aesl[data-device="mobile"] .aesl-arrow--prev { left: 10px; }
.aesl[data-device="mobile"] .aesl-arrow--next { right: 10px; }
.aesl[data-device="mobile"] .aesl-bullets { bottom: 16px; }
.aesl[data-device="mobile"] .aesl-counter,
.aesl[data-device="mobile"] .aesl-thumbs:not(.aesl-thumbs--below) { display: none; }
.aesl[data-device="mobile"].aesl-has-thumbs .aesl-bullets { bottom: 16px; }
.aesl[data-device="mobile"] .aesl-timer { width: 38px; height: 38px; right: 12px; bottom: 12px; }
.aesl[data-device="mobile"] .aesl-timer .aesl-i-play, .aesl[data-device="mobile"] .aesl-timer .aesl-i-pause { inset: 10px; width: 18px; height: 18px; }

/* Fullscreen (double-click / F) */
.aesl.is-fullscreen { display: flex; flex-direction: column; justify-content: center; width: 100vw; height: 100vh; max-width: none; margin: 0; background: var(--aesl-bg, #000); }
.aesl.is-fullscreen .aesl-viewport { border-radius: 0; box-shadow: none; }
.aesl.is-fullscreen .aesl-thumbs--below { position: absolute; bottom: 24px; left: 50%; margin: 0; transform: translateX(-50%); }
.aesl:fullscreen { width: 100vw; height: 100vh; }
.aesl::backdrop { background: var(--aesl-bg, #000); }

.aesl-noscript .aesl-slide:not(:first-child) { display: none; }
