/* Radio DIY - blueprint-paper background, echoing the app's radio Blueprint editor. */
:root, html[data-theme="light"] {
  --page-bg: #123a67;
  --text-light: #eef4ff;
  --text-muted: #a9c2e8;
  --card-bg: #16457f;
  --header-border: rgba(238, 244, 255, 0.18);
  --radio-accent: #ffb547;
}

body {
  background-color: var(--page-bg);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.14) 0px, rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px, transparent 120px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0px, rgba(255, 255, 255, 0.14) 1.5px, transparent 1.5px, transparent 120px);
  background-attachment: fixed;
}

.wrap.legal,
.hub-hero {
  background: rgba(9, 26, 51, 0.55);
  border: 1px solid rgba(238, 244, 255, 0.15);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 24px auto;
}

/* The opening "DIY = Do It Yourself" explanation is a long paragraph; justified reads
   better than centered there. */
.hub-hero > p.hub-bio:first-of-type {
  /* ~55px from the box edge on desktop instead of the default ~110px (420px max-width). */
  max-width: 530px;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.whats-new-link {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 16px;
  background: rgba(238, 244, 255, 0.1);
  border: 1px solid rgba(238, 244, 255, 0.25);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-light);
}

/* YouTube channel button - YouTube red so it reads as YouTube at a glance. */
.youtube-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 22px;
  background: #ff0033;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 0, 51, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.youtube-link:hover,
.youtube-link:focus-visible {
  background: #e0002d;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 0, 51, 0.5);
}

.youtube-icon {
  width: 28px;
  height: 20px;
  flex-shrink: 0;
}

/* Screenshot gallery + feature cards (radio-diy/assets/js/gallery.js), same layout as the
   Lettower / Kości+ pages, recoloured for the blueprint background. */
.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.45);
  cursor: zoom-in;
}

/* Carousel enhancement: 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 {
  flex: 0 0 auto;
  width: 220px;
  height: 477px;
  object-fit: cover;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(238, 244, 255, 0.25);
  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.prev { left: 0; }
.carousel-btn.next { right: 0; }

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

.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.active {
  opacity: 1;
  background: var(--radio-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: rgba(5, 16, 33, 0.92);
  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;
}

.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 {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 0;
}

section.features h2 {
  text-align: center;
  margin: 0 0 20px;
}

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

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

.feature-card {
  background: rgba(9, 26, 51, 0.55);
  border: 1px solid rgba(238, 244, 255, 0.15);
  border-radius: 16px;
  padding: 16px 18px;
}

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

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

/* Same small device note as under the Kości+ / Lettower download buttons. */
.hub-hero p.platforms {
  color: var(--text-muted);
  font-size: 0.75rem;
  max-width: 480px;
  margin: 12px auto 0;
}
