/* ── Metis Screenshots Page Stylesheet ──────────────────────────────────── */

.screenshots-page {
  --card-wide-width: 680px;
  --card-narrow-width: 170px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Page Layout Container */
.screenshots-container {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 140px var(--site-gutter) 100px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  box-sizing: border-box;
}

/* Header Area styling */
.screenshots-header-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.screenshots-eyebrow {
  font-family: var(--mono-font);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
}

.screenshots-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  width: 100%;
}

.screenshots-headline {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 270; /* Matter thin weight matching docs-hero */
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
  max-width: 68ch;
}

/* Scroll Control Buttons */
.scroll-controls {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.control-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 16px;
  outline: none;
}

.control-btn:hover {
  border-color: var(--brand-strong);
  color: var(--brand-strong);
  background: var(--brand-dim);
  transform: scale(1.05);
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn i {
  display: block;
}

/* Screenshot Horizontal Scroll Track */
.screenshot-track-wrapper {
  position: relative;
  width: 100%;
}

.screenshot-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  padding: 12px 4px 28px;
  width: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

.screenshot-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Asymmetric Bento Cards */
.screenshot-card {
  flex: 0 0 auto;
  height: 460px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-1);
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s ease, 
              box-shadow 0.3s ease;
  box-shadow: var(--shadow);
}

.screenshot-card:hover {
  transform: translateY(-6px);
  border-color: var(--brand-strong);
  box-shadow: var(--shadow-lg);
}

/* Width Variations */
.card-wide {
  width: var(--card-wide-width);
}

.card-narrow {
  width: var(--card-narrow-width);
}

/* Image inside card */
.card-img-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #090909;
}

.card-img {
  width: 100%;
  height: 100%;
  object-position: left top; /* Show top menu/actions of app screenshots */
  opacity: 0.88;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.card-narrow {
  cursor: pointer;
}

.card-narrow .card-img {
  object-fit: cover;
}

.card-wide .card-img {
  object-fit: contain;
  background: #060606;
}

.card-narrow:hover .card-img {
  transform: scale(1.02);
  opacity: 0.96;
}

.card-wide:hover .card-img {
  opacity: 0.96;
  transform: none; /* Keep screenshot fit to screen, no scaling */
}

/* Overlay Info block */
.card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.45) 45%,
    rgba(0, 0, 0, 0.15) 70%,
    transparent 100%
  );
  padding: 28px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
}

.card-title {
  font-size: 20px;
  font-weight: 550;
  letter-spacing: -0.015em;
  margin: 0 0 8px 0;
  color: #ffffff;
}

.card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  max-width: 90%;
}

.card-wide .card-desc {
  max-width: 78%;
}

.card-wide {
  cursor: zoom-in;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 8, 8, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
}

.lightbox-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 90%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-modal[aria-hidden="false"] .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 44px;
  font-weight: 200;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  outline: none;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.lightbox-close:hover {
  color: #ffffff;
  transform: scale(1.1);
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .screenshots-container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

@media (max-width: 820px) {
  .screenshots-container {
    padding-top: 100px;
    padding-bottom: 60px;
    gap: 32px;
  }
  .screenshots-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .scroll-controls {
    display: none; /* Hide scroll controls on mobile column feed */
  }
  .screenshot-track {
    flex-direction: column;
    gap: 20px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 0;
  }
  .screenshot-card {
    width: 100% !important; /* Stretch to full width of column */
    height: auto !important;
    aspect-ratio: 16 / 10;
    cursor: pointer !important;
  }
  .screenshot-card .card-img {
    object-fit: cover !important;
  }
}

@media (max-width: 640px) {
  .screenshots-container {
    padding-left: 24px;
    padding-right: 24px;
    gap: 24px;
  }
  .screenshots-headline {
    font-size: 24px;
  }
  .screenshot-track {
    gap: 16px;
  }
}
