/**
 * App screens carousel (#interface) + phone frame.
 * Rollback: delete this file and its <link> from index.html; remove #interface markup.
 * Branch: feat/website-app-interface-footer
 */

.app-screens-section .section-desc {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.app-screens-section .section-label,
.app-screens-section .section-title {
  text-align: center;
  display: block;
}

.app-screens {
  --phone-max-h: min(720px, 78vh);
  --phone-w: min(360px, 86vw, calc(var(--phone-max-h) * 9 / 19.5));
  max-width: 48rem;
  margin: 0 auto;
  outline: none;
}

.app-screens-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.app-screens-nav {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-screens-nav:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.app-screens-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.app-screens-nav svg {
  width: 1.25rem;
  height: 1.25rem;
}

.phone-frame {
  width: var(--phone-w);
  margin: 0 auto;
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(160deg, #2a3340 0%, #12161c 55%, #1a222c 100%);
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 18px 40px rgba(0, 0, 0, 0.45);
  position: relative;
}

.phone-frame::before,
.phone-frame::after {
  content: '';
  position: absolute;
  right: -3px;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: #3a4554;
}

.phone-frame::before {
  top: 18%;
  height: 36px;
}

.phone-frame::after {
  top: 32%;
  height: 56px;
}

.phone-frame-bezel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 19.5;
}

.phone-frame-notch {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 10px;
  border-radius: 999px;
  background: #0a0c10;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.app-screens-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.app-screens-track {
  display: flex;
  height: 100%;
  transition: transform 0.28s ease;
  will-change: transform;
}

.app-screen-slide {
  flex: 0 0 100%;
  margin: 0;
  height: 100%;
  background: var(--surface);
}

.app-screen-slide picture,
.app-screen-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.app-screens-caption {
  margin: 1rem 0 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
  min-height: 1.4em;
}

.app-screens-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.app-screens-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.app-screens-dot.is-active {
  background: var(--accent);
  transform: scale(1.2);
}

.app-screens-platform {
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-screens-windows {
  margin-top: 2.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.desktop-frame {
  margin: 0 auto;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #12161c;
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 18px 40px rgba(0, 0, 0, 0.4);
}

.desktop-frame-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.75rem;
  background: #1a222c;
  border-bottom: 1px solid var(--line);
}

.desktop-frame-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a4554;
}

.desktop-frame-chrome span:first-child { background: #ff5f57; }
.desktop-frame-chrome span:nth-child(2) { background: #febc2e; }
.desktop-frame-chrome span:nth-child(3) { background: #28c840; }

.desktop-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.app-screens-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (min-width: 769px) {
  .app-screens {
    --phone-max-h: min(760px, 82vh);
    --phone-w: min(380px, 34vw, calc(var(--phone-max-h) * 9 / 19.5));
  }

  .app-screens-nav {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  .app-screens-stage {
    grid-template-columns: 1fr;
  }

  .app-screens-nav {
    display: none;
  }

  .app-screens {
    --phone-max-h: min(680px, 72vh);
    --phone-w: min(340px, 88vw, calc(var(--phone-max-h) * 9 / 19.5));
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-screens-track {
    transition: none;
  }

  .app-screens-dot {
    transition: none;
  }
}
