:root {
    --paper: #f3edde;
    --paper-deep: #e8dfcd;
    --ink: #30261f;
    --ink-soft: rgba(48, 38, 31, .68);
    --line: rgba(48, 38, 31, .22);
    --accent: #83aaa2;
    --clay: #bd7654;
    --olive: #7f8357;
    --shell: min(1180px, calc(100vw - 80px));
    --serif: var(--gh-font-heading, "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif);
    --body: var(--gh-font-body, "Songti SC", "Noto Serif CJK SC", Georgia, serif);
    --mono: "Courier New", "Nimbus Mono PS", ui-monospace, monospace;
    --ease: 700ms cubic-bezier(.16, 1, .3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

body.lesedi-site {
    position: relative;
    min-height: 100vh;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

body.lesedi-site::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background-image: url("../images/paper-grain.svg");
    background-size: 320px 320px;
    content: "";
    mix-blend-mode: multiply;
    opacity: .38;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

button,
input {
    color: inherit;
    font: inherit;
}

h1,
h2,
h3,
p,
figure {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 400;
}

.site-shell {
    width: var(--shell);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 8px 14px;
    color: var(--paper);
    background: var(--ink);
    transform: translateY(-160%);
}

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

[data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity var(--ease), transform var(--ease);
}

[data-reveal].is-visible,
.no-js [data-reveal] {
    opacity: 1;
    transform: none;
}

.field-label,
.archive-note,
.index-number,
.index-enter,
.form-caption,
.footer-navigation h3,
.post-meta {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1.5;
    text-transform: uppercase;
}

.ink-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 3px;
    border-bottom: 1px solid currentColor;
    font-size: 15px;
    line-height: 1.4;
    transition: gap .25s ease, opacity .25s ease;
}

.ink-link:hover {
    gap: 21px;
    opacity: .68;
}

.ruled-section .site-shell {
    border-top: 1px solid var(--line);
}

/* Header */
.site-header {
    position: relative;
    z-index: 100;
    background: color-mix(in srgb, var(--paper) 93%, transparent);
}

.site-header.is-scrolled {
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: grid;
    min-height: 94px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 42px;
}

.site-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--serif);
    font-size: 24px;
    letter-spacing: .02em;
    white-space: nowrap;
}

.site-mark img {
    width: 38px;
    height: 52px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.desktop-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(19px, 2.2vw, 38px);
}

.desktop-navigation a {
    position: relative;
    font-family: var(--serif);
    font-size: 14px;
    white-space: nowrap;
}

.desktop-navigation a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 1px;
    background: currentColor;
    content: "";
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .3s ease;
}

.desktop-navigation a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header-actions {
    display: flex;
    align-items: center;
}

.search-button,
.menu-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.search-button {
    font-family: var(--mono);
    font-size: 20px;
}

.menu-button {
    display: none;
    align-content: center;
    gap: 7px;
}

.menu-button > span:not(.visually-hidden) {
    width: 25px;
    height: 1px;
    background: currentColor;
}

.mobile-navigation[hidden] {
    display: none;
}

/* Hero */
.home-hero {
    padding: clamp(55px, 7vw, 104px) 0 clamp(78px, 9vw, 132px);
}

.hero-kicker {
    margin-bottom: 24px;
    text-align: center;
}

.home-hero h1 {
    max-width: 1070px;
    margin-inline: auto;
    font-size: clamp(42px, 5.2vw, 76px);
    letter-spacing: .025em;
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
}

.hero-artwork {
    width: min(1240px, calc(100vw - 26px));
    margin: clamp(36px, 5vw, 68px) auto 0;
    margin-left: 50%;
    transform: translateX(-50%);
}

.hero-artwork[data-reveal].is-visible {
    transform: translateX(-50%);
}

.hero-artwork img {
    width: 100%;
    filter: saturate(.92) contrast(.98);
}

.hero-introduction {
    display: grid;
    max-width: 1010px;
    grid-template-columns: minmax(0, 620px) auto;
    align-items: end;
    justify-content: space-between;
    gap: 60px;
    margin: clamp(32px, 4vw, 55px) auto 0;
}

.hero-introduction p {
    font-size: clamp(18px, 1.7vw, 23px);
    line-height: 1.95;
}

/* Now */
.now-section .site-shell {
    padding-block: clamp(84px, 9vw, 138px);
}

.now-grid {
    display: grid;
    grid-template-columns: .76fr 1.24fr;
    align-items: center;
    gap: clamp(55px, 8vw, 125px);
}

