:root {
    --paper: #ffffff;
    --ink: #111111;
    --muted: #6a6a6a;
    --rule: #d8d8d8;
    --serif: Georgia, "Times New Roman", Times, serif;
    --sans: Arial, Helvetica, sans-serif;
    --side: clamp(1.5rem, 5vw, 5rem);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 25%;
}

a {
    color: inherit;
}

button,
textarea {
    font: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 1rem;
    padding: 0.65rem 0.9rem;
    color: var(--paper);
    background: var(--ink);
    font-family: var(--sans);
    font-size: 0.8rem;
    transform: translateY(-120%);
}

.skip-link:focus {
    transform: translateY(0);
}

.cover {
    position: relative;
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: 5rem var(--side);
    background: var(--paper);
}

.cover__center {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.cover__logo {
    position: relative;
    width: clamp(11rem, 19vw, 15rem);
    height: clamp(11rem, 19vw, 15rem);
    overflow: hidden;
}

.cover__logo img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: none;
    transform: translate(-50%, -58%);
    grid-area: auto / auto / auto / 2;
}

.cover h1 {
    margin: 1.75rem 0 0;
    font-family: var(--serif);
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    font-weight: 400;
    letter-spacing: 0.015em;
    line-height: 1.3;
}

.cover__number {
    position: absolute;
    bottom: 2.25rem;
    left: 50%;
    margin: 0;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    transform: translateX(-50%);
}

.section-nav {
    position: sticky;
    z-index: 20;
    top: 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
    background: rgba(255, 255, 255, 0.98);
}

.section-nav__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: min(100%, 88rem);
    margin: 0 auto;
}

.section-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.5rem;
    padding: 0.75rem 1rem;
    font-family: var(--sans);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.section-nav a + a {
    border-left: 1px solid var(--rule);
}

.section-nav a:hover,
.section-nav a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.3rem;
}

.chapter {
    display: grid;
    min-height: 100svh;
    padding: clamp(7rem, 14vw, 13rem) var(--side);
    border-bottom: 1px solid var(--rule);
    place-items: center;
    scroll-margin-top: 4.5rem;
}

.chapter__inner {
    width: min(100%, 52rem);
    margin: 0 auto;
}

.chapter h2 {
    margin: 0 0 clamp(3.5rem, 7vw, 6rem);
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    line-height: 1.4;
    text-transform: uppercase;
}

.prose {
    max-width: 43rem;
}

.prose p {
    margin: 0;
    font-size: clamp(1.05rem, 1.65vw, 1.3rem);
    line-height: 1.75;
}

.prose p + p {
    margin-top: 2rem;
}

.text-button,
.question-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 1.3rem;
    border: 1px solid var(--ink);
    border-radius: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
}

.text-button {
    margin-top: 4.5rem;
}

.text-button:hover,
.text-button:focus-visible,
.question-form button:hover,
.question-form button:focus-visible {
    color: var(--paper);
    background: var(--ink);
}

.question-form {
    max-width: 43rem;
    margin-top: clamp(5rem, 10vw, 8rem);
    padding-top: 2rem;
    border-top: 1px solid var(--ink);
}

.question-form label {
    display: block;
    margin-bottom: 1.25rem;
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.question-form textarea {
    display: block;
    width: 100%;
    min-height: 10rem;
    padding: 0 0 1.25rem;
    resize: vertical;
    border: 0;
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-family: var(--serif);
    font-size: 1.15rem;
    line-height: 1.7;
}

.question-form textarea:focus {
    border-bottom-width: 2px;
}

.question-form textarea::placeholder {
    color: #969696;
}

.question-form__end {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.question-form__end p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.library__intro {
    max-width: 34rem;
    margin: 0 0 clamp(4rem, 8vw, 6rem);
    font-size: clamp(1.05rem, 1.65vw, 1.3rem);
}

.library {
    border-top: 1px solid var(--ink);
}

.library__item {
    display: grid;
    grid-template-columns: 0.4fr 1fr auto;
    align-items: baseline;
    gap: 2rem;
    padding: 1.6rem 0;
    border-bottom: 1px solid var(--ink);
}

.library__item span,
.library__item small {
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.library__item p {
    margin: 0;
    font-size: 1rem;
}

.library__item small {
    color: var(--muted);
    white-space: nowrap;
}

.closing {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 42svh;
    padding: 7rem var(--side);
    text-align: center;
}

.countdown p {
    margin: 0;
}

.countdown__date {
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.countdown__time {
    margin-top: 0.45rem !important;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.64rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.countdown__status {
    min-height: 1.2em;
    margin-top: 0.35rem !important;
    color: var(--muted);
    font-size: 0.75rem;
    font-style: italic;
}

.closing__label {
    margin: 1.75rem 0 0;
    font-family: var(--sans);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

@media (max-width: 760px) {
    .section-nav {
        position: relative;
    }

    .section-nav__inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-nav a {
        min-height: 4rem;
        padding: 0.65rem 0.75rem;
        font-size: 0.61rem;
    }

    .section-nav a:nth-child(3),
    .section-nav a:nth-child(4) {
        border-top: 1px solid var(--rule);
    }

    .section-nav a:nth-child(3) {
        border-left: 0;
    }

    .chapter {
        min-height: auto;
        padding-top: 7rem;
        padding-bottom: 7rem;
        scroll-margin-top: 0;
    }

    .chapter h2 {
        margin-bottom: 3.5rem;
    }

    .prose p {
        line-height: 1.7;
    }

    .question-form__end {
        align-items: flex-start;
        flex-direction: column;
    }

    .question-form button {
        width: 100%;
    }

    .library__item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .library__item small {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
