/* Discover story — full-viewport sticky landscape. Duration: --discover-height. */

.discover-story {
  --discover-height: 200vh;
  --discover-intro-opacity: 1;
  --discover-intro-shift: 0px;
  --discover-overlay: 1;
  --discover-hotspots: 0;
  --discover-hint: 0;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100vh;
  height: 100dvh;
  background: #0c1410;
  color: #f7faf8;
  overflow-anchor: none;
}

.js .discover-story {
  height: var(--discover-height);
}

.discover-story-sticky {
  position: relative;
  isolation: isolate;
  height: 100%;
  overflow: hidden;
}

.js .discover-story-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
}

.discover-story-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.discover-story-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 38%;
  pointer-events: none;
  user-select: none;
}

.discover-story-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(8, 16, 22, 0.46) 0%,
      rgba(8, 16, 22, 0.28) 38%,
      rgba(8, 16, 22, 0.22) 68%,
      rgba(8, 16, 22, 0.38) 100%
    );
}

.discover-story-dock {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.discover-dock-card {
  display: none;
}

.discover-story-intro {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 46%;
  width: min(720px, calc(100% - 40px));
  margin: 0;
  text-align: center;
  opacity: var(--discover-intro-opacity);
  transform: translate(-50%, calc(-50% + var(--discover-intro-shift)));
  pointer-events: none;
}

.discover-story-intro h2 {
  max-width: none;
  margin: 0 auto;
  color: #fff;
  font-size: clamp(2.05rem, 5.4vw, 3.35rem);
  line-height: 1.1;
  text-shadow: 0 2px 28px rgba(8, 16, 22, 0.4);
}

.discover-story-intro p {
  max-width: 36rem;
  margin: 18px auto 0;
  color: rgba(247, 250, 248, 0.86);
  font-size: 1.08rem;
  line-height: 1.5;
  text-shadow: 0 1px 16px rgba(8, 16, 22, 0.35);
}

.discover-story-stage {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.discover-hotspot {
  --pin-x: 50%;
  --pin-y: 50%;
  --stagger: 0;
  position: absolute;
  left: var(--pin-x);
  top: var(--pin-y);
  width: 0;
  height: 0;
  z-index: 1;
  pointer-events: none;
}

.discover-hotspot-viz {
  opacity: 0;
  transform: translate(0, 8px);
}

.discover-story.is-hotspots .discover-hotspot.is-placed:not(.is-clipped) {
  pointer-events: auto;
}

.discover-story.is-hotspots .discover-hotspot.is-placed:not(.is-clipped) .discover-hotspot-viz {
  animation: discover-hotspot-in 0.75s ease calc(var(--stagger) * 110ms) both;
}

.discover-hotspot.is-active .discover-hotspot-viz {
  opacity: 1;
  transform: none;
}

.discover-hotspot.is-active {
  z-index: 5;
}

.discover-hotspot.is-clipped,
.discover-story.is-hotspots .discover-hotspot.is-clipped {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.discover-pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s ease;
}

.discover-pin:focus {
  outline: none;
}

.discover-pin:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
  border-radius: 50%;
}

.discover-pin-pulse,
.discover-pin-ring,
.discover-pin-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
}

.discover-pin-dot {
  width: 8px;
  height: 8px;
  background: #f7faf8;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--signal) 62%, rgba(255, 255, 255, 0.8)),
    0 0 0 4px rgba(8, 16, 22, 0.16),
    0 0 12px rgba(244, 247, 242, 0.4);
  transform: translate(-50%, -50%);
}

.discover-pin-ring {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(247, 250, 248, 0.55);
  background: rgba(14, 26, 20, 0.1);
  transform: translate(-50%, -50%) scale(1);
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    background-color 0.35s ease,
    box-shadow 0.35s ease;
}

.discover-pin-pulse {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(247, 250, 248, 0.22);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0.38;
  animation: discover-pulse 4.4s ease-in-out infinite;
}

.discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin {
  animation: discover-pin-blink 1s ease-in-out calc(0.6s + var(--stagger) * 110ms) 2;
  transition: none;
}

.discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin-dot {
  animation: discover-dot-blink 1s ease-in-out calc(0.6s + var(--stagger) * 110ms) 2;
}

.discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin-ring {
  animation: discover-ring-blink 1s ease-in-out calc(0.6s + var(--stagger) * 110ms) 2;
}

.discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin-pulse {
  animation: discover-ping-attention 1.5s ease-out calc(0.55s + var(--stagger) * 110ms) 2;
}