.now-copy {
    max-width: 465px;
}

.now-copy h2,
.section-heading h2,
.letter-copy h2,
.archive-header h1,
.field-page-header h1 {
    margin: 17px 0 25px;
    font-size: clamp(39px, 4.3vw, 64px);
    letter-spacing: .02em;
    line-height: 1.25;
}

.now-copy > p:not(.field-label):not(.archive-note) {
    margin-top: 16px;
    color: var(--ink-soft);
    font-size: 16px;
}

.archive-note {
    margin-top: 34px;
}

.now-artwork img {
    width: 100%;
    max-height: 590px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Field index */
.field-index .site-shell {
    padding: 30px 0 0;
}

.index-list {
    margin-top: 8px;
}

.index-row {
    display: grid;
    min-height: 116px;
    grid-template-columns: 82px 74px minmax(180px, .75fr) 1.35fr 90px;
    align-items: center;
    gap: clamp(18px, 3vw, 45px);
    border-bottom: 1px solid var(--line);
    transition: background .25s ease, padding .25s ease;
}

.index-row:hover {
    padding-inline: 12px;
    background: rgba(255, 255, 255, .13);
}

.index-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    color: var(--ink-soft);
}

.index-icon svg {
    width: 60px;
    height: 60px;
    overflow: visible;
    filter: url("#rough-paper");
    stroke-width: 2.2;
}

.index-row h2 {
    font-size: clamp(25px, 2.5vw, 37px);
    letter-spacing: .02em;
}

.index-row > p {
    color: var(--ink-soft);
    font-size: 14px;
}

.index-enter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.index-enter b {
    font-family: var(--body);
    font-size: 21px;
    font-weight: 400;
    transition: transform .25s ease;
}

.index-row:hover .index-enter b {
    transform: translateX(6px);
}

/* Shared content sections */
.activities-section .site-shell,
.collections-section .site-shell {
    padding-block: clamp(85px, 9vw, 136px);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: clamp(48px, 6vw, 78px);
}

.section-heading h2 {
    margin-bottom: 9px;
}

.section-heading > div > p:last-child {
    color: var(--ink-soft);
}

.section-link {
    margin-top: clamp(45px, 6vw, 75px);
    text-align: center;
}

/* Activity circles */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(35px, 6vw, 86px);
}

.activity-card {
    text-align: center;
}

.activity-image {
    position: relative;
    display: grid;
    width: 100%;
    aspect-ratio: 1;
    place-items: center;
    padding: 10px;
    border-radius: 50%;
    background: #eee5d5;
    clip-path: polygon(50% 0%, 60% 1%, 70% 0%, 80% 3%, 90% 2%, 97% 10%, 99% 20%, 98% 31%, 100% 42%, 98% 52%, 100% 64%, 96% 74%, 95% 85%, 87% 93%, 76% 95%, 66% 99%, 55% 98%, 44% 100%, 33% 97%, 23% 98%, 13% 92%, 6% 84%, 4% 73%, 1% 63%, 2% 52%, 0% 41%, 3% 31%, 1% 21%, 6% 11%, 15% 5%, 25% 3%, 36% 1%);
    filter: drop-shadow(0 3px 3px rgba(48, 38, 31, .12));
}

.activity-image::after {
    position: absolute;
    inset: 9px;
    border: 1px solid rgba(48, 38, 31, .2);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.activity-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    filter: saturate(.78) sepia(.08);
    transition: filter .4s ease, transform .7s cubic-bezier(.16, 1, .3, 1);
}

.activity-card:hover .activity-image img {
    filter: saturate(.96);
    transform: scale(1.025);
}

.activity-card h3 {
    margin-top: 24px;
    font-size: clamp(23px, 2.2vw, 31px);
}

.activity-card > p {
    margin-top: 9px;
    color: var(--ink-soft);
    font-size: 14px;
}

.activity-fallback {
    background:
        radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 78%, transparent) 0 12%, transparent 13%),
        repeating-radial-gradient(circle at center, transparent 0 18px, rgba(48, 38, 31, .09) 19px 20px),
        var(--paper-deep);
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: .18em;
}

/* Collection stamps */
.stamp-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: clamp(18px, 3vw, 48px);
}

.stamp-item {
    display: grid;
    min-width: 0;
    grid-template-rows: 1fr auto;
    gap: 18px;
    text-align: center;
}

.stamp-item img {
    width: 100%;
    max-height: 210px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .45s cubic-bezier(.16, 1, .3, 1), opacity .25s ease;
}

