/* ==========================================================================
   Home hero — cursor spotlight + story slider
   ========================================================================== */

.hero--home {
  --hx: 72%;
  --hy: 28%;
  --hero-spot-alpha: 0.14;
  --hero-globe-opacity: 0.5;
}

/* ---------- Hero motion toggle ---------- */
.motion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.motion-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.motion-toggle__icon {
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='12' cy='12' r='8' stroke-dasharray='4 3'/%3E%3Ccircle cx='12' cy='4' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='18.5' cy='15.5' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='5.5' cy='15.5' r='1.2' fill='black' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='12' cy='12' r='8' stroke-dasharray='4 3'/%3E%3Ccircle cx='12' cy='4' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='18.5' cy='15.5' r='1.2' fill='black' stroke='none'/%3E%3Ccircle cx='5.5' cy='15.5' r='1.2' fill='black' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
}

html[data-hero-motion="off"] .motion-toggle {
  opacity: 0.72;
}

html[data-hero-motion="off"] .motion-toggle__icon {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='12' cy='12' r='8' stroke-dasharray='4 3'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='12' cy='12' r='8' stroke-dasharray='4 3'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E") center / contain no-repeat;
}

html[data-hero-motion="off"] .hero__spotlight,
html[data-hero-motion="off"] .hero__star-globe {
  display: none !important;
}

html[data-hero-motion="off"] .hero--home.is-pointer-lit .hero__edify {
  color: inherit;
  text-shadow: none;
}

html[data-theme="day"] .motion-toggle {
  border-color: rgba(12, 21, 38, 0.12);
  background: #f3f6fb;
  color: var(--ink-900);
}

html[data-theme="day"] .motion-toggle:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.28);
  color: var(--brand-500);
}

.hero__spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    420px 320px at var(--hx) var(--hy),
    rgba(0, 212, 160, var(--hero-spot-alpha)),
    transparent 62%
  );
  transition: opacity 0.35s var(--ease);
  opacity: 0;
}

.hero--home.is-pointer-lit .hero__spotlight {
  opacity: 1;
}

.hero__star-globe {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: var(--hero-globe-opacity);
}

.hero__edify {
  color: inherit;
  text-shadow: 0 0 0 transparent;
  transition: color 0.35s var(--ease), text-shadow 0.45s var(--ease);
}

.hero--home.is-pointer-lit .hero__edify {
  color: #9ff5dc;
  text-shadow:
    0 0 18px rgba(0, 212, 160, 0.55),
    0 0 42px rgba(0, 212, 160, 0.28);
}

.hero--home.is-pointer-lit .hero__blob--1 {
  transform: translate(
    calc((var(--hx) - 50%) * 0.12),
    calc((var(--hy) - 50%) * 0.1)
  );
}

.hero--home.is-pointer-lit .hero__blob--2 {
  transform: translate(
    calc((var(--hx) - 50%) * -0.1),
    calc((var(--hy) - 50%) * -0.08)
  );
}

.hero--home .hero__blob {
  transition: transform 0.45s var(--ease);
}

/* ---------- Slide stage ---------- */
.hero-stage {
  margin-top: 8px;
}

.hero-stage__track {
  position: relative;
  min-height: 33rem;
}

.hero-stage__slide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition:
    opacity 1.6s var(--ease),
    transform 1.6s var(--ease),
    visibility 0s linear 1.6s;
}

.hero-stage__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity 1.6s var(--ease),
    transform 1.6s var(--ease),
    visibility 0s linear 0s;
}

.hero-stage__slide[hidden] {
  display: block;
}

.hero-stage__slide:not(.is-active) {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
}

.hero-stage__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #35e6bb;
  margin: 0 0 10px;
}

.hero-stage__slide .hero__lead {
  margin-top: 20px;
}

.hero-stage__slide h1 + .hero__actions {
  margin-top: 30px;
}

.hero-stage__products {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
  max-width: 34rem;
}

.hero-stage__products li {
  font-size: 0.92rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  padding-left: 14px;
  position: relative;
}

.hero-stage__products li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-500);
  box-shadow: 0 0 8px rgba(0, 212, 160, 0.55);
}

.hero-stage__products a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 230, 187, 0.35);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.hero-stage__products a:hover,
.hero-stage__products a:focus-visible {
  color: #35e6bb;
  border-bottom-color: #35e6bb;
}

/* ---------- Controls ---------- */
.hero-stage__controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.hero-stage__nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(7, 16, 31, 0.45);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.hero-stage__nav svg {
  width: 16px;
  height: 16px;
}

.hero-stage__nav:hover,
.hero-stage__nav:focus-visible {
  background: rgba(0, 212, 160, 0.16);
  border-color: rgba(0, 212, 160, 0.55);
  outline: none;
}

.hero-stage__nav:active {
  transform: scale(0.96);
}

