:root {
  --bg: #050403;
  --ring: rgba(255, 255, 255, 0.86);
  --pulse: rgba(120, 162, 255, 0.5);
  --fill: rgba(120, 162, 255, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #000;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  background: transparent;
}

.top-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.top-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: flex-end;
}

.top-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 12px;
  transition: color 180ms ease;
}

.top-header.is-on-light .top-link {
  color: #0d0d0d;
}

.scene-stage {
  position: relative;
  width: 100vw;
  width: 100dvw;
  min-height: 100vh;
  min-height: 100dvh;
  background: #000;
}

.scene-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  --pan-x: 0px;
  --pan-y: 0px;
  --zoom: 1;
  --viewer-ratio: 16 / 10;
  --viewer-ratio-number: 1.6;
}

.scene-label {
  display: none;
}

.scene-content {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transform: translate3d(var(--pan-x), var(--pan-y), 0) scale(var(--zoom));
  transition:
    transform 1250ms cubic-bezier(0.22, 0.8, 0.18, 1),
    opacity 1250ms ease;
}

.scene-fade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(255, 248, 240, 0.04), rgba(14, 10, 7, 0.28) 78%),
    rgba(5, 4, 3, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1250ms ease;
}

.scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  user-select: none;
  -webkit-user-drag: none;
}

.scene-frame.is-transitioning .scene-content {
  opacity: 0.84;
}

.scene-frame.is-transitioning .scene-fade {
  opacity: 0.14;
}

.hotspot {
  position: absolute;
  left: var(--left-px, 50%);
  top: var(--top-px, 50%);
  width: var(--size-px, 120px);
  height: var(--size-px, 120px);
  transform: translate(-50%, -50%);
  border: 1px solid var(--ring);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--fill) 0%, rgba(120, 162, 255, 0.08) 48%, transparent 68%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 28px rgba(120, 162, 255, 0.16);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.hotspot::before,
.hotspot::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.hotspot::before {
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.hotspot::after {
  inset: -8%;
  border: 1px solid var(--pulse);
  animation: pulse 2.6s ease-out infinite;
}

.hotspot:hover,
.hotspot:focus-visible,
.hotspot.is-active {
  transform: translate(-50%, -50%) scale(1.05);
  border-color: #ffffff;
  outline: none;
}

.scene-frame.is-transitioning .hotspot {
  pointer-events: none;
}

.scene-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: translateX(-50%);
  color: rgba(255, 247, 238, 0.82);
  animation: floatHint 3.8s ease-in-out infinite;
  pointer-events: none;
}

.scene-hint-text {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scene-hint-arrow {
  width: 14px;
  height: 14px;
  border-right: 1px solid rgba(255, 247, 238, 0.78);
  border-bottom: 1px solid rgba(255, 247, 238, 0.78);
  transform: rotate(45deg);
}

.story-sequence {
  background: #000;
}

.story-panel {
  position: relative;
  min-height: 155vh;
  background: #000;
}

.story-panel--text {
  min-height: 165vh;
}

.story-sticky {
  position: sticky;
  top: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 8vh 5vw;
}

.story-panel--image,
.story-panel--image .story-sticky,
.story-panel--html,
.story-panel--html .story-sticky {
  background: #ffffff;
}

.story-panel--image .story-sticky,
.story-panel--html .story-sticky {
  padding: 0;
}

.story-card {
  width: min(92vw, 1640px);
  opacity: 0;
  transform: translate3d(0, 72px, 0) scale(0.94);
  transform-origin: center center;
  will-change: transform, opacity;
  transition: opacity 180ms linear, transform 180ms linear;
}

.story-card--text {
  width: min(90vw, 1380px);
}

.question-copy {
  display: grid;
  gap: 0.18em;
  justify-items: center;
  color: #fff7ee;
  text-align: center;
  font-family: "Aptos Display", Aptos, "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4.9vw, 4.65rem);
  line-height: 1.03;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.question-line {
  display: block;
  opacity: 0;
  transform: translateY(84px);
  transition:
    transform 900ms cubic-bezier(0.2, 0.82, 0.2, 1),
    opacity 900ms ease;
  will-change: transform, opacity;
}

.question-copy.is-visible .question-line {
  opacity: 1;
  transform: translateY(0);
}

.question-copy.is-visible .question-line:nth-child(2) {
  transition-delay: 140ms;
}

.story-media {
  margin: 0;
  display: grid;
  place-items: center;
  width: 100vw;
  min-height: 100vh;
  min-height: 100dvh;
  background: #ffffff;
}

.story-media--intro {
  position: relative;
}

.story-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  object-fit: contain;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
}

.story-intro-copy {
  position: absolute;
  top: 50%;
  right: clamp(4vw, 8vw, 10vw);
  width: min(30vw, 420px);
  color: #121212;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-align: left;
  line-height: 1.02;
  letter-spacing: -0.03em;
  transform: translate3d(-120px, -50%, 0);
  opacity: 0;
  pointer-events: none;
}

.story-intro-strong {
  display: block;
  font-size: clamp(2rem, 3.25vw, 3.6rem);
  font-weight: 700;
}

.story-intro-regular {
  display: block;
  margin-top: 0.55rem;
  font-size: clamp(1.15rem, 1.55vw, 1.7rem);
  font-weight: 400;
  font-style: italic;
}

.story-card--html {
  width: min(94vw, calc(88vh * var(--story-frame-ratio-number, 1.6)), 1600px);
  max-width: 1600px;
  aspect-ratio: var(--story-frame-ratio, 16 / 10);
  max-height: 88vh;
  overflow: hidden;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.08);
}

