@import 'tailwind.generated.css';

/* Anchor links (the "O mnie" hero arrow) glide instead of jumping — but not for
   visitors who asked the system for less motion. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html,
body {
  background-color: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: 400;
}

/* On a page shorter than the viewport the closing section absorbs the leftover
   height, so no strip of page background is left showing above the footer. */
main {
  display: flex;
  flex-direction: column;
}

main > :last-child {
  flex: 1 0 auto;
}

/* Product photo gallery. Each radio sits immediately before the photo it
   selects, so this one rule replaces a script: the checked radio's photo is the
   only one drawn. The radios themselves are visually hidden but focusable, so
   the gallery works from the keyboard. */
.galeria-zdjec img {
  opacity: 0;
  /* Every photo covers the whole frame, so the ones that are not drawn would
     still swallow clicks meant for the arrows underneath them. Nothing on a
     photo is clickable, so none of them takes the pointer. */
  pointer-events: none;
}

.galeria-zdjec input:checked + img {
  opacity: 1;
}

/* The arrows over the photo. Every photo carries its own pair, rendered right
   after it, so the same adjacency that picks the photo picks its arrows — the
   pair that is drawn always points at the neighbours of the photo on top. The
   element keeps the `flex` class for the layout it needs once revealed; this
   rule, loaded after Tailwind, is what hides the other pairs. */
.galeria-strzalki {
  display: none;
}

.galeria-zdjec input:checked + img + .galeria-strzalki {
  display: flex;
}
