#wa-slider {
  --hero-surface: #ede8e0;
  --hero-ink: #292720;
  --hero-muted: #645e56;
  --hero-accent: #89644b;
  --hero-line: #8e75652e;
  --hero-glass: #fffaf0db;
  --hero-glass-edge: #ffffffb3;
  position: relative;
  isolation: isolate;
  width: min(1440px, calc(100% - max(7.2vw, 24px)));
  margin: clamp(16px, 2vw, 28px) auto 0;
  overflow: hidden;
  border: 1px solid var(--hero-line);
  border-radius: 24px;
  color: var(--hero-ink);
  background: var(--hero-surface);
}
#wa-slider *, #wa-slider *::before, #wa-slider *::after { box-sizing: border-box; }
#wa-slider .wa-shell { position: relative; }
#wa-slider .wa-stage { position: relative; height: clamp(490px, calc(100svh - 224px), 660px); }
#wa-slider .wa-slide {
  position: relative;
  display: none;
  width: 100%;
  height: 100%;
  isolation: isolate;
  overflow: hidden;
}
#wa-slider .wa-slide.active { display: block; animation: waReveal .6s ease both; }
#wa-slider .wa-slide[hidden] { display: none; }
#wa-slider .wa-slide::before {
  content: "";
  position: absolute;
  inset: -10% -15% -10% 45%;
  z-index: -1;
  background: currentColor;
  -webkit-mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask-mode: luminance;
  opacity: .09;
}
#wa-slider .wa-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 86% 20%, #c3a48833, transparent 70%);
}
#wa-slider .wa-visual {
  position: absolute;
  inset: 0 auto 0 0;
  width: 73%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border-start-end-radius: 110px;
}
#wa-slider .wa-copy {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: clamp(22px, 3vw, 46px);
  transform: translateY(-50%);
  width: min(43%, 490px);
  padding: clamp(26px, 3vw, 44px);
  border: 1px solid var(--hero-glass-edge);
  border-radius: 20px;
  background: var(--hero-glass);
  background: linear-gradient(130deg, var(--hero-glass), color-mix(in srgb, var(--hero-glass) 75%, transparent));
  -webkit-backdrop-filter: blur(24px) saturate(115%);
  backdrop-filter: blur(24px) saturate(115%);
  box-shadow: inset 0 1px 0 #ffffff26, 0 24px 70px #00000014;
}
#wa-slider .wa-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--hero-accent);
  font-size: .875rem;
  font-weight: 550;
}
#wa-slider .wa-eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
#wa-slider .wa-title {
  margin: 0 0 18px;
  color: var(--hero-ink);
  font: 650 clamp(2.4rem, 3.9vw, 4rem)/1.4 Vazirmatn, Tahoma, sans-serif;
  letter-spacing: -.035em;
}
#wa-slider .wa-title .wa-accent { display: block; color: var(--hero-accent); }
#wa-slider .wa-desc { margin: 0 0 24px; color: var(--hero-muted); font-size: 1rem; line-height: 1.9; }
#wa-slider .wa-meta { display: flex; }
#wa-slider .wa-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--hero-line);
  border-radius: 8px;
  background: var(--hero-ink);
  color: var(--hero-surface);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow .2s ease;
}
#wa-slider .wa-meta a:hover { box-shadow: 0 4px 18px #00000026; }
#wa-slider .wa-main-photo { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
#wa-slider :is(.wa-photo, .wa-process-photo) { display: block; width: 100%; height: 100%; object-fit: cover; }
#wa-slider .wa-compare {
  --compare-split: 50%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  direction: ltr;
  user-select: none;
  background: #31231c;
}
#wa-slider .wa-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 56%; pointer-events: none; }
#wa-slider .wa-after { clip-path: inset(0 0 0 var(--compare-split)); }
#wa-slider .wa-divider {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 var(--compare-split);
  width: 1px;
  background: #fff7ec;
  box-shadow: 0 0 10px #0004;
  pointer-events: none;
}
#wa-slider .wa-divider::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #ffffff99;
  border-radius: 50%;
  background: #1717189e;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff7ec;
  font: 1.3rem/1 system-ui, sans-serif;
}
#wa-slider .wa-compare input {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
#wa-slider .wa-compare:has(input:focus-visible) .wa-divider::after { outline: 3px solid #fff; outline-offset: 4px; }
#wa-slider .wa-detail .wa-visual { overflow: visible; }
#wa-slider .wa-detail .wa-visual::before {
  content: "";
  position: absolute;
  inset: 0 5%;
  background: currentColor;
  -webkit-mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask: url("assets/darmag-mandala.png") center / contain no-repeat;
  mask-mode: luminance;
  opacity: .2;
}
#wa-slider .wa-detail .wa-main-photo { inset: 2% 16% 0 0; width: 84%; height: 98%; }
#wa-slider .wa-portrait-photo { object-fit: contain; object-position: center bottom; filter: drop-shadow(0 16px 30px #00000030); }
#wa-slider .wa-small-photo {
  position: absolute;
  z-index: 2;
  left: 28px;
  bottom: 28px;
  width: 25%;
  height: 30%;
  object-fit: cover;
  border: 5px solid var(--hero-surface);
  border-radius: 12px;
  box-shadow: 0 16px 32px #00000030;
  transform: rotate(-5deg);
}
#wa-slider .wa-process .wa-visual { display: grid; grid-template-columns: 1.4fr .6fr; grid-template-rows: 1fr 1fr; gap: 8px; direction: ltr; }
#wa-slider .wa-process .wa-main-photo { position: relative; grid-row: 1 / 3; }
#wa-slider .wa-process .wa-photo { object-position: 35% center; }
#wa-slider .wa-process-small { min-height: 0; overflow: hidden; }
#wa-slider .wa-collection .wa-photo { object-position: center 43%; }
#wa-slider .wa-bottom {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  min-height: 72px;
  padding: 12px clamp(22px, 3vw, 46px);
  border-top: 1px solid var(--hero-line);
  background: var(--hero-surface);
  background: color-mix(in srgb, var(--hero-surface) 85%, transparent);
}
#wa-slider .wa-caption { display: inline-flex; align-items: center; min-height: 44px; color: var(--hero-ink); text-underline-offset: 6px; font-size: .9rem; }
#wa-slider .wa-controls { display: flex; align-items: center; gap: 12px; direction: ltr; }
#wa-slider .wa-progress { width: 80px; height: 2px; overflow: hidden; background: var(--hero-line); }
#wa-slider .wa-progress span { display: block; width: 25%; height: 100%; background: var(--hero-accent); transition: width .35s ease; }
#wa-slider .wa-count { min-width: 48px; color: var(--hero-muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
#wa-slider .wa-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hero-line);
  border-radius: 50%;
  background: transparent;
  color: var(--hero-ink);
  font: 1.35rem/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
