/* Księgarnia Leśmiana — arkusz stylów */
:root {
  --blue: #0a0ab4;
  --blue-deep: #06067a;
  --ink: #15153a;
  --muted: #55557a;
  --paper: #fbf7f3;
  --petal: #f7e3dd;
  --petal-strong: #efc9c0;
  --white: #fff;
  --line: #e6dfd8;
  --radius: 14px;
  --wrap: 1180px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgb(21 21 58 / .06), 0 12px 32px -12px rgb(21 21 58 / .18);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--body);
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.6rem; line-height: 1.15; }
p { margin: 0 0 1.1em; text-wrap: pretty; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 46rem; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--white { background: var(--white); }
.section--petal { background: var(--petal); }
.eyebrow {
  font: 600 .95rem/1.2 var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1rem;
}
.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--blue); color: #fff; padding: .7rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; color: #fff; }

/* Przyciski */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 600 1.15rem/1 var(--display); letter-spacing: .04em; text-transform: uppercase;
  padding: .95rem 1.5rem; border-radius: 999px; text-decoration: none;
  border: 2px solid var(--blue); background: var(--blue); color: #fff;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--blue); }
.btn--ghost:hover { background: var(--blue); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--blue); }
.btn--light:hover { background: var(--petal); border-color: var(--petal); color: var(--blue-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.more { font: 600 1.15rem var(--display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; }
.more::after { content: " →"; transition: margin .2s; }
.more:hover::after { margin-left: .3rem; }

/* Nagłówek */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand img { width: 168px; }
.nav ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .6rem .9rem; border-radius: 999px;
  font: 500 1.2rem/1 var(--display); letter-spacing: .03em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
.nav a:hover { background: var(--petal); color: var(--blue); }
.nav a[aria-current="page"] { background: var(--blue); color: #fff; }
.nav-toggle {
  display: none; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .25s, background .25s;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem; display: none;
    box-shadow: 0 24px 32px -24px rgb(21 21 58 / .3);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { font-size: 1.5rem; padding: .9rem 1rem; border-radius: 10px; }
}

/* Hero */
.hero { overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero h1 span { color: var(--blue); }
.hero-media { position: relative; }
.hero-media > img:first-child {
  border-radius: 220px 220px var(--radius) var(--radius);
  aspect-ratio: 4 / 5; object-fit: cover; width: 100%;
  box-shadow: var(--shadow);
}
.hero-emblem {
  position: absolute; left: -44px; bottom: 36px; width: 128px; height: 128px;
  border-radius: 50%; border: 6px solid var(--paper);
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .95rem; font-weight: 600; padding: .4rem .9rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); margin-bottom: 1.4rem;
}
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: #9a9ab0; }
.status[data-open="true"]::before { background: #1f9d55; box-shadow: 0 0 0 4px rgb(31 157 85 / .18); }
.status[data-open="false"]::before { background: #c2410c; }
.status:empty { display: none; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media > img:first-child { aspect-ratio: 4 / 3; border-radius: 120px 120px var(--radius) var(--radius); }
  .hero-emblem { left: 12px; bottom: -28px; width: 92px; height: 92px; }
}

/* Karty „trzy powody” */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: 1.5rem 1.5rem 1.75rem; }
.card h3 { font-size: 2rem; }
.card h3 em { font-style: normal; color: var(--blue); }
.card p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* Dwie kolumny */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split--top { align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.chips li {
  background: var(--petal); color: var(--ink); border-radius: 999px;
  padding: .35rem .95rem; font-size: .98rem; font-weight: 600;
}
.section--petal .chips li { background: #fff; }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.ticks li { position: relative; padding-left: 2.2rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .3rem; width: 1.35rem; height: 1.35rem;
  border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Patron */
.patron { background: var(--blue); color: #fff; position: relative; overflow: hidden; }
.patron .eyebrow { color: var(--petal-strong); }
.patron p { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: rgb(255 255 255 / .9); }
.patron-emblem {
  position: absolute; right: -120px; top: 50%; width: 460px; height: 460px; margin-top: -230px;
  border-radius: 50%; opacity: .16; animation: spin 120s linear infinite; pointer-events: none;
}
.patron .wrap { position: relative; }

/* Aktualności */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.news-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem;
}
.news-item time, .post-meta { font: 600 .95rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.news-item h3 { margin: 0; font-size: 1.5rem; }
.news-item h3 a { color: inherit; text-decoration: none; }
.news-item h3 a:hover { color: var(--blue); text-decoration: underline; }
@media (max-width: 860px) { .news { grid-template-columns: 1fr; } }

.year { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem 2rem; padding-block: 2.5rem; border-top: 1px solid var(--line); }
.year:first-of-type { border-top: 0; padding-top: 0; }
.year > h2 { color: var(--blue); font-size: clamp(2.5rem, 6vw, 4rem); margin: 0; position: sticky; top: 100px; align-self: start; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.entry {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.5rem; display: grid; grid-template-columns: 1fr; gap: .35rem;
}
.entry--feat { grid-template-columns: 200px 1fr; gap: 1.5rem; align-items: center; padding: 1rem; }
.entry--feat img { border-radius: 10px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.entry time { font: 600 .9rem var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.entry h3 { margin: 0; font-size: 1.45rem; }
.entry h3 a { color: inherit; text-decoration: none; }
.entry h3 a:hover { color: var(--blue); text-decoration: underline; }
.entry p { margin: .3rem 0 0; color: var(--muted); font-size: 1rem; }
@media (max-width: 700px) {
  .year { grid-template-columns: 1fr; }
  .year > h2 { position: static; }
  .entry--feat { grid-template-columns: 1fr; }
}

/* Nagłówek podstrony */
.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); margin-bottom: .3em; }
.crumbs { font-size: .95rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--petal-strong); }

/* Galeria */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: .9rem; }
.gallery button {
  padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius);
  overflow: hidden; grid-column: span 4;
}
.gallery button:nth-child(1), .gallery button:nth-child(2) { grid-column: span 6; }
.gallery button:nth-child(6) { grid-column: span 12; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .5s; }
.gallery button:nth-child(6) img { aspect-ratio: 21 / 9; }
.gallery button:hover img { transform: scale(1.04); }
@media (max-width: 700px) {
  .gallery button, .gallery button:nth-child(n) { grid-column: span 6; }
  .gallery button:nth-child(5), .gallery button:nth-child(6) { grid-column: span 12; }
}
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible;
}
.lightbox::backdrop { background: rgb(10 10 40 / .9); }
.lightbox img { max-width: 96vw; max-height: 82vh; border-radius: 10px; margin-inline: auto; }
.lightbox p { color: #fff; text-align: center; margin: .8rem 0 0; font-size: .98rem; }
.lightbox-bar { display: flex; justify-content: center; gap: .6rem; margin-top: .8rem; }
.lightbox button {
  font: 600 1.05rem var(--display); letter-spacing: .06em; text-transform: uppercase;
  background: #fff; color: var(--ink); border: 0; border-radius: 999px; padding: .6rem 1.2rem; cursor: pointer;
}
.lightbox button:hover { background: var(--petal); }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.tile h2, .tile h3 { font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 1rem; }
.tile .big { font: 600 clamp(1.7rem, 3vw, 2.2rem)/1.1 var(--display); color: var(--ink); text-decoration: none; display: block; overflow-wrap: anywhere; }
a.big:hover { color: var(--blue); }
.tile p { margin: .6rem 0 0; color: var(--muted); font-size: 1rem; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: .55rem 0; text-align: left; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; font-weight: 600; white-space: nowrap; }
.hours tr:last-child > * { border-bottom: 0; }
.hours tr.is-today > * { color: var(--blue); font-weight: 600; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.map {
  margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: var(--petal); min-height: 420px; display: grid; place-items: center; text-align: center; padding: 2rem;
}
.map.is-loaded { padding: 0; display: block; }
.map iframe { width: 100%; height: 460px; border: 0; display: block; }
.map p { max-width: 34rem; margin-inline: auto; color: var(--muted); font-size: 1rem; }

/* Visit strip */
.visit { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 860px) { .visit { grid-template-columns: 1fr; } }

/* Artykuł */
.post-cover { border-radius: var(--radius); margin-bottom: 2rem; box-shadow: var(--shadow); width: 100%; }
.prose { font-size: 1.125rem; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-top: 1.2em; }
.video { position: relative; aspect-ratio: 560 / 314; border-radius: var(--radius); overflow: hidden; margin-top: 2rem; background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-nav { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Wsparcie */
.support { display: grid; gap: 1.5rem; }
.support-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  display: grid; grid-template-columns: 320px 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.support-logos { display: grid; gap: 1.25rem; justify-items: center; }
.support-logos img { max-height: 190px; width: auto; }
.support-item h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.support-item p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .support-item { grid-template-columns: 1fr; } }

/* Pasek dofinansowań (na każdej stronie) */
.funding { background: #fff; border-top: 1px solid var(--line); padding-block: 2.5rem; }
.funding h2 { font: 600 .95rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.5rem; }
.funding-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
.funding-item { display: flex; align-items: center; gap: 1.5rem; }
.funding-item p { margin: 0; font-size: .92rem; line-height: 1.5; color: var(--ink); }
.funding-logos { display: flex; align-items: center; gap: 1rem; flex: none; }
.funding-logos img { height: 76px; width: auto; }
.funding-more { margin: 1.5rem 0 0; font-size: .95rem; }
@media (max-width: 980px) { .funding-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .funding-item { flex-direction: column; align-items: flex-start; gap: .9rem; }
  .funding-logos img { height: 52px; }
}

/* Stopka */
.site-footer { background: var(--blue-deep); color: rgb(255 255 255 / .85); padding-block: 3.5rem 1.5rem; font-size: 1rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-grid img { width: 200px; margin-bottom: 1rem; }
.site-footer h2 { font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; color: var(--petal-strong); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer .legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .18); font-size: .9rem; color: rgb(255 255 255 / .65); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Animacja wejścia */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .nav-toggle, .map, .btn-row, .hero-emblem, .patron-emblem { display: none !important; }
  body { background: #fff; }
}
