/* Pico Bay additions to the shared ctrlPi theme. */
.hero { overflow-x: visible; }
body { overflow-x: clip; }
.text-page { max-width: 760px; padding-top: 56px; padding-bottom: 48px; }
.text-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 24px; }
.text-page h2, .text-page h3 { margin-top: 32px; margin-bottom: 12px; }
.text-page p { color: var(--slate); margin-bottom: 18px; }
.text-page ul { padding-left: 24px; color: var(--slate); }
.text-page li + li { margin-top: 8px; }
.text-page code { overflow-wrap: anywhere; }
.faq-item + .faq-item { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 4px; }
.license-text { white-space: pre-wrap; overflow-wrap: anywhere; font: 0.9rem/1.7 'JetBrains Mono', monospace; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.i-brand { background: rgba(139,92,246,.12); color: var(--violet); }
.quick-start { }
.quick-start .code-block { margin: 24px 0; }
.quick-start p { color: var(--slate); }
.app-preview { max-width: 860px; margin-top: 48px; }
.app-preview img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.app-preview figcaption { font-size: .88rem; text-align: center; color: var(--slate); }
@media (max-width: 600px) {
  .text-page { padding-top: 32px; }
  .license-text { padding: 18px; font-size: .8rem; }
}
.quick-start .code-block pre { background: #0b1120; color: #e2e8f0; border-radius: 14px; padding: 16px 46px 16px 20px; overflow-x: auto; font: .95rem/1.6 'JetBrains Mono', monospace; }
.quick-start > p + p { margin-top: 16px; }


.gallery-heading { margin-bottom: 14px; }
/* One card: the slides edge to edge, then a white control bar. Each slide is as tall as its own content. */
.gallery-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.screenshot-gallery { display: flex; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; transition: height .25s ease; }
.screenshot-gallery::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; padding: 0; }
.gallery-frame { position: relative; overflow: hidden; border: 0; border-radius: 0; background: white; }
.files-shot { aspect-ratio: 668 / 379; }
.console-shot { aspect-ratio: 668 / 379; }   /* same height as files-shot: the bottom of the console shot is cut */
.app-preview .gallery-frame img { position: absolute; max-width: none; height: auto; border: 0; border-radius: 0; box-shadow: none; }
.files-shot img { width: 119.91%; left: -10.03%; top: -124.27%; }
.console-shot img { width: 135.08%; left: -17.54%; top: -137.91%; }
.screenshot-gallery:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }

/* Keep cards, screenshots, and reading columns proportionate on wide screens. */
.app-preview figcaption { max-width: 620px; margin: 0 auto; padding: 12px 16px 14px; }

.gallery-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-top: 1px solid var(--line); background: #fff; }
.gallery-pages { display: flex; gap: 6px; }
.gallery-pagination button { min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--blue); font: inherit; font-size: .8rem; cursor: pointer; }
.gallery-pagination button:hover { background: #eef2ff; }
.gallery-pagination .gallery-arrow, #gallery-play { width: 30px; height: 30px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.gallery-page[aria-current="true"] { background: var(--blue); color: white; border-color: var(--blue); }
.gallery-pagination button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (max-width: 640px) {
  .gallery-pagination { gap: 4px; padding: 8px 6px; }
  .gallery-pagination button { min-width: 26px; height: 26px; }
  .gallery-pagination .gallery-arrow, #gallery-play { width: 26px; height: 26px; font-size: .85rem; }
}

/* Long code lines scroll inside their block (the FAQ blocks are not inside .quick-start), so they never widen the page on a phone. */
.code-block { min-width: 0; max-width: 100%; }
.code-block pre { max-width: 100%; overflow-x: auto; }

/* The hero's Online version button: a gradient that drifts across it like a wave. */
.hero .cta-row .btn.online {
  display: inline-flex; align-items: center; gap: 9px;
  color: #fff; border: 0;
  background: linear-gradient(100deg, #2563eb, #06b6d4, #10b981, #8b5cf6, #ec4899, #2563eb);
  background-size: 400% 100%;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.32);
  animation: online-wave 9s linear infinite;
}
.hero .cta-row .btn.online:hover { box-shadow: 0 12px 30px rgba(139, 92, 246, 0.42); animation-duration: 4s; }
.hero .cta-row .btn.online svg { width: 18px; height: 18px; }
@keyframes online-wave { from { background-position: 0% 50%; } to { background-position: 133.33% 50%; } }
@media (prefers-reduced-motion: reduce) { .hero .cta-row .btn.online { animation: none; } }
