/**
 * Smarto.one public homepage — hero slider
 * Used on https://smarto.one/public/ (body.theme-aims .aims-slider)
 */

body.theme-aims .aims-slider {
  --aims-slider-interval: 7s;
  --aims-slider-glass: rgba(7, 12, 17, 0.42);
  --aims-slider-line: rgba(255, 255, 255, 0.18);
  position: relative;
  isolation: isolate;
  color: #fff;
  background: #070c11;
  overflow: hidden;
}

body.theme-aims .aims-slider:focus {
  outline: none;
}

body.theme-aims .aims-slider:focus-visible {
  outline: 2px solid var(--aims-jade-soft, #2bb89a);
  outline-offset: -2px;
}

body.theme-aims .aims-slider-track {
  position: relative;
  min-height: min(88vh, 760px);
  min-height: min(88svh, 760px);
  overflow: hidden;
}

body.theme-aims .aims-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: clamp(5.25rem, 9vw, 7.5rem) 0 8.75rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
  transition:
    opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.75s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

body.theme-aims .aims-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  z-index: 1;
}

body.theme-aims .aims-slide-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

body.theme-aims .aims-slide-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.06);
  filter: saturate(0.88) contrast(1.05);
}

body.theme-aims .aims-slide.is-active .aims-slide-photo {
  animation: aims-hero-drift 18s ease-in-out infinite alternate;
}

@keyframes aims-hero-drift {
  from { transform: scale(1.06) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.6%, -1.2%, 0); }
}

body.theme-aims .aims-slide-shade {
  position: absolute;
  inset: 0;
}

body.theme-aims .aims-slide-shade--ink {
  background:
    linear-gradient(108deg, rgba(7, 12, 17, 0.94) 0%, rgba(12, 18, 25, 0.76) 48%, rgba(15, 46, 40, 0.48) 100%),
    linear-gradient(180deg, rgba(7, 12, 17, 0.22) 0%, rgba(7, 12, 17, 0.84) 100%);
}

body.theme-aims .aims-slide-shade--jade {
  background:
    linear-gradient(110deg, rgba(6, 22, 20, 0.94) 0%, rgba(10, 48, 42, 0.72) 50%, rgba(12, 18, 25, 0.45) 100%),
    linear-gradient(180deg, rgba(7, 12, 17, 0.18) 0%, rgba(7, 12, 17, 0.8) 100%);
}

body.theme-aims .aims-slide-shade--signal {
  background:
    linear-gradient(110deg, rgba(28, 12, 8, 0.92) 0%, rgba(68, 28, 16, 0.68) 46%, rgba(12, 18, 25, 0.5) 100%),
    linear-gradient(180deg, rgba(7, 12, 17, 0.2) 0%, rgba(7, 12, 17, 0.8) 100%);
}

body.theme-aims .aims-slide-grain {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  pointer-events: none;
}

body.theme-aims .aims-slide-copy {
  position: relative;
  z-index: 2;
  width: min(44rem, calc(100% - 2rem));
  margin: 0 auto 0 0;
  padding: 0 1.25rem;
  max-width: 80rem;
}

body.theme-aims .aims-slide.is-active .aims-slide-kicker,
body.theme-aims .aims-slide.is-active .aims-slide-brand,
body.theme-aims .aims-slide.is-active .aims-slide-title,
body.theme-aims .aims-slide.is-active .aims-slide-lead,
body.theme-aims .aims-slide.is-active .aims-slide-ctas {
  animation: aims-hero-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.theme-aims .aims-slide.is-active .aims-slide-kicker { animation-delay: 0.05s; }
body.theme-aims .aims-slide.is-active .aims-slide-brand { animation-delay: 0.12s; }
body.theme-aims .aims-slide.is-active .aims-slide-title { animation-delay: 0.2s; }
body.theme-aims .aims-slide.is-active .aims-slide-lead { animation-delay: 0.3s; }
body.theme-aims .aims-slide.is-active .aims-slide-ctas { animation-delay: 0.4s; }

@keyframes aims-hero-enter {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 640px) {
  body.theme-aims .aims-slide-copy { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  body.theme-aims .aims-slide-copy {
    margin-left: max(1.5rem, calc((100% - 80rem) / 2));
    padding: 0 2rem;
  }
}

body.theme-aims .aims-slide-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

body.theme-aims .aims-slide-kicker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  letter-spacing: 0.08em;
}

body.theme-aims .aims-slide-brand {
  font-family: var(--aims-font-display, "Bricolage Grotesque", system-ui, sans-serif);
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 5.1rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #fff;
  margin: 0 0 1rem;
  text-shadow: 0 10px 42px rgba(0, 0, 0, 0.35);
}

body.theme-aims .aims-slide-title {
  font-size: clamp(1.3rem, 3vw, 2.05rem);
  font-weight: 700;
  line-height: 1.22;
  color: rgba(255, 255, 255, 0.96) !important;
  margin: 0 0 1rem;
  max-width: 22ch;
}

body.theme-aims .aims-slide-lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1.75rem;
  max-width: 40ch;
  font-weight: 500;
}

