/* ═══════════════════════════════════════════════════════════════════════════
   world-summer.css — SCENE 04 · the last week of August

   A photograph you are standing inside, a paper record pinned over it, and a
   light that drains as you read. Nothing bounces; the unease is in the pace.
   ═══════════════════════════════════════════════════════════════════════════ */

.world--shd {
    position: relative;
    min-height: 100svh;
    color: var(--scene-ink);
    --light: 0;
}

/* ── the photograph ────────────────────────────────────────────────────── */
.shd__scenery { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.shd__plate { position: absolute; inset: -3%; display: block; }
.shd__plate img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(1.02) saturate(1.06);
    transition: filter 1200ms var(--ease-out);
}
.shd__haze {
    position: absolute; inset: 0;
    background:
        radial-gradient(58% 44% at 74% 16%, oklch(99% 0.04 88 / 0.55) 0%, transparent 68%),
        linear-gradient(180deg, oklch(97% 0.03 86 / 0.28) 0%, transparent 42%);
}
.shd__foliage { position: absolute; inset: 0; }
.shd__foliage i {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: oklch(38% 0.06 140 / 0.55);
    filter: blur(14px);
}
.shd__foliage i:nth-child(1) { left: -12%; top: 34%; width: 34vw; height: 30vh; }
.shd__foliage i:nth-child(2) { right: -14%; bottom: -6%; width: 40vw; height: 38vh; }
.shd__foliage i:nth-child(3) { left: 38%; bottom: -14%; width: 46vw; height: 26vh; opacity: 0.7; }
.shd__dusk {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, oklch(46% 0.04 250 / 0.55) 0%, oklch(30% 0.05 268 / 0.7) 100%);
    opacity: calc(var(--light, 0) * 0.8);
    transition: opacity 900ms var(--ease-out);
}

.world--shd[data-light='golden'] .shd__plate img { filter: brightness(0.95) saturate(1.02) sepia(0.08); }
.world--shd[data-light='dusk'] .shd__plate img { filter: brightness(0.74) saturate(0.82) hue-rotate(-8deg); }
.world--shd[data-light='night'] .shd__plate img { filter: brightness(0.48) saturate(0.46) hue-rotate(-16deg); }

/* ── the world's chrome: a paper bar over the photograph ───────────────── */
.world--shd .scene-bar {
    background: oklch(96% 0.02 84 / 0.86);
    border-bottom: 1px solid oklch(22% 0.018 70 / 0.2);
    color: var(--scene-ink);
}
.world--shd .scene-bar__id { color: oklch(42% 0.02 70); }
.world--shd .tool { color: oklch(34% 0.02 70); border-color: oklch(22% 0.018 70 / 0.18); }
.world--shd .tool:hover { background: oklch(100% 0 0 / 0.7); color: var(--scene-ink); }
.world--shd .tool[data-on='true'] { color: oklch(42% 0.09 45); }

/* ── the vertical title ────────────────────────────────────────────────── */
.shd__jp {
    position: absolute; z-index: 12;
    left: calc(var(--page-gutter) + 2px); top: clamp(120px, 22vh, 220px);
    writing-mode: vertical-rl;
    font-family: var(--font-prose);
    font-size: clamp(1.1rem, 1.6vw, 1.5rem);
    letter-spacing: 0.34em;
    color: oklch(28% 0.02 70 / 0.55);
}

