/* NWS 3D stage: sticky canvas, loading symbol, 2D view, hotspots and the tour chapters.
   Markup: .nws-stage > .nws-stage__inner > .nws-stage__viewport + .nws-stage__content > .nws-chapter */
.nws-stage {
  display: block;
  position: relative;
  background: var(--nws-c-stage-bg);
  color: var(--nws-c-stage-fg-2);
}
.nws-stage .nws-stage__inner {
  position: relative;
}
.nws-stage .nws-stage__viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.nws-stage.is-hero .nws-stage__viewport {
  position: relative;
  min-height: 680px;
}
.nws-stage.is-compact .nws-stage__viewport {
  height: 72vh;
  height: 72svh;
  min-height: 540px;
  max-height: 820px;
}
.nws-stage .nws-stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s var(--nws-ease-out);
}
.nws-stage .nws-stage__canvas.is-ready {
  opacity: 1;
}
.nws-stage .nws-stage__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--nws-c-stage-bg) 75%, transparent) 0%, transparent 16%);
}
.nws-stage.is-hero .nws-stage__shade {
  background: linear-gradient(90deg, color-mix(in srgb, var(--nws-c-stage-bg) 88%, transparent) 0%, color-mix(in srgb, var(--nws-c-stage-bg) 45%, transparent) 36%, transparent 58%), linear-gradient(0deg, color-mix(in srgb, var(--nws-c-stage-bg) 70%, transparent) 0%, transparent 22%);
}
@media (max-width: 1068px) {
  .nws-stage.is-hero .nws-stage__shade {
    background: linear-gradient(0deg, color-mix(in srgb, var(--nws-c-stage-bg) 92%, transparent) 0%, color-mix(in srgb, var(--nws-c-stage-bg) 60%, transparent) 45%, transparent 70%);
  }
}
.nws-stage.is-hero.is-compact .nws-stage__shade {
  background: linear-gradient(0deg, color-mix(in srgb, var(--nws-c-stage-bg) 85%, transparent) 0%, color-mix(in srgb, var(--nws-c-stage-bg) 40%, transparent) 26%, transparent 45%);
}
.nws-stage .nws-stage__content {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  margin-top: -100svh;
}
.nws-stage.is-story .nws-stage__content {
  pointer-events: none;
}
.nws-stage.is-story .nws-stage__content .nws-chapter-card {
  pointer-events: auto;
}
.nws-stage.is-hero .nws-stage__content {
  position: absolute;
  inset: 0;
  margin: 0;
}
.nws-stage .nws-stage__fallback {
  position: absolute;
  inset: 0;
  background: var(--nws-c-stage-bg);
  transition: opacity 1.2s var(--nws-ease-out);
}
.nws-stage .nws-stage__fallback.is-hidden {
  opacity: 0;
}
.nws-stage .nws-fallback-device {
  position: absolute;
  top: 50%;
  left: 72%;
  translate: -50% -50%;
  padding: 10px;
  border-radius: 34px;
  background: linear-gradient(145deg, #3a4266, #151a36);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: left 0.6s var(--nws-ease-out), width 0.6s var(--nws-ease-out);
}
.nws-stage .nws-fallback-device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
}
.nws-stage .nws-fallback-device--phone {
  width: min(270px, 34vh);
}
.nws-stage .nws-fallback-device--tablet {
  width: min(560px, 42vw);
  border-radius: 26px;
}
.nws-stage .nws-fallback-device--tablet img {
  border-radius: 16px;
}
.nws-stage .nws-fallback-device--laptop {
  width: min(620px, 46vw);
  border-radius: 18px 18px 8px 8px;
}
.nws-stage .nws-fallback-device--laptop img {
  border-radius: 8px;
}
@media (max-width: 1068px) {
  .nws-stage .nws-fallback-device {
    left: 50%;
    top: 34%;
  }
  .nws-stage .nws-fallback-device--tablet, .nws-stage .nws-fallback-device--laptop {
    width: 82vw;
  }
}
.nws-stage .nws-loader {
  position: absolute;
  top: 50%;
  left: 72%;
  translate: -50% -50%;
}
@media (max-width: 1068px) {
  .nws-stage .nws-loader {
    top: 30%;
    left: 50%;
  }
}
.nws-stage .nws-hotspots {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
@media (max-width: 734px) {
  .nws-stage .nws-hotspots {
    display: none;
  }
}
.nws-stage .nws-hotspot {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
  will-change: transform;
}
.nws-stage .nws-hotspot__dot {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(95, 141, 241, 0.45), 0 0 18px rgba(95, 141, 241, 0.9);
}
.nws-stage .nws-hotspot__dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation: nws-hotspot-pulse 2.2s ease-out infinite;
}
.nws-stage .nws-hotspot__label {
  position: absolute;
  left: 16px;
  top: -44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--nws-radius-pill);
  background: rgba(12, 13, 36, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  pointer-events: auto;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.nws-stage .nws-hotspot__label b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nws-grad-brand);
  font-size: 0.8125rem;
}
@media (max-width: 734px) {
  .nws-stage .nws-hotspot__label {
    font-size: 0.75rem;
    top: -36px;
  }
}
.nws-stage .nws-hotspot.is-flipped .nws-hotspot__label {
  left: auto;
  right: 16px;
}
.nws-stage .nws-hotspot__label--link {
  padding-right: 12px;
  transition: background-color var(--nws-dur-fast) ease, border-color var(--nws-dur-fast) ease;
}
.nws-stage .nws-hotspot__label--link svg {
  transition: transform var(--nws-dur-fast) var(--nws-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nws-stage .nws-hotspot__label--link:hover {
    background: var(--nws-c-secondary);
    border-color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
  }
  .nws-stage .nws-hotspot__label--link:hover svg {
    transform: translateX(3px);
  }
}
.nws-stage .nws-hotspot__label--link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
@keyframes nws-hotspot-pulse {
  from {
    transform: scale(0.6);
    opacity: 1;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nws-stage .nws-hotspot__dot::after {
    animation: none;
  }
}

.nws-chapter {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--nws-bar-top) + 20px) calc(32px + var(--nws-bar-bottom));
}
.nws-chapter > .nws-container {
  display: flex;
}
@media (max-width: 1068px) {
  .nws-chapter {
    align-items: flex-end;
    padding-block: 44svh calc(14px + var(--nws-bar-bottom));
  }
}

