/* balatat.com — shared by the Material and Story pages. Loads after shared/theme.css.
   Long-form pieces the theme does not have: reading column, collapsible panel, pull line, colour caption, closing block. */

/* ───────── small pieces ───────── */
/* these two pages are long: sections sit closer than the theme default (which doubles up between .sec blocks) */
main > .sec { padding-block: 32px; }
@media (min-width: 700px) { main > .sec { padding-block: 48px; } .sec-head { margin-block-end: 24px; } }
@media (min-width: 900px) { main > .sec { padding-block: 64px; } .sec-head { margin-block-end: 30px; gap: 14px; } }
.sec-head .h2 { min-width: 0; }
.sec-head .num { flex: none; }

/* colour caption: dot + code, the name in both scripts (always from colors.js), optional tag */
.cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; font-size: var(--fs-s); line-height: 18px; color: var(--ink-2); }
.kcode { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--ink); white-space: nowrap; }
.kcode i { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(21, 23, 28, .1); }
.cap-n { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0 8px; }
.cn-1 { color: var(--ink); font-weight: 500; }
.cn-2 { color: var(--ink-2); }

/* the sentence(s) of the owner's text that a visual illustrates, set as comfortable body text above it */
.sec-lead { font-size: 16.5px; line-height: 1.65; font-weight: 300; max-width: 40em; margin-block-end: 22px; text-wrap: pretty; }
:lang(ar) .sec-lead { font-size: 17.5px; line-height: 2; }
@media (min-width: 700px) { .sec-lead { font-size: 18px; margin-block-end: 30px; } :lang(ar) .sec-lead { font-size: 19px; } }
/* a line lifted from the owner's text, set large and light */
.pull { font-size: 20px; line-height: 1.4; font-weight: 300; letter-spacing: -.012em; max-width: 30em; text-wrap: pretty; }
:lang(ar) .pull { font-size: 19px; line-height: 1.8; }
@media (min-width: 700px) { .pull { font-size: 24px; } :lang(ar) .pull { font-size: 22px; } }
@media (min-width: 900px) { .pull { font-size: 28px; line-height: 1.36; } :lang(ar) .pull { font-size: 25px; line-height: 1.8; } }

.pre { font-size: var(--fs-s); color: var(--ink-2); }

/* ───────── entrance (only when motion is allowed: html.kq-anim) ───────── */
.kq-anim .fade { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform 1s var(--ease); transition-delay: var(--d, 0s); }
.kq-anim .fade.in { opacity: 1; transform: none; }

/* ───────── the full text: heading column + reading column ───────── */
.reading { display: grid; gap: 22px; }
.read-head { display: grid; gap: 10px; justify-items: start; align-content: start; }
.read-head .sec-head { margin-block-end: 0; }
.read-title { font-size: var(--fs-m); line-height: 1.4; font-weight: 500; letter-spacing: -.01em; max-width: 22em; text-wrap: balance; }
:lang(ar) .read-title { line-height: 1.7; }
.draft { display: inline-grid; gap: 1px; padding: 7px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); background: rgba(255, 255, 255, .55); font-size: var(--fs-xs); line-height: 1.5; color: var(--ink-2); }
.draft span { display: block; }
@media (min-width: 1180px) {
  .reading { grid-template-columns: minmax(0, 1fr) minmax(0, 760px); column-gap: 72px; align-items: start; }
  .read-head { position: -webkit-sticky; position: sticky; top: 32px; }
}

/* collapsible panel */
.tg-p { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.tg.open > .tg-p { grid-template-rows: 1fr; }
.tg-in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .6s; }
.tg.open > .tg-p > .tg-in { visibility: visible; transition-delay: 0s; }
.chev { flex: none; transition: transform .5s var(--ease); }
.tg.open .chev { transform: rotate(180deg); }

/* reading column: Readex Pro, light, generous leading */
.prose { max-width: 640px; font-size: 16.5px; line-height: 1.72; font-weight: 300; color: var(--ink); }
.prose p, .prose li { text-wrap: pretty; }
.prose p + p, .prose p + ul, .prose ul + p { margin-block-start: 1.05em; }
.prose strong { font-weight: 500; }
.prose em { font-style: normal; font-weight: 500; }
.prose ul { display: grid; gap: .7em; }
.prose li { position: relative; padding-inline-start: 22px; }
.prose li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: var(--deep); }
.prose .rq { font-size: 1.22em; line-height: 1.4; letter-spacing: -.012em; text-wrap: balance; margin-block: 1.1em 1.2em; }
.prose .rq strong { font-weight: 400; }
:lang(ar) .prose { font-size: 17.5px; line-height: 2.05; font-weight: 300; }
:lang(ar) .prose p { line-height: 2.05; }
:lang(ar) .prose li::before { top: 1em; }
:lang(ar) .prose .rq { line-height: 1.8; }
:lang(ar) .prose .rq strong { font-weight: 500; }
@media (min-width: 700px) { .prose { font-size: 17.5px; line-height: 1.75; } :lang(ar) .prose { font-size: 19px; } }

/* ───────── closing: three quiet links + the pre-order button ───────── */
.closing { padding-block: 12px 56px; display: grid; gap: 28px; }
.closing-cta { display: grid; gap: 10px; justify-items: stretch; text-align: center; }
@media (min-width: 700px) {
  .closing { padding-block: 16px 88px; gap: 36px; }
  .closing .lcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .closing-cta { display: flex; align-items: center; gap: 18px; text-align: start; }
}
@media (min-width: 900px) { .closing { padding-block: 16px 120px; } }
