/*
 * Information pages (app/product/templates/site/*.html), species and breed pages (editions), and the
 * "what would you like to make" and keepsake chooser pages. Loaded after site.css and pages.css.
 *
 * Layout language (the same as the product pages, with its own names): a hero that pairs the heading and one action
 * with a large image; then full-width bands separated by a hairline, each a split heading, text columns, a gallery
 * or a closing call to action. Art is 4:5, scenes 4:3, object-fit: cover with a 4px radius. Every information page
 * wraps its content in .info.
 */

.info {
  --info-gap: clamp(2.75rem, 6vw, 4.5rem);
  --info-col: clamp(1.75rem, 4.5vw, 4rem);
  padding-top: clamp(0.5rem, 2vw, 1.5rem);
}
.info h2 { color: var(--brand); margin: 0 0 0.9rem; }
.info h3 { margin: 0 0 0.4rem; }
.info p { margin: 0 0 1rem; }
.info p:last-child { margin-bottom: 0; }
.info-muted, .info-cols p, .info-split-body p, .info-head p { color: var(--ink-muted); }

/* ---------- Hero: heading, lead and one action beside a large image ---------- */
.info-hero { display: grid; gap: 2rem var(--info-col); align-items: center; }
.info-hero h1 { margin: 0 0 1rem; font-size: clamp(2.1rem, 1.5rem + 2.1vw, 3.1rem); line-height: 1.08; color: var(--brand); }
.info-hero .lead { margin: 0 0 1.75rem; max-width: 34rem; }
.info-hero-text > :last-child { margin-bottom: 0; }
.info-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 0 0 1rem; }
.info-note { margin: 1rem 0 0; max-width: 34rem; font-size: 1rem; color: var(--ink-muted); }
@media (min-width: 56rem) { .info-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Images */
.info-media { margin: 0; }
.info-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--paper-deep); }
.info-media--scene img { aspect-ratio: 5 / 4; }
.info-media figcaption, .info-pair figcaption, .info-gallery figcaption { margin-top: 0.65rem; font-size: 0.9rem; line-height: 1.4; color: var(--ink-muted); }
@media (min-width: 56rem) { .info-hero .info-media img { max-height: 36rem; } }
.info-pair { margin: 0; }
.info-pair > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.info-pair img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--paper-deep); }

/* ---------- Bands ---------- */
.info-band { margin-top: var(--info-gap); padding-top: var(--info-gap); border-top: 1px solid var(--border); }

/* Split heading: the heading on the left, its short paragraph on the right */
.info-head { display: grid; gap: 0.25rem var(--info-col); margin: 0 0 clamp(1.75rem, 4vw, 2.5rem); }
.info-head p { margin: 0; max-width: 40rem; font-size: 1.0625rem; }
@media (min-width: 52rem) {
  .info-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: baseline; }
  .info-head h2 { margin: 0; }
}
/* A page whose hero is words only: the heading on the left, the lead on the right */
.info-head--page { margin: 0; align-items: end; }
.info-head--page h1 { margin: 0 0 0.75rem; font-size: clamp(2.1rem, 1.5rem + 2.1vw, 3.1rem); line-height: 1.08; color: var(--brand); }
.info-head--page .lead { margin: 0; max-width: 34rem; font-size: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem); }

/* Split band: a heading in the left column, the content in the right (shipping, questions, memorial) */
.info-split { display: grid; gap: 0.5rem var(--info-col); }
.info-split > h2 { margin: 0 0 0.5rem; }
.info-split-body { min-width: 0; }
.info-split-body > :first-child { margin-top: 0; }
.info-split-body p, .info-split-body li { max-width: 40rem; }
.info-split-body ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--ink-muted); }
.info-split-body li + li { margin-top: 0.35rem; }
@media (min-width: 52rem) {
  .info-split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .info-split > h2 { position: sticky; top: 1.5rem; align-self: start; }
}

