/* printables.css : the three Printables pages (resources, coloring,
   letter-paper) on the scrapbook kit (scrapbook.css, README in
   scripts/scrapbook/). The kit owns layout, tilt, tears, pins and motion;
   this file only sets what the three pages share: type, the captions and
   download buttons under each sheet, the closing invitation and the letter
   signup on painted paper. Page-specific placement stays in each page. */

.pr { position: relative; z-index: 1; }
/* one pin scale per page: the painted notes' own pins (scaled by --k) and
   the kit's pins on the sheets read as the same pins (Fable, SBP review) */
.pr { --sb-pin-w: clamp(24px, 2.6vw, 38px); }
.pr .sb-paper--note { --k: 0.62; }
/* The torn note's brass pin sits in the art's top-MIDDLE slice, which stretches
   sideways. Scaling the border down (--k: 0.5) shrank the slice's height but
   not its width, so the pin drew twice as wide as tall (Tom, 2026-11-10:
   "looks stretched, especially the pin"). This wide copy of the same painting
   (note-torn-wide-w1280: only the plain paper either side of the pin is
   widened) prints at the same size with --k: 1, so every slice keeps its
   shape; --st covers the pin's shadow too. */
.pr .sb-paper--torn { --art: url("/Assets/printables/note-torn-wide-w1280.webp"); --iw: 1280; --k: 1; --st: 165; }
.pr a { color: var(--lamp, #FFE9B8); }
.pr p { color: rgba(250, 246, 239, 0.8); }
.pr a:focus-visible, .pr button:focus-visible { outline: 2px solid #FFE9B8; outline-offset: 4px; border-radius: 6px; }

/* breadcrumbs (the trail JSON-LD already carries) */
.pr-crumbs { max-width: var(--sb-max); margin: 0.6rem auto 0; padding-inline: var(--sb-gutter); font-size: 0.82rem; color: rgba(250, 246, 239, 0.6); }
.pr-crumbs a { color: rgba(250, 246, 239, 0.78) !important; text-decoration: none; }
.pr-crumbs a:hover { color: #F5A623 !important; text-decoration: underline; }

/* headings: Fraunces, lamplight gold */
.pr h1, .pr h2 {
  font-family: 'Fraunces', 'M PLUS Rounded 1c', Georgia, serif;
  font-variation-settings: 'opsz' 60, 'wght' 700, 'SOFT' 100, 'WONK' 1;
  font-weight: 700; letter-spacing: -0.005em; color: #F5A623;
  word-break: keep-all; overflow-wrap: anywhere;
}
.pr h1 > span, .pr h2 > span, .pr h2 > span > span {
  background: linear-gradient(180deg, #FFE9B8 0%, #F5A623 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.pr h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.3; margin: 0 0 0.8rem; }
.pr h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.45; margin: 0 0 0.7rem; }
.pr .coloring-sub { font-family: 'Fraunces', 'M PLUS Rounded 1c', Georgia, serif; font-variation-settings: 'opsz' 60, 'wght' 600, 'SOFT' 100, 'WONK' 1; font-size: clamp(1.1rem, 1.8vw, 1.32rem); line-height: 1.6; color: #FFE9B8; margin: 0 0 1.2rem; }
.pr .coloring-intro { font-size: clamp(0.98rem, 1.4vw, 1.05rem); line-height: 1.95; max-width: 34em; }
.pr .coloring-intro p { color: rgba(250, 246, 239, 0.84); }
.pr-head .sb-head__copy { padding-top: clamp(1rem, 5vw, 5rem); }
.pr-head .sb-head__art { width: min(100%, 500px); }
/* the printables are the point: keep the first band's heading in reach of the fold */
.pr .pr-head { padding-bottom: clamp(1rem, 2vw, 1.75rem); }

/* Hoshi reading, sitting on the top edge of a pile's front sheet (the
   articles' Reader pose); a wax seal pressed on a pile's front corner */
.sb-pile > .pr-reader { position: absolute; z-index: 4; width: 26%; height: auto; right: 21%; top: 0; translate: 0 -74%; filter: drop-shadow(0 12px 14px rgba(4, 8, 32, 0.45)); pointer-events: none; }
.sb-pile > .sb-object:nth-child(3) { z-index: 4; width: 24%; justify-self: end; align-self: end; margin: 0 12% 0 0; }

/* -- under each sheet: the word (or the paper's name) and the downloads */
.pr-cap { margin-top: 1rem; }
.pr-word {
  font-family: 'Fraunces', 'M PLUS Rounded 1c', Georgia, serif;
  font-variation-settings: 'opsz' 60, 'wght' 700, 'SOFT' 100, 'WONK' 1;
  font-weight: 700; font-size: 1.35rem; line-height: 1.3; color: #FFE9B8 !important;
  margin: 0; overflow-wrap: anywhere;
}
.sb-sheets__item:first-child .pr-word { font-size: 1.7rem; }
.pr-word small {
  display: block;
  font-family: 'M PLUS Rounded 1c', 'Nunito', sans-serif; font-variation-settings: normal;
  font-weight: 500; font-size: 0.82rem; line-height: 1.5; letter-spacing: 0.04em;
  color: rgba(250, 246, 239, 0.66);
  margin-top: 0.1rem;
}
.pr-dl { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.pr-btn {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 40px; padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  border-radius: 999px;
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 600; font-size: 0.88rem; line-height: 1;
  text-decoration: none;
  background: #F5A623; color: #131f52 !important;
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.32);
  transition: background-color 200ms var(--ease-spring), transform 200ms var(--ease-spring), box-shadow 200ms var(--ease-spring);
}
.pr-btn::before {
  /* a small down-arrow into a tray: "this saves a file" */
  content: ''; width: 0.8em; height: 0.8em; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5v8.2M4.6 6.6 8 10l3.4-3.4M2 11.5v2.5h12v-2.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5v8.2M4.6 6.6 8 10l3.4-3.4M2 11.5v2.5h12v-2.5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pr-btn .pr-size { font-family: 'Nunito', sans-serif; font-weight: 600; font-size: 0.72rem; opacity: 0.72; }
.pr-btn--alt { background: transparent; color: #FAF6EF !important; box-shadow: inset 0 0 0 1.5px rgba(250, 246, 239, 0.45); }
@media (hover: hover) and (pointer: fine) {
  .pr-btn:hover { background: #FAC96A; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245, 166, 35, 0.45); }
  .pr-btn--alt:hover { background: rgba(250, 246, 239, 0.1); color: #FFE9B8 !important; box-shadow: inset 0 0 0 1.5px rgba(250, 246, 239, 0.8); }
}
.pr-btn:active { transform: scale(0.97); }
.pr-btn:focus-visible { border-radius: 999px; }

/* -- the living gold button (the site's), for the invitation */
.pr-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; margin-top: 1.5rem; }
.pr-actions a {
  font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; font-weight: 600; font-size: 1rem;
  text-decoration: none; display: inline-flex; align-items: center; min-height: 48px;
  padding: 0.7rem 1.5rem; border-radius: 999px;
  background: #F5A623; color: #131f52 !important;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.40), 0 2px 4px rgba(245, 166, 35, 0.20);
  transition: background-color 200ms var(--ease-spring), transform 200ms var(--ease-spring), box-shadow 200ms var(--ease-spring);
}
.pr-actions a:hover { background: #FAC96A; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(245, 166, 35, 0.50), 0 4px 8px rgba(245, 166, 35, 0.30); }
.pr-actions a:active { transform: translateY(0) scale(0.98); }
.pr-actions a.alt { background: transparent; color: #FAF6EF !important; border: 1.5px solid rgba(250, 246, 239, 0.5); font-weight: 500; box-shadow: none; }
.pr-actions a.alt:hover { background: rgba(250, 246, 239, 0.1); border-color: rgba(250, 246, 239, 0.85); color: #FFE9B8 !important; box-shadow: none; }
.pr-actions a:focus-visible { border-radius: 999px; }

/* -- the invitation band: text on the night, a painted object breaking the edge */
.pr-invite p { max-width: 32em; line-height: 1.95; }
.pr-invite .sb-edge { max-width: 640px; }
.pr-book { width: 100%; --sb-tilt: -5deg; }
/* the hub's version: three world plates in a pile */
.pr-worlds { max-width: 560px; }
.pr-worlds .sb-plate { aspect-ratio: 16 / 9; }
.pr-worlds > :nth-child(1) { width: 70%; }
.pr-worlds > :nth-child(2), .pr-worlds > :nth-child(3) { width: 58%; }
.pr-worlds > :nth-child(2) { margin-top: 30%; }
.pr-worlds > :nth-child(3) { margin-top: 4%; }

/* -- usage notes and lists on painted paper */
.pr .sb-paper ul { list-style: none; margin: 0; padding: 0; }
.pr .sb-paper li { position: relative; padding-left: 1.3rem; margin: 0 0 0.55rem; font-size: 0.95rem; line-height: 1.75; color: rgba(34, 41, 90, 0.86); }
.pr .sb-paper li::before { content: ''; position: absolute; left: 0.15rem; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: #c98a1c; box-shadow: 0 0 0 2px rgba(201, 138, 28, 0.18); }
.pr .sb-paper a { color: #8a5a0a; text-decoration-color: rgba(138, 90, 10, 0.4); text-underline-offset: 3px; }
.pr .sb-paper h2 > span, .pr .sb-paper h2 > span > span { background: none; -webkit-text-fill-color: #6b4708; color: #6b4708; }
.pr .sb-paper h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); margin-bottom: 0.9rem; }

/* -- "A Letter from Hoshi", written on Hoshi's letter paper, sealed */
.pr-signup { position: relative; max-width: 620px; }
.pr-signup .letter-signup { margin: 0; max-width: none; text-align: left; }
.pr-signup .letter-signup p { color: rgba(34, 41, 90, 0.8); }
.pr-signup .letter-signup form { justify-content: flex-start; }
.pr-signup .letter-signup input[type="email"] { background: #fffdf8; border: 1.5px solid rgba(107, 71, 8, 0.35); max-width: none; min-height: 46px; }
.pr-signup .letter-signup button { min-height: 46px; box-shadow: 0 4px 16px rgba(245, 166, 35, 0.40), 0 2px 4px rgba(245, 166, 35, 0.20); transition: background-color 200ms var(--ease-spring), transform 200ms var(--ease-spring); }
.pr-signup .letter-signup button:hover:not(:disabled) { background: #FAC96A; transform: translateY(-2px); }
.pr-signup .letter-signup-msg { color: #22295a; }
.pr-signup .letter-signup-note, .pr-signup .letter-signup-note a { color: rgba(34, 41, 90, 0.62); }
.pr-signup .line-add { color: rgba(34, 41, 90, 0.8); }
.pr-signup .line-btn { color: #fff !important; box-shadow: 0 4px 14px rgba(3, 127, 54, 0.35); transition: background-color 200ms var(--ease-spring), transform 200ms var(--ease-spring); }
.pr-signup .line-btn:hover { background: #02702F; transform: translateY(-2px); }
/* Hoshi's envelope (Tom's painting) tucked at the letter's corner, its own
   seal standing in for the loose one */
.pr-envelope-signup { position: absolute; z-index: 2; right: -2.4rem; bottom: -2.6rem; width: clamp(130px, 14vw, 190px); height: auto; transform: rotate(8deg); filter: drop-shadow(0 12px 16px rgba(4, 8, 32, 0.5)); }
.pr-seal { position: absolute; z-index: 2; right: -1.2rem; bottom: -1.8rem; width: clamp(76px, 9vw, 112px); height: auto; transform: rotate(12deg); filter: drop-shadow(0 6px 8px rgba(40, 10, 10, 0.4)); }

/* -- questions (side anchor) */
.pr-faq .q { font-family: 'Fraunces', 'M PLUS Rounded 1c', Georgia, serif; font-variation-settings: 'opsz' 60, 'wght' 700, 'SOFT' 100, 'WONK' 1; font-weight: 700; font-size: 1.15rem; color: #FFE9B8 !important; margin: 1.8rem 0 0.4rem; }
.pr-faq .q:first-of-type { margin-top: 0.3rem; }
.pr-faq p:not(.q) { line-height: 1.95; max-width: 36em; }

.pr-updated { color: rgba(250, 246, 239, 0.5) !important; font-size: 0.8rem; margin: 0; }

@media (max-width: 860px) {
  .pr .coloring-intro { margin-inline: auto; }
  .pr-actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .pr h2 { font-size: 1.45rem; }
  .pr .sb-head__copy { text-align: left; }
  .pr-head .sb-head__art { width: min(100%, 340px); }
  .pr-word { font-size: 1.15rem; }
  .sb-sheets__item:first-child .pr-word { font-size: 1.3rem; }
  .pr-dl { flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .pr-btn { justify-content: flex-start; min-height: 44px; }
  .pr-seal { width: 64px; right: -0.4rem; bottom: -1.4rem; }
  .pr-envelope-signup { width: 112px; right: -0.6rem; bottom: -2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-btn, .pr-actions a, .pr-signup .letter-signup button, .pr-signup .line-btn { transition: none; }
}
