/* White Lantern Crossing product page refinements, v3.8.0. */

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: var(--bg-deep);
  background: var(--text-primary);
  transform: translateY(-160%);
  transition: transform .2s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.product-hero,
.characters-section,
.systems-section,
.specs-section,
.updates-section,
#gallery {
  scroll-margin-top: 80px;
}

.product-hero-bg img {
  object-position: center 58%;
}

/* The first viewport must remain useful even before the optional scroll observer runs. */
.product-hero .fade-in-up {
  opacity: 1;
  transform: none;
}

.product-hero + .content-section {
  padding-top: 72px;
}

.hero-scene-card {
  border: 0;
  background: var(--bg-primary);
}

.characters-section,
.systems-section,
.specs-section,
.updates-section,
#gallery {
  content-visibility: auto;
  contain-intrinsic-size: auto 960px;
}

.char-grid {
  align-items: start;
}

.char-card {
  display: grid;
  grid-template-rows: 420px auto;
  aspect-ratio: auto;
  overflow: visible;
  cursor: default;
  background: transparent;
  isolation: isolate;
  transition-delay: 0s !important;
}

.char-card::after {
  display: none;
}

.char-card:hover {
  transform: none;
}

.char-card img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  object-position: center bottom;
  transform: none !important;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .24));
}

.char-info {
  position: static;
  min-width: 0;
  min-height: 156px;
  padding: 18px 8px 28px;
}

.char-role,
.char-name,
.char-desc {
  overflow-wrap: anywhere;
}

.char-name {
  font-size: 22px;
}

.screenshot-grid .s-item {
  border: 0;
  outline: none;
  background: var(--bg-primary);
}

.screenshot-grid .s-item:focus-visible {
  outline: 2px solid var(--rose-gold);
  outline-offset: 3px;
}

.screenshot-grid .s-item img {
  display: block;
}

.scene-viewer {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  color: var(--text-primary);
  background: #0b0a09;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .75);
}

.scene-viewer::backdrop {
  background: rgba(0, 0, 0, .84);
  backdrop-filter: blur(5px);
}

.scene-viewer-shell {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
}

.scene-viewer-media {
  display: grid;
  place-items: center;
  min-height: 0;
  background: #050505;
}

.scene-viewer-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 116px);
  max-height: calc(100svh - 116px);
  object-fit: contain;
}

.scene-viewer-caption {
  min-height: 64px;
  margin: 0;
  padding: 20px 76px;
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-size: 14px;
  text-align: center;
}

.scene-viewer-control {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  background: rgba(5, 5, 5, .72);
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}

.scene-viewer-control:hover,
.scene-viewer-control:focus-visible {
  border-color: var(--rose-gold);
  color: var(--rose-gold);
  outline: none;
}

.scene-viewer-close {
  top: 12px;
  right: 12px;
}

.scene-viewer-prev,
.scene-viewer-next {
  top: 50%;
  transform: translateY(-50%);
}

.scene-viewer-prev { left: 12px; }
.scene-viewer-next { right: 12px; }

@media (max-width: 1024px) {
  .char-card {
    grid-template-rows: 390px auto;
  }
}

@media (max-width: 768px) {
  .product-hero {
    padding-top: 112px;
  }

  .product-hero-inner {
    gap: 32px;
  }

  .product-hero-inner > * {
    min-width: 0;
  }

  .product-hero-desc,
  .product-hero-subtitle {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .product-hero-cat {
    max-width: 100%;
    font-size: 9px;
    letter-spacing: .12em;
    line-height: 1.7;
    overflow-wrap: anywhere;
  }

  html[lang="en"] .product-hero-title,
  html[lang="ru"] .product-hero-title {
    font-size: 40px !important;
    line-height: 1.12;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-scene-card {
    display: block;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .char-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .char-card {
    grid-template-rows: clamp(250px, 72vw, 320px) auto;
  }

  .char-info {
    min-height: 174px;
    padding: 14px 3px 24px;
  }

  .char-role {
    font-size: 9px;
    line-height: 1.55;
  }

  .char-name {
    font-size: 19px;
  }

  .char-desc {
    font-size: 12px;
  }

  .scene-viewer-caption {
    padding: 16px 58px;
    font-size: 12px;
  }

  .scene-viewer-control {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 420px) {
  .char-grid {
    grid-template-columns: 1fr;
  }

  .char-card {
    grid-template-rows: min(116vw, 480px) auto;
  }

  .char-info {
    min-height: 0;
    padding-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-viewer *,
  .char-card,
  .char-card img {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
