/* ============================================================================
   media-kit.css — /media-kit ("Materiały promocyjne"). Built from the kit
   (page-header, section-header, card (+ --pad*, --sheen, --lift),
   spotlight, chip, notice (Shared/Notice), icon-tile, dlg, spinner,
   eyebrow--muted, caption, horizon, split, FAQ section (Shared/FaqSection),
   cta-band (Shared/CtaBand); layout.css: .page-top); this file lays the
   page out. Tokens only: the brand swatches read their colour from the
   inline --swatch that BrandIdentity.html.twig sets.

   Hovers of the cards, previews and swatches are mouse only (tokens.css).

   Contents
     1. Intro           .mk-includes
     2. Packs           .mk-packs, .mk-pack
     3. Pack dialogs    .mk-dialog, .mk-files, .mk-file
     4. Lightbox        .mk-lightbox
     5. Brand           .mk-swatches, .mk-swatch, .mk-type
     6. Rules           .mk-rules__*
     7. Creators        .mk-creators__*, .mk-copy
     8. Firefox         transform-free motion (sub-pixel re-snap)
     9. Reduced motion
   ========================================================================== */


/* ── 1. Intro: what the kit holds ──────────────────────────────────────── */
.mk-includes {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
}
.mk-include {
  flex-direction: row;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
}
.mk-include__text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--text-1);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-wrap: pretty;
}
.mk-include__num {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
}


/* ── 2. Packs ──────────────────────────────────────────────────────────── */
.mk-packs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
}
@media (min-width: 768px) {
  .mk-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .mk-packs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The preview stage: the pack's own files on a dark sunken floor with the
   dot grid, a soft light behind them. */
.mk-pack__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 13rem;
  overflow: hidden;
  background:
    radial-gradient(60% 80% at 50% 100%, var(--ambient-violet-soft), transparent 70%),
    var(--dot-grid),
    var(--bg-deep);
  background-size: auto, var(--dot-grid-size), auto;
  border-bottom: 1px solid var(--line-subtle);
}
/* Every preview shares one hover motion (0.6s --ease-out), set per image
   with variables: --mk-rot the resting tilt, --mk-rot-h the tilt on hover
   (default: unchanged), --mk-x / --mk-y how far it moves on hover. Centred
   previews use left: calc(50% - half the width), not translateX(-50%). */
.mk-pack__img {
  position: absolute;
  height: auto;
  max-width: none;
  border-radius: var(--radius-sm);
  transform: rotate(var(--mk-rot, 0deg));
  transition: transform 0.6s var(--ease-out), filter 0.6s var(--ease-out);
}
/* Logo pack: logo on top, icon bottom-left, logo with slogan bottom-right.
   Hover: they spread — the logo lifts, the icon turns a little and steps
   left, the slogan logo steps right — and a soft violet glow follows the
   logo shapes (drop-shadow, so transparent PNGs glow, not their box).
   The fan-out and the glow are mouse only (tokens.css, hover effects); on
   touch the previews stay at rest. */
.mk-pack--logo .mk-pack__img { filter: drop-shadow(0 0 0.75rem transparent); }
@media (hover: hover) and (pointer: fine) {
  .mk-pack:hover .mk-pack__img {
    transform: rotate(var(--mk-rot-h, var(--mk-rot, 0deg))) translate(var(--mk-x, 0px), var(--mk-y, 0px));
  }
  .mk-pack--logo:hover .mk-pack__img { filter: drop-shadow(0 0 0.75rem var(--accent-line)); }
}
.mk-pack--logo .mk-pack__img--1 { top: 2.25rem; left: calc(50% - 6rem); width: 12rem; --mk-y: -4px; }
.mk-pack--logo .mk-pack__img--2 { bottom: 1.5rem; left: calc(50% - 7.5rem); width: 4rem; --mk-rot-h: -10deg; --mk-x: -6px; --mk-y: -2px; }
.mk-pack--logo .mk-pack__img--3 { bottom: 2.25rem; left: calc(50% - 2rem); width: 9.5rem; --mk-x: 6px; --mk-y: -2px; }
/* Banners: wide banner in front, square and tall behind it, fanned; on
   hover the two behind fan out further. */
.mk-pack--banners .mk-pack__img {
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}
.mk-pack--banners .mk-pack__img--1 { z-index: 2; bottom: 1.75rem; left: calc(50% - 7.5rem); width: 15rem; box-shadow: var(--shadow-xl), var(--underlight-sm); }
.mk-pack--banners .mk-pack__img--2 { z-index: 1; top: 1.5rem; left: calc(50% - 8.5rem); width: 8rem; opacity: 0.8; --mk-rot: -5deg; --mk-rot-h: -8deg; --mk-x: -6px; --mk-y: -4px; }
.mk-pack--banners .mk-pack__img--3 { z-index: 1; top: 1.75rem; right: calc(50% - 8.5rem); width: 12rem; opacity: 0.8; --mk-rot: 4deg; --mk-rot-h: 7deg; --mk-x: 6px; --mk-y: -4px; }
.mk-pack--soon .mk-pack__media { background: var(--dot-grid), var(--bg-deep); background-size: var(--dot-grid-size), auto; }
.mk-pack--soon .icon-tile { color: var(--text-3); }