.hero-stage__dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-stage__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition:
    background 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.hero-stage__dot.is-active {
  background: var(--accent-500);
  transform: scale(1.25);
  box-shadow: 0 0 0 4px rgba(0, 212, 160, 0.22);
}

.hero-stage__dot:hover,
.hero-stage__dot:focus-visible {
  background: rgba(255, 255, 255, 0.7);
  outline: none;
}

.hero-stage__dot.is-active:hover,
.hero-stage__dot.is-active:focus-visible {
  background: var(--accent-400);
}

/* ---------- Panels swap ---------- */
.hero-stage__panels {
  position: relative;
  min-height: 280px;
}

.hero-stage__panels .hero__panel {
  width: 100%;
  transition:
    opacity 1.6s var(--ease),
    transform 1.6s var(--ease),
    visibility 0s linear 1.6s;
}

.hero-stage__panels .hero__panel:not(.is-active) {
  position: absolute;
  inset: 0 auto auto 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.985);
}

.hero-stage__panels .hero__panel.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition:
    opacity 1.6s var(--ease),
    transform 1.6s var(--ease),
    visibility 0s linear 0s;
}

.hero-stage__panels .hero__panel[hidden] {
  display: block;
}

.hero-stage__panels .shield-row .ok a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(53, 230, 187, 0.4);
}

.hero-stage__panels .shield-row .ok a:hover,
.hero-stage__panels .shield-row .ok a:focus-visible {
  color: #35e6bb;
}

.hero--home .hero__panel.is-tilting {
  transition: transform 0.12s linear;
}

/* ---------- Day theme ---------- */
html[data-theme="day"] .hero--home {
  --hero-spot-alpha: 0.18;
  --hero-globe-opacity: 0.62;
}

html[data-theme="day"] .hero__spotlight {
  background: radial-gradient(
    480px 340px at var(--hx) var(--hy),
    rgba(0, 180, 140, 0.22),
    rgba(37, 99, 235, 0.08) 42%,
    transparent 70%
  );
}

html[data-theme="day"] .hero--home.is-pointer-lit .hero__edify {
  color: #067a5c;
  text-shadow:
    0 0 14px rgba(0, 160, 120, 0.45),
    0 0 28px rgba(0, 160, 120, 0.22);
}

html[data-theme="day"] .hero-stage__eyebrow {
  color: #067a5c;
}

html[data-theme="day"] .hero-stage__products li {
  color: var(--ink-700);
}

html[data-theme="day"] .hero-stage__products a {
  color: var(--ink-900);
  border-bottom-color: rgba(6, 122, 92, 0.35);
}

html[data-theme="day"] .hero-stage__products a:hover,
html[data-theme="day"] .hero-stage__products a:focus-visible {
  color: #067a5c;
  border-bottom-color: #067a5c;
}

html[data-theme="day"] .hero-stage__nav {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(12, 21, 38, 0.18);
  color: var(--ink-900);
}

html[data-theme="day"] .hero-stage__nav:hover,
html[data-theme="day"] .hero-stage__nav:focus-visible {
  background: rgba(0, 212, 160, 0.14);
  border-color: rgba(0, 212, 160, 0.5);
}

html[data-theme="day"] .hero-stage__dot {
  background: rgba(12, 21, 38, 0.22);
}

html[data-theme="day"] .hero-stage__dot.is-active {
  background: var(--accent-500);
}

html[data-theme="day"] .hero-stage__dot:hover,
html[data-theme="day"] .hero-stage__dot:focus-visible {
  background: rgba(12, 21, 38, 0.45);
}

/* ---------- Narrow screens ---------- */
@media (max-width: 960px) {
  .hero-stage__track {
    min-height: 0;
  }

  .hero-stage__slide:not(.is-active) {
    position: absolute;
  }

  .hero-stage__panels {
    min-height: 0;
    margin-top: 8px;
  }

  .hero-stage__products {
    gap: 6px;
  }

  .hero-stage__products li {
    font-size: 0.88rem;
  }
}

@media (max-width: 640px) {
  .hero-stage__controls {
    margin-top: 18px;
  }

  .hero-stage__products {
    margin-bottom: 18px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__spotlight,
  .hero__star-globe,
  .hero__edify,
  .hero--home .hero__blob,
  .hero-stage__slide,
  .hero-stage__panels .hero__panel,
  .hero-stage__nav,
  .hero-stage__dot {
    transition: none !important;
  }

  .hero__spotlight,
  .hero__star-globe {
    display: none !important;
  }

  .hero-stage__slide {
    transform: none;
  }

  .hero-stage__panels .hero__panel:not(.is-active) {
    transform: none;
  }
}

@media (max-width: 960px) {
  .hero--home {
    --hero-globe-opacity: 0.5;
  }
}
