/* Adaptive layout. Desktop web = normal long page. Mobile (<=820px) and installed PWA = swipe slides.
   Everything is scoped to html.slides-on, which slider.js (and the head snippet) toggles. */
html.slides-on, html.slides-on body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.slides-on .site-header { position: fixed; top: 0; left: 0; right: 0; }
html.slides-on .site-footer { display: none; }

html.slides-on #main {
  position: fixed;
  inset: var(--header-h, 64px) 0 0 0;
  overflow: hidden;
  touch-action: pan-y;
}
html.slides-on #main > .slides-track {
  display: flex; height: 100%; width: 100%;
  will-change: transform;
  transition: transform .35s cubic-bezier(.22,.8,.3,1);
}
html.slides-on #main > .slides-track.dragging { transition: none; }
html.slides-on #main > .slides-track > section {
  flex: 0 0 100%; width: 100%; max-width: none; height: 100%;
  box-sizing: border-box; overflow-y: auto; overflow-x: hidden;
  padding-bottom: 56px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}

.s-dots {
  position: fixed; left: 0; right: 0; bottom: max(10px, env(safe-area-inset-bottom));
  display: flex; justify-content: center; gap: 6px; z-index: 90; pointer-events: none;
}
.s-dots button {
  pointer-events: auto; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px;
  background: rgba(255,255,255,.35); transition: width .25s, background .25s;
}
.s-dots button[aria-current="true"] { width: 22px; background: #22E0C8; }

/* keep content visible: reveal observers are unreliable inside slides */
html.slides-on .reveal-card, html.slides-on [data-reveal], html.slides-on .lazy-media { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) { html.slides-on #main > .slides-track { transition: none; } }

/* ---- Mobile fit: no horizontal overflow ---- */
body { max-width: 100%; }
@media (max-width: 820px) { html { overflow-x: clip; } }   /* clip: no scroll container, keeps sticky header working */
img, video, canvas, iframe, svg { max-width: 100%; }
@media (max-width: 640px) {
  .site-header .header-inner { gap: 8px; }
  .site-header .brand { font-size: 1.4rem; gap: 8px; min-width: 0; }
  .site-header .brand img { width: 40px; height: 40px; }
  .site-header .header-actions { gap: 6px; flex: none; }
  .site-header .header-actions > .btn { display: none; }   /* CTA lives in the mobile menu too */
}
@media (max-width: 360px) {
  .site-header .brand { font-size: 1.2rem; }
}