body.theme-aims .aims-slide-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

body.theme-aims .aims-hero-ghost {
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.65rem !important;
  color: #fff;
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

body.theme-aims .aims-hero-ghost:hover {
  background: #fff;
  color: var(--aims-ink, #0c1219);
  border-color: #fff;
}

body.theme-aims .aims-hero-ghost:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- Dock / story nav ---------- */

body.theme-aims .aims-slider-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  width: min(80rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.7rem 0.8rem;
  border-radius: 1rem;
  background: var(--aims-slider-glass);
  border: 1px solid var(--aims-slider-line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 960px) {
  body.theme-aims .aims-slide {
    padding-bottom: 7.5rem;
  }

  body.theme-aims .aims-slide-copy {
    padding-right: 15rem;
  }

  body.theme-aims .aims-slider-dock {
    left: auto;
    right: max(1.25rem, calc((100vw - 80rem) / 2 + 1.25rem));
    top: 46%;
    bottom: auto;
    width: 13rem;
    margin: 0;
    transform: translateY(-50%);
    flex-direction: column;
    align-items: stretch;
    padding: 0.9rem 1rem;
  }

  body.theme-aims .aims-slider-thumbs {
    width: 100%;
    grid-template-columns: 1fr;
  }

  body.theme-aims .aims-slider-thumb {
    padding: 0.4rem 0 0.2rem;
  }
}

body.theme-aims .aims-slider-controls {
  display: flex;
  gap: 0.5rem;
}

body.theme-aims .aims-slider-btn {
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.7rem;
  background: rgba(7, 12, 17, 0.38);
  color: #fff;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

body.theme-aims .aims-slider-btn:hover,
body.theme-aims .aims-slider-btn:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.7);
  outline: none;
  transform: translateY(-1px);
}

body.theme-aims .aims-slider-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

body.theme-aims .aims-slider-btn--pause.is-paused {
  background: rgba(15, 138, 116, 0.35);
  border-color: rgba(43, 184, 154, 0.7);
}

body.theme-aims .aims-slider-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  width: min(34rem, 100%);
}

body.theme-aims .aims-slider-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.45rem 0.15rem 0.1rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

body.theme-aims .aims-slider-thumb:hover,
body.theme-aims .aims-slider-thumb:focus-visible {
  color: #fff;
  outline: none;
}

body.theme-aims .aims-slider-thumb:focus-visible .aims-slider-thumb-bar {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

body.theme-aims .aims-slider-thumb-bar {
  display: block;
  width: 100%;
  height: 3px;
  margin-bottom: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

body.theme-aims .aims-slider-thumb-bar::after {
  content: "";
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #fff 0%, var(--aims-jade-soft, #2bb89a) 100%);
}

body.theme-aims .aims-slider-thumb.is-active {
  color: #fff;
}

body.theme-aims .aims-slider-thumb.is-active .aims-slider-thumb-bar::after {
  animation: aims-slider-progress var(--aims-slider-interval) linear forwards;
}

body.theme-aims .aims-slider.is-paused .aims-slider-thumb.is-active .aims-slider-thumb-bar::after {
  animation-play-state: paused;
}

@keyframes aims-slider-progress {
  from { width: 0; }
  to { width: 100%; }
}

body.theme-aims .aims-slider-thumb-num {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

body.theme-aims .aims-slider-thumb-label {
  font-size: 0.78rem;
  font-weight: 600;
}

body.theme-aims .aims-slider .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  body.theme-aims .aims-slider-track {
    min-height: 640px;
  }

  body.theme-aims .aims-slide {
    align-items: flex-end;
    padding-top: 5rem;
    padding-bottom: 11.25rem;
  }

  body.theme-aims .aims-slide-brand {
    font-size: clamp(2.35rem, 13vw, 3.4rem);
  }

  body.theme-aims .aims-slide-title {
    font-size: clamp(1.2rem, 5.4vw, 1.6rem);
  }

  body.theme-aims .aims-slider-dock {
    bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
  }

  body.theme-aims .aims-slider-thumb-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-aims .aims-slide,
  body.theme-aims .aims-slide-photo,
  body.theme-aims .aims-slider-thumb-bar,
  body.theme-aims .aims-slide.is-active .aims-slide-kicker,
  body.theme-aims .aims-slide.is-active .aims-slide-brand,
  body.theme-aims .aims-slide.is-active .aims-slide-title,
  body.theme-aims .aims-slide.is-active .aims-slide-lead,
  body.theme-aims .aims-slide.is-active .aims-slide-ctas {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  body.theme-aims .aims-slide:not(.is-active) {
    opacity: 0 !important;
    visibility: hidden !important;
  }
}