.stamp-item:nth-child(2) img,
.stamp-item:nth-child(4) img {
    transform: rotate(1.3deg);
}

.stamp-item:nth-child(3) img {
    transform: rotate(-1.1deg);
}

.stamp-item:hover img {
    opacity: .76;
    transform: translateY(-6px) rotate(-1deg);
}

.stamp-item span {
    font-family: var(--serif);
    font-size: 16px;
    letter-spacing: .07em;
}

/* Newsletter and footer */
.site-footer {
    border-top: 1px solid var(--line);
}

.letter-signup {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    align-items: end;
    gap: clamp(60px, 10vw, 150px);
    padding-block: clamp(85px, 9vw, 135px);
}

.letter-copy p:last-child {
    max-width: 480px;
    color: var(--ink-soft);
}

.signup-form {
    align-self: end;
}

.signup-row {
    display: grid;
    grid-template-columns: 1fr auto;
    border-bottom: 1px solid var(--ink);
}

.signup-row input {
    min-width: 0;
    padding: 17px 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--serif);
    font-size: 18px;
}

.signup-row input::placeholder {
    color: var(--ink-soft);
}

.signup-row button {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 0 0 0 28px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
}

.form-caption,
.form-message,
.members-disabled {
    margin-top: 15px;
    color: var(--ink-soft);
    font-size: 11px;
}

.form-message {
    display: none;
}

.signup-form.success .form-message.success,
.signup-form.error .form-message.error {
    display: block;
}

.footer-navigation {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: clamp(30px, 5vw, 75px);
    padding-block: 58px;
    border-top: 1px solid var(--line);
}

.footer-identity > p {
    max-width: 250px;
    margin-top: 17px;
    color: var(--ink-soft);
    font-size: 14px;
}

.footer-mark img {
    width: 42px;
    height: 52px;
}

.footer-navigation nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-navigation h3 {
    margin: 0 0 7px;
}

.footer-navigation nav a,
.footer-navigation nav span {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.5;
}

.footer-navigation nav a:hover {
    color: var(--ink);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 22px 0 30px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.footer-bottom > div {
    display: flex;
    gap: 22px;
}

/* Archive, posts and editable pages */
.archive-header,
.field-page-header {
    padding: clamp(70px, 9vw, 135px) 0 clamp(50px, 7vw, 95px);
    text-align: center;
}

.archive-header p,
.field-page-header p {
    max-width: 720px;
    margin-inline: auto;
    color: var(--ink-soft);
}

.post-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 60px 38px;
    padding-bottom: 120px;
}

.post-card-image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--paper-deep);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.8);
    transition: transform .7s cubic-bezier(.16, 1, .3, 1), filter .3s ease;
}

.post-card:hover .post-card-image img {
    filter: saturate(1);
    transform: scale(1.025);
}

.post-card h2 {
    margin-top: 20px;
    font-size: 29px;
    line-height: 1.35;
}

.post-card > p {
    margin-top: 11px;
    color: var(--ink-soft);
    font-size: 14px;
}

.post-meta {
    margin-top: 14px;
}

.field-page-artwork,
.post-header-image {
    width: min(1080px, calc(100vw - 32px));
    margin-inline: auto;
}

.field-page-artwork img,
.post-header-image img {
    width: 100%;
    max-height: 680px;
    object-fit: cover;
    filter: saturate(.82);
}

.post-content {
    width: min(720px, calc(100vw - 42px));
    margin: clamp(55px, 7vw, 92px) auto 120px;
    font-size: 18px;
}

.post-content > * + * {
    margin-top: 1.4em;
}

.post-content h2,
.post-content h3 {
    margin-top: 2em;
    line-height: 1.4;
}

.post-content h2 {
    font-size: 36px;
}

.post-content h3 {
    font-size: 28px;
}

.post-content a {
    border-bottom: 1px solid currentColor;
}

.post-content figure,
.post-content .kg-width-wide {
    width: min(980px, calc(100vw - 42px));
    margin-left: 50%;
    transform: translateX(-50%);
}

.post-content .kg-width-full {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}

.post-content blockquote {
    margin-inline: 0;
    padding-left: 25px;
    border-left: 1px solid var(--ink);
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 24px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-bottom: 100px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .12em;
}

