/* React Bits Folder · Book / matte, adapted into a three-page brand book.
   Attribution: assets/vendor/react-bits/LICENSE.md. */
.memories {
  --memory-sage: #596f63;
  --memory-sea: #76938d;
  --memory-gold: #dfc18a;
  --memory-ink: #243f34;
  width: 88%; max-width: 1350px; margin-inline: auto;
  padding: 40px 0 88px; color: var(--memory-ink); overflow-anchor: none;
}
.memory-book { position: relative; display: flex; flex-direction: column; align-items: stretch; }
.memory-book button { color: var(--memory-ink); }
.book-navigation button {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 48px; padding: 12px 16px; border: 0; background: transparent; cursor: pointer; font-size: 15px;
}
.book-navigation[hidden] { display: none; }
.book-navigation { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.book-navigation button { width: 48px; border-radius: 50%; }
.book-navigation button:hover:not(:disabled) { background: #e9ece3; }
.book-navigation button:disabled { opacity: .3; cursor: default; }
.book-prev svg { transform: rotate(180deg); }
.book-page-count { min-width: 44px; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.book-back, .book-front, .book-page-open { display: none; }
.book-pages { display: grid; gap: 40px; }
.book-page { background: #fbf8f0; border-radius: 4px 14px 14px 4px; }
.book-page:nth-child(2) { background: #eef1e8; }
.book-page:nth-child(3) { background: #f4eddf; }
.book-page-content { padding: 44px; }
.book-page-content h2 { font-size: 48px; line-height: 1.1; letter-spacing: -.035em; }
.book-page-content h2:focus { outline: none; }
.book-page-content h2 em { color: var(--memory-sage); font-style: normal; }
.book-page-content p { margin-top: 24px; font-size: 17px; line-height: 1.75; }
.book-page-content .book-origin-lead { margin-top: 40px; font-size: 25px; line-height: 1.6; }
.book-origin-lead em { font-style: normal; color: #5a715e; }
.book-signature { display: block; margin-top: 48px; font-family: var(--display); font-size: 36px; line-height: 1.2; color: var(--memory-sage); }
.book-page-actions { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 16px; }
.memories-link { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 0; font-size: 14px; line-height: 1.5; text-decoration: underline; text-underline-offset: 5px; }
.memories-link svg { width: 18px; height: 18px; }
.memories-link:hover { color: #526b59; }
.book-page-picture { width: 100%; height: auto; aspect-ratio: 800 / 474; border-radius: 12px; margin-top: 28px; }
.memories-values { display: grid; gap: 24px; margin: 32px 0 0; }
.memories-values dt { font-family: var(--display); font-size: 25px; line-height: 1.25; letter-spacing: -.02em; }
.memories-values dd { margin: 10px 0 0; font-size: 16px; line-height: 1.7; color: #465c4e; }
/* Nothing is hidden until the book's controls and geometry are ready. */
.memory-book[data-ready] .book-stage { position: relative; height: var(--stage-height); touch-action: pan-y; perspective: 1800px; }
.memory-book[data-ready] .book-assembly { position: absolute; width: var(--book-w); height: var(--book-total); left: 50%; top: 50%; perspective: 1600px; transform: translate(-50%, -50%); isolation: isolate; }
.memory-book[data-ready] .book-back { display: block; position: absolute; width: 100%; height: var(--book-h); top: var(--book-tab); left: 0; border-radius: 3px 18px 18px 3px; background: var(--memory-sea); box-shadow: 0 20px 40px #243f3420; }
.book-tab { position: absolute; top: calc(-1 * var(--book-tab)); right: 7%; width: 36%; height: calc(var(--book-tab) + 2px); display: flex; align-items: center; justify-content: center; background: var(--memory-sea); border-radius: 12px 12px 0 0; color: #13271f; font-size: 13px; line-height: 1; }
.memory-book[data-ready] .book-front { display: block; position: absolute; top: var(--book-tab); left: 0; width: 100%; height: var(--book-h); padding: 0; border: 0; background: transparent; transform-origin: left center; transform-style: preserve-3d; cursor: pointer; }
.book-front:focus-visible { outline: 3px solid var(--focus); outline-offset: 8px; }
.book-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 3px 18px 18px 3px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.book-face-outer { padding: 14%; background: var(--memory-sage); color: #fff9ee; box-shadow: inset 12px 0 16px -16px #13271faa, 0 16px 32px #243f3426; transform: translateZ(1px); }
.book-wordmark { font-family: var(--display); font-size: var(--cover-brand-size); line-height: 1.2; color: #ffebc7; }
.book-cover-title { margin-top: 36px; text-align: center; font-family: var(--display); font-size: var(--cover-title-size); line-height: 1.18; letter-spacing: -.025em; }
.book-cover-line { width: 28%; height: 1px; background: var(--memory-gold); margin-top: 40px; }
.book-face-inner { background: var(--memory-sage); transform: rotateY(180deg); box-shadow: inset -12px 0 16px -16px #13271faa; }
.memory-book[data-ready] .book-pages { position: absolute; inset: 0; display: block; pointer-events: none; }
.memory-book[data-ready] .book-page { position: absolute; left: 0; top: 0; width: var(--page-width); margin: 0; overflow: hidden; transform-origin: center; box-shadow: 0 12px 30px #243f3426; pointer-events: none; }
.memory-book[data-view="overview"] .book-page, .memory-book[data-view="reading"] .book-page[data-selected] { pointer-events: auto; }
.memory-book[data-ready] .book-page-content { visibility: hidden; }
.memory-book[data-view="reading"] .book-page[data-selected] .book-page-content { visibility: visible; }
.memory-book[data-ready] .book-page-open {
  display: flex; position: absolute; inset: 0; width: 100%; height: 100%; flex-direction: column; justify-content: space-between;
  padding: 9%; border: 0; border-radius: inherit; background: inherit; text-align: left; cursor: pointer;
}
.memory-book[data-view="reading"] .book-page[data-selected] .book-page-open { visibility: hidden; }
.book-page-open:focus-visible { outline: 5px solid var(--focus); outline-offset: -10px; }
.book-preview-title { font-family: var(--display); font-size: var(--preview-title-size); line-height: 1.12; letter-spacing: -.025em; }
.book-page-open > img { width: 100%; height: 43%; object-fit: cover; object-position: 65% 50%; border-radius: 12px; margin: 7% 0; }
.book-page:nth-child(3) .book-page-open > img { object-position: 50% 58%; }
.book-preview-logo { display: block; width: 100%; height: 43%; position: relative; overflow: hidden; margin: 7% 0; }
.book-preview-logo img { width: 100%; height: 155%; object-fit: contain; position: absolute; top: -26%; mix-blend-mode: multiply; }
.book-preview-action { display: flex; align-self: flex-end; align-items: center; justify-content: center; font-size: var(--preview-label-size); line-height: 1; }
.book-preview-action svg { width: 1.5em; height: 1.5em; }
.memory-book[data-ready] .book-page-open { cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.book-front { user-select: none; -webkit-user-select: none; }
.memory-book[data-view="reading"] .book-page[data-selected] { cursor: zoom-out; }
.book-page-content :is(a, button) { cursor: pointer; }
.memory-book[data-animating] :is(.book-front, .book-back, .book-page) { will-change: transform; }
@media (max-width: 800px) {
  .memories { width: 92%; padding: 24px 0 64px; }
  .book-page-content { padding: 32px; }
  .book-page-content h2 { font-size: 42px; }
  .book-page-content .book-origin-lead { font-size: 23px; }
}
@media (max-width: 480px) {
  .memories { width: 94%; }
  .book-page-content { padding: 28px 24px; }
  .book-page-content h2 { font-size: clamp(29px, 8.4vw, 38px); }
  .book-page-content p { font-size: 16px; margin-top: 24px; }
  .book-page-content .book-origin-lead { font-size: 21px; margin-top: 32px; }
  .book-page-actions { display: grid; gap: 0; }
  .book-page-picture { margin-top: 20px; }
  .book-signature { font-size: 30px; margin-top: 36px; }
  .memories-values { gap: 24px; margin-top: 28px; }
  .memories-values dt { font-size: 23px; }
  .memories-values dd { font-size: 16px; }
  .book-navigation { gap: 4px; margin-top: 24px; }
  .book-tab { font-size: 11px; }
  .book-cover-title { margin-top: 24px; }
  .book-cover-line { margin-top: 28px; }
}
@media print {
  .memory-book .book-navigation, .memory-book .book-front, .memory-book .book-back, .memory-book .book-page-open { display: none !important; }
  .memory-book[data-ready] .book-stage, .memory-book[data-ready] .book-assembly, .memory-book[data-ready] .book-pages, .memory-book[data-ready] .book-page { position: static; transform: none !important; width: 100%; height: auto !important; opacity: 1 !important; box-shadow: none; overflow: visible; }
  .memory-book[data-ready] .book-page-content { visibility: visible; }
  .book-page { break-inside: avoid; }
}
