:root {
    --paper: #f4f1ea;
    --ink: #23201c;
    --muted: #6b6459;
    --rule: #ddd6c8;
    --seal: #7d4a2e;
    --panel: #fbf9f5;
    --lines-gap: 1.25rem;
    --swap-period: 12s;
}

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

body {
    margin: 0;
    padding: 0 1.25rem 4rem;
    background: var(--paper);
    color: var(--ink);
    font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    font-size: 18px;
    line-height: 1.55;
}

main,
.masthead,
.colophon {
    max-width: 46rem;
    margin: 0 auto;
}

.masthead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 2.5rem 0 1.25rem;
    border-bottom: 1px solid var(--rule);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: inherit;
    text-decoration: none;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.wordmark img {
    display: block;
}

.venture {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero {
    padding: 3rem 0 1rem;
}

.hero h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.1rem, 6vw, 3.1rem);
    line-height: 1.1;
    font-weight: 600;
}

.lede {
    margin: 0 0 1rem;
    font-size: 1.08rem;
    color: #35302a;
}

.lines {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--lines-gap);
    margin: 2.5rem 0;
}

@media (min-width: 40rem) {
    .lines {
        grid-template-columns: 1fr 1fr;
    }
}

.line {
    background: var(--panel);
    border: 1px solid var(--rule);
    padding: 1.5rem;
}

.line h2 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.format {
    margin: 0 0 0.9rem;
    color: var(--seal);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.line p:last-child {
    margin-bottom: 0;
}

/* The two panels trade places on a loop. Transform-only so the DOM order,
   and therefore the reading and tab order, never changes. */
@media (min-width: 40rem) and (prefers-reduced-motion: no-preference) {
    .line {
        --swap-shift: calc(100% + var(--lines-gap));
        position: relative;
        will-change: transform;
        animation: swap-over var(--swap-period) linear infinite;
    }

    .line:first-child {
        z-index: 2;
    }

    .line:nth-child(2) {
        --swap-shift: calc(-100% - var(--lines-gap));
        animation-name: swap-under;
    }
}

@keyframes swap-over {
    0%,
    44% {
        transform: translateX(0);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4);
    }

    47% {
        transform: translate(calc(var(--swap-shift) / 2), -1.4rem) scale(0.97);
        box-shadow: 0 0.9rem 2.2rem rgba(0, 0, 0, 0.26);
        animation-timing-function: cubic-bezier(0.25, 0.6, 0.5, 1);
    }

    50%,
    94% {
        transform: translateX(var(--swap-shift));
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
        animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4);
    }

    97% {
        transform: translate(calc(var(--swap-shift) / 2), -1.4rem) scale(0.97);
        box-shadow: 0 0.9rem 2.2rem rgba(0, 0, 0, 0.26);
        animation-timing-function: cubic-bezier(0.25, 0.6, 0.5, 1);
    }

    100% {
        transform: translateX(0);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}

@keyframes swap-under {
    0%,
    44% {
        transform: translateX(0);
        opacity: 1;
        animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4);
    }

    47% {
        transform: translate(calc(var(--swap-shift) / 2), 0.9rem) scale(0.93);
        opacity: 0.45;
        animation-timing-function: cubic-bezier(0.25, 0.6, 0.5, 1);
    }

    50%,
    94% {
        transform: translateX(var(--swap-shift));
        opacity: 1;
        animation-timing-function: cubic-bezier(0.5, 0, 0.75, 0.4);
    }

    97% {
        transform: translate(calc(var(--swap-shift) / 2), 0.9rem) scale(0.93);
        opacity: 0.45;
        animation-timing-function: cubic-bezier(0.25, 0.6, 0.5, 1);
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.note {
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.note h2 {
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
}

.note p {
    margin: 0;
}

.colophon {
    margin-top: 3.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.9rem;
}

.colophon p {
    margin: 0 0 0.35rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #17150f;
        --ink: #ece5d6;
        --muted: #9d9385;
        --rule: #37322a;
        --seal: #c89268;
        --panel: #1e1b15;
    }

    .lede {
        color: #d8d1c2;
    }
}
