/* Compact features keep their typography fixed while the surface expands. */
.nyx-feature {
  position: absolute;
  box-sizing: border-box;
  width: 23%;
  padding: 20px;
  opacity: var(--show, 0);
  transform: translateY(calc((1 - var(--show, 0)) * 10px));
  border: 0;
  border-radius: 0;
  background: none;
  pointer-events: auto;
  isolation: isolate;
}
.nyx-feature[data-order="1"],
.nyx-feature[data-order="2"] {
  top: 15%;
}
.nyx-feature[data-order="3"],
.nyx-feature[data-order="4"] {
  top: 56%;
}
.nyx-feature[data-order="1"],
.nyx-feature[data-order="3"] {
  left: 0;
}
.nyx-feature[data-order="2"],
.nyx-feature[data-order="4"] {
  right: 0;
}
.nyx-feature span {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--nyx-ink);
}
.nyx-feature h3 {
  font:
    600 clamp(18px, 1.65vw, 24px) / 1.25 Manrope,
    sans-serif;
  letter-spacing: -0.035em;
  margin: 12px 0 9px;
  color: #19252b;
}
.nyx-feature p {
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 400;
  line-height: 1.65;
  color: #414f56;
  text-wrap: pretty;
  max-width: none;
  margin: 0;
}
.nyx-feature::before {
  content: "";
  display: block;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  border-radius: 3px;
  background: var(--nyx-ink);
  transform: scaleY(0.09375);
  transform-origin: center bottom;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s;
}
.nyx-feature.is-highlighted {
  border-radius: 22px;
}
.nyx-feature.is-highlighted::before {
  background: rgb(var(--accent));
}
.nyx-feature.is-highlighted:not(.is-expanded)::before {
  transform: scaleY(1);
  border-radius: 0;
}

/* Number markers are the only hover and expansion controls. */
.nyx-hotspots {
  transform: scale(0.9);
  transform-origin: center;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.nyx-hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%) scale(calc(0.8 + var(--show, 0) * 0.2));
  opacity: var(--show, 0);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid #ffffff80;
  background: linear-gradient(145deg, #ffffff80, #ffffff20);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 #ffffffaa,
    0 4px 14px #07192250;
  color: #fff;
  text-shadow: 0 1px 3px #0009;
  font:
    600 11px Manrope,
    sans-serif;
  letter-spacing: 0.03em;
  pointer-events: auto;
  cursor: pointer;
  transition:
    background 0.3s,
    box-shadow 0.3s,
    border-radius 0.3s;
}
.nyx-hotspot:disabled {
  pointer-events: none;
}
.nyx-hotspot.is-highlighted {
  background: rgb(var(--accent) / 0.9);
  color: #172d35;
  text-shadow: none;
  border-radius: 50%;
  box-shadow:
    0 0 0 7px rgb(var(--accent) / 0.18),
    0 5px 18px #07192250;
}
.nyx-hotspot:focus-visible,
.nyx-panel-close:focus-visible {
  outline: 2px solid var(--nyx-ink);
  outline-offset: 5px;
}

/* The original card stays in its positioning context throughout both directions. */
body.nyx-detail-open {
  overflow: hidden;
}
.nyx-detail-open .nyx-heading,
.nyx-detail-open #nyx-video,
.nyx-detail-open .nyx-hotspots,
.nyx-detail-open .nyx-feature:not(.is-expanded),
.nyx-detail-open .nyx-scroll-note,
.nyx-detail-open .menu-shell,
.nyx-detail-open > footer {
  filter: blur(6px);
}
.nyx-detail-open .nyx-sticky {
  overflow: visible;
}
.nyx-detail-open .nyx-feature:not(.is-expanded) {
  transition: opacity 0.6s cubic-bezier(0.45, 0, 0.55, 1);
}
.nyx-detail-open:not(.nyx-detail-closing) .nyx-feature:not(.is-expanded) {
  opacity: 0.22;
}
.nyx-feature.is-expanded {
  z-index: 20;
  transform: none;
  opacity: 1;
  border-radius: 26px;
  overflow: hidden;
  overscroll-behavior: contain;
  max-width: none;
  text-align: left;
}
.nyx-feature.is-expanded.is-settled {
  overflow-y: auto;
}
.nyx-feature.is-expanded[data-order] {
  padding: clamp(24px, 4vw, 32px);
}
.nyx-panel-surface {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #f7fafa;
  box-shadow: inset 0 0 0 1px #66828c70;
  backdrop-filter: blur(24px);
  pointer-events: none;
}
.nyx-expanded-content {
  margin-top: 24px;
  max-width: none;
}
.nyx-expanded-content section {
  margin: 20px 0;
}
.nyx-expanded-content h4 {
  font-size: 14px;
  color: #20373e;
  margin: 0 0 8px;
}
.nyx-expanded-content p {
  font-size: 14px;
  line-height: 1.7;
  color: #435860;
}
.nyx-expanded-content .nyx-panel-status {
  font-size: 9px;
  letter-spacing: 2px;
  border-top: 1px solid #20373e22;
  padding-top: 18px;
}
.nyx-panel-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #20373e25;
  background: #fff8;
  color: #20373e;
  font-size: 24px;
  cursor: pointer;
}

