/* Shared styles for every page. */
:root {
  --spruce: #1e3a2f;
  --red: #a93226;
  --snow: #f8f7f3;
  --frost: #e1ecec;
  --card: #ece8dc;
  --ink: #22302a;
  --muted: #55645d;
  --link: #7b4a24;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 18px/1.5 Nunito, system-ui, sans-serif; color: var(--ink); background: var(--snow); }
img { max-width: 100%; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1, h2 { margin: 0; font-family: Pangolin, cursive; font-weight: 400; line-height: 1.15; color: var(--spruce); }
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: clamp(28px, 3.5vw, 38px); }
p { margin: 0; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.narrow { max-width: 808px; }

.banner { background: var(--spruce); text-align: center; padding: 10px 16px; font-size: 15px; }
.banner a { color: #fff; text-decoration: none; }
.top { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; padding-block: 20px; }
.brand { font: 32px Pangolin, cursive; color: var(--spruce); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px clamp(18px, 4vw, 28px); font-weight: 600; }
.top nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.split__text { flex: 1 1 340px; display: flex; flex-direction: column; align-items: stretch; gap: 20px; }
.split__media { flex: 1 1 400px; min-width: 0; }
.hero { padding-block: 32px 64px; }
.art { display: grid; border-radius: 24px; overflow: hidden; }
.art img { grid-area: 1 / 1; width: 100%; height: auto; align-self: center; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-block; border: 2px solid transparent; border-radius: 10px; padding: 13px 26px; font: inherit; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { color: #fff; background: #8f2a20; }
.btn--outline { border-color: var(--spruce); color: var(--spruce); background: transparent; }
.btn--dark { background: var(--spruce); color: #fff; }
.btn:disabled { opacity: 0.65; cursor: wait; }
.note { font-size: 15px; color: var(--muted); }

.band { padding-block: 64px; }
.band--frost { background: var(--frost); }
.band--spruce { background: var(--spruce); color: #fff; }
.band--spruce h2 { color: #fff; }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 16px 20px; }
.row strong, .row__prices { display: block; }
.row s { color: var(--muted); margin-right: 8px; }
.row b { color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.shelf { padding-block: 72px; }
.shelf h2 { margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; }
.card:hover { color: var(--spruce); }
.card__media { display: flex; align-items: center; justify-content: center; height: 280px; padding: 20px; background: var(--card); border-radius: 16px; }
.card__media img { max-height: 100%; object-fit: contain; }
.card__more { color: var(--link); }
.card[data-book] .card__media { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; height: auto; aspect-ratio: 4 / 3; padding: 12px; overflow: hidden; }
.card[data-book] img { width: auto; height: auto; max-width: 100%; max-height: 100%; min-height: 0; border-radius: 8px; }
.card s { color: var(--muted); margin-right: 8px; }
.card b { color: var(--red); }

.portrait { flex: 0 1 340px; min-width: 0; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; }

.faq { padding-block: 72px; }
.faq h2 { margin-bottom: 20px; }
.faq details { border-bottom: 1px solid #cfd8d2; padding: 16px 0; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq details p { margin-top: 10px; }

.signup { display: flex; flex-wrap: wrap; gap: 12px; }
.signup label { flex: 1 1 100%; font: 28px/1.3 Pangolin, cursive; color: var(--spruce); }
.signup input[type="email"] { flex: 1 1 280px; min-width: 0; font: inherit; padding: 13px 16px; border: 2px solid var(--spruce); border-radius: 10px; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.signup__check { flex: 1 1 100%; }
.signup__status { flex: 1 1 100%; font-weight: 800; color: var(--spruce); }
.signup__status:empty { display: none; }
.signup__status.is-error { color: var(--red); }

.doc { padding-block: 32px 64px; }
.doc h2 { font: 800 22px/1.3 Nunito, sans-serif; color: var(--ink); margin-top: 28px; }
.doc p { margin-top: 14px; }
.draft { color: var(--red); font-weight: 800; }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; padding: 36px 24px; font-size: 15px; }
.doc ul { margin: 14px 0 0; padding-left: 22px; }
.doc li { margin-top: 6px; }

.top nav a[aria-current="page"], .top nav a[aria-current="true"] { color: var(--red); text-decoration: underline; text-underline-offset: 6px; }
.page-head { padding-block: 40px; }
.page-head p { max-width: 600px; margin-top: 8px; }
.page-head .page-head__tagline { margin-top: 14px; }
.issues { display: flex; flex-direction: column; gap: 32px; padding-block: 48px 72px; }
.issue { display: flex; flex-wrap: wrap; gap: 36px; background: #fff; border-radius: 20px; padding: clamp(18px, 3vw, 32px); }
.issue__cover { flex: 1 1 240px; max-width: 280px; margin-inline: auto; display: flex; justify-content: center; align-items: center; padding: 16px; background: var(--card); border-radius: 12px; }
.issue__cover img { width: 100%; height: auto; border-radius: 4px; }
.issue__text { flex: 999 1 340px; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px; }
.issue h2 { font-size: clamp(28px, 3vw, 34px); }
.issue__meta { color: var(--muted); }
.issue__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 24px; }
.issue__price s { color: var(--muted); font-size: 19px; margin-right: 4px; }
.issue__price b { color: var(--red); }
.issue__note { font-size: 15px; }
.issue__status { color: var(--red); font-weight: 800; }
.issue__status:empty { display: none; }
.foot--frost { background: var(--frost); }

body.gallery-open { overflow: hidden; overscroll-behavior: none; }
.gallery-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gallery-modal[hidden], .gallery-modal__meta[hidden], .gallery-modal__intro[hidden] { display: none; }
.gallery-modal__backdrop { position: absolute; inset: 0; background: rgba(30, 58, 47, 0.7); cursor: pointer; }
.gallery-modal__panel { position: relative; width: min(30rem, 94vw); max-height: 92vh; overflow: auto; padding: 16px 16px 20px; border-radius: 16px; background: var(--snow); }
.gallery-modal__title { font-size: 22px; text-align: center; margin-bottom: 8px; }
.gallery-modal__meta, .gallery-modal__intro { margin-bottom: 10px; font-size: 15px; text-align: center; color: var(--muted); }
.gallery-modal__viewport { display: flex; align-items: center; gap: 6px; }
.gallery-modal__strip { flex: 1; min-width: 0; overflow: hidden; }
.gallery-modal__track { display: flex; transition: transform 0.28s ease; }
.gallery-modal__slide { flex: 0 0 100%; min-width: 100%; }
.gallery-modal__img { display: block; width: 100%; height: auto; max-height: min(68vh, 36rem); object-fit: contain; margin: 0 auto; border-radius: 6px; }
.gallery-modal__nav { flex-shrink: 0; width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--spruce); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.gallery-modal__nav:disabled { opacity: 0.35; cursor: default; }
.gallery-modal__counter { margin-top: 10px; text-align: center; font-size: 15px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .gallery-modal__track { transition: none; } }

/* Books are landscape: wider covers and a wider page viewer. */
body[data-category="books"] .issue__cover { flex-basis: 340px; max-width: 420px; align-self: center; }
body[data-category="books"] .gallery-modal__panel { width: min(60rem, 96vw); }
@media (max-width: 600px) {
  body[data-category="books"] .gallery-modal__viewport { flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
  body[data-category="books"] .gallery-modal__strip { order: -1; flex-basis: 100%; }
}

/* Calendars have no page viewer, so their photos are shown larger. */
body[data-category="calendars"] .issue__cover { flex-basis: 300px; max-width: 360px; }

/* Text pages keep the footer at the bottom of the screen. */
body:has(> .doc) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:has(> .doc) > .top { width: 100%; }
body > .doc { flex: 1 0 auto; width: 100%; }
.doc .doc__action { margin-top: 28px; }

.form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; }
.form input, .form textarea { width: 100%; font: inherit; font-weight: 400; color: var(--ink); padding: 13px 16px; background: #fff; border: 2px solid var(--spruce); border-radius: 10px; }
.form textarea { resize: vertical; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form__check { min-height: 65px; }
.form .btn { align-self: flex-start; }
.doc .form__status { margin: 0; font-weight: 800; color: var(--spruce); }
.doc .form__status:empty { display: none; }
.doc .form__status.status--error { color: var(--red); }

/* Product pages: one item per page. */
.crumbs { padding-block: 4px 0; font-size: 15px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.product { display: flex; flex-wrap: wrap; gap: 48px; padding-block: 24px 64px; }
.product__media { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.product__cover { display: flex; justify-content: center; padding: 24px; background: var(--card); border-radius: 16px; }
.product__cover img { width: auto; max-height: 560px; height: auto; border-radius: 4px; }
.product__thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.product__thumbs button { display: block; padding: 8px; background: var(--card); border: 2px solid transparent; border-radius: 12px; cursor: zoom-in; }
.product__thumbs button:hover { border-color: var(--spruce); }
.product__thumbs img { display: block; width: 100%; height: 150px; object-fit: contain; }
.product__info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.product__info h2 { font: 800 20px/1.3 Nunito, sans-serif; color: var(--ink); margin-top: 12px; }
.product__info ul { margin: 0; padding-left: 22px; }
.product__info li + li { margin-top: 6px; }
.product__info .btn { min-width: 200px; }
.product__badge { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--spruce); color: #fff; font-size: 14px; font-weight: 800; }
.product__author { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-top: 12px; padding: 20px; background: var(--frost); border-radius: 16px; }
.product__author img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.product__author div { flex: 1 1 220px; }
.more { padding-block: 48px 72px; }
.more h2 { margin-bottom: 24px; }
.more .card { max-width: 280px; }
.issue__cover a { display: block; }
.issue h2 a { color: inherit; text-decoration: none; }
.issue h2 a:hover { text-decoration: underline; text-underline-offset: 6px; }