.story-html-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.viewer-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 520ms ease;
}

.viewer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 3, 0.18);
  backdrop-filter: blur(3px);
}

.viewer-panel {
  position: relative;
  z-index: 1;
  width: min(96vw, calc(92vh * var(--viewer-ratio-number, 1.6)), 1680px);
  max-width: 1680px;
  aspect-ratio: var(--viewer-ratio, 16 / 10);
  height: auto;
  max-height: 92vh;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 12, 10, 0.9);
  box-shadow: 0 32px 120px rgba(0, 0, 0, 0.34);
  transform: translateY(18px) scale(0.98);
  transition: transform 520ms cubic-bezier(0.22, 0.8, 0.18, 1);
}

.viewer-overlay.is-open .viewer-panel {
  transform: translateY(0) scale(1);
}

.viewer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(14, 11, 9, 0.42);
  color: #fff7ee;
  padding: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.viewer-close:hover,
.viewer-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.viewer-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@keyframes pulse {
  0% {
    transform: scale(0.94);
    opacity: 0.95;
  }
  72% {
    transform: scale(1.18);
    opacity: 0;
  }
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes floatHint {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@media (max-width: 720px) {
  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }

  .top-nav {
    gap: 10px 14px;
    justify-content: flex-start;
  }

  .top-link {
    font-size: 11px;
  }

  .scene-label {
    top: 16px;
    left: 18px;
    font-size: 10px;
  }

  .viewer-panel {
    width: min(95vw, calc(80vh * var(--viewer-ratio-number, 1.6)));
    max-height: 80vh;
    border-radius: 20px;
  }

  .scene-hint {
    bottom: 14px;
  }

  .story-panel {
    min-height: 145vh;
  }

  .story-panel--text {
    min-height: 155vh;
  }

  .story-sticky {
    padding: 8vh 8vw;
  }

  .question-copy {
    font-size: clamp(1.55rem, 7vw, 2.85rem);
    line-height: 1.08;
  }

  .story-image {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
  }

  .story-intro-copy {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 9vh;
    width: min(82vw, 420px);
    text-align: center;
    transform: translate3d(-50%, 0, 0);
  }

  .story-intro-strong {
    font-size: clamp(1.5rem, 8vw, 2.45rem);
  }

  .story-intro-regular {
    font-size: clamp(1rem, 4.2vw, 1.25rem);
  }

  .story-card--html {
    width: min(96vw, calc(78vh * var(--story-frame-ratio-number, 1.6)));
    max-height: 78vh;
  }

  .question-line {
    transform: translateY(56px);
  }

  .hotspot::before {
    inset: 18%;
  }

  .hotspot::after {
    inset: -4%;
  }
}

@media (max-width: 560px) {
  .top-header {
    gap: 8px;
    padding: 10px 12px;
  }

  .top-mark,
  .top-mark img {
    width: 36px;
    height: 36px;
  }

  .top-nav {
    gap: 8px 12px;
  }

  .top-link {
    font-size: 10px;
  }

  .scene-frame {
    height: 100svh;
  }

  .scene-label {
    top: 12px;
    left: 14px;
    font-size: 9px;
  }

  .scene-hint {
    bottom: 10px;
    gap: 6px;
  }

  .scene-hint-text {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .viewer-panel {
    width: min(100vw, calc(74svh * var(--viewer-ratio-number, 1.6)));
    max-height: 74svh;
    border-radius: 16px;
  }

  .viewer-close {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .story-panel {
    min-height: 132vh;
  }

  .story-panel--text {
    min-height: 142vh;
  }

  .story-sticky {
    padding: 6vh 5vw;
  }

  .question-copy {
    font-size: clamp(1.3rem, 7.4vw, 2rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
  }

  .story-intro-copy {
    bottom: 6vh;
    width: min(88vw, 360px);
  }

  .story-intro-strong {
    font-size: clamp(1.3rem, 7vw, 2rem);
  }

  .story-intro-regular {
    font-size: clamp(0.95rem, 4.5vw, 1.15rem);
    margin-top: 0.4rem;
  }

  .story-card--html {
    width: 100vw;
    max-height: 70svh;
    border-radius: 0;
    box-shadow: none;
  }
}