.discover-story.is-pin-attention .discover-hotspot.is-active .discover-pin,
.discover-story.is-pin-attention .discover-hotspot.is-active .discover-pin-dot,
.discover-story.is-pin-attention .discover-hotspot.is-active .discover-pin-ring,
.discover-story.is-pin-attention .discover-hotspot.is-active .discover-pin-pulse,
.discover-story.is-pin-attention .discover-hotspot:focus-within .discover-pin,
.discover-story.is-pin-attention .discover-hotspot:focus-within .discover-pin-dot,
.discover-story.is-pin-attention .discover-hotspot:focus-within .discover-pin-ring,
.discover-story.is-pin-attention .discover-hotspot:focus-within .discover-pin-pulse {
  animation: none;
}

.discover-hotspot.is-active .discover-pin,
.discover-hotspot:focus-within .discover-pin {
  transform: translate(-50%, -50%) scale(1.08);
}

.discover-hotspot.is-active .discover-pin-ring,
.discover-hotspot:focus-within .discover-pin-ring {
  border-color: rgba(247, 250, 248, 0.88);
  background: rgba(0, 184, 93, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 184, 93, 0.28);
  transform: translate(-50%, -50%) scale(1.18);
}

.discover-hotspot.is-active .discover-pin-dot,
.discover-hotspot:focus-within .discover-pin-dot {
  box-shadow:
    0 0 0 1px var(--signal),
    0 0 14px rgba(244, 247, 242, 0.5);
}

