:root {
  --navy: #263c6f;
  --navy-dark: #1b2c53;
  --red: #c13530;
  --red-dark: #a02a26;
  --grey: #f4f5f8;
  --text: #1f2430;
  --muted: #5b6273;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* inaczej np. .cards { display: grid } nadpisuje atrybut hidden */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--text); background: #fff; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--navy); }
h3 { font-size: 1.2rem; color: var(--navy); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.wrap { width: min(1140px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: 5rem 0; }
.section--grey { background: var(--grey); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2 { color: #fff; }
.lead { font-size: 1.15rem; max-width: 46rem; margin-bottom: 2.5rem; }

/* przyciski */
.btn { display: inline-block; padding: .7em 1.4em; border-radius: 999px; border: 2px solid transparent; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; transition: background .2s, color .2s; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { border-color: #fff; color: #fff; background: transparent; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--lg { font-size: 1.1rem; padding: .85em 1.8em; }
.btn--small { font-size: .9rem; padding: .5em 1.1em; margin-top: 1rem; align-self: flex-start; }
.link { background: none; border: 0; padding: 0; color: var(--red); font: 600 1rem var(--sans); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* nagłówek */
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 12px rgb(0 0 0 / .08); }
.topbar__in { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); }
.brand img { height: 52px; width: auto; }
.brand__name { font-family: var(--serif); font-size: 1.05rem; line-height: 1.15; font-weight: 600; }
.brand__name em { font-size: 1.2rem; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav > a:not(.btn) { text-decoration: none; color: var(--text); font-weight: 500; }
.nav > a:not(.btn):hover { color: var(--red); }
.lang { display: flex; border: 1px solid #d5d8e0; border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: none; padding: .3em .7em; font: 600 .85rem var(--sans); cursor: pointer; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; margin: 5px 0; background: var(--navy); border-radius: 2px; }

/* hero */
.hero { position: relative; color: #fff; background: linear-gradient(90deg, rgb(27 44 83 / .92) 0%, rgb(27 44 83 / .6) 55%, rgb(27 44 83 / .25) 100%), url("../img/hero.jpg") center 40% / cover; }
.hero__in { padding: 4.5rem 0 4.5rem; max-width: 1140px; }
.hero__in > * { max-width: 40rem; }
.hero__in > h1 { max-width: 52rem; } /* nazwa w 2 wierszach – niższe hero */
/* odstęp na napis „Jagiellonka” ze zdjęcia – wysokość i kadr ustawia fitHero() w main.js */
.hero__gap { height: 0; }
.hero__kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .85rem; opacity: .9; margin: 0 0 1rem; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.3rem, 5vw, 3.9rem); margin-bottom: .25em; }
.hero__tagline { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 1.2rem; color: #f3d5d3; }
.hero__lead { font-size: 1.2rem; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; }

/* liczby */
.stats { background: var(--red); color: #fff; }
.stats__in { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 2rem 0; gap: 1rem; }
.stats strong { display: block; font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.stats span { font-size: .95rem; opacity: .95; }

/* układy */
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.card { background: #fff; border-radius: var(--radius); padding: 1.8rem; box-shadow: 0 4px 20px rgb(38 60 111 / .08); color: var(--text); }
.card--soft { background: var(--grey); box-shadow: none; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 1.8rem; margin-bottom: .6rem; }
.ticks li::before { content: "♥"; position: absolute; left: 0; color: var(--red); }

/* działania */
.status { align-self: flex-start; margin: 0 0 .6rem; padding: .15em .7em; border-radius: 999px; font: 700 .75rem var(--sans); text-transform: uppercase; letter-spacing: .06em; }
.status--done { background: #e3e8f3; color: var(--navy); }
.status--now { background: var(--red); color: #fff; }
.status--next { background: #fbe9e8; color: var(--red-dark); }
.action { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.action img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.action__body { padding: 1.5rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.action__body .link { margin-top: auto; align-self: flex-start; }
.action--text { border-top: 5px solid var(--red); }
.tag { color: var(--red); font-weight: 600; font-size: .9rem; margin: 0 0 .4rem; }
.transfer { margin: auto 0 0; font-size: .9rem; color: var(--muted); }
.transfer code { display: inline-block; background: var(--grey); padding: .1em .5em; border-radius: 6px; color: var(--navy); font: 600 .9rem var(--sans); }

/* wsparcie */
.help { display: flex; flex-direction: column; align-items: flex-start; }
.help p { flex: 1; }
.account { flex: 0 !important; background: var(--grey); border-radius: 10px; padding: .8rem 1rem; width: 100%; }
.account__nr { display: block; font: 700 1.05rem/1.4 var(--sans); color: var(--navy); letter-spacing: .02em; }
.account small { color: var(--muted); }

/* galeria */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters button { border: 1px solid #d5d8e0; background: #fff; padding: .45em 1.1em; border-radius: 999px; font: 500 .95rem var(--sans); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.grid button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--grey); }
.grid img { aspect-ratio: 1; object-fit: cover; width: 100%; transition: transform .3s; }
.grid button:hover img { transform: scale(1.05); }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 95vw; max-height: 95vh; overflow: visible; }
.lightbox::backdrop { background: rgb(10 15 30 / .9); }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.lightbox button { position: fixed; background: rgb(255 255 255 / .15); color: #fff; border: 0; font-size: 2.4rem; line-height: 1; width: 3.2rem; height: 3.2rem; border-radius: 50%; cursor: pointer; }
.lightbox button:hover { background: rgb(255 255 255 / .3); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 1rem; top: 50%; translate: 0 -50%; }

/* dokumenty */
.docs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.docs a { display: flex; align-items: center; gap: 1rem; background: #fff; padding: 1.2rem 1.4rem; border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: 0 4px 20px rgb(38 60 111 / .08); }
.docs a:hover strong { color: var(--red); }
.docs__icon { background: var(--red); color: #fff; font: 700 .8rem var(--sans); padding: .9em .7em; border-radius: 8px; }
.docs small { display: block; color: var(--muted); }

/* kontakt */
.big-link { font-size: 1.3rem; font-weight: 600; color: var(--red); }
.data { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.2rem; margin: 0; }
.data dt { font-weight: 600; color: var(--muted); }
.data dd { margin: 0; font-weight: 600; }

.footer { background: var(--navy-dark); color: #cfd6e6; padding: 2rem 0; font-size: .9rem; }
.footer__in { display: flex; align-items: center; gap: 1.2rem; }
.footer img { background: #fff; border-radius: 10px; padding: 6px; height: 66px; width: auto; }
.footer a { color: #fff; }

.toast { position: fixed; bottom: 1.5rem; left: 50%; translate: -50% 0; background: var(--text); color: #fff; padding: .7rem 1.3rem; border-radius: 999px; z-index: 100; }

/* mobile */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; padding: 1rem 1.25rem 1.5rem; gap: .9rem; box-shadow: 0 10px 20px rgb(0 0 0 / .08); }
  .nav.open { display: flex; }
  .nav .btn { text-align: center; }
  .lang { align-self: flex-start; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 3.5rem 0; }
  .stats__in { grid-template-columns: repeat(2, 1fr); }
  .hero__in { padding: 4.5rem 0 4rem; }
  .brand__name { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