/* Only headings breathe; word wrappers retain normal line wrapping. */
.nyx-feature h3 .nyx-title-wave-word {
  display: inline-block;
  white-space: nowrap;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}
.nyx-feature h3 .nyx-title-wave-letter {
  position: relative;
  display: inline-block;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  transform-origin: 50% 75%;
}
.nyx-feature h3 .nyx-title-wave-letter:nth-child(4n + 2) {
  color: color-mix(
    in srgb,
    currentColor calc(100% - var(--letter-glint, 0) * 40%),
    #63cfe5
  );
}
.nyx-wave-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .nyx-feature {
    width: 46%;
    padding: 12px;
    background: #f4f4f4;
  }
  .nyx-feature[data-order="1"],
  .nyx-feature[data-order="2"] {
    top: auto;
    bottom: 103%;
  }
  .nyx-feature[data-order="3"],
  .nyx-feature[data-order="4"] {
    top: 94%;
    bottom: auto;
  }
  .nyx-feature[data-order="2"],
  .nyx-feature[data-order="4"] {
    text-align: right;
  }
  .nyx-feature[data-order="2"] p,
  .nyx-feature[data-order="4"] p {
    margin-left: auto;
  }
  .nyx-feature[data-order="2"]::before,
  .nyx-feature[data-order="4"]::before {
    margin-left: auto;
  }
  .nyx-feature h3 {
    font-size: 16px;
    margin: 7px 0 6px;
  }
  .nyx-feature p {
    font-size: 13px;
    line-height: 1.45;
  }
  .nyx-feature::before {
    margin-bottom: 10px;
  }
  .nyx-hotspot {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    font-size: 9px;
  }
  .nyx-feature.is-expanded {
    text-align: left;
    background: transparent;
  }
  /* Keep the introduction and feature copy in flow on a narrow screen. */
  .nyx-sticky {
    padding-bottom: 90px;
  }
  .nyx-sequence {
    align-items: center;
  }
  .nyx-film {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    aspect-ratio: auto;
    margin-bottom: 0;
  }
  #nyx-video,
  .nyx-hotspots {
    grid-area: 1 / 1 / 2 / 3;
  }
  #nyx-video {
    aspect-ratio: 16 / 9;
    height: auto;
  }
  .nyx-hotspots {
    position: relative;
    inset: auto;
  }
  .nyx-feature[data-order] {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    padding: 8px 10px;
  }
  .nyx-feature[data-order="1"] {
    grid-area: 2 / 1;
  }
  .nyx-feature[data-order="2"] {
    grid-area: 2 / 2;
  }
  .nyx-feature[data-order="3"] {
    grid-area: 3 / 1;
  }
  .nyx-feature[data-order="4"] {
    grid-area: 3 / 2;
  }
  .nyx-feature::before {
    height: 3px;
    transform: none;
  }
  .nyx-feature > span {
    font-size: 9px;
  }
  .nyx-feature h3 {
    font-size: 15px;
  }
  .nyx-feature p {
    font-size: 12px;
    line-height: 1.4;
  }
  .nyx-feature.is-expanded {
    position: absolute;
    grid-area: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nyx-feature,
  .nyx-feature::before,
  .nyx-hotspot {
    transition: none;
  }
  .nyx-feature h3 .nyx-title-wave-letter {
    transform: none !important;
  }
}