/* ── the title page ────────────────────────────────────────────────────── */
.shd__head {
    position: relative; z-index: 10;
    padding: clamp(var(--space-6), 5vh, var(--space-16)) var(--page-gutter) clamp(var(--space-5), 3vh, var(--space-8));
    padding-left: clamp(var(--space-16), 6vw, 120px);
    background: linear-gradient(180deg,
        oklch(96% 0.02 84 / 0.94) 0%,
        oklch(96% 0.02 84 / 0.80) 58%,
        oklch(96% 0.02 84 / 0) 100%);
}
.shd__eyebrow {
    font-family: var(--font-mono); font-size: var(--text-2xs);
    letter-spacing: var(--tracking-caps); text-transform: uppercase;
    color: oklch(42% 0.03 60);
}
.shd__title {
    margin: var(--space-2) 0 var(--space-3);
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: clamp(2.3rem, 5.4vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: var(--tracking-tight);
    color: oklch(20% 0.02 66);
}
.shd__sub {
    font-family: var(--font-prose);
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
    font-style: italic;
    color: oklch(36% 0.035 60);
}
.shd__caption {
    margin-top: var(--space-2);
    font-family: var(--font-mono); font-size: var(--text-2xs);
    letter-spacing: 0.16em;
    color: oklch(44% 0.045 55);
}
.shd__count {
    margin-top: 2px;
    font-family: var(--font-mono); font-size: var(--text-3xs);
    letter-spacing: 0.12em; text-transform: uppercase;
    color: oklch(46% 0.03 60);
}

/* ── chapters: the record's contents ───────────────────────────────────── */
.shd__chapters {
    position: sticky; top: var(--bar-height); z-index: 30;
    display: flex; flex-wrap: wrap; gap: var(--space-1);
    padding: var(--space-2) var(--page-gutter);
    padding-left: clamp(var(--space-16), 6vw, 120px);
    background: oklch(96% 0.02 84 / 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid oklch(22% 0.018 70 / 0.16);
}
.shd__chapters a {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: var(--control-sm);
    padding: 0 var(--space-3);
    font-family: var(--font-mono);
    font-size: var(--text-3xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: oklch(38% 0.03 60);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.shd__chapters a span { color: oklch(48% 0.07 50); }
.shd__chapters a:hover { color: oklch(20% 0.02 66); border-bottom-color: oklch(48% 0.07 50); }

/* ── the record ────────────────────────────────────────────────────────── */
.shd__letter {
    position: relative; z-index: 10;
    width: min(34rem, calc(100vw - 2 * var(--page-gutter)));
    margin: clamp(var(--space-8), 6vh, var(--space-16)) 0 var(--space-12)
            clamp(var(--space-16), 26vw, 30%);
    padding: clamp(var(--space-6), 3.4vw, var(--space-12));
    background: oklch(97% 0.014 84 / 0.94);
    border: 1px solid oklch(22% 0.018 70 / 0.14);
    box-shadow: 0 30px 60px -40px oklch(20% 0.03 60 / 0.55);
}
.shd__letter::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background-image: var(--noise); opacity: 0.05;
}
.shd__pull {
    margin-bottom: var(--space-6);
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.15rem, 1.9vw, 1.45rem);
    line-height: 1.3;
    color: oklch(34% 0.04 50);
}
.shd__block {
    font-family: var(--font-prose);
    font-size: clamp(1.06rem, 1.35vw, 1.2rem);
    line-height: var(--leading-prose);
    color: oklch(24% 0.018 66);
    margin-bottom: var(--space-4);
}
.shd__block[data-chapter-mark] { scroll-margin-top: calc(var(--bar-height) + 64px); }
.shd__refrain {
    margin: var(--space-6) 0;
    padding-left: var(--space-4);
    border-left: 2px solid oklch(48% 0.07 50);
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    line-height: 1.35;
    color: oklch(30% 0.05 45);
}
.shd__sign {
    margin-top: var(--space-6);
    text-align: right;
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    letter-spacing: 0.1em;
    color: oklch(42% 0.03 60);
}
.shd__inline { margin: var(--space-6) 0; }
.shd__inline img { width: 100%; border: 6px solid oklch(100% 0 0); box-shadow: 0 12px 28px -18px oklch(20% 0.03 60 / 0.6); }
.shd__motto {
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid oklch(22% 0.018 70 / 0.16);
    font-family: var(--font-prose);
    font-style: italic;
    font-size: clamp(1.15rem, 1.7vw, 1.35rem);
    text-align: center;
    color: oklch(32% 0.05 45);
}
.shd__notes-text {
    margin-top: var(--space-3);
    text-align: center;
    letter-spacing: 0.5em;
    color: oklch(45% 0.04 55);
    font-size: var(--text-sm);
}

.shd__card {
    position: relative; z-index: 10;
    width: min(46rem, calc(100vw - 2 * var(--page-gutter)));
    margin: 0 auto var(--space-10);
}
.shd__card img { width: 100%; border: 8px solid oklch(100% 0 0 / 0.9); box-shadow: 0 30px 60px -40px oklch(15% 0.03 60 / 0.6); }
.shd__card figcaption {
    padding-top: var(--space-3);
    text-align: center;
    font-family: var(--font-prose);
    font-style: italic;
    font-size: var(--text-lg);
    color: oklch(28% 0.02 66);
}
.shd__foot {
    position: relative; z-index: 10;
    display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
    gap: var(--space-3);
    width: min(46rem, calc(100vw - 2 * var(--page-gutter)));
    margin: 0 auto;
    padding: var(--space-5) var(--space-5) var(--space-6);
    background: oklch(96% 0.02 84 / 0.9);
    border-top: 1px solid oklch(22% 0.018 70 / 0.2);
    margin-bottom: var(--space-16);
    color: oklch(24% 0.018 66);
}
.shd__foot p { font-family: var(--font-prose); font-style: italic; }
.shd__return {
    display: inline-flex; align-items: center;
    min-height: var(--control-md);
    font-family: var(--font-mono); font-size: var(--text-2xs);
    letter-spacing: var(--tracking-caps); text-transform: uppercase;
    color: oklch(24% 0.018 66);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}
.shd__return:hover { color: oklch(32% 0.08 45); }

/* reveal: the final plate rises out of the dusk */
.shd__card[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
.shd__card[data-reveal].is-in { opacity: 1; transform: none; }

/* ── entry device: a warm iris closing ─────────────────────────────────── */
.entry--shd .entry__word {
    font-family: var(--font-display);
    font-style: italic;
    color: oklch(26% 0.03 60);
}
.entry--shd .entry__field { background: oklch(94% 0.045 80); }
.entry--shd .entry__iris {
    background: oklch(94% 0.045 80);
    animation: iris-close 1.9s var(--ease-scene) forwards;
}
@keyframes iris-close {
    from { clip-path: circle(142% at 50% 50%); }
    to { clip-path: circle(0% at 50% 50%); }
}

/* ── narrow ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .shd__jp { display: none; }
    .shd__head { padding-left: var(--page-gutter); }
    .shd__chapters {
        padding-left: var(--page-gutter);
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .shd__chapters::-webkit-scrollbar { display: none; }
    .shd__chapters a { white-space: nowrap; min-height: var(--control-md); }
    .shd__letter {
        width: calc(100vw - 2 * var(--space-4));
        margin: var(--space-6) auto var(--space-8);
        padding: var(--space-5);
    }
    .shd__card, .shd__foot { width: calc(100vw - 2 * var(--space-4)); }
}
