.feature-page {
  padding-block: clamp(40px, 7vw, 96px) clamp(36px, 6vw, 80px);
  background: var(--panel);
}

.feature-intro {
  max-width: 770px;
  margin: 0 auto clamp(28px, 4vw, 48px);
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid #dce8fa;
  border-radius: 8px;
  background: radial-gradient(ellipse at 85% 0%, #d7f2fb, transparent 65%), radial-gradient(ellipse at 35% 10%, var(--accent-glow), transparent 60%);
  text-align: center;
}

.feature-intro h2 { max-width: 19ch; margin: 0 auto; }
.feature-intro p { max-width: 60ch; margin: 16px auto 0; color: var(--muted); font-size: 18px; line-height: 1.55; }

.feature-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.catalog-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 5px;
  background: #e6efff;
}

.catalog-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.catalog-card h3 { margin-top: 18px; font-size: 23px; line-height: 1.2; letter-spacing: -.03em; }
.catalog-card p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.55; }

.app-showcase { padding-block: clamp(38px, 6vw, 76px); background: var(--accent-soft); }
.app-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.app-gallery figure {
  min-width: 0;
  margin: 0;
}
.gallery-pagination:not([hidden]) { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.gallery-pagination .button { min-width: 44px; min-height: 44px; padding: 8px 14px; }
.gallery-pagination [aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.gallery-pagination .button:disabled { opacity: .45; cursor: default; box-shadow: none; }
.gallery-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
}
.app-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.gallery-thumbnail:hover, .gallery-thumbnail:focus-visible { border-color: var(--accent); box-shadow: 0 8px 24px #16233722; }
.gallery-lightbox { width: min(1200px, 96vw); max-width: 96vw; max-height: 94dvh; padding: 52px 16px 16px; border: 0; border-radius: 10px; background: #fff; }
.gallery-lightbox::backdrop { background: #0a142be0; }
.gallery-lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(94dvh - 150px); object-fit: contain; margin: auto; }
.lightbox-navigation { display: flex; justify-content: center; align-items: center; gap: clamp(8px, 2vw, 20px); margin-top: 16px; }
.lightbox-navigation .button { min-height: 44px; padding: 8px 12px; }
.lightbox-navigation .button:disabled { opacity: .4; cursor: default; box-shadow: none; }
.lightbox-navigation [role="status"] { color: var(--muted); font-size: 14px; white-space: nowrap; }
.gallery-close { position: absolute; right: 14px; top: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .gallery-thumbnail { transition: box-shadow 180ms ease, border-color 180ms ease; }
  .gallery-thumbnail img { transition: transform 220ms ease; }
  .gallery-thumbnail:hover img { transform: scale(1.04); }
}
@media (max-width: 1050px) {
  .app-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .app-gallery { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 1050px) {
  .feature-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-card { min-height: 250px; }
}

@media (max-width: 700px) {
  .feature-intro p { font-size: 16px; }
}

@media (max-width: 540px) {
  .feature-catalog { grid-template-columns: 1fr; gap: 14px; }
  .catalog-card { min-height: 0; }
}