.discover-pill {
  position: absolute;
  left: 0;
  top: -34px;
  transform: translate(-50%, 6px);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(14, 26, 20, 0.42);
  color: #f7faf8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.discover-hotspot.is-active .discover-pill,
.discover-hotspot:focus-within .discover-pill {
  opacity: 1;
  transform: translate(-50%, 0);
}

.discover-card {
  position: absolute;
  left: 18px;
  top: 0;
  width: min(288px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(14, 26, 20, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.discover-hotspot.is-open .discover-card {
  z-index: 6;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.discover-hotspot.is-open .discover-hotspot-viz::before {
  content: "";
  position: absolute;
  left: -64px;
  top: -64px;
  width: 128px;
  height: 128px;
  pointer-events: auto;
}

.discover-card-media {
  display: block;
  width: 100%;
  height: 92px;
  overflow: hidden;
  background: var(--forest-2);
}

.discover-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discover-card-body {
  padding: 16px 18px 18px;
}

.discover-card-kicker {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-2);
}

.discover-card h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
}

.discover-card-category {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--signal-2);
}

.discover-card-copy {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

.discover-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
}

.discover-card-stats dt {
  margin: 0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.discover-card-stats dd {
  margin: 4px 0 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.03em;
  color: var(--ink);
  white-space: nowrap;
}

.discover-card-link {
  display: inline-flex;
  align-items: center;
  margin: 14px 0 0;
  color: var(--signal-2);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.discover-card-link:hover {
  color: var(--forest);
}

.discover-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(247, 250, 248, 0.82);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(8, 16, 22, 0.45);
}

.discover-story.is-card-open .discover-hint {
  opacity: 0 !important;
}

.discover-hint svg {
  display: block;
  width: 16px;
  height: 16px;
  opacity: 0.8;
}

.discover-hint-icon-tap,
.discover-hint-tap {
  display: none;
}

@keyframes discover-hotspot-in {
  from {
    opacity: 0;
    transform: translate(0, 8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes discover-pulse {
  0%,
  100% {
    opacity: 0.38;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.08;
    transform: translate(-50%, -50%) scale(1.55);
  }
}

@keyframes discover-pin-blink {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.28);
  }
}

@keyframes discover-dot-blink {
  0%,
  100% {
    background: #f7faf8;
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--signal) 62%, rgba(255, 255, 255, 0.8)),
      0 0 0 4px rgba(8, 16, 22, 0.16),
      0 0 12px rgba(244, 247, 242, 0.4);
  }
  50% {
    background: #fff;
    box-shadow:
      0 0 0 2px var(--signal),
      0 0 0 7px rgba(0, 184, 93, 0.28),
      0 0 22px rgba(0, 184, 93, 0.9);
  }
}

@keyframes discover-ring-blink {
  0%,
  100% {
    border-color: rgba(247, 250, 248, 0.55);
    background: rgba(14, 26, 20, 0.1);
    box-shadow: none;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    border-color: rgba(247, 250, 248, 0.95);
    background: rgba(0, 184, 93, 0.22);
    box-shadow: 0 0 0 1px rgba(0, 184, 93, 0.4);
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes discover-ping-attention {
  0% {
    opacity: 0.75;
    border-color: rgba(0, 184, 93, 0.9);
    transform: translate(-50%, -50%) scale(0.75);
  }
  100% {
    opacity: 0;
    border-color: rgba(247, 250, 248, 0.2);
    transform: translate(-50%, -50%) scale(2.9);
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  .discover-story {
    background: var(--bg);
    color: var(--ink);
  }

  .js .discover-story-sticky {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding:
      calc(18px + env(safe-area-inset-top, 0px))
      0
      calc(16px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    background: var(--bg);
  }

  .discover-story-intro {
    position: relative;
    left: auto;
    top: auto;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 0;
    width: min(36rem, calc(100% - 40px));
    min-height: 0;
    margin: 0 auto;
    padding: 0 4px;
    transform: none;
    text-align: center;
  }

  .discover-story-intro h2 {
    max-width: none;
    color: var(--ink);
    font-size: clamp(1.5rem, 6.4vw, 2rem);
    text-shadow: none;
  }

  .discover-story-intro p {
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 0.98rem;
    text-shadow: none;
  }

  .discover-story-frame {
    position: relative;
    inset: auto;
    z-index: 1;
    flex: 0 0 auto;
    width: 94%;
    margin: 0 auto;
    overflow: hidden;
    scrollbar-width: none;
  }

  .discover-story-media {
    width: 100%;
    height: auto;
    object-fit: unset;
    object-position: unset;
    aspect-ratio: 1024 / 768;
  }

  .discover-story-overlay {
    display: none;
  }

  .discover-story-stage {
    z-index: 2;
  }

  .discover-story-dock {
    position: relative;
    inset: auto;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    width: min(36rem, calc(100% - 40px));
    min-height: 0;
    margin: 0 auto;
    padding: 0 4px;
    pointer-events: auto;
  }

  .discover-hint {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    color: var(--muted);
    text-shadow: none;
  }

  .discover-hint-hover,
  .discover-hint-icon-hover {
    display: none;
  }

  .discover-hint-tap {
    display: inline;
  }

  .discover-hint-icon-tap {
    display: block;
  }

  .discover-story.is-card-open .discover-hint {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    opacity: 0 !important;
  }

  .discover-card {
    display: none !important;
  }

  .discover-hotspot.is-open .discover-hotspot-viz::before {
    content: none;
  }

  .discover-pill {
    display: none;
  }

  .discover-dock-card {
    display: none;
    width: 100%;
    max-height: 100%;
    overflow: auto;
    color: var(--ink);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
  }

  .discover-dock-card:not([hidden]) {
    display: block;
  }

  .discover-dock-card.is-in {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .discover-dock-card .discover-card-kicker {
    margin-bottom: 6px;
  }

  .discover-dock-card h3 {
    font-size: 1.2rem;
  }

  .discover-dock-card .discover-card-copy {
    margin-top: 8px;
    font-size: 0.86rem;
  }

  .discover-dock-card .discover-card-stats {
    margin-top: 12px;
    padding-top: 10px;
  }

  .discover-dock-card .discover-card-link {
    margin-top: 10px;
  }

  .discover-pin {
    width: 44px;
    height: 44px;
  }

  .discover-hotspot.is-active .discover-pin,
  .discover-hotspot:focus-within .discover-pin {
    transform: translate(-50%, -50%) scale(1);
  }

  .discover-hotspot.is-active .discover-pin-ring,
  .discover-hotspot:focus-within .discover-pin-ring {
    transform: translate(-50%, -50%) scale(1.22);
  }
}

@media (hover: none), (pointer: coarse) {
  .discover-hint-hover,
  .discover-hint-icon-hover {
    display: none;
  }

  .discover-hint-tap {
    display: inline;
  }

  .discover-hint-icon-tap {
    display: block;
  }
}

.js body:has(.discover-story.is-scene) .site-header {
  animation: none;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.js body:has(.discover-story.is-scene) .site-header:focus-within {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .discover-pin-pulse,
  .discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin,
  .discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin-dot,
  .discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin-ring,
  .discover-story.is-pin-attention .discover-hotspot.is-placed:not(.is-clipped) .discover-pin-pulse {
    animation: none;
  }

  .discover-pin-pulse {
    opacity: 0.28;
  }

  .discover-story.is-hotspots .discover-hotspot.is-placed .discover-hotspot-viz {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .discover-pill,
  .discover-card,
  .discover-dock-card,
  .discover-dock-card.is-in,
  .discover-pin,
  .discover-pin-ring,
  .discover-pin-dot {
    transition: none;
  }
}