.nws-chapter--text-right > .nws-container {
  justify-content: flex-end;
}

.nws-chapter--text-center > .nws-container {
  justify-content: center;
  text-align: center;
}

.nws-chapter-card {
  display: grid;
  gap: 16px;
  width: min(100%, 500px);
  max-height: calc(100svh - var(--nws-bar-top) - var(--nws-bar-bottom) - 52px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--nws-c-stage-line);
  border-radius: var(--nws-radius-m);
  background: var(--nws-c-stage-card);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  color: var(--nws-c-stage-fg-2);
  box-shadow: var(--nws-c-stage-shadow);
}
.nws-chapter-card h1,
.nws-chapter-card h2,
.nws-chapter-card h3 {
  color: var(--nws-c-stage-fg);
}
.nws-chapter--text-center .nws-chapter-card {
  justify-items: center;
  width: min(100%, 760px);
}
@media (max-width: 1068px) {
  .nws-chapter-card {
    width: 100%;
    max-height: calc(56svh - 14px - var(--nws-bar-bottom));
    gap: 10px;
    padding: 20px;
    font-size: 0.9375rem;
    line-height: 1.55;
  }
  .nws-chapter-card .nws-t-h2 {
    font-size: 1.375rem;
  }
  .nws-chapter-card .nws-t-h3 {
    font-size: 1.1875rem;
  }
}