#wa-slider .wa-arrow:hover { background: var(--hero-ink); color: var(--hero-surface); }
#wa-slider :is(a, button):focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
#wa-slider .wa-intro img { animation: waCompareIntro .58s both; }
@keyframes waReveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes waCompareIntro {
  0% { opacity: .3; transform: translateX(6px); }
  25% { opacity: 1; transform: translateX(-4px); }
  45% { transform: translateX(2px); }
  65%, 100% { opacity: 1; transform: none; }
}
html[data-theme="dark"] #wa-slider {
  --hero-surface: #141415;
  --hero-ink: #f1f0ee;
  --hero-muted: #bbb7b2;
  --hero-accent: #d3b99f;
  --hero-line: #ffffff24;
  --hero-glass: #19191bd6;
  --hero-glass-edge: #ffffff26;
}
@media (max-width: 767px) {
  #wa-slider { border-radius: 18px; }
  #wa-slider .wa-stage { height: auto; }
  #wa-slider .wa-slide.active { display: flex; flex-direction: column; }
  #wa-slider .wa-visual { position: relative; inset: auto; order: 0; width: 100%; height: clamp(340px, 92vw, 460px); border-radius: 0 0 70px 0; }
  #wa-slider .wa-copy {
    position: relative;
    inset: auto;
    order: 1;
    transform: none;
    width: calc(100% - 32px);
    margin: -24px 16px 18px;
    padding: 22px;
    border-radius: 16px;
  }
  #wa-slider .wa-title { font-size: clamp(1.9rem, 7.6vw, 2.8rem); line-height: 1.35; margin-block-end: 10px; }
  #wa-slider .wa-title .wa-accent { display: inline; }
  #wa-slider .wa-eyebrow { margin-block-end: 12px; font-size: .875rem; }
  #wa-slider .wa-desc { font-size: .95rem; line-height: 1.8; margin-block-end: 16px; }
  #wa-slider .wa-meta a { min-height: 44px; padding: 8px 16px; font-size: .875rem; }
  #wa-slider .wa-detail .wa-main-photo { inset-inline-end: 0; width: 100%; }
  #wa-slider .wa-small-photo { left: 18px; bottom: 28px; width: 28%; height: 30%; border-width: 4px; }
  #wa-slider .wa-bottom { padding: 10px 18px; }
  #wa-slider .wa-controls { gap: 8px; }
  #wa-slider .wa-progress { width: 42px; }
  #wa-slider .wa-count { min-width: 42px; }
}
@media (max-width: 360px) {
  #wa-slider .wa-controls { margin-inline-start: auto; }
}
@media (prefers-reduced-motion: reduce) {
  #wa-slider .wa-slide.active, #wa-slider .wa-intro img { animation: none; }
  #wa-slider .wa-progress span, #wa-slider .wa-arrow, #wa-slider .wa-meta a { transition: none; }
}


