/* ==========================================================================
   Samia Books — shelf and covers. Loaded after samia.css on the Books site only.
   ========================================================================== */

/* The shelf: a row of sample covers with their notes underneath */
.shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px); align-items: start; }
.book { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.book-cover { aspect-ratio: 2 / 3; width: 100%; max-width: 320px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper-2); box-shadow: var(--shadow); overflow: hidden; transform-origin: 50% 92%; transition: transform .35s var(--spring), box-shadow .35s var(--ease); }
.book-cover svg { width: 100%; height: 100%; display: block; }
.book:hover .book-cover, .book:focus-within .book-cover { transform: rotate(-2.5deg) translate(-4px, -6px); box-shadow: var(--shadow-lg); }
.book:nth-child(even):hover .book-cover, .book:nth-child(even):focus-within .book-cover { transform: rotate(2.5deg) translate(-4px, -6px); }
.book-meta { display: grid; gap: 6px; justify-items: start; }
.book-meta h3 { margin: 4px 0 0; }
.book-meta p { margin: 0; font-size: var(--fs-small); }
.book-meta .year { font-size: var(--fs-label); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 700px) {
  .shelf { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .book-cover { max-width: 260px; }
}
@media (prefers-reduced-motion: reduce) { .book-cover { transition: none; } }

/* Landscape book cards: printed titles shown as a photographed cover (16:11) with notes underneath.
   Used for the Allah Book series on Books and Kids. The .shelf covers above are 2:3 portrait; this is separate. */
.book-landscape { display: flex; flex-direction: column; gap: 14px; min-width: 0; color: inherit; }
.book-landscape .book-photo { aspect-ratio: 16 / 11; width: 100%; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--sand); box-shadow: var(--shadow); overflow: hidden; transition: transform .35s var(--spring), box-shadow .35s var(--ease); }
.book-landscape .book-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-landscape:hover .book-photo, .book-landscape:focus-within .book-photo { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.book-landscape .book-meta { display: grid; gap: 8px; justify-items: start; }
.book-landscape .book-meta h3 { margin: 4px 0 0; }
.book-landscape .book-meta p { margin: 0; font-size: var(--fs-small); }
.book-landscape .book-meta .btn { margin-top: 6px; }
a.book-landscape:hover { text-decoration: none; }
a.book-landscape:hover .btn { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.photo-credit { font-size: .82rem; color: var(--muted); margin-top: var(--s3); }
@media (prefers-reduced-motion: reduce) { .book-landscape .book-photo { transition: none; } }

/* A centred sign-up form inside a .center block */
.center .inline-form { margin-inline: auto; }

/* Plain-English terms: a two-column definition list that stacks on phones */
.terms { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0; margin: 0; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.terms dt, .terms dd { margin: 0; padding: 16px 20px; border-bottom: 1.5px solid var(--line); }
.terms dt { font-weight: 700; color: var(--ink); background: var(--lemon); border-right: 1.5px solid var(--line); }
.terms dt:nth-last-of-type(1), .terms dd:last-of-type { border-bottom: 0; }
@media (max-width: 600px) {
  .terms { grid-template-columns: minmax(0, 1fr); }
  .terms dt { border-right: 0; padding-bottom: 6px; }
  .terms dt:nth-last-of-type(1) { border-bottom: 1.5px solid var(--line); }
}

/* ==========================================================================
   November 2026 launch: printed covers on a drawn shelf, feature rows, press kit, stats.
   Everything above stays (the Kids site uses .book-landscape); these are additions.
   ========================================================================== */

/* Printed books: the real cover photograph framed as a book, each standing on its own drawn plank */
.print-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(32px, 4vw, 56px) clamp(20px, 3vw, 40px); align-items: start; }
.book-print { display: flex; flex-direction: column; min-width: 0; color: inherit; }
.book-print .cover { position: relative; aspect-ratio: 1100 / 850; margin: 0 18px -2px 10px; border: var(--bw) solid var(--ink); border-radius: 3px 6px 6px 3px; overflow: hidden; background: var(--paper-2); box-shadow: 7px 7px 0 var(--ink); transform-origin: 50% 100%; transition: transform .35s var(--spring), box-shadow .35s var(--ease); }
.book-print .cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 16px; background: linear-gradient(90deg, rgba(21,19,26,.16), rgba(21,19,26,0)); pointer-events: none; }
.book-print .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.book-print .plank { position: relative; z-index: 1; height: 18px; background: var(--peach); border: var(--bw) solid var(--ink); border-radius: 2px; box-shadow: 5px 5px 0 var(--ink); }
.book-print:hover .cover, .book-print:focus-within .cover { transform: translateY(-8px) rotate(-2deg); box-shadow: 9px 9px 0 var(--ink); }
.book-print .book-meta { margin-top: var(--s3); display: grid; gap: 8px; justify-items: start; }
.book-print .book-meta h3 { margin: 4px 0 0; }
.book-print .book-meta p { margin: 0; font-size: var(--fs-small); }
.book-print .book-meta .btn { margin-top: 6px; }
@media (max-width: 760px) {
  .print-shelf { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .book-print .cover { margin-right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .book-print .cover { transition: none; } }

/* Feature rows (the series page): a tinted stage with the cover on a plank, words beside it */
.book-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-block: clamp(32px, 5vw, 64px); border-top: var(--bw) solid var(--ink); }
.book-feature:last-of-type { border-bottom: var(--bw) solid var(--ink); }
.book-feature.flip .stage { order: 2; }
.book-feature .words { display: grid; gap: 10px; justify-items: start; }
.book-feature .words > * { margin: 0; }
.book-feature .words h3 { font-size: clamp(1.8rem, 1.3rem + 2vw, 3rem); font-variation-settings: "wdth" 78; letter-spacing: -.02em; line-height: .95; }
.book-feature .words .lead { max-width: 30em; }
.book-feature .words .actions { margin-top: var(--s2); }
.stage { position: relative; isolation: isolate; padding: clamp(28px, 5vw, 56px) clamp(22px, 5vw, 56px) 0; border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; background: var(--lemon); }
.stage.rose { background: var(--rose); } .stage.mint { background: var(--mint); } .stage.sky { background: var(--sky); } .stage.peach { background: var(--peach); }
.stage::before { content: ""; position: absolute; z-index: 0; width: clamp(72px, 12vw, 110px); aspect-ratio: 1; border-radius: 50%; background: var(--sun); border: var(--bw) solid var(--ink); right: 7%; top: 7%; }
/* Flipped stages keep the disc top-right too: the caption sits top-left and must not cross it. */
.stage .cover { position: relative; z-index: 1; aspect-ratio: 1100 / 850; max-width: 440px; margin: 0 auto -2px; border: var(--bw) solid var(--ink); border-radius: 3px 6px 6px 3px; overflow: hidden; background: var(--paper-2); box-shadow: 7px 7px 0 var(--ink); }
.stage .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.stage .plank { position: relative; z-index: 2; height: 20px; margin: 0 calc(-1 * clamp(22px, 5vw, 56px)); background: var(--peach); border-top: var(--bw) solid var(--ink); }
.stage .caption { position: absolute; z-index: 3; left: 16px; top: 16px; margin: 0; }
@media (max-width: 900px) {
  .book-feature { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .book-feature.flip .stage { order: 0; }
}

/* Stats with three cells (the four-cell .stats is in samia.css) */
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .stats.three { grid-template-columns: minmax(0, 1fr); } .stats.three > div { border-right: 0; border-bottom: var(--bw) solid var(--ink); } .stats.three > div:last-child { border-bottom: 0; } .stats.three > div:nth-child(even) { background: var(--lemon); } .stats.three > div:nth-child(3) { background: var(--surface); } }

/* Press kit: the mark files, with a swatch and a note each */
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.files li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--paper-2); box-shadow: 3px 3px 0 var(--ink); }
.files .swatch { width: 64px; height: 64px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper); }
.files .swatch.ink { background: var(--ink); }
.files .swatch img { width: 40px; height: 40px; }
.files .swatch img.wide { width: 56px; height: auto; }
.files b { display: block; color: var(--ink); }
.files small { color: var(--muted); display: block; }

