/* ==========================================================================
   Blok „Która marka do czego?” (.match): sytuacja → pasująca marka; oprogramowanie jako karty.
   Źródło (prototyp): assets/css/strona-b.css („Dobór marki”), assets/css/style.css
   (.brand-logo, .software__tag – używane w kartach oprogramowania).
   ========================================================================== */

.match { padding: clamp(4rem, 8vw, 7.5rem) 0; }
.match__head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: start; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}
.match__head > .eyebrow.eyebrow { grid-column: 1 / -1; margin: 0; }
.match__head h2 { margin: 0; }
.match__head p { margin: 0; color: var(--muted); font-size: 1.0625rem; max-width: 62ch; }

.match__picker {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  width: fit-content; max-width: 100%; margin: 0 0 1.25rem; padding: .45rem;
  border-radius: 28px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
}
.match__hint { padding: 0 .55rem 0 .7rem; font-family: var(--font-ui); font-size: .8125rem; font-weight: 500; color: var(--muted); }
.match__opt {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer;
  padding: .75em 1.15em; border: 0; border-radius: var(--radius-pill);
  font-family: var(--font-ui); font-size: .9375rem; font-weight: 500; line-height: 1; color: var(--navy-900);
  background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 4px 10px -7px rgba(22, 42, 67, .35);
  transition: background-color .25s, color .25s, box-shadow .35s var(--ease), transform .35s var(--ease);
}
.match__opt .icon { width: 1.05em; height: 1.05em; color: var(--navy); transition: color .25s; }
.match__opt:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--line-strong), 0 8px 16px -10px rgba(22, 42, 67, .45); }
.match__opt[aria-pressed="true"] { background: var(--navy-900); color: #fff; box-shadow: 0 10px 20px -12px rgba(22, 42, 67, .9); }
.match__opt[aria-pressed="true"] .icon { color: var(--orange-400); }
/* bez JS przełączniki nic nie robią – nie pokazujemy ich */
.no-js .match__picker { display: none; }

.match__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.4vw, 1.125rem); }
.match__card {
  position: relative; display: flex; flex-direction: column;
  padding: 1.5rem 1.4rem 1.4rem; border-radius: var(--radius-lg); background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -32px rgba(22, 42, 67, .45);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .4s;
}
.match__card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-float); }
.match__logo { position: relative; display: flex; align-items: center; height: 52px; margin-bottom: 1.25rem; }
.match__logo img { display: block; height: var(--h, 28px); width: auto; transition: opacity .35s var(--ease); }
.match__logo img + img { position: absolute; left: 0; top: 50%; translate: 0 -50%; opacity: 0; }
.match__card:hover .match__logo img, .match__card.is-picked .match__logo img { opacity: 0; }
.match__card:hover .match__logo img + img, .match__card.is-picked .match__logo img + img { opacity: 1; }
/* logotyp bez wersji kolorowej (własny plik) nie znika */
.match__card:hover .match__logo img:only-child, .match__card.is-picked .match__logo img:only-child { opacity: 1; }
.match__label { margin: 0 0 .35rem; font-family: var(--font-ui); font-size: .75rem; font-weight: 500; letter-spacing: .02em; color: var(--muted); }
.match__when { margin: 0 0 1.25rem; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; color: var(--navy-900); }
.match__why { display: flex; gap: .6rem; margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.match__why .icon { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; color: var(--orange-ink); stroke-width: 2.25; }
.match__tag {
  position: absolute; top: 1rem; right: 1rem; display: inline-flex; align-items: center; gap: .35rem;
  padding: .4em .75em; border-radius: var(--radius-pill); background: var(--orange); color: #fff;
  font-family: var(--font-ui); font-size: .75rem; font-weight: 600; line-height: 1;
  opacity: 0; transform: translateY(-4px) scale(.96); transition: opacity .3s, transform .4s var(--ease);
}
.match__tag .icon { width: .9rem; height: .9rem; stroke-width: 2.6; }
.match.has-pick .match__card:not(.is-picked) { opacity: .42; }
.match__card.is-picked { transform: translateY(-6px); box-shadow: inset 0 0 0 2px var(--orange), var(--shadow-float); }
.match__card.is-picked .match__tag { opacity: 1; transform: none; }

.match__soft {
  margin-top: clamp(3.5rem, 6vw, 5rem); scroll-margin-top: calc(var(--nav-h) + 2rem);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: center;
}
.match__soft h3 { max-width: 19ch; font-size: clamp(1.5rem, 1.15rem + 1.1vw, 2rem); letter-spacing: -.025em; }
.match__soft-intro > p { margin: 0; color: var(--muted); max-width: 46ch; }
.match__apps { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.match__app {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .5rem 1.5rem; align-items: center;
  padding: 1.15rem 1.35rem; border-radius: var(--radius-lg); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line);
}
.match__app > dl { display: contents; }
.match__app dt { display: flex; align-items: center; gap: .5rem; margin: 0; }
.match__app dd { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--muted); }
.match__app-name { font-family: var(--font-ui); font-weight: 600; font-size: 1.125rem; color: var(--navy); }
.match .brand-logo { display: block; width: auto; height: var(--h, 28px); max-width: 100%; }
.match .software__tag { font-size: .75rem; font-weight: 600; line-height: 1; color: var(--navy-900); background: var(--navy-50); border-radius: var(--radius-pill); padding: .35em .6em; }
.match__close {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem;
  margin: clamp(2.5rem, 4vw, 3rem) 0 0; padding: 1.25rem 1.5rem; border-radius: 22px;
  background: var(--orange-50); box-shadow: inset 0 0 0 1px var(--orange-100); color: var(--navy-900);
}
.match__close p { flex: 1 1 32rem; margin: 0; font-size: 1rem; line-height: 1.6; }
.match__close-ico { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; }
.match__close-ico .icon { width: 1.2rem; height: 1.2rem; }

@media (max-width: 1100px) {
  .match__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .match__head, .match__soft { grid-template-columns: minmax(0, 1fr); }
  .match__picker { border-radius: 20px; }
}
@media (max-width: 600px) {
  .match__grid { grid-template-columns: minmax(0, 1fr); }
  .match__opt { flex: 1 1 calc(50% - .5rem); justify-content: center; text-align: center; font-size: .875rem; padding-inline: .8em; }
  .match__hint { flex-basis: 100%; padding: .25rem .4rem .1rem; }
  .match__app { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .match__card { transition: none; }
}