.mk-pack .card__body { gap: var(--space-3); padding: var(--space-6) var(--space-6) var(--space-5); }
.mk-pack .card__foot { padding: 0 var(--space-6) var(--space-6); }
.mk-pack__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.mk-pack__soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.5rem;
  margin: 0;
  color: var(--text-2);
  font-size: var(--fs-sm);
}


/* ── 3. Pack dialogs ───────────────────────────────────────────────────── */
.mk-dialog .dlg__body { padding: var(--space-5); }
.mk-files {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin: 0;
}
@media (min-width: 768px) {
  .mk-files { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mk-file { gap: var(--space-3); }   /* a kit .card.card--pad-xs */
/* The preview box has one fixed height for every file, so the rows stay
   even and nothing moves when the lazy image arrives. The image fills the
   box (absolute, inset 0) and is fitted inside its content box with
   object-fit: contain — the padding is the margin around it — so the WHOLE
   file shows, centred, whatever its shape (a tall banner, a round icon), on
   the dotted floor that transparent PNGs sit on. Nothing is cropped. */
.mk-file__preview {
  position: relative;
  display: block;
  width: 100%;
  height: 9.5rem;
  padding: 0;
  overflow: hidden;
  background: var(--dot-grid), var(--bg-deep);
  background-size: var(--dot-grid-size), auto;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  cursor: zoom-in;
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.mk-file__preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  padding: var(--space-4);
  object-fit: contain;
  object-position: 50% 50%;
}
/* No pulse / fade while a preview loads: the image simply appears over the
   static box (media-kit.js drops .is-loading when it is done). Until then
   it is not painted, so no alt text or broken-image icon flashes in. */
.mk-file__preview.is-loading img { visibility: hidden; }
.mk-file__preview:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mk-file__zoom {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--text-1);
  background-color: var(--surface-float);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.mk-file__preview:focus-visible .mk-file__zoom { opacity: 1; }
/* The accent edge and the zoom badge on hover: mouse only (tokens.css). */
@media (hover: hover) and (pointer: fine) {
  .mk-file__preview:hover { border-color: var(--accent-line); }
  .mk-file__preview:hover .mk-file__zoom { opacity: 1; }
}
@media (hover: none), (pointer: coarse) {   /* no hover to reveal it: always shown */
  .mk-file__zoom { opacity: 1; }
}
.mk-file__info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  padding-inline: var(--space-1);
}
.mk-file__name {
  overflow: hidden;
  color: var(--text-strong);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mk-file__meta { color: var(--text-2); font-size: var(--fs-xs); }
.mk-file__meta .mono { color: var(--text-1); }
.mk-file__dl { align-self: stretch; }


/* ── 4. Lightbox (over the dialog) ─────────────────────────────────────── */
/* The full file is fitted into the viewport (minus the padding) at its own
   proportions: max-width / max-height cap it and width / height auto keep
   the ratio, so a tall banner shrinks to the screen height and is never
   cropped or stretched. The height cap uses viewport units, so it holds
   whatever the flex box around it does. */
.mk-lightbox {
  --mk-lb-pad: var(--space-6);
  z-index: calc(var(--z-modal) + 1);
  padding: var(--mk-lb-pad);
}
.mk-lightbox__backdrop {
  background-color: color-mix(in srgb, var(--bg-deep) 92%, transparent);
  cursor: zoom-out;
}
.mk-lightbox__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
}
.mk-lightbox__img {
  position: relative;
  z-index: 1;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: calc(100vh - 2 * var(--mk-lb-pad));
  max-height: calc(100dvh - 2 * var(--mk-lb-pad));
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  animation: ls-rise-in var(--dur-base) var(--ease-out);
}
/* The kit .spinner, 2.5rem, shown while the file loads. */
.mk-lightbox__spinner {
  --spinner-size: 2.5rem;
  position: relative;
  z-index: 1;
  display: none;
}
.mk-lightbox.is-loading .mk-lightbox__spinner { display: block; }


/* ── 5. Brand identity ─────────────────────────────────────────────────── */
.mk-brand__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
}
@media (min-width: 1024px) {
  .mk-brand__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.mk-brand__card { gap: var(--space-5); }   /* kit .card--pad.card--sheen */

/* Brand swatches: the site palette (tokens.css). The colour comes from the
   inline --swatch of each swatch (BrandIdentity.html.twig, the one place
   the hex values are written). */
.mk-swatches {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  margin: 0;
}
@media (min-width: 768px) {
  .mk-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.mk-swatch {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  text-align: left;
  background-color: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.mk-swatch:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.mk-swatch__color {
  display: block;
  height: 6.5rem;
  background-color: var(--swatch);
  border-bottom: 1px solid var(--line);
}
.mk-swatch__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: var(--space-3) var(--space-4) 0;
}
.mk-swatch__name { color: var(--text-strong); font-weight: 600; }
.mk-swatch__role { color: var(--text-2); font-size: var(--fs-xs); }
.mk-swatch__hex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4) var(--space-3);
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
}
.mk-swatch__hex svg {
  color: var(--text-3);
  font-size: 0.75rem;
  transition: color var(--dur-fast) var(--ease-standard);
}
@media (hover: hover) and (pointer: fine) {   /* a tile hover: mouse only */
  .mk-swatch:hover { border-color: var(--line-hover); }
  .mk-swatch:hover .mk-swatch__hex svg { color: var(--accent-text); }
}
.mk-swatch.is-copied .mk-swatch__hex svg { color: var(--success-text); }
@media (max-width: 767px) {
  .mk-swatch { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); }
  .mk-swatch__color { grid-row: span 2; height: auto; min-height: 4.5rem; border-bottom: 0; border-right: 1px solid var(--line); }
}

