/* Ruri's page (ruri2.html). Same structure as the other pages (title, white description box,
   content below); each poem is set on a textured paper card, like Qih's essay card.
   Paper colours match the essay card in styles.css. */

:root {
    --ruri-ink: #2b2a5a;            /* dark text on paper */
    --ruri-paper: #f1e4d0;          /* cream paper (same as the Qih / About cards) */
    --ruri-paper-edge: #d9c6a8;
    --ruri-paper-line: rgba(67, 67, 142, 0.14);
    --ruri-mark: #f1c3cf;           /* highlighter pink on paper */
}

.ruri-page .essay-content {
    text-align: left;
    padding-bottom: 12vh;
}
/* same height fix as the Qih page: the column has bottom padding, so shrink its height by it */
@media (min-width: 1025px) {
    .ruri-page .essay-content { height: calc(100vh - 4.375rem - 12vh) !important; }
}

.ruri-page .essay-body { width: 100%; }

/* ---------- one poem = number + title above a paper card ---------- */
.poem {
    position: relative;
    margin: 0 0 clamp(3.5rem, 8vw, 6rem);
}

.poem__head {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.25rem 1.25rem;
    margin-bottom: -1.2rem;       /* title overlaps the top edge of the paper */
}
.poem__no {
    font: 700 clamp(5rem, 9vw, 8rem)/0.8 "Space Grotesk", sans-serif;
    color: transparent;
    -webkit-text-stroke: 2px var(--title-pink);
    letter-spacing: -0.06em;
}
.ruri-page .poem__title {
    flex: 1 1 12rem;
    margin: 0 0 0.6rem;
    font: 700 clamp(1.6rem, 2.6vw, 2.4rem)/1.1 "Space Grotesk", sans-serif;
    letter-spacing: -0.02em;
    color: var(--title-pink);
    text-shadow: var(--title-shadow);
    text-align: left;
}

.poem__body {
    position: relative;
    box-sizing: border-box;
    padding: 2.5rem max(1.5rem, 4vw) 1.5rem;
    background-color: var(--ruri-paper);
    /* faint ruled lines + grain, so it reads as paper */
    background-image: repeating-linear-gradient(transparent 0 calc(1.7em - 1px), var(--ruri-paper-line) calc(1.7em - 1px) 1.7em);
    background-position: 0 2.4rem;
    border: 0.0625rem solid var(--ruri-paper-edge);
    border-radius: 0.1875rem;
    box-shadow: 0.5rem 0.5rem 0 rgba(20, 20, 60, 0.35);
    color: var(--ruri-ink);
    font-family: "EB Garamond", Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.7;
}
.poem__body::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.09;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.poem__body > * { position: relative; z-index: 1; max-width: 38rem; }
.poem__body > .split,
.poem__body > .scan { max-width: none; }

/* the small-phone `.essay-content p` rule in styles.css justifies and resizes text; undo it here */
.essay-content .poem__body .st {
    margin: 0 0 1.4em;
    font-size: inherit;
    line-height: inherit;
    text-align: left;
}
.essay-content .poem__body .st.tight { margin-bottom: 0.4em; }
.essay-content .poem__body .st.r { text-align: right; }
.poem__body .emoji { font-size: 1.1em; margin-left: 0.15em; }

/* speech: highlighter label */
.poem__body .q {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 0.15em 0.6em;
    font-style: italic;
    background: var(--ruri-mark);
}

.audio-section { margin-bottom: 1.6rem; }
.audio-section audio {
    width: 100%;
    max-width: 26rem;
    height: 3rem;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem 2.5rem;
    margin-bottom: 1.6rem;
}
.split__col .st:last-child { margin-bottom: 0; }

.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.95em;
    line-height: 1.5;
}
.checklist li { position: relative; padding: 0 0 1rem 2rem; }
.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2em;
    width: 1.15rem;
    height: 1.15rem;
    border: 2px solid currentColor;
    border-radius: 0.25rem;
}
.checklist li.done::before {
    content: "✓";
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checklist s { text-decoration-thickness: 2px; opacity: 0.8; }

.verdict {
    display: inline-block;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.85em;
    line-height: 1.5;
    padding: 0.8rem 1.1rem;
    border: 3px solid var(--ruri-ink);
    border-radius: 0.4rem;
    transform: rotate(-1.2deg);
    margin: 0.4rem 0 2rem;
}

.scan { margin: 2rem 0; }
.scan img {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
    border: 1px solid var(--ruri-paper-edge);
    box-shadow: 0.25rem 0.3rem 0 rgba(20, 20, 60, 0.25);
}
.scan--tall img { max-width: 30rem; }
.scan figcaption {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.8rem;
    margin-top: 0.6rem;
    color: rgba(43, 42, 90, 0.8);
}
.scan .dl {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
    color: var(--ruri-ink);
}
.scan .dl:hover { color: #8d5966; }

.ruri-page .poem__body :focus-visible { outline: 3px solid var(--ruri-ink); outline-offset: 2px; }

@media (max-width: 768px) {
    .poem__head { margin-bottom: 0.6rem; }
    .ruri-page .poem__title { margin-bottom: 0.2rem; }
    .split { grid-template-columns: 1fr; }
}