@media (min-width: 768px) {
  #wa-slider .wa-slide:first-child .wa-visual { background: url("assets/mah-clock-detail.jpg") right center / cover no-repeat; }
  #wa-slider .wa-slide:first-child .wa-compare { right: 25%; }
}


#wa-slider .wa-type-text { position: relative; }
#wa-slider .wa-type-source { display: block; opacity: 0; }
#wa-slider .wa-type-visual {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  user-select: none;
  pointer-events: none;
}
#wa-slider .wa-type-caret {
  display: inline-block;
  width: 2px;
  height: .8em;
  margin-inline-start: .1em;
  vertical-align: -.04em;
  background: currentColor;
  animation: waCaretBlink .7s steps(1) infinite;
}
#wa-slider .wa-slide.active::before { animation: waRosetteDrift 36s ease-in-out infinite alternate; }
#wa-slider .wa-slide.active .wa-small-photo { animation: waDetailFloat 7s ease-in-out infinite; }
#wa-slider .wa-slide.active .wa-eyebrow { animation: waLabelIn .5s ease both; }
#wa-slider .wa-motion {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
#wa-slider .wa-motion i {
  position: absolute;
  display: block;
  width: 32px;
  height: 32px;
  border: 1px solid #fff3da70;
  opacity: .65;
  animation: waGeometryFloat 9s ease-in-out infinite;
}
#wa-slider .wa-motion i::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid currentColor;
  color: #fff3da70;
  transform: rotate(45deg);
}
#wa-slider .wa-motion i:nth-child(1) { top: 12%; left: 5%; animation-delay: -2s; }
#wa-slider .wa-motion i:nth-child(2) { bottom: 9%; left: 49%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: -6s; }
#wa-slider .wa-motion i:nth-child(3) { top: 6%; right: 12%; width: 23px; height: 23px; border-color: var(--hero-accent); animation-duration: 10s; animation-delay: -4s; }
#wa-slider .wa-motion i:nth-child(3)::after { color: var(--hero-accent); }
#wa-slider:not(.wa-motion-running) :is(.wa-motion i, .wa-small-photo),
#wa-slider:not(.wa-motion-running) .wa-slide::before { animation-play-state: paused; }
@keyframes waCaretBlink { 50% { opacity: 0; } }
@keyframes waRosetteDrift { from { transform: rotate(-6deg) scale(1); } to { transform: rotate(8deg) scale(1.05); } }
@keyframes waDetailFloat {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-9px) rotate(-2deg); }
}
@keyframes waGeometryFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(22deg); }
}
@keyframes waLabelIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
  #wa-slider .wa-motion { bottom: auto; height: clamp(340px, 92vw, 460px); }
  #wa-slider .wa-motion i:nth-child(2) { left: 75%; bottom: 18%; }
  #wa-slider .wa-motion i:nth-child(3) { right: 8%; top: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  #wa-slider .wa-slide.active::before,
  #wa-slider .wa-slide.active :is(.wa-small-photo, .wa-eyebrow),
  #wa-slider .wa-motion i { animation: none; }
  #wa-slider .wa-type-caret { display: none; }
}