.mk-type { display: flex; flex-direction: column; }
.mk-type__row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--line-subtle);
}
.mk-type__row:first-child { padding-top: 0; }
.mk-type__sample {
  width: 4.5rem;
  flex-shrink: 0;
  color: var(--text-strong);
  font-family: var(--font-main);
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.mk-type__sample--mono { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; }
.mk-type__info { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; }
.mk-type__name { color: var(--text-strong); font-weight: 600; }
.mk-type__role { color: var(--text-2); font-size: var(--fs-sm); }
.mk-type__tagline {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-5);
}
.mk-type__slogan {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}


/* ── 6. Usage rules ────────────────────────────────────────────────────── */
.mk-rules__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
}
@media (min-width: 768px) {
  .mk-rules__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mk-rules__col {
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
}
.mk-rules__col .notice__icon { font-size: 1.25rem; margin-top: 0.125rem; }
.mk-rules__col .notice__title { font-size: 1.125rem; line-height: 1.4; }
.mk-rules__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-3) 0 0;
}
.mk-rules__list li {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  gap: var(--space-3);
  color: var(--text-1);
  line-height: 1.6;
}
.mk-rules__list svg {
  margin-top: 0.3125rem;
  color: var(--tone);
  font-size: 0.8125rem;
}
.mk-rules__list strong { color: var(--text-strong); }


/* ── 7. For creators ───────────────────────────────────────────────────── */
.mk-creators__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--grid-gap);
}
.mk-creators__col { display: flex; flex-direction: column; gap: var(--grid-gap); min-width: 0; }
@media (min-width: 1024px) {
  .mk-creators__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
.mk-copy {
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6) var(--space-6);
}
.mk-copy__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.mk-copy__btn.is-copied { --btn-line: var(--success-line); --btn-fg: var(--success-text); --btn-bg: var(--success-soft); }
.mk-copy__body {
  margin: 0;
  padding: var(--space-4) var(--space-5);
  color: var(--text-1);
  background-color: var(--sunken);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.mk-copy__body > p { margin: 0; }
.mk-copy__body > p + p { margin-top: var(--space-3); }
.mk-copy__body--link {
  color: var(--accent-300);
  font-family: var(--font-mono);
  font-size: clamp(0.8125rem, 3.4vw, 0.9375rem);
}
@media (max-width: 767px) {
  .mk-copy { padding: var(--space-4) var(--space-4) var(--space-5); }
  .mk-copy__body { padding: var(--space-4); }
}
.mk-copy__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
}


/* ── 8. Firefox: the same motion without a transform that re-snaps ────────
   Firefox moves a transformed element on its own layer at its exact
   sub-pixel spot and drops the layer when the motion ends; the content is
   then re-snapped to whole pixels — a visible 0.5–1px jump. Here (Chrome /
   Edge unchanged):
   - pack previews: the same transform motion as Chrome, but each preview
     keeps its own layer for good (will-change: transform), so Firefox never
     drops it at the end of the hover and nothing re-snaps. Fine here:
     these are images only (no text that a permanent layer would soften),
     and a margin-based motion stepped visibly in whole pixels.
   - lightbox image: only fades in, no rise (as the kit dialog does).
   Kit pieces on this page (buttons, card lift, dialog, toast, accordion)
   carry their own Firefox rules in components.css. (-moz-appearance =
   Firefox.) */
@supports (-moz-appearance: none) {
  .mk-pack__img { will-change: transform; }
  .mk-lightbox__img { animation-name: ls-fade-in; }
}


/* ── 9. Reduced motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mk-lightbox__img { animation: none; }
  .mk-pack__img { transition: none; }
}