/* A copy-ready paragraph: dashed, like something to cut out */
.boiler { border: var(--bw) dashed var(--ink); border-radius: var(--r); background: var(--paper-2); padding: clamp(22px, 3vw, 36px); font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }
.boiler p { margin: 0; }
.boiler p + p { margin-top: 1em; }

/* Mailboxes: the address is the headline */
.mailbox .addr { font-family: var(--display); font-weight: 800; font-size: clamp(1.05rem, .9rem + .7vw, 1.35rem); letter-spacing: -.01em; font-variation-settings: "wdth" 84; color: var(--ink); word-break: break-word; overflow-wrap: anywhere; }

/* The signature, once per site, in blue */
.signature-line { font-family: var(--arabic); font-size: clamp(2.6rem, 2rem + 3vw, 4.4rem); line-height: 1.1; color: var(--blue); }

/* The sun wheel beside the long view: it turns slowly */
.longview { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 760px) { .longview { grid-template-columns: minmax(0, 1fr); } .longview .sunwheel { margin-inline: auto; } }

/* Corrections: an honest empty line under a rule */
.empty-line { border-block: var(--bw) solid var(--ink); padding: var(--s3) 0; display: flex; gap: var(--s2); align-items: baseline; flex-wrap: wrap; }
.empty-line b { color: var(--ink); }

/* Tilt tiles: the lean comes from the tile's own perspective() transform, so children can stay flat.
   With preserve-3d plus will-change, Chrome sometimes drops a child's box (the icon tile) from the paint. */
.tilt { transform-style: flat; }
