/* Shared archive and Motion 2 UI, versioned for cache-safe deploys. */
.app-shell--motion2 {
  --accent-rgb: 120, 215, 231;
  --accent-soft: rgba(120, 215, 231, 0.1);
  --accent-border: rgba(120, 215, 231, 0.26);
  --accent-text: rgba(226, 251, 255, 0.92);
}

.motion2-brand-link {
  color: inherit;
  text-decoration: none;
}

.scene-motion2::before {
  background:
    radial-gradient(circle at center, rgba(120, 215, 231, 0.07), transparent 36%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
}

.motion2-status {
  position: absolute;
  top: 20%;
  left: 50%;
  z-index: 80;
  display: flex;
  width: min(520px, calc(100vw - 48px));
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transform: translateX(-50%);
  pointer-events: none;
}

.motion2-mobile-caption {
  display: none;
}

.motion2-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: #070707;
}

.motion2-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.52)),
    radial-gradient(circle at 50% 40%, transparent 36%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
  transition: border-color 280ms ease;
}

.motion2-card.is-front {
  border-color: rgba(255, 255, 255, 0.54);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.78),
    0 0 28px rgba(120, 215, 231, 0.09);
}

.motion2-card.is-front::after {
  border-color: rgba(120, 215, 231, 0.1);
}

.motion2-card .media-poster,
.motion2-card .motion2-video {
  transition:
    opacity 420ms ease,
    filter 420ms ease,
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.motion2-card .media-poster {
  filter: saturate(0.88) contrast(1.08) brightness(0.8);
  transform: scale(1.025);
}

.motion2-card.is-front .media-poster {
  filter: saturate(0.96) contrast(1.08) brightness(0.92);
  transform: scale(1);
}

.motion2-video {
  z-index: 2;
  opacity: 0;
  background: #050505;
}

.motion2-card.is-loaded .motion2-video {
  opacity: 1;
  pointer-events: auto;
}

.motion2-card.is-loaded .media-poster {
  opacity: 0;
}

.motion2-card.is-loaded::after {
  opacity: 0.16;
}

.motion2-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  display: inline-flex;
  min-width: 112px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(5, 5, 5, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition:
    color 240ms ease,
    border-color 240ms ease,
    background 240ms ease,
    opacity 240ms ease,
    transform 240ms ease;
}

.motion2-play::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid currentColor;
}

.motion2-play:hover,
.motion2-play:focus-visible {
  color: #050505;
  border-color: rgba(120, 215, 231, 0.84);
  outline: none;
  background: rgba(120, 215, 231, 0.88);
  transform: translate(-50%, -50%) scale(1.03);
}

.motion2-card:not(.is-front) .motion2-play {
  opacity: 0;
  pointer-events: none;
}

.motion2-card.is-playing .motion2-play {
  opacity: 0;
  pointer-events: none;
}

.motion2-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 9;
  display: none;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(5, 5, 5, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font: 300 15px/1 var(--font-sans);
  cursor: pointer;
}

.motion2-card.is-loaded .motion2-close {
  display: inline-flex;
}

.motion2-card.is-loading .motion2-play::before {
  width: 9px;
  height: 9px;
  border: 1px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: motion2-spin 700ms linear infinite;
}

.motion2-card .video-meta {
  top: 10px;
  bottom: auto;
  z-index: 6;
  transition: opacity 220ms ease;
}

.motion2-card.is-loaded .video-meta {
  opacity: 0.28;
}

.aspect-editorial {
  width: 300px;
  height: 244px;
  margin-top: -122px;
  margin-left: -150px;
}

.archive-switch--quad .archive-switch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
}

.archive-switch--five .archive-switch-button {
  min-width: 68px;
}

.access-section-motion2 {
  bottom: 4%;
  gap: 12px;
  max-width: 560px;
}

.app-shell--still .access-section > .access-label,
.app-shell--still .access-section > .input-group,
.app-shell--video .access-section > .access-label,
.app-shell--video .access-section > .input-group {
  display: none;
}

.app-shell--still .access-section,
.app-shell--video .access-section {
  gap: 0;
  max-width: 540px;
}

