/* History page (/historia, preview only). Colours follow the header and the nature section. */
.hist { --krem: #F3ECE3; --braz: #4A2C1B; --tan: #C29A6B; --amber: #E0A458; --wood: #2A231C; }
.hist h1, .hist h2, .hist h3 { font-family: var(--head); line-height: 1.08; }
.hist .hist-hero { background: var(--wood); color: #EFEBE4; padding: clamp(64px, 9vw, 130px) 0; position: relative; overflow: hidden; }
.hist .hist-hero .wrap { position: relative; display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.hist .kicker { color: var(--amber); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.hist .hist-hero .hist__h1 { font-size: clamp(42px, 6vw, 82px); color: #fff; margin: 14px 0 22px; }
.hist .hist-hero p.lead { font-size: 21px; color: #E3DDD3; max-width: 34ch; }
.hist .cytat { font-family: "EB Garamond", serif; font-size: 27px; line-height: 1.35; color: #fff; border-left: 2px solid var(--amber); padding-left: 24px; }
.hist .cytat small { display: block; font-family: Inter, sans-serif; font-size: 14px; color: #B9B2A6; margin-top: 14px; }
.hist .rozdzial { padding-top: clamp(56px, 7vw, 100px); padding-bottom: 20px; }
.hist .rozdzial header { display: grid; grid-template-columns: 220px 1fr; gap: 40px; margin-bottom: 40px; }
.hist .rozdzial header .lata { font-family: Archivo, sans-serif; font-size: 64px; color: var(--tan); line-height: .9; }
.hist .rozdzial header h2 { font-size: clamp(30px, 3.4vw, 46px); }
.hist .rozdzial header p { color: var(--muted); margin-top: 10px; max-width: 60ch; }
.hist .os { position: relative; margin-left: 110px; padding-left: 48px; border-left: 2px solid #D9CBBB; display: grid; gap: 44px; }
.hist .wpis { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.hist .wpis::before { content: ""; position: absolute; left: -58px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--braz); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--braz); }
.hist .wpis .rok { position: absolute; left: -170px; top: 0; width: 90px; text-align: right; font-family: Archivo, sans-serif; font-weight: 700; font-size: 24px; color: var(--braz); }
.hist .wpis h3 { font-size: 24px; margin-bottom: 8px; }
.hist .wpis p { color: var(--muted); }
.hist .wpis img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 2px; }
.hist .wpis .podpis { font-size: 13px; color: var(--muted); margin-top: 6px; }
.hist .wpis--wpadka h3::before { content: "Wpadka · "; color: #B3261E; }
.hist .wpis--sam { grid-template-columns: 1fr; max-width: 640px; }
.hist .para { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hist .para figure { margin: 0; }
.hist .para figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
@media (max-width: 860px) {
  .hist .hist-hero .wrap, .hist .rozdzial header { grid-template-columns: 1fr; gap: 20px; }
  .hist .os { margin-left: 8px; padding-left: 28px; }
  .hist .wpis { grid-template-columns: 1fr; }
  .hist .wpis::before { left: -38px; }
  .hist .wpis .rok { position: static; text-align: left; width: auto; }
}
.hist .hist-hero { margin-top: clamp(40px, 5vw, 72px); }

/* Closing of the history: archive-like black and white photo on the left, invitation on the right. */
.hist .dzis { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #ECE6DD; color: var(--ink); margin-top: clamp(48px, 6vw, 96px); }
.hist .dzis__foto { min-height: 100%; }
.hist .dzis__foto img { width: 100%; height: 100%; min-height: 420px; max-height: 860px; object-fit: cover; display: block; }
.hist .dzis__tekst { align-self: center; padding: clamp(40px, 6vw, 96px) var(--edge) clamp(40px, 6vw, 96px) clamp(32px, 5vw, 88px); display: grid; gap: 18px; justify-items: start; max-width: 640px; }
.hist .dzis__tekst .kicker { color: var(--amber-ink, #8A5A1C); }
.hist .dzis__tekst h2 { font-size: clamp(34px, 4.4vw, 60px); color: var(--ink); }
.hist .dzis__tekst p:not(.kicker) { color: var(--muted); font-size: 18px; max-width: 42ch; }
.hist .dzis__tekst .btn { margin-top: 8px; }
@media (max-width: 860px) { .hist .dzis { grid-template-columns: 1fr; } .hist .dzis__foto img { min-height: 0; aspect-ratio: 4 / 3; height: auto; } .hist .dzis__tekst { padding: 36px var(--edge) 48px; } }
/* Entries with a photo alternate: photo on the right, then on the left. On phones the photo stays under the text. */
@media (min-width: 861px) { .hist .wpis--lewo > div:first-of-type { order: 2; } }
/* On phones the quote uses the system serif, so the page does not fetch the header font (its links sit in the menu there). */
@media (max-width: 1100px) { .hist .cytat { font-family: Georgia, "Times New Roman", serif; } }
/* Phones: the whole history is one long line that slides sideways. Chapters and their entries become cards in one
   row: a chapter card (years, title, short text) with a bigger amber mark, then one card per year with a photo.
   The line runs under all of them; the fold is not needed then (site.css, phone block). */
@media (max-width: 760px) {
  .hist #historia-rozdzialy {
    display: flex; align-items: flex-start; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge); scrollbar-width: none;
    margin-top: 32px; padding: 0 var(--edge) 6px;
    background: linear-gradient(#D9CBBB, #D9CBBB) 0 7px / 100% 2px no-repeat local;
  }
  .hist #historia-rozdzialy::-webkit-scrollbar { display: none; }
  .hist .rozdzial, .hist .os { display: contents; }
  .hist .rozdzial header, .hist .wpis, .hist .wpis--sam {
    flex: 0 0 78%; max-width: none; min-width: 0; margin: 0; scroll-snap-align: start; position: relative;
    display: flex; flex-direction: column; gap: 12px; padding-top: 30px;
  }
  .hist .wpis::before { left: 0; top: 0; }
  .hist .rozdzial header::before { content: ""; position: absolute; left: -2px; top: -3px; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--braz); }
  .hist .rozdzial header { flex-basis: 64%; }
  .hist .rozdzial header .lata { font-size: 40px; }
  .hist .rozdzial header h2 { font-size: 26px; }
  .hist .rozdzial header p { margin-top: 6px; font-size: 16px; }
  .hist .wpis .rok { font-size: 22px; line-height: 1; }
  .hist .wpis > div:last-child { order: 1; }
  .hist .wpis > div:first-of-type { order: 2; }
  .hist .wpis > div:empty { display: none; }
  .hist .wpis h3 { font-size: 21px; }
  .hist .wpis p { font-size: 16px; }
}
