/*
 * POMOCE BIBLIJNE — WSPÓLNE STYLE WSZYSTKICH STRON
 *
 * 01. Kolory, fonty i najczęściej zmieniane wymiary
 * 02. Ustawienia podstawowe
 * 03. Logo i nawigacja
 * 04. Nagłówki, wprowadzenie i cytat główny
 * 05. Ilustracje i podpisy
 * 06. Treść artykułów — wspólna klasa .reading-body
 * 07. Spis treści i rozwijane cytaty
 * 08. Pliki PDF
 * 09. Pozostałe artykuły i stopka
 * 10. Dostosowanie do mniejszych ekranów
 *
 * W HTML zwykły akapit zapisuj jako <p>Treść...</p>,
 * a śródtytuł jako <h2>Tytuł...</h2>. Nie potrzebują własnych klas.
 * Wszystkie strony korzystają z tego jednego pliku CSS.
 */

/* 01. KOLORY, FONTY I WYMIARY */

:root {
    --ink: #1c242a;
    --muted: #667078;
    --rule: #cdd1d0;
    --accent: #9c392e;
    --paper: #f5f4ef;

    --serif: Georgia, 'Times New Roman', serif;
    --sans: system-ui, -apple-system, 'Segoe UI', sans-serif;

    --page-width: 1350px;
    --text-width: 870px;
    --text-size: 22px;
    --text-leading: 1.7;
    --heading-size: clamp(38px, 4.3vw, 59px);
    --image-padding: 40px 33px;
}

/* 02. USTAWIENIA PODSTAWOWE */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font: 17px/1.7 var(--sans);
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button {
    font: inherit;
}

.wrap {
    max-width: var(--page-width);
    margin-inline: auto;
    padding-inline: 42px;
}

.skip {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 10;
    padding: 10px;
    background: #fff;
}