.nws-chapter-card--plain {
  position: relative;
  isolation: isolate;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  width: min(100%, 560px);
  max-height: none;
  overflow: visible;
}
.nws-chapter-card--plain .nws-t-lead {
  max-width: 38ch;
}
.nws-chapter-card--plain::before {
  content: "";
  position: absolute;
  inset: -18% -30% -18% -40%;
  z-index: -1;
  background: radial-gradient(ellipse 60% 55% at 40% 50%, color-mix(in srgb, var(--nws-c-stage-bg) 85%, transparent) 0%, color-mix(in srgb, var(--nws-c-stage-bg) 55%, transparent) 50%, transparent 75%);
  pointer-events: none;
}
@media (max-width: 1068px) {
  .nws-chapter-card--plain {
    max-height: calc(56svh - 14px - var(--nws-bar-bottom));
    overflow-y: auto;
    padding: 20px;
    border-radius: var(--nws-radius-m);
    background: var(--nws-c-stage-card);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .nws-chapter-card--plain::before {
    display: none;
  }
  .nws-chapter-card--plain .nws-t-display {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
  }
  .nws-chapter-card--plain .nws-t-quote {
    font-size: 1.0625rem;
  }
  .nws-chapter-card--plain .nws-t-lead {
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  .nws-chapter-card--plain .nws-crumbs {
    font-size: 0.8125rem;
  }
  .nws-chapter-card--plain .nws-scroll-hint {
    display: none;
  }
  .nws-chapter-card--plain .nws-btn-row,
  .nws-chapter-card--plain .nws-btn-row .nws-btn {
    width: 100%;
    justify-content: center;
  }
}

.nws-chapter-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--nws-grad-brand);
  color: #fff;
  box-shadow: var(--nws-shadow-glow);
}

@media (max-width: 1068px) {
  .nws-chapter > .nws-container {
    scroll-margin-top: calc(42svh - var(--nws-bar-top) - 28px);
  }
}
@media (min-width: 1069px) {
  .nws-chapter:first-of-type {
    min-height: calc(100svh - var(--nws-bar-top) - var(--nws-topbar-h));
    padding-top: 24px;
  }
}
@media (max-width: 1068px) {
  .nws-stage.is-story {
    margin-top: calc(-1 * var(--nws-bar-top));
  }
}
@media (max-width: 1068px) {
  .nws-chapter {
    padding-top: calc(44svh - 28px);
  }
  .nws-chapter .nws-chapter-card,
  .nws-chapter .nws-chapter-card--plain {
    max-height: calc(56svh + 14px - var(--nws-bar-bottom));
  }
  .nws-chapter .nws-chapter-card--plain .nws-crumbs {
    display: none;
  }
}
.nws-chapter .nws-chapter-card {
  transform-origin: 50% 100%;
  transition: opacity 600ms var(--nws-ease-out), transform 900ms var(--nws-ease-out);
}

.nws-stage.is-live .nws-chapter:not(.is-current) .nws-chapter-card {
  opacity: 0;
  transform: perspective(1400px) translate3d(0, 56px, -160px) rotateX(12deg);
  pointer-events: none;
}

.nws-stage.is-live .nws-chapter.is-past:not(.is-current) .nws-chapter-card {
  transform-origin: 50% 0%;
  transform: perspective(1400px) translate3d(0, -56px, -160px) rotateX(-12deg);
}

@media (prefers-reduced-motion: reduce) {
  .nws-chapter .nws-chapter-card {
    transition: opacity 300ms linear;
  }
  .nws-stage.is-live .nws-chapter:not(.is-current) .nws-chapter-card {
    transform: none;
  }
}

/* Loading symbol of every 3D view: the NWS mark pops up, then breathes until the scene is ready. */
.nws-loader {
  display: block;
  width: clamp(64px, 6vw, 92px);
  color: var(--nws-logo-color, var(--nws-c-primary));
  animation: nws-loader-pop 700ms var(--nws-ease-out) both, nws-loader-breathe 1.6s ease-in-out 700ms infinite;
}
.nws-loader svg {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
}
@media (prefers-reduced-motion: reduce) {
  .nws-loader {
    animation: none;
  }
}
@keyframes nws-loader-pop {
  0% { opacity: 0; transform: scale(0.55); }
  60% { opacity: 1; transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes nws-loader-breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.92); }
}

/* Performance: once the 3D picture is there, the loader (fading out with the cover) stops animating. */
.nws-stage .nws-stage__fallback.is-hidden .nws-loader {
  animation-play-state: paused;
}
