/* Обложка и развороты школьного комикса. */
.school-comic {
    --comic-ink: #223c3b;
    --comic-paper: #fff8e6;
    --comic-gold: #ffd561;
    --section-deep: #194f49;
    color: var(--comic-ink);
    background: #fffcf3;
    border-bottom: 1px solid #ded8c7;
    margin-bottom: 28px;
}

.comic-cover {
    overflow: hidden;
    background-color: var(--comic-paper);
    background-image: radial-gradient(#725a2021 .7px, transparent .9px);
    background-size: 5px 5px;
    border-bottom: 2px solid var(--comic-ink);
}

.comic-cover__spread {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .94fr);
    grid-template-areas: "title picture" "intro picture";
    align-content: center;
    align-items: center;
    gap: 0 clamp(32px, 6vw, 88px);
    max-width: 1190px;
    padding: clamp(42px, 5vw, 72px) clamp(8px, 2vw, 28px);
}

.comic-cover__title { grid-area: title; align-self: end; }
.comic-cover__intro { grid-area: intro; align-self: start; }

.comic-kicker, .comic-folio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.comic-kicker::after, .comic-folio::after {
    content: "";
    width: 52px;
    height: 2px;
    background: currentColor;
}

.comic-cover h1, .comic-scene h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: -.065em;
    text-wrap: balance;
}

.comic-cover h1 {
    margin: 0 0 24px;
    font-size: clamp(60px, 6.9vw, 104px);
    line-height: .99;
}

.comic-cover h1 em {
    position: relative;
    isolation: isolate;
    display: inline-block;
    padding-right: .08em;
    color: #265954;
}

.comic-cover h1 em::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: auto -.05em .02em -.02em;
    height: .15em;
    border-radius: 65% 25% 60% 25%;
    background: var(--comic-gold);
    transform: rotate(-2deg);
}

.comic-cover__intro > p, .comic-scene__copy > p:not(.comic-folio) {
    max-width: 45ch;
    margin-bottom: 24px;
    font-size: clamp(17px, 1.42vw, 20px);
    line-height: 1.55;
}

.comic-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 25px;
}

.school-comic .comic-read {
    padding: 15px 22px;
    background: var(--comic-ink);
    box-shadow: 3px 3px 0 #c9ac61;
    border-radius: 9px;
}

.comic-read svg { transform: rotate(90deg); }
.school-comic .text-link { max-width: 100%; border-color: #dab13e; }
.school-comic a:focus-visible { outline: 3px solid #a74627; outline-offset: 5px; }

.comic-frame {
    position: relative;
    isolation: isolate;
    margin: 0;
    padding: 6px;
    background: #fffef9;
    border: 2px solid var(--comic-ink);
    box-shadow: 5px 6px 0 var(--comic-ink);
}

.comic-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    border: 1px solid var(--comic-ink);
}

.comic-cover__picture {
    grid-area: picture;
    justify-self: center;
    width: min(100%, 470px);
    transform: rotate(2deg);
}

.comic-cover__picture::before {
    content: "";
    position: absolute;
    z-index: -2;
    width: 40%;
    aspect-ratio: 1;
    right: -6%;
    top: -5%;
    background-image: radial-gradient(#244a45 1.6px, transparent 1.8px);
    background-size: 7px 7px;
}

.comic-bubble {
    position: absolute;
    left: 5%;
    bottom: 4%;
    width: max-content;
    max-width: 90%;
    padding: .55em .95em;
    border: 2px solid var(--comic-ink);
    border-radius: 1.4em;
    background: #fffef8;
    color: var(--comic-ink);
    box-shadow: 2px 3px 0 var(--comic-ink);
    font: italic bold clamp(16px, 1.55vw, 22px)/1.15 Georgia, serif;
    transform: rotate(-3deg);
}

.comic-bubble::before {
    content: "";
    position: absolute;
    top: -.53em;
    left: 58%;
    width: .82em;
    height: .82em;
    border-top: 2px solid var(--comic-ink);
    border-left: 2px solid var(--comic-ink);
    background: inherit;
    transform: skewY(-25deg) rotate(35deg);
}

.comic-pages { max-width: 1040px; padding-block: 18px 40px; }
.comic-scene {
    --folio-color: #28645c;
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    grid-template-areas: "art copy";
    align-items: center;
    gap: clamp(38px, 6.5vw, 90px);
    padding: clamp(36px, 4.2vw, 64px) clamp(6px, 2vw, 26px);
}

.comic-scene + .comic-scene { border-top: 1px dashed #bcb8a6; }
.comic-scene .comic-frame { grid-area: art; transform: rotate(-1deg); }
.comic-scene__copy { grid-area: copy; }
.comic-folio { color: var(--folio-color); margin-bottom: 14px; }
.comic-scene h2 { margin-bottom: 16px; font-size: clamp(38px, 4.6vw, 67px); line-height: 1.05; }
.comic-scene:nth-child(even) { --folio-color: #8b492d; }
.comic-scene:nth-child(even) .comic-frame { transform: rotate(1deg); }
@media (min-width: 721px) {
    .comic-scene:nth-child(even) {
        grid-template-areas: "copy art";
        grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    }
}

.comic-resources {
    margin-top: 20px;
    border-block: 1px solid #d9d4c2;
}
.comic-resources summary {
    padding: 12px 0;
    color: #285952;
    font-weight: 650;
    cursor: pointer;
}
.comic-resources summary:focus-visible { outline: 3px solid #a74627; outline-offset: 2px; }
.comic-resources p { margin: 0 0 10px; line-height: 1.6; }
.comic-resources ul {
    padding: 0 0 14px;
    margin: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 16px;
}
.comic-resources a {
    display: inline-block;
    padding-block: 4px;
    font-size: 15px;
    color: #244f4d;
    text-decoration: underline;
    text-decoration-color: #adad91;
    text-underline-offset: 3px;
}
.comic-resources a:hover { text-decoration-color: currentColor; }

/* Общий наблюдатель страницы отмечает каждый прочитанный кадр один раз. */
body.js-ready .comic-scene.reveal { opacity: 1; transform: none; transition: none; }
@media screen and (prefers-reduced-motion: no-preference) {
    .comic-scene .comic-frame, .comic-scene__copy {
        transition: opacity .55s ease-out, translate .65s ease-out;
    }
    .comic-scene__copy { transition-delay: .08s; }
    body.js-ready .comic-scene:not(.is-visible, :focus-within) > * {
        opacity: 0;
        translate: 0 18px;
    }
    .comic-scene:focus-within > * { transition: none; }
}

@media (max-width: 720px) {
    .comic-cover__spread {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "title" "picture" "intro";
        max-width: 520px;
        gap: 20px;
        padding: 26px 4px 32px;
    }
    .comic-cover h1 { margin-bottom: 0; font-size: clamp(46px, 10.5vw, 68px); }
    .comic-cover h1 br { display: none; }
    .comic-cover h1 em { margin-left: .1em; }
    .comic-kicker { margin-bottom: 12px; }
    .comic-cover__picture { width: min(88%, 340px); margin-block: 2px 8px; }
    .comic-cover__intro > p { margin-bottom: 18px; }
    .comic-pages { max-width: 520px; padding-block: 0 12px; }
    .comic-scene {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "art" "copy";
        gap: 25px;
        padding: 32px 4px;
    }
    .comic-scene .comic-frame { justify-self: center; width: min(93%, 370px); }
    .comic-folio { margin-bottom: 8px; }
}