/* Text columns */
.info-cols { display: grid; gap: 2rem var(--info-col); }
@media (min-width: 48rem) { .info-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .info-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.info-cols h2, .info-cols h3 { font-size: clamp(1.3rem, 1.2rem + 0.4vw, 1.5rem); margin: 0 0 0.5rem; color: var(--ink); }
.info-cols > * { padding-top: 1.1rem; border-top: 1px solid var(--border); }

/* Facts: a short list of term and value (delivery times, what is included) */
.info-facts { display: grid; gap: 0; margin: 0 0 1.25rem; max-width: 40rem; }
.info-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.info-facts > div:first-child { border-top: 1px solid var(--border); }
.info-facts dt { color: var(--ink); }
.info-facts dd { margin: 0; color: var(--ink-muted); text-align: right; }

/* Steps: the shared .steps component, with four- and six-step grids that never leave one step alone in a row */
.info .steps { margin: 0; }
.info .info-steps-title { margin-bottom: clamp(1.75rem, 4vw, 2.5rem); }
.info .steps p { max-width: none; }
@media (min-width: 48rem) { .info .steps--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .info .steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* A row of art at 4:5 with short captions */
.info-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 0.75rem; margin: 0; padding: 0; list-style: none; }
.info-gallery figure { margin: 0; }
.info-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--paper-deep); }
.info-gallery--square img { aspect-ratio: 1; }
.info-gallery-name { display: block; margin-top: 0.6rem; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; color: var(--ink); }
@media (min-width: 48rem) { .info-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
@media (min-width: 64rem) { .info-gallery--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 47.99rem) { .info-gallery--3 > :first-child { grid-column: 1 / -1; } }

/* Closing call to action */
.info-close { display: grid; gap: 1.25rem var(--info-col); align-items: center; }
.info-close h2 { margin: 0 0 0.5rem; }
.info-close p { margin: 0; color: var(--ink-muted); }
@media (min-width: 52rem) { .info-close { grid-template-columns: minmax(0, 1fr) auto; } }

/* The one-line link row (.home-links in site.css) sits under a band's content */
.info .home-links { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.info .seo-keepsakes { margin: 0; }

/* ---------- Questions: one band per group, the group name on the left ---------- */
.info-faq .faq { max-width: none; }
.info-faq .faq details p { max-width: 44rem; }

/* ---------- Chooser (/create): three or four large cards that fill the row ---------- */
.make-cards { display: grid; gap: 1.25rem; margin: clamp(1.5rem, 4vw, 2.5rem) 0 0; padding: 0; list-style: none; }
.make-card { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; align-items: center; color: var(--ink); text-decoration: none; }
.make-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--paper-deep); }
.make-card h2 { margin: 0 0 0.3rem; font-size: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem); color: var(--ink); }
.make-card p { margin: 0; color: var(--ink-muted); font-size: 1rem; }
.make-card:hover { color: var(--ink); }
.make-card:hover h2 { color: var(--brand); text-decoration: underline; text-underline-offset: 0.2em; }
@media (min-width: 48rem) {
  .make-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.75rem; }
  .make-cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .make-card { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0; }
  .make-card img { margin-bottom: 1rem; }
}

/* ---------- Keepsake list (/shop): grouped rows, the group name on the left ---------- */
.shop-rows { list-style: none; margin: 0; padding: 0; }
.shop-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem 1.25rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.shop-rows > .shop-row:first-child { border-top: 1px solid var(--border); }
.shop-row h3 { margin: 0 0 0.15rem; font-size: 1.25rem; color: var(--ink); }
.shop-row p { margin: 0; font-size: 1rem; color: var(--ink-muted); }
.shop-row .price { color: var(--ink); }
.shop-row .button { min-width: 7.5rem; justify-content: center; }
.shop-gift-line { margin: var(--info-gap) 0 0; padding-top: 1.25rem; border-top: 1px solid var(--border); font-size: 1rem; color: var(--ink-muted); }
.shop-gift-cards { margin-top: 1.5rem; }

/* ---------- Editions: species and breed pages ---------- */
/* The hero grows with its words, so the promises and the caption never spill out of the panel. */
@media (min-width: 56rem) {
  .edition .home-hero { height: auto; min-height: min(40rem, calc(100vh - 6.5rem)); }
}
.edition-hero-portrait { object-fit: contain; background: var(--brand); }

/* Breed cards: three across on wide screens (two rows of three), two on phones */
.edition .edition-children { gap: 2rem 1rem; }
@media (min-width: 56rem) { .edition .edition-children { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 1.75rem; } }
.edition .edition-children .keepsake img { margin-bottom: 0.75rem; }

/* One photo, several portraits: on phones an odd count gives the first portrait the full row, so none is alone */
.edition .transform-from .transform-label { margin: 0; }
@media (max-width: 51.99rem) {
  .edition .transform-to > li:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
}

/* Several animals, one portrait each: photo and portrait side by side, the pairs across the row */
.edition-pairs { display: grid; gap: 2rem 1.75rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 52rem) { .edition-pairs { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); } }
.edition-pair { margin: 0; }
.edition-pair-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.25rem; }
.edition-pair-images img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }

/* Keepsakes: the heading and links on the left, two cards on the right; the animal's own catalogue photos are tall,
   so the cards are art-shaped (4:5) on wide screens and square on phones */
