/* Entrances of the portrait commission and pet portrait pages.
   The same rules as the home page (one painting shown whole, a museum label, a headline, one
   sentence, one small line of standing, no button), but each page has its own arrangement:
   - portraits, "the spread": the painting on the left, the words on the right, like an art book;
     on a phone the headline comes first, then the painting.
   - pets, "the plate": the animal centred and first, the words under it.
   The paintings are unframed on the ivory page and are never cropped, covered or tinted. */
body.commission-editorial .ce { --ce-ink: #26171F; --ce-stone: #67565E; --ce-tyrian: #66023C; padding-block: clamp(28px, 4.5vh, 56px) clamp(52px, 8vh, 96px); }

/* Words */
body.commission-editorial .ce h1 { margin: 0; max-width: none; font: inherit; letter-spacing: 0; color: var(--ce-ink); animation-name: none; }
body.commission-editorial .ce .ce-kicker { display: block; margin: 0 0 clamp(16px, 1.8vw, 26px); font: 500 12px/1.7 var(--hui-font-body, Jost, Arial, sans-serif); letter-spacing: .16em; text-transform: uppercase; color: var(--ce-stone); }
body.commission-editorial .ce .ce-title { display: block; font: 400 clamp(44px, 4.7vw, 78px)/1.04 var(--hui-font-heading, "Playfair Display", Georgia, serif); letter-spacing: -.02em; color: var(--ce-ink); text-wrap: balance; }
body.commission-editorial .ce .ce-title em { display: inline; font-style: italic; font-weight: 400; color: var(--ce-tyrian); }
body.commission-editorial .ce .ce-lede { max-width: 33rem; margin: clamp(22px, 2.6vw, 36px) 0 0; font: 400 clamp(16px, 1.15vw, 18px)/1.75 var(--hui-font-body, Jost, Arial, sans-serif); letter-spacing: .005em; color: var(--ce-ink); }
body.commission-editorial .ce .ce-note { width: fit-content; min-width: min(17rem, 100%); margin: clamp(30px, 5.5vh, 60px) 0 0; padding-top: 18px; border-top: 1px solid rgba(102, 2, 60, .32); font: 400 14px/1.5 var(--hui-font-body, Jost, Arial, sans-serif); letter-spacing: .03em; text-align: left; color: var(--ce-stone); }

/* The painting and its label. --ph is the painting's height; its width follows from its own proportions. */
body.commission-editorial .ce .ce-art { display: flex; flex-direction: column; align-items: flex-start; width: auto; max-width: none; min-width: 0; margin: 0; }
body.commission-editorial .ce .ce-frame { display: block; box-shadow: none; }  /* no shadow under paintings on commission and pet pages */
body.commission-editorial .ce .ce-painting { display: block; height: var(--ph); width: auto; max-width: none; aspect-ratio: var(--pr); object-fit: cover; border-radius: 0; }
body.commission-editorial .ce .ce-label { display: flex; flex-direction: column; gap: 2px; margin: clamp(16px, 2.2vh, 24px) 0 0; padding: 0; font: 400 13px/1.55 var(--hui-font-body, Jost, Arial, sans-serif); letter-spacing: .02em; text-transform: none; color: var(--ce-stone); }
body.commission-editorial .ce .ce-label span { margin: 0; color: inherit; }
body.commission-editorial .ce .ce-label .ce-label-title { margin-bottom: 2px; font: 400 19px/1.3 var(--hui-font-heading, "Playfair Display", Georgia, serif); letter-spacing: -.005em; color: var(--ce-ink); }

/* Portraits: the spread */
body.commission-editorial .ce--spread { --pr: 1280 / 1918; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 6vw, 108px); }
body.commission-editorial .ce--spread .ce-art { justify-self: center; }
body.commission-editorial .ce--spread .ce-painting { --ph: max(340px, min(calc(100svh - var(--header-height) - 270px), 700px, calc((46vw - var(--gutter) - 24px) / .6674))); }
body.commission-editorial .ce--spread .ce-copy { min-width: 0; }

/* Pets: the plate */
body.commission-editorial .ce--plate { --pr: 1171 / 1303; display: flex; flex-direction: column; align-items: center; text-align: center; }
body.commission-editorial .ce--plate .ce-art { align-items: center; }
body.commission-editorial .ce--plate .ce-painting { --ph: max(300px, min(calc(100svh - var(--header-height) - 360px), 560px, calc((100vw - 2 * var(--gutter)) / .8987))); }
body.commission-editorial .ce--plate .ce-label { align-items: center; }
body.commission-editorial .ce--plate .ce-label .ce-label-title { font: 400 13px/1.55 var(--hui-font-body, Jost, Arial, sans-serif); letter-spacing: .02em; color: var(--ce-stone); }
body.commission-editorial .ce--plate .ce-copy { display: flex; flex-direction: column; align-items: center; margin-top: clamp(28px, 4.5vh, 52px); }
body.commission-editorial .ce--plate .ce-title { font-size: clamp(40px, 4.4vw, 72px); }
body.commission-editorial .ce--plate .ce-lede { max-width: 31rem; }
body.commission-editorial .ce--plate .ce-note { text-align: center; }

/* Phone and tablet */
@media (max-width: 899px) {
  body.commission-editorial .ce { padding-block: 22px 52px; }
  body.commission-editorial .ce .ce-kicker { margin-bottom: 12px; font-size: 11px; letter-spacing: .14em; }
  body.commission-editorial .ce .ce-title { font-size: clamp(36px, 10.2vw, 56px); line-height: 1.06; }
  body.commission-editorial .ce .ce-lede { margin-top: 26px; font-size: 16px; }
  body.commission-editorial .ce .ce-note { margin-top: 28px; }
  /* Portraits: the headline, then the whole painting, then the sentence. */
  body.commission-editorial .ce--spread { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  body.commission-editorial .ce--spread .ce-copy { display: contents; }
  body.commission-editorial .ce--spread h1 { order: 0; }
  body.commission-editorial .ce--spread .ce-art { order: 1; align-self: center; margin-top: 26px; }
  body.commission-editorial .ce--spread .ce-painting { --ph: max(300px, min(calc(100svh - var(--header-height) - 300px), 600px, calc((100vw - 2 * var(--gutter) - 44px) / .6674))); }
  body.commission-editorial .ce--spread .ce-lede { order: 2; }
  body.commission-editorial .ce--spread .ce-note { order: 3; }
  /* Pets: the animal first, as wide as the screen allows. */
  body.commission-editorial .ce--plate .ce-painting { --ph: max(260px, min(calc(100svh - var(--header-height) - 330px), 560px, calc((100vw - 2 * var(--gutter)) / .8987))); }
  body.commission-editorial .ce--plate .ce-copy { margin-top: 26px; }
}
