/* Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #2b2b2b;
    --muted: #66707a;
    --accent: #3d6a9e;
    --accent-soft: #edf3fa;
    --border: #dfe5ec;
    --shadow: 0 1px 2px rgba(20, 40, 70, 0.04), 0 4px 16px rgba(20, 40, 70, 0.06);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Keeps the hidden attribute working on elements given a display above */
[hidden] {
    display: none !important;
}

/* Header */
header {
    padding: 3rem 1rem 2rem;
    text-align: center;
}

header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.9rem, 7vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

header p {
    margin: 0;
    color: var(--muted);
    font-style: italic;
}

header::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 1.5rem auto 0;
    background: var(--accent);
    border-radius: 2px;
}

/* Page cards */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 1rem;
}

main > section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

main > section > h2 {
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    line-height: 1.3;
    color: var(--accent);
}

/* Notes picture and its button */
.notes img {
    width: 100%;
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.toggle {
    padding: 0.55rem 1.2rem;
    font: inherit;
    font-size: 0.95rem;
    color: #fff;
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.toggle:hover {
    filter: brightness(1.1);
}

.toggle[aria-expanded="true"] {
    color: var(--accent);
    background: transparent;
}

.toggle[aria-expanded="true"]:hover {
    background: var(--accent-soft);
    filter: none;
}

.toggle:focus-visible {
    outline: 3px solid var(--text);
    outline-offset: 2px;
}

/* Critique text */
.critique {
    margin-top: 1.25rem;
}

.critique > section + section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border);
}

.critique h3 {
    margin: 0 0 0.6rem;
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.critique p {
    margin: 0 0 0.85em;
}

.critique ul,
.critique ol {
    margin: 0 0 0.85em;
    padding-left: 1.4rem;
}

.critique li {
    margin-bottom: 0.4em;
}

.critique li::marker {
    color: var(--accent);
}

.critique section > :last-child {
    margin-bottom: 0;
}

.critique .verse {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    font-size: 0.97rem;
}

.critique .verse strong {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 0;
    color: var(--accent);
}

/* Footer summary */
footer {
    max-width: 700px;
    margin: 0 auto;
    padding: 1rem 1rem 4rem;
    text-align: center;
}

footer h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.4rem, 5vw, 1.75rem);
    color: var(--accent);
}

footer p {
    margin: 0 0 0.75em;
}

footer .closing {
    margin-bottom: 0;
    font-style: italic;
}

footer .toggle {
    margin-top: 2rem;
}

.video-wrap {
    position: relative;
    margin-top: 1rem;
}

.video-wrap video {
    display: block;
    width: 100%;
    background: #000;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Round buttons over the video: play while paused, pause while playing */
.video-play,
.video-pause {
    position: absolute;
    display: grid;
    place-items: center;
    padding: 0;
    color: #fff;
    background: var(--accent);
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

/* Centered, big tap target */
.video-play {
    inset: 0;
    width: 4.5rem;
    height: 4.5rem;
    margin: auto;
}

.video-play svg {
    width: 2.1rem;
    height: 2.1rem;
}

/* Bottom left, sitting just above the browser's own control bar */
.video-pause {
    left: 0.75rem;
    bottom: 3.5rem;
    width: 3.25rem;
    height: 3.25rem;
}

.video-pause svg {
    width: 1.5rem;
    height: 1.5rem;
}

.video-play:hover,
.video-pause:hover {
    transform: scale(1.06);
}

.video-play:focus-visible,
.video-pause:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

footer .thanks {
    margin: 2.5rem 0 0;
    font-size: clamp(1.2rem, 4.5vw, 1.45rem);
    font-weight: bold;
    line-height: 1.35;
    color: var(--accent);
}

footer .thanks::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 1.25rem auto 0;
    background: var(--accent);
    border-radius: 2px;
}

footer .credit {
    margin: 2.5rem 0 0;
    font-size: 0.85rem;
    text-align: left;
    color: var(--muted);
}

/* Wider screens: once a picture is shown, notes on the left and text on the right */
@media (min-width: 800px) {
    main > section {
        padding: 1.75rem 2rem;
    }

    main > section:has(.notes img:not([hidden])) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 2.5rem;
        align-items: start;
    }

    main > section:has(.notes img:not([hidden])) > h2 {
        grid-column: 1 / -1;
    }

    main > section:has(.notes img:not([hidden])) .notes {
        position: sticky;
        top: 1.5rem;
    }

    main > section:has(.notes img:not([hidden])) .critique {
        margin-top: 0;
    }

    .critique {
        max-width: 70ch;
    }
}