.skip:focus {
    top: 10px;
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* 03. LOGO I NAWIGACJA */

.site-header {
    border-bottom: 1px solid var(--rule);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    min-height: 110px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 185px;
    text-align: left;
    text-decoration: none;
    line-height: .9;
    letter-spacing: -.04em;
}

.brand span {
    font: italic 24px var(--serif);
}

.brand strong {
    margin-top: 9px;
    font: 700 25px var(--sans);
    letter-spacing: .13em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    padding: 40px 0 36px;
    border-bottom: 2px solid transparent;
    font-size: 20px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.nav a:hover,
.nav a[aria-current] {
    color: var(--accent);
    border-color: var(--accent);
}

.menu-toggle {
    display: none;
}

/* 04. NAGŁÓWKI, WPROWADZENIE I CYTAT GŁÓWNY */

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 400;
    letter-spacing: -.035em;
    line-height: 1.13;
}

h1 {
    max-width: 1100px;
    margin: 0 0 23px;
    font-size: clamp(50px, 6.1vw, 84px);
}

.article-header {
    padding-top: 66px;
    padding-bottom: 45px;
}

.article-meta {
    display: flex;
    gap: 26px;
    margin-bottom: 37px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.article-meta span + span {
    color: var(--muted);
}

.dek {
    max-width: 800px;
    margin: 0;
    color: #49545a;
    font: clamp(20px, 2.1vw, 27px)/1.5 var(--sans);
}

.article-quote {
    max-width: 880px;
    margin: 32px 0 0;
    padding-left: 25px;
    border-left: 3px solid var(--accent);
    font: italic clamp(25px, 3vw, 38px)/1.4 var(--serif);
    overflow-wrap: anywhere;
}

/* 05. ILUSTRACJE I PODPISY — jeden styl .plate */

.plate {
    margin-top: 0;
    margin-bottom: 0;
}

.plate-inner {
    padding: var(--image-padding);
    border: 1px solid #e1e0d9;
    background: var(--paper);
}

.plate img {
    width: 100%;
    height: auto;
}

.plate figcaption {
    display: flex;
    gap: 40px;
    padding-top: 14px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.plate a,
.reading-body a {
    text-decoration-color: var(--accent);
    text-underline-offset: 4px;
    overflow-wrap: anywhere;
}

.fig-number {
    min-width: 77px;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: .1em;
}

/* 06. TREŚĆ WSZYSTKICH ARTYKUŁÓW — wzorzec z index.html */

.reading {
    display: grid;
    grid-template-columns: 23% minmax(0, 1fr);
    gap: 4%;
    padding-top: 93px;
    padding-bottom: 96px;
}

.reading-rail {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    padding-top: 9px;
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.rail-rule {
    width: 65px;
    height: 2px;
    margin-bottom: 12px;
    background: var(--accent);
}

.reading-body {
    grid-column: 2;
    min-width: 0;
    max-width: var(--text-width);
    font: var(--text-size)/var(--text-leading) var(--sans);
}

.reading-body p {
    margin: 0 0 25px;
}

.reading-body h2 {
    margin: 48px 0 27px;
    font-size: var(--heading-size);
    scroll-margin-top: 25px;
}

.reading-body h2:first-child {
    margin-top: 0;
}

.reading-body h3 {
    font-size: 27px;
}

.reading-body a {
    color: var(--accent);
}

.reading-body ol,
.reading-body ul {
    padding-left: 30px;
}

.reading-body li {
    margin-bottom: 27px;
    padding-left: 10px;
}

.reading-body .plate {
    margin: 40px 0 48px;
}

.source-note {
    margin: 28px 0 30px;
    padding: 18px 24px;
    border-left: 2px solid var(--accent);
    background: var(--paper);
}

.source-emphasis {
    color: var(--accent);
}

.reading-body li > .source-emphasis {
    font-weight: 700;
}

.source-caption,
.acknowledgement {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

/* 07. SPIS TREŚCI I ROZWIJANE CYTATY */

.article-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0 0 55px;
    padding: 22px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    font: 14px/1.7 var(--sans);
}

.article-toc strong {
    flex-basis: 100%;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.verse {
    margin: 24px 0;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    scroll-margin-top: 24px;
}

.verse summary {
    cursor: pointer;
    color: var(--accent);
    font: 600 15px/1.6 var(--sans);
}

.verse[open] summary {
    margin-bottom: 20px;
}

.verse p:last-child {
    margin-bottom: 0;
}

/* 08. PLIKI PDF */

.publications {
    padding-top: 28px;
    padding-bottom: 95px;
    border-top: 1px solid var(--ink);
}

.section-top {
    display: grid;
    grid-template-columns: 27% 1fr;
    align-items: start;
}

.section-top > span {
    padding-top: 12px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.section-top h2 {
    margin: 0 0 45px;
    font-size: var(--heading-size);
}

.publication {
    display: grid;
    grid-template-columns: 8% 1fr 130px 155px;
    align-items: center;
    gap: 15px;
    padding: 27px 0;
    border-top: 1px solid var(--rule);
}

.publication:last-of-type {
    border-bottom: 1px solid var(--rule);
}

.publication-no,
.publication-size {
    color: var(--muted);
    font-size: 13px;
}

.publication-no {
    color: var(--accent);
    font-weight: 700;
}

.publication h3 {
    margin: 0 0 8px;
    font-size: clamp(23px, 2.7vw, 34px);
}

.publication p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.publication a {
    padding: 11px 15px;
    border: 1px solid var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.publication a:hover {
    color: #fff;
    background: var(--ink);
}

.publication a span {
    margin-left: 10px;
}

.usage {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* 09. POZOSTAŁE ARTYKUŁY I STOPKA */

.more {
    padding: 60px 0 75px;
    background: var(--paper);
}

.more-label {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.more-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 44px;
    margin-top: 24px;
}

.more-links a {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 21px 0;
    border-top: 1px solid var(--rule);
    font: 27px/1.2 var(--serif);
    text-decoration: none;
}

.more-links a:hover {
    color: var(--accent);
}

.more-links a span {
    color: var(--accent);
    font: 13px var(--sans);
    white-space: nowrap;
}

.footer {
    color: #e1e5e2;
    background: #202b30;
}

.footer .wrap {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 25px;
    padding-bottom: 25px;
    font-size: 18px;
}

.footer a {
    text-underline-offset: 4px;
}

/* 10. MNIEJSZE EKRANY — wszystkie zmiany mobilne w jednym miejscu */

@media (max-width: 980px) {
    .wrap {
        padding-inline: 28px;
    }

    .nav {
        gap: 15px;
    }

    .nav a {
        font-size: 18px;
    }

    .publication {
        grid-template-columns: 45px 1fr 120px;
    }

    .publication-size {
        display: none;
    }
}

/* Większe menu przełącza się wcześniej, by nie nachodziło na logo. */
@media (max-width: 900px) {
    .header-inner {
        min-height: 82px;
        flex-wrap: wrap;
    }

    .brand {
        min-width: 0;
    }

    .menu-toggle {
        display: block;
        padding: 8px 12px;
        border: 1px solid var(--rule);
        background: #fff;
        font-size: 13px;
    }

    .menu-toggle span {
        margin-left: 8px;
    }

    .nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: 14px;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 11px 0;
        border-bottom: 1px solid var(--rule);
        font-size: 15px;
    }
}

@media (max-width: 740px) {
    :root {
        --text-size: 18px;
        --text-leading: 1.75;
        --image-padding: 19px 8px;
    }

    .wrap {
        padding-inline: 19px;
    }

    .brand span,
    .brand strong {
        font-size: 19px;
    }

    .article-header {
        padding-top: 42px;
        padding-bottom: 32px;
    }

    .article-meta {
        display: block;
        margin-bottom: 24px;
        line-height: 1.6;
    }

    .article-meta span {
        display: block;
    }

    h1 {
        font-size: clamp(41px, 10vw, 65px);
    }

    .dek {
        font-size: 20px;
    }

    .article-quote {
        font-size: 27px;
    }

    .plate figcaption {
        gap: 15px;
        font-size: 12px;
    }

    .fig-number {
        min-width: 50px;
    }

    .reading {
        display: block;
        padding-top: 58px;
        padding-bottom: 65px;
    }

    .reading-rail {
        gap: 3px;
        margin-bottom: 31px;
    }

    .rail-rule {
        margin-bottom: 5px;
    }

    .reading-body ol,
    .reading-body ul {
        padding-left: 24px;
    }

    .reading-body li {
        padding-left: 5px;
    }

    .source-note {
        padding: 16px;
    }

    .article-toc {
        flex-direction: column;
    }

    .section-top {
        display: block;
    }

    .section-top h2 {
        margin-top: 21px;
        margin-bottom: 30px;
    }

    .publication {
        grid-template-columns: 29px 1fr;
        align-items: start;
        gap: 9px;
    }

    .publication a {
        grid-column: 2;
        justify-self: start;
        margin-top: 7px;
    }

    .publication-size {
        display: block;
        grid-column: 2;
    }

    .publication h3 {
        font-size: 27px;
    }

    .more-links {
        grid-template-columns: 1fr;
    }

    .more-links a {
        font-size: 24px;
    }

    .footer .wrap {
        flex-direction: column;
    }
}

@media (max-width: 380px) {
    .brand strong {
        letter-spacing: .09em;
    }

    .article-meta {
        font-size: 11px;
    }

    .publication h3 {
        font-size: 25px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    a,
    button {
        transition: color .18s, background .18s, border-color .18s;
    }
}