.edition-keep { display: grid; gap: 0 var(--home-gap); }
.edition-keep .home-links { margin-top: 1.25rem; }
.edition .edition-keepsakes { grid-template-columns: minmax(0, 1fr); gap: 2.25rem 1.75rem; }
@media (min-width: 40rem) { .edition .edition-keepsakes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 56rem) {
  .edition-keep { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
  .edition-keep .home-head { margin: 0; }
}
.edition .edition-keepsakes .keepsake img { aspect-ratio: 1; object-position: 50% 30%; margin-bottom: 1rem; }
@media (min-width: 40rem) { .edition .edition-keepsakes .keepsake img { aspect-ratio: 4 / 5; } }
.edition .edition-keepsakes .keepsake h3 { font-size: clamp(1.35rem, 1.22rem + 0.5vw, 1.6rem); margin-bottom: 0.3rem; }
.edition .edition-keepsakes .keepsake-meta { color: var(--ink-muted); }

/* Memorial: a quiet band of its own, heading left and words right */
.edition-memorial .info-split-body p { color: var(--ink-muted); }
.edition-memorial .occasion-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--dusk); font-weight: 600; text-underline-offset: 0.2em; }

/* Closing: a portrait beside the invitation (as on the home page), onward links under the button.
   site.css narrows .edition-final to one column with !important; these rules restore the home page's pairing. */
.edition .edition-final .container { grid-template-columns: minmax(0, 1fr) !important; gap: 2rem; }
@media (min-width: 52rem) {
  .edition .edition-final .container { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 4.5rem; align-items: center; }
}
.edition-final-figure { width: min(100%, 24rem); justify-self: center; }
.edition-final-figure img { aspect-ratio: 4 / 5; object-fit: cover; }
.edition .final-copy .edition-onward { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--border); gap: 0.25rem; }
.edition .final-copy .edition-onward p { margin: 0; }
.edition .final-copy .edition-onward .edition-onward-title { font-size: 1.15rem; }

/* ---------- Phones ---------- */
@media (max-width: 40rem) {
  .info { --info-gap: 2.5rem; }
  .info-hero .info-actions .button, .info-close .button { width: 100%; justify-content: center; }
  .shop-row .button { min-width: 6rem; padding-left: 1rem; padding-right: 1rem; }
}

/* ---------- Scenes: landscape pairs and galleries (houses are wider than they are tall) ---------- */
.info-pair--scene img { aspect-ratio: 3 / 2; }
.info-pair--scene > div { align-items: center; }
/* A framed print shown whole on the page ground, never cropped into its frame */
.info-pair .info-pair-print { object-fit: contain; background: none; border-radius: 0; }

/* ---------- Buyer pages (app/commissions): house portraits and closing gifts ----------
 * The information-page language with a price under the lead and the order form in a split band. */
.buy-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.75rem; margin: 0 0 1.25rem; font-size: 1.05rem; color: var(--ink-muted); }
.buy-price .price { font-family: var(--font-display); font-weight: 400; font-size: 2.1rem; line-height: 1.1; color: var(--ink); }
.info .buy-frames { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.buy-frames img { aspect-ratio: 5 / 4; object-fit: contain; background: none; border-radius: 0; }
.buy-form { max-width: 34rem; }
.buy-form .buy-formats { border: 0; padding: 0; margin: 0 0 1.5rem; }
.buy-form .buy-formats legend { padding: 0; margin-bottom: 0.25rem; }
/* Two classes deep, so the row wins over site.css's plain-form label grid (fieldset > label). */
.buy-form .buy-formats > .buy-format { display: flex; align-items: center; gap: 0.75rem; min-height: 3.25rem; margin: 0; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-weight: 400; cursor: pointer; }
.buy-format .price { margin-left: auto; }
.buy-format input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--brand); flex: none; }
.buy-form .buy-formats > .buy-format:has(:checked) { color: var(--brand); font-weight: 600; }
.buy-form .hint { font-weight: 400; color: var(--ink-muted); font-size: 0.9rem; }
.buy-form p.hint { margin: 0.35rem 0 0; }
.buy-form .buy-terms { font-size: 0.95rem; color: var(--ink-muted); margin: 0 0 1rem; }
.buy-order [hidden] { display: none; }
.buy-also { margin: var(--info-gap) 0 0; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--ink-muted); }
.buy-return { padding: clamp(1rem, 4vw, 3rem) 0; min-height: 45vh; }
.buy-return h1 { font-size: clamp(2.1rem, 1.5rem + 2.1vw, 3.1rem); line-height: 1.08; color: var(--brand); margin: 0 0 1.25rem; }
@media (max-width: 40rem) { .buy-form .button { width: 100%; justify-content: center; } }