.archive-switch--four-clean .archive-switch-options {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-switch--four-clean {
  width: min(520px, calc(100vw - 24px));
  padding: 4px;
}

.archive-switch--four-clean .archive-switch-label {
  display: none;
}

.archive-switch--four-clean .archive-switch-button {
  min-width: 86px;
}

@keyframes motion2-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .motion2-status {
    top: 19%;
  }

  .aspect-editorial {
    width: 260px;
    height: 212px;
    margin-top: -106px;
    margin-left: -130px;
  }

  .access-section-motion2 {
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .app-shell--motion2 .site-header {
    flex-direction: row;
    align-items: center;
    padding: 14px 14px 0;
  }

  .app-shell--motion2 .header-left,
  .app-shell--motion2 .header-right {
    width: auto;
  }

  .app-shell--motion2 .header-right {
    margin-left: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .app-shell--motion2 .header-right > span:nth-child(2),
  .app-shell--motion2 .header-right .issue-mark {
    display: none;
  }

  .app-shell--motion2 .timer-block {
    margin-top: 0;
    font-size: 8px;
  }

  .scene-motion2 {
    align-items: flex-start;
    padding-top: clamp(230px, 35vh, 310px);
    padding-bottom: 160px;
  }

  .motion2-status {
    display: none;
  }

  .motion2-mobile-caption {
    position: fixed;
    right: 16px;
    bottom: 96px;
    left: 16px;
    z-index: 88;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, 0.46);
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    pointer-events: none;
  }

  .app-shell--motion2 .aspect-cinema {
    width: clamp(270px, 82vw, 352px);
    height: clamp(152px, 46.125vw, 198px);
    margin-left: clamp(-176px, -41vw, -135px);
    margin-top: clamp(-99px, -23.0625vw, -76px);
  }

  .app-shell--motion2 .aspect-reel {
    width: clamp(176px, 54vw, 232px);
    height: clamp(313px, 96vw, 412px);
    margin-left: clamp(-116px, -27vw, -88px);
    margin-top: clamp(-206px, -48vw, -156.5px);
  }

  .aspect-editorial {
    width: clamp(252px, 74vw, 318px);
    height: clamp(205px, 60.2vw, 259px);
    margin-top: clamp(-129.5px, -30.1vw, -102.5px);
    margin-left: clamp(-159px, -37vw, -126px);
  }

  .motion2-play {
    min-width: 118px;
    min-height: 42px;
    font-size: 9px;
  }

  .motion2-card .video-meta {
    display: none;
  }

  .motion2-close {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
  }

  .motion2-card.is-front {
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.86),
      0 0 34px rgba(120, 215, 231, 0.12);
  }

  .access-section-motion2 {
    position: fixed;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-width: none;
    gap: 0;
  }

  .access-section-motion2 > .access-label {
    display: none;
  }

  .archive-switch--quad {
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 4px;
    border-color: rgba(120, 215, 231, 0.22);
    background: rgba(7, 11, 12, 0.88);
    box-shadow:
      0 18px 48px rgba(0, 0, 0, 0.72),
      0 0 0 1px rgba(255, 255, 255, 0.025) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }

  .archive-switch--quad .archive-switch-label {
    display: none;
  }

  .archive-switch--quad .archive-switch-options {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .archive-switch--five .archive-switch-options {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .archive-switch--four-clean .archive-switch-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .archive-switch--quad .archive-switch-button {
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 4px;
    font-size: 8px;
    letter-spacing: 0.1em;
  }

  .archive-switch--five .archive-switch-button {
    min-width: 0;
    padding-inline: 3px;
    font-size: 7px;
    letter-spacing: 0.07em;
  }

  .archive-switch--four-clean .archive-switch-button {
    min-width: 0;
    padding-inline: 5px;
    font-size: 8px;
    letter-spacing: 0.09em;
  }

  .app-shell--still .access-section,
  .app-shell--video .access-section {
    bottom: 72px;
    width: calc(100% - 24px);
    max-width: none;
  }

  .app-shell--motion2 .bottom-right {
    display: none;
  }
}

@media (max-width: 420px) {
  .app-shell--motion2 .header-right > span:first-child {
    font-size: 8px;
  }

  .app-shell--motion2 .timer-block {
    display: none;
  }

  .archive-switch--quad .archive-switch-button {
    min-height: 42px;
    height: 42px;
    font-size: 7px;
    letter-spacing: 0.08em;
  }

  .motion2-mobile-caption {
    right: 14px;
    bottom: 84px;
    left: 14px;
    font-size: 6px;
    letter-spacing: 0.12em;
  }
}

@media (max-width: 380px), (max-height: 720px) {
  .scene-motion2 {
    padding-top: clamp(190px, 32vh, 230px);
  }

  .app-shell--motion2 .aspect-cinema {
    width: clamp(248px, 78vw, 296px);
    height: clamp(140px, 43.875vw, 167px);
    margin-left: clamp(-148px, -39vw, -124px);
    margin-top: clamp(-83.5px, -21.9375vw, -70px);
  }

  .app-shell--motion2 .aspect-reel {
    width: clamp(160px, 50vw, 190px);
    height: clamp(284px, 88.9vw, 338px);
    margin-left: clamp(-95px, -25vw, -80px);
    margin-top: clamp(-169px, -44.45vw, -142px);
  }

  .aspect-editorial {
    width: clamp(228px, 70vw, 266px);
    height: clamp(186px, 56.9vw, 217px);
    margin-top: clamp(-108.5px, -28.45vw, -93px);
    margin-left: clamp(-133px, -35vw, -114px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion2-card,
  .motion2-card .media-poster,
  .motion2-card .motion2-video {
    transition-duration: 1ms;
  }
}
