/* Product screens: app-window frames, slow focus zoom, highlight ring,
   crossfade carousel, and casual copy deterrents. Loaded by index.html.
   All motion is off under prefers-reduced-motion. */

/* ---- Screen: image + ring + guard ---- */
.screen {
  position: relative;
  overflow: hidden;
  line-height: 0;
  background: #F4F6F9;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.screen__stage {
  position: relative;
  transform-origin: var(--fx, 50%) var(--fy, 50%);
  will-change: transform;
}

.screen__stage img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Transparent layer above the image: right-click / long-press hits this, not the <img> */
.screen__guard {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  -webkit-touch-callout: none;
}

/* Slow focus zoom toward the key area of each screen (runs only while on screen) */
@keyframes screen-focus {
  0%   { transform: scale(1); }
  100% { transform: scale(1.09); }
}

.screen.is-on .screen__stage {
  animation: screen-focus 14s cubic-bezier(.45, .05, .35, 1) 0.9s infinite alternate both;
}

.screen.is-paused .screen__stage {
  animation-play-state: paused;
}

/* Highlight ring on one key UI element */
.screen__ring {
  position: absolute;
  left: var(--rx);
  top: var(--ry);
  width: var(--rw);
  height: var(--rh);
  border-radius: 10px;
  border: 2px solid rgba(0, 106, 176, 0.85);
  box-shadow: 0 0 0 0 rgba(0, 106, 176, 0.35);
  opacity: 0;
  transform: scale(1.15);
  transition: opacity .6s ease 1.2s, transform .6s ease 1.2s;
  pointer-events: none;
  z-index: 2;
}

.screen.is-on .screen__ring {
  opacity: 1;
  transform: scale(1);
  animation: screen-ring 2.8s ease-out 1.8s infinite;
}

@keyframes screen-ring {
  0%   { box-shadow: 0 0 0 0 rgba(0, 106, 176, 0.38); }
  70%  { box-shadow: 0 0 0 12px rgba(0, 106, 176, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 106, 176, 0); }
}

/* Protect other product images on the page from drag / long-press save */
.product-stage img,
.product-mosaic img {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ---- Carousel (crossfade with dots) ---- */
.screen-carousel {
  max-width: 980px;
  margin: var(--s-8, 64px) auto 0;
}

.screen-carousel__head {
  text-align: center;
  margin-bottom: 20px;
}

.screen-carousel__viewport {
  display: grid;
}

.screen-carousel__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility 0s linear .9s;
}

.screen-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .9s ease, visibility 0s;
}

.screen-carousel__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.screen-carousel__dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 13px/1 var(--font-body, inherit);
  color: var(--ink-500, #5B6B7B);
  background: var(--paper, #fff);
  border: 1px solid var(--ink-200, #DDE3EA);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.screen-carousel__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-200, #DDE3EA);
  transition: background .2s ease;
}

.screen-carousel__dot[aria-current="true"] {
  color: var(--brand-700, #00578F);
  border-color: var(--brand-300, #8CC0E3);
}

.screen-carousel__dot[aria-current="true"]::before {
  background: var(--brand-500, #006AB0);
}

.screen-carousel__dot:focus-visible {
  outline: 2px solid var(--brand-500, #006AB0);
  outline-offset: 2px;
}

.screen-carousel__caption {
  text-align: center;
  margin: 14px auto 0;
  max-width: 62ch;
  min-height: 3em;
  font-size: var(--fs-small, 15px);
  line-height: 1.5;
  color: var(--ink-500, #5B6B7B);
}

@media (max-width: 640px) {
  .screen-carousel__dot { font-size: 12px; padding: 8px 11px; }
  .screen__ring { border-width: 1.5px; border-radius: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen.is-on .screen__stage { animation: none; }
  .screen__ring { transition: none; opacity: 1; transform: none; }
  .screen.is-on .screen__ring { animation: none; }
  .screen-carousel__slide,
  .screen-carousel__slide.is-active { transition: none; }
}
