/* =========================================================
   MACLOST — TWÓR
   Pojedynczy TWÓR
   ========================================================= */

.twor {
    min-height: calc(100vh - 88px);
    padding: 105px 6vw 90px;
    background: var(--paper);
}


/* ---------------------------------------------------------
   NAGŁÓWEK TWORU
   Tytuł + opis | okładka
   --------------------------------------------------------- */

.twor-header {
    max-width: 1200px;
    margin: 0 auto 38px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
    grid-template-rows: auto auto auto;
    column-gap: clamp(45px, 7vw, 90px);
    align-items: center;
}


/* ---------------------------------------------------------
   LEWA KOLUMNA
   --------------------------------------------------------- */

.twor-eyebrow {
    grid-column: 1;
    grid-row: 1;

    margin: 0 0 25px;

    font-size: 12px;
    letter-spacing: 0.32em;
    color: var(--muted);
}

.twor-meta {
    display: block;
    margin-top: 12px;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.twor-title {
    grid-column: 1;
    grid-row: 2;

    margin: 0 0 22px;

    font-size: clamp(48px, 6vw, 78px);
    line-height: 0.98;
    letter-spacing: 0.07em;
    font-weight: 300;
}

.twor-description {
    grid-column: 1;
    grid-row: 3;

    max-width: 700px;
    margin: 0;

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 16px;
    line-height: 1.75;

    color: var(--muted);
}

.twor-translation-missing {
    grid-column: 1;
    grid-row: 3;

    margin: 10px 0 0;

    font-size: 10px;
    line-height: 1.5;
    letter-spacing: 0.06em;

    color: var(--muted);
}


/* ---------------------------------------------------------
   PRAWA KOLUMNA — OKŁADKA
   --------------------------------------------------------- */

.twor-cover {
    grid-column: 2;
    grid-row: 1 / 4;

    width: min(400px, 100%);
    justify-self: end;
    align-self: center;
}

.twor-cover-image,
.twor-cover-placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.twor-cover-image {
    object-fit: cover;
}

.twor-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);

    font-size: 11px;
    letter-spacing: 0.28em;
    color: var(--muted);

    background: rgba(0, 0, 0, 0.025);
}


.twor-genesis {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding-top: 8px;
}

.twor-genesis .twor-section-title {
    margin-bottom: 28px;
}

.twor-genesis-content {
    max-width: 800px;
    padding-top: 28px;
    border-top: 1px solid var(--line);

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 15px;
    line-height: 1.9;
    color: var(--muted);
}

.twor-genesis-content p {
    margin: 0 0 1.5em;
}

.twor-genesis-content p:last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   NAWIGACJA MIĘDZY TWORAMI
   --------------------------------------------------------- */

.twor-navigation {
    max-width: 1200px;
    margin: 0 auto 65px;

    padding: 18px 0;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);

    font-size: 11px;
    letter-spacing: 0.13em;
}

.twor-navigation-prev {
    justify-self: start;
}

.twor-navigation-current {
    color: var(--muted);
    text-align: center;
}

.twor-navigation-next {
    justify-self: end;
}

.twor-navigation a {
    transition: opacity 0.2s ease;
}

.twor-navigation a:hover {
    opacity: 0.55;
}


/* ---------------------------------------------------------
   WARSTWY TWORU
   --------------------------------------------------------- */

.twor-section {
    max-width: 1200px;
    margin: 0 auto 70px;
}

.twor-section-title {
    margin: 0 0 24px;

    font-size: 13px;
    letter-spacing: 0.28em;
    font-weight: 400;
}

.twor-layers {
    border-top: 1px solid var(--line);
}

.twor-layer {
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.twor-layer-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 30px;
}

.twor-layer-title {
    margin: 0;

    font-size: 22px;
    letter-spacing: 0.12em;
    font-weight: 300;
}

.twor-layer-type {
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--muted);
    text-transform: uppercase;
}

.twor-layer-content {
    max-width: 800px;
    margin-top: 18px;

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 15px;
    line-height: 1.8;

    color: var(--muted);
}


/* ---------------------------------------------------------
   ROZDZIAŁY
   --------------------------------------------------------- */

.twor-chapters {
    margin-top: 20px;
}

.twor-chapter {
    display: grid;
    grid-template-columns: 45px 1fr;
    column-gap: 18px;
    align-items: baseline;

    padding: 13px 0;

    border-top: 1px solid var(--line);
}