/* Responsive */
@media (max-width: 1040px) {
    :root {
        --shell: min(100% - 52px, 960px);
    }

    .desktop-navigation {
        gap: 18px;
    }

    .desktop-navigation a {
        font-size: 13px;
    }

    .now-grid {
        gap: 55px;
    }

    .index-row {
        grid-template-columns: 68px 64px minmax(165px, .8fr) 1.2fr 76px;
        gap: 18px;
    }

    .footer-navigation {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-identity {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    :root {
        --shell: min(100% - 38px, 720px);
    }

    .header-inner {
        min-height: 78px;
        grid-template-columns: 1fr auto;
    }

    .desktop-navigation,
    .search-button {
        display: none;
    }

    .menu-button {
        display: grid;
    }

    .mobile-navigation {
        min-height: calc(100svh - 78px);
        padding: 20px 19px 48px;
        border-top: 1px solid var(--line);
        background: var(--paper);
    }

    .mobile-navigation nav {
        display: grid;
    }

    .mobile-navigation a {
        display: grid;
        grid-template-columns: 42px 1fr;
        align-items: center;
        padding: 17px 0;
        border-bottom: 1px solid var(--line);
        font-family: var(--serif);
        font-size: clamp(27px, 8vw, 38px);
        line-height: 1.25;
    }

    .mobile-navigation a span {
        font-family: var(--mono);
        font-size: 10px;
    }

    .home-hero {
        padding-top: 48px;
    }

    .home-hero h1 {
        font-size: clamp(36px, 8.8vw, 58px);
    }

    .hero-artwork {
        width: calc(100vw - 10px);
    }

    .hero-introduction {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-introduction .ink-link {
        justify-self: end;
    }

    .now-grid {
        grid-template-columns: 1fr;
    }

    .now-copy {
        max-width: 620px;
    }

    .now-artwork {
        order: -1;
    }

    .index-row {
        grid-template-columns: 54px 55px 1fr auto;
        grid-template-areas:
            "icon number title enter"
            "icon description description enter";
        gap: 7px 14px;
        padding-block: 18px;
    }

    .index-icon { grid-area: icon; width: 48px; height: 48px; }
    .index-icon svg { width: 48px; height: 48px; }
    .index-number { grid-area: number; }
    .index-row h2 { grid-area: title; }
    .index-row > p { grid-area: description; }
    .index-enter { grid-area: enter; }
    .index-enter { font-size: 0; }
    .index-enter b { font-size: 22px; }

    .activity-grid {
        gap: 24px;
    }

    .stamp-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 42px 24px;
    }

    .stamp-item:nth-child(4) {
        grid-column: 1 / 2;
        margin-left: 50%;
    }

    .stamp-item:nth-child(5) {
        grid-column: 2 / 3;
        margin-left: 50%;
    }

    .letter-signup {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 45px;
    }

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

    .post-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    :root {
        --shell: calc(100vw - 32px);
    }

    body.lesedi-site {
        font-size: 16px;
    }

    .site-mark {
        gap: 9px;
        font-size: 21px;
    }

    .site-mark img {
        width: 31px;
        height: 44px;
    }

    .hero-kicker {
        max-width: 270px;
        margin-inline: auto;
    }

    .home-hero h1 {
        font-size: 34px;
        line-height: 1.48;
    }

    .hero-artwork {
        width: calc(100vw + 95px);
    }

    .hero-introduction p {
        font-size: 18px;
    }

    .now-section .site-shell,
    .activities-section .site-shell,
    .collections-section .site-shell {
        padding-block: 76px;
    }

    .now-artwork img {
        width: calc(100% + 44px);
        max-width: none;
        margin-left: -22px;
    }

    .field-index .site-shell {
        padding-top: 24px;
    }

    .index-row {
        grid-template-columns: 42px 1fr auto;
        grid-template-areas:
            "icon number enter"
            "icon title enter"
            "description description description";
        padding: 20px 0;
    }

    .index-number {
        align-self: end;
    }

    .index-row h2 {
        font-size: 27px;
    }

    .index-row > p {
        margin-top: 7px;
        padding-left: 56px;
    }

    .activity-grid {
        grid-template-columns: 1fr;
        gap: 58px;
    }

    .activity-card {
        width: min(78vw, 390px);
        margin-inline: auto;
    }

    .stamp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 20px;
    }

    .stamp-item:nth-child(4),
    .stamp-item:nth-child(5) {
        grid-column: auto;
        margin-left: 0;
    }

    .stamp-item:last-child {
        grid-column: 1 / -1;
        width: 50%;
        justify-self: center;
    }

    .signup-row {
        grid-template-columns: 1fr;
    }

    .signup-row button {
        justify-self: end;
        padding: 8px 0 14px;
    }

    .footer-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 38px 22px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .post-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
