/* Commission page refinements (EN and IT). Loaded before brand.css so the
   approved palette and type keep the last word. */

/* The search phrase stays inside the main heading, set as a small label above it. */
.cm-hero h1 .cm-h1-kicker, .wd-hero h1 .cm-h1-kicker {
  display: flex; align-items: center; gap: .875rem; margin-bottom: 1.125rem;
  color: var(--hui-stone, #67565E);
  font: 600 .75rem/1.6 var(--hui-font-body, "Jost", Arial, sans-serif);
  letter-spacing: .16em; text-transform: uppercase;
}
.cm-hero h1 .cm-h1-kicker::before, .wd-hero h1 .cm-h1-kicker::before { content: ""; width: 3rem; height: 1px; background: currentColor; flex-shrink: 0; }

/* Paintings on commission and pet pages carry no shadow (owner's request, 23 Nov 2026). */
.cm-hero .cm-hero-picture img { box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .commission-work-card { transition: transform .35s ease; }
  .commission-work-card:hover { transform: translateY(-6px); }
}

/* Four reassurances, directly under the opening. */
.cm-assure { margin-block: clamp(1.5rem, 4vw, 3rem); }
.cm-assure ul {
  list-style: none; margin: 0; padding: clamp(1.25rem, 3vw, 2.25rem) 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--hui-canvas, #EDE9E1);
}
.cm-assure li {
  display: flex; flex-direction: column; gap: .375rem;
  padding: .25rem clamp(1rem, 2vw, 1.75rem);
  border-left: 1px solid rgba(var(--hui-ink-rgb, 38, 23, 31), .16);
}
.cm-assure li:first-child { border-left: 0; }
.cm-assure strong {
  font: 400 1.3125rem/1.25 var(--hui-font-heading, "Playfair Display", Georgia, serif);
  color: var(--hui-ink, #26171F);
}
.cm-assure span { font-size: .875rem; line-height: 1.5; color: var(--hui-stone, #67565E); }
@media (max-width: 899px) {
  .cm-assure ul { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; }
  .cm-assure li:nth-child(odd) { border-left: 0; }
}
@media (max-width: 479px) {
  .cm-assure ul { grid-template-columns: 1fr; row-gap: 0; padding-block: .5rem; }
  .cm-assure li { border-left: 0; padding-block: .875rem; border-top: 1px solid rgba(var(--hui-ink-rgb, 38, 23, 31), .16); }
  .cm-assure li:first-child { border-top: 0; }
}

/* Phone only: the inquiry action stays within reach until the form or footer is on screen. */
.cm-sticky { display: none; }
@media (max-width: 699px) {
  .cm-sticky:not([hidden]) {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--hui-ivory, #FBF9F4);
    border-top: 1px solid rgba(var(--hui-ink-rgb, 38, 23, 31), .16);
    transition: transform .25s ease;
  }
  .cm-sticky.is-away { transform: translateY(110%); }
  .cm-sticky .cm-button { flex: 1; justify-content: center; }
  body.has-cm-sticky { padding-bottom: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .commission-work-card, .cm-sticky { transition: none; }
  .commission-work-card:hover { transform: none; }
}
@media print { .cm-sticky { display: none !important; } }

/* Memorial portraits. On phones one painting runs edge to edge with the words
   beneath it; on wide screens the painting and the words share a dark band.
   The painting itself stays still. */
.cm-memorial-band { margin-top: clamp(3rem, 7vw, 5.5rem); }
.cm-fullbleed { position: relative; margin: 0; background: #560A36; }
.cm-fullbleed img { display: block; width: 100%; height: 78vh; object-fit: cover; object-position: 42% 50%; }
.cm-fullbleed figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 1rem;
  padding: 3.5rem 1.5rem 1.25rem; color: #FBF9F4;
  font-size: .75rem; letter-spacing: .09em; text-transform: uppercase;
  background: linear-gradient(to top, rgba(38, 23, 31,.72), rgba(38, 23, 31,0));
}
.cm-memorial { max-width: 46rem; margin: 0 auto; padding: clamp(2.5rem, 8vw, 4rem) 1.5rem; text-align: center; }
.cm-memorial .cm-eyebrow { margin-bottom: 1rem; }
.cm-memorial h2 { margin: 0 0 1.25rem; }
.cm-memorial p:last-child { margin: 0 auto; max-width: 38rem; line-height: 1.75; color: var(--hui-stone, #67565E); }
@media (min-width: 900px) {
  .cm-memorial-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; background: #560A36; }
  .cm-fullbleed img { height: auto; max-height: 92vh; object-position: 50% 50%; }
  .cm-memorial { padding: 3rem clamp(2.5rem, 6vw, 6rem); text-align: left; }
  /* brand.css fixes heading colours in a layer with !important, so the light
     colour goes on a span inside the heading instead. */
  .cm-memorial-band .cm-memorial { --hui-brass-text: var(--hui-gold, #DCB870); --hui-emphasis: var(--hui-gold, #DCB870); --hui-link-color: initial; --hui-link-line: currentColor; }
  .cm-memorial-band .cm-memorial h2 > span { color: #FBF9F4; }
  .cm-memorial-band .cm-memorial .cm-eyebrow { color: #DCB870; }
  .cm-memorial-band .cm-memorial p:last-child { margin: 0; color: #DDD6C9; }
}

/* Scroll reveal: classes are added by scroll-reveal.js only. Paintings only
   fade (they never move); steps arrive from the left, reviews settle, and the
   form is the one block that rises. */
.will-reveal { opacity: 0; transition: opacity .9s ease var(--reveal-delay, 0ms), transform .9s cubic-bezier(.2,.75,.2,1) var(--reveal-delay, 0ms); }
.will-reveal--slow-fade { transition-duration: 1.6s; }
.will-reveal--from-left { transform: translateX(-22px); }
.will-reveal--settle { transform: scale(.975); transform-origin: 50% 60%; }
.will-reveal--rise { transform: translateY(26px); }
.will-reveal.is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .will-reveal { opacity: 1; transform: none; transition: none; } }
@media print { .will-reveal { opacity: 1 !important; transform: none !important; } }

/* Layers: a second, smaller painting overlaps the opening painting, and the
   gallery paintings lift slightly under the pointer. */
.commission-editorial .pet-hero-art { position: relative; overflow: visible; }
.pet-hero-art > picture { display: block; box-shadow: none; }
.pet-hero-layer {
  position: absolute; z-index: 2; left: -11%; bottom: 9%; width: 34%;
  border: 7px solid #FBF9F4; background: #FBF9F4;
  box-shadow: none;
}
.pet-hero-layer img { display: block; width: 100%; height: auto; }
@media (max-width: 899px) { .pet-hero-layer { left: auto; right: -10px; bottom: 44px; width: 30%; border-width: 5px; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .pet-works figure { transition: transform .45s ease; }
  .pet-works figure:hover { transform: translateY(-6px); }
}

/* Reassurance band on the pet pages: each promise is marked by a short brass
   rule. With scroll-reveal.js the rules draw in one after another and the
   words follow. */
.cm-assure--ruled li::before { content: ""; display: block; width: 1.75rem; height: 1px; margin-bottom: .5rem; background: var(--hui-brass, #7B5E3B); transform-origin: left center; }
/* Each promise slides in from the left as a whole, one after another; its
   rule then draws across. */
.will-reveal--draw { transform: translateX(-44px); transition: opacity .7s ease var(--reveal-delay, 0ms), transform .95s cubic-bezier(.16,.84,.3,1) var(--reveal-delay, 0ms); }
.will-reveal--draw::before { transform: scaleX(0); transition: transform .8s cubic-bezier(.65,0,.2,1) calc(var(--reveal-delay, 0ms) + 350ms); }
.will-reveal--draw.is-revealed::before { transform: none; }
@media (prefers-reduced-motion: reduce) { .will-reveal--draw::before { transform: none; transition: none; } }
@media print { .will-reveal--draw::before { transform: none !important; } }

/* Breathing room on the pet pages where a section starts right after a
   coloured band. */
.commission-editorial #pet-faq { padding-top: clamp(3.25rem, 7vw, 5.25rem); }
/* The paragraph now sits between the memorial band and the process band, so it has room on both sides. */
.commission-editorial #pet-photograph-start { padding-block: clamp(3.25rem, 7vw, 6rem); }

/* Rows slide in from inside the band, never from outside it. */
.cm-assure--ruled ul { overflow: hidden; }