.twor-chapter-number {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.twor-chapter-title {
    margin: 0;

    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.twor-chapter-read {
    float: right;
    margin-left: 25px;

    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.12em;

    color: var(--muted);
    transition: opacity 0.2s ease;
}

.twor-chapter-read:hover {
    opacity: 0.5;
}


/* ---------------------------------------------------------
   SPOTIFY
   --------------------------------------------------------- */

.twor-spotify {
    margin-top: 25px;
    width: 100%;
    overflow: hidden;
}

.twor-spotify iframe {
    display: block;
    width: 100%;
    height: 192px;
    border: 0;
}


/* ---------------------------------------------------------
   TELEFON
   --------------------------------------------------------- */

@media (max-width: 800px) {

    .twor {
        padding: 95px 6vw 65px;
    }

    .twor-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;

        margin-bottom: 50px;
    }

    .twor-cover {
        width: min(420px, 100%);
        align-self: flex-start;

        order: -1;

        margin-bottom: 35px;
    }

    .twor-eyebrow,
    .twor-title,
    .twor-description,
    .twor-translation-missing {
        width: 100%;
    }

    .twor-title {
        font-size: clamp(44px, 11vw, 68px);
    }

    .twor-description {
        font-size: 15px;
    }

    .twor-navigation {
        grid-template-columns: 1fr 1fr;
        row-gap: 15px;
        margin-bottom: 50px;
    }

    .twor-navigation-current {
        display: none;
    }

    .twor-navigation-prev {
        justify-self: start;
    }

    .twor-navigation-next {
        justify-self: end;
    }

    .twor-layer-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .twor-layer-title {
        font-size: 19px;
    }

    .twor-chapter {
        grid-template-columns: 32px 1fr;
        column-gap: 12px;
    }

    .twor-chapter-read {
        float: none;
        display: block;
        margin: 6px 0 0;
    }
}


/* =========================================================
   MACLOST — ROZDZIELENIE WARSTW TWORU
   TEKST = dzieło / katalog rozdziałów
   ALBUM = osobna warstwa muzyczna
   ========================================================= */

/* Nie pokazujemy technicznego typu sekcji.
   Semantykę warstwy pokazuje już jej układ. */
.twor-layer-type {
    display: none;
}


/* ---------------------------------------------------------
   TEKST
   --------------------------------------------------------- */

.twor-layer--tekst {
    padding-top: 30px;
    padding-bottom: 30px;
}

.twor-layer--tekst .twor-layer-header {
    margin-bottom: 4px;
}

.twor-layer--tekst .twor-layer-title {
    font-size: 20px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.twor-layer--tekst .twor-chapters {
    margin-top: 24px;
}

.twor-layer--tekst .twor-chapter {
    padding: 16px 0;
}

.twor-layer--tekst .twor-chapter-title {
    font-size: 15px;
    letter-spacing: 0.06em;
}


/* ---------------------------------------------------------
   ALBUM
   --------------------------------------------------------- */

.twor-layer--muzyka {
    margin-top: 14px;
    padding: 26px 0 28px;
}

.twor-layer--muzyka .twor-layer-title {
    font-size: 20px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.twor-layer--muzyka .twor-spotify {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.twor-layer--muzyka .twor-spotify iframe {
    height: 192px;
    border: 1px solid var(--line);
}


/* ---------------------------------------------------------
   MOBILE — warstwy
   --------------------------------------------------------- */

@media (max-width: 800px) {

    .twor-layer--tekst {
        padding-top: 25px;
        padding-bottom: 25px;
    }

    .twor-layer--tekst .twor-layer-title,
    .twor-layer--muzyka .twor-layer-title {
        font-size: 17px;
        letter-spacing: 0.15em;
    }

    .twor-layer--muzyka {
        margin-top: 10px;
        padding: 28px 0 32px;
    }

    .twor-layer--muzyka .twor-spotify {
        margin-top: 24px;
        padding-top: 22px;
    }

    .twor-genesis {
        margin-bottom: 55px;
    }

    .twor-genesis-content {
        padding-top: 22px;
        font-size: 14px;
        line-height: 1.85;
    }
}


/* =========================================================
   MACLOST — TEKST
   Katalog rozdziałów / spis dzieła
   ========================================================= */

.twor-layer--tekst .twor-chapters {
    border-top: 0;
}

.twor-layer--tekst .twor-chapter {
    position: relative;
    transition:
        padding-left 0.2s ease,
        padding-right 0.2s ease,
        background-color 0.2s ease;
}

.twor-layer--tekst .twor-chapter:hover {
    padding-left: 10px;
    padding-right: 10px;
    background: rgba(0, 0, 0, 0.018);
}

.twor-layer--tekst .twor-chapter-number {
    font-variant-numeric: tabular-nums;
}

.twor-layer--tekst .twor-chapter-title {
    transition: opacity 0.2s ease;
}

.twor-layer--tekst .twor-chapter-read {
    text-transform: uppercase;
}

.twor-layer--tekst .twor-chapter:hover .twor-chapter-read {
    opacity: 1;
}


/* ---------------------------------------------------------
   ODDZIELENIE KOŃCA TEKSTU OD ALBUMU
   --------------------------------------------------------- */

.twor-layer--tekst {
    padding-bottom: 38px;
}

.twor-layer--muzyka {
    padding-top: 38px;
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 800px) {

    .twor-layer--tekst .twor-chapter:hover {
        padding-left: 5px;
        padding-right: 5px;
    }

    .twor-layer--tekst {
        padding-bottom: 30px;
    }

    .twor-layer--muzyka {
        padding-top: 30px;
    }
}
