/* Open Any File page: screenshot carousel, lightbox, video and feature grid.
   Carousel, lightbox and features follow lettower/assets/css/style.css; colors come from
   the site's shared variables in assets/css/style.css plus the app's accent below. */

:root {
  --oaf-accent: #6f6cf2;
  --overlay-bg: rgba(10, 10, 14, 0.88);
}

html[data-theme="light"] {
  --oaf-accent: #4f55e0;
  --overlay-bg: rgba(20, 20, 24, 0.85);
}

.screenshots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  overflow-x: auto;
  padding: 24px 20px 8px;
  scroll-snap-type: x mandatory;
}

.screenshots img {
  scroll-snap-align: center;
  border-radius: 20px;
  height: 380px;
  flex: 0 0 auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.screenshots img:hover {
  transform: translateY(-4px);
}

/* Carousel enhancement - applied by site.js; a .screenshots element
   without this class keeps the plain scrollable listing above as a
   no-JS fallback. */
.screenshots.is-carousel {
  display: block;
  overflow: visible;
  padding: 24px 0 8px;
  scroll-snap-type: none;
}

.carousel {
  position: relative;
  margin: 0 auto;
  padding: 0 48px;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track {
    transition: none;
  }
}

.carousel-track img {
  scroll-snap-align: unset;
  flex: 0 0 auto;
  width: 220px;
  height: 477px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  cursor: zoom-in;
}

.carousel-track img:hover {
  transform: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--card-bg);
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.08);
}

.carousel-btn:focus-visible {
  outline: 2px solid var(--oaf-accent);
  outline-offset: 2px;
}

.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--text-muted);
  opacity: 0.4;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.carousel-dots button:focus-visible {
  outline: 2px solid var(--oaf-accent);
  outline-offset: 2px;
}

.carousel-dots button.active {
  opacity: 1;
  background: var(--oaf-accent);
  transform: scale(1.2);
}

.carousel-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
  min-height: 1.4em;
  padding: 0 20px;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  cursor: zoom-out;
}

.lightbox-overlay img {
  width: 92vw;
  height: 88vh;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}

section.features {
  padding: 40px 20px;
}

section.features h2 {
  text-align: center;
  margin-bottom: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 560px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

.feature-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px 18px;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--oaf-accent);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}


section.demo {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 0;
  text-align: center;
}

section.demo h2 {
  margin-bottom: 8px;
}

section.demo p {
  color: var(--text-muted);
  margin: 0 auto 20px;
  max-width: 460px;
  line-height: 1.45;
}

section.demo video {
  width: 260px;
  max-width: 100%;
  aspect-ratio: 444 / 960;
  border-radius: 28px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  background: var(--card-bg);
}

section.features {
  max-width: 640px;
  margin: 0 auto;
}
