.examples {
  padding: 0 0 clamp(0.5rem, 0.5vw, 2.75rem);
}

.examples__inner {
  width: 100%;
  max-width: var(--layout-inner-max);
  margin: 0 auto;
  padding: 0 var(--layout-pad-x);
}

.examples__toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;

  width: max-content;
  margin: 0 auto;
  padding: 0.6rem 0.85rem;

  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(0.78rem, 0.2vw + 0.73rem, 0.9rem);
  font-weight: 400;
  line-height: 1;
  color: var(--muted);

  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(75, 185, 109, 0.58);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  list-style: none;

  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.examples__toggle::-webkit-details-marker {
  display: none;
}

.examples__toggle::marker {
  content: "";
}

.examples__toggle-label--hide {
  display: none;
}

.examples__disclosure[open] .examples__toggle-label--show {
  display: none;
}

.examples__disclosure[open] .examples__toggle-label--hide {
  display: inline;
}

.examples__toggle:hover {
  color: #fff;
  background: rgba(75, 185, 109, 0.1);
  border-color: rgba(75, 185, 109, 0.8);
}

.examples__toggle:focus-visible {
  outline: 2px solid var(--input-border-focus);
  outline-offset: 4px;
  border-radius: 8px;
}

.examples__toggle-icon {
  width: 0.9rem;
  height: 0.9rem;

  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;

  transition: transform 180ms ease;
}

.examples__disclosure[open] .examples__toggle-icon {
  transform: rotate(180deg);
}

.examples__carousel {
  position: relative;

  width: min(100%, 34rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  margin-right: auto;
  margin-left: auto;
}

.examples__viewport {
  position: relative;

  width: 100%;
  aspect-ratio: 768 / 1024;
}

.examples__navigation {
  display: contents;
}

.examples__slide {
  position: absolute;
  inset: 0;

  width: 100%;
  margin: 0;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 280ms ease,
    visibility 280ms ease;
}

.examples__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.examples__slide img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: clamp(10px, 1.6vw, 18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.examples__control {
  position: absolute;
  top: calc(50% - 1rem);

  display: grid;
  place-items: center;

  width: clamp(2.25rem, 4vw, 3rem);
  height: clamp(2.25rem, 4vw, 3rem);
  padding: 0;

  color: #fff;
  background: rgba(7, 10, 8, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);

  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.examples__control:hover {
  background: rgba(28, 55, 36, 0.92);
  border-color: rgba(75, 185, 109, 0.85);
  transform: translateY(-50%) scale(1.04);
}

.examples__control svg {
  width: 52%;
  height: 52%;

  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.examples__control--previous {
  left: calc(-1 * clamp(3rem, 5vw, 3.75rem));
}

.examples__control--next {
  right: calc(-1 * clamp(3rem, 5vw, 3.75rem));
}

.examples__position {
  margin: 0.9rem 0 0;

  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  font-weight: 300;
  text-align: center;
  color: var(--muted);
}

.lp .examples {
  margin-top: 1rem;
  padding: 0;
}

.lp .examples__inner {
  max-width: none;
  padding: 0;
}

.about .examples {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: 0;
}

@media (max-width: 700px) {
  .examples {
    padding: 3vw 0 5vw;
  }

  .examples__control {
    width: 2.5rem;
    height: 2.5rem;
  }

  .examples__carousel {
    width: min(calc(100% - 3rem), 34rem);
  }

  .examples__control--previous {
    left: -3rem;
  }

  .examples__control--next {
    right: -3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .examples__toggle,
  .examples__toggle-icon,
  .examples__control,
  .examples__slide {
    transition: none;
  }

  .examples__control,
  .examples__control:hover {
    transform: translateY(-50%);
  }
}
