.fencepost-page { color: #f6e5ca; background: #211109; }
.fence-wall {
  padding: calc(var(--header-height) + 1rem) clamp(1rem, 3vw, 3rem) 4rem;
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background: #3b1d10;
}
.fence-wall::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("assets/fencepost-leather.jpg") center / 100% 100% no-repeat;
  pointer-events: none;
  font-family: Palatino, 'Palatino Linotype', Georgia, serif;
}
.fence-inner { max-width: 1450px; margin: auto; }
.fence-top, .fence-lower, .fence-detail { display: grid; align-items: start; gap: clamp(1rem, 3vw, 3rem); }
.fence-top { grid-template-columns: 1fr 1.05fr 1fr; align-items: center; }
.fence-lower { grid-template-columns: repeat(2, minmax(0,1fr)); margin-top: clamp(2rem, 5vw, 5rem); }
.fence-lower > :last-child { width: calc((100% - clamp(1rem, 3vw, 3rem)) / 2); grid-column: 1 / -1; justify-self: center; }
.fence-piece { margin: 0; text-align: center; }
.fence-wall .fence-piece figcaption { margin: 0 0 .7rem; font-size: clamp(.9rem, 1.55vw, 1.25rem); letter-spacing: .13em; text-transform: uppercase; }
.fence-piece a, .fence-full { display: block; }
.fence-piece img, .fence-full img { display: block; width: 100%; height: auto; }
.fence-intro { text-align: center; }
.fence-intro h1 { margin: 0 auto .6rem; }
.fence-intro h1 img { display: block; width: 100%; max-width: 27rem; height: auto; margin: auto; }
.fence-intro p { margin: 0; font-size: clamp(1rem, 1.35vw, 1.3rem); line-height: 1.5; }
.fence-detail { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; }
.fence-detail .fence-full { max-width: 900px; margin: auto; }
.fence-detail .fence-full img { max-height: 76vh; object-fit: contain; width: auto; max-width: 100%; }
.fence-copy h1 { font-size: clamp(1.7rem, 3.5vw, 3rem); margin: 0 0 1rem; }
.fence-copy p { max-width: 40ch; font-size: clamp(1.1rem, 1.5vw, 1.45rem); line-height: 1.65; }
.fence-buy { display: inline-block; padding: .7rem 1rem; border: 1px solid #d8b489; color: #fff0da; }
.fence-wall a:focus-visible { outline: 3px solid #fff0da; outline-offset: 5px; }
@media (max-width: 760px) {
  .fence-top, .fence-lower, .fence-detail { grid-template-columns: minmax(0,1fr); gap: 1.75rem; }
  .fence-intro { order: -1; max-width: 31rem; margin: auto; }
  .fence-intro h1 img { max-width: 18rem; }
  .fence-lower > :last-child { width: 100%; grid-column: auto; }
  .fence-wall .fence-piece, .fence-copy { width: min(100%, 34rem); margin: auto; }
}

.art-page .fence-five .fencepost-card figcaption {
  white-space: nowrap;
  font-size: clamp(.82rem, 1.42vw, 1.5rem);
  letter-spacing: .035em;
}
@media (min-width: 761px) {
  .art-page .fence-five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(.55rem, 1.75vw, 1.8rem);
    width: 100%;
    max-width: none;
  }
  .art-page .fence-five .frame { max-width: 100%; }
}
.fence-print { --header-height: 132px; }
.fence-print .site-header,
.fence-print .site-header.scrolled { height: var(--header-height); }
.fence-print .site-header .header-inner { grid-template-rows: 40px 1fr; }
.fence-print .site-header .brand {
  width: min(450px, 54vw);
  transform: none;
}
.fence-print .fence-wall {
  min-height: 100svh;
  padding-top: calc(var(--header-height) + 1rem);
  padding-bottom: 1rem;
}
.fence-print .fence-wall::before { transform: rotate(180deg); }
.fence-print .fence-detail { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(1rem, 2vw, 2rem); }
.fence-print .fence-print-art { margin: 0; min-width: 0; text-align: center; }
.fence-print .fence-full { display: block; width: fit-content; max-width: 100%; padding: 0; border: 0; background: transparent; margin: 0 auto; cursor: zoom-in; }
.fence-print .fence-full img { width: auto; max-width: 100%; max-height: calc(100svh - var(--header-height) - 4.25rem); margin: auto; }
.fence-print figcaption { margin-top: .8rem; font: 700 1rem/1.3 system-ui, sans-serif; }
.fence-print .fence-copy { width: 100%; text-align: center; }
.fence-print .fence-copy h1, .fence-print .fence-copy p { font-family: Papyrus, Palatino, Georgia, serif; }
.fence-print .fence-copy p { margin-inline: auto; }
.fence-print .fence-copy h1 { font-weight: 400; }
.fence-print .ordering-actions, .fence-print .piece-paging { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: .65rem 1rem; margin: 1.4rem 0 0; }
.fence-print .ordering-actions .text-action, .fence-print .piece-paging a { color: #fff0da; }
@media (max-width: 760px) {
  .fence-print { --header-height: 88px; }
  .fence-print .site-header .header-inner { grid-template-rows: 1fr; }
  .fence-print .site-header .brand { width: min(280px, 68vw); }
  .fence-print .site-header .primary-menu { top: var(--header-height); }
  .fence-print .fence-detail { grid-template-columns: minmax(0, 1fr); }
  .fence-print .fence-full img { max-height: none; }
}

/* Keep the shared gallery light and shadow on .collection and .frame. */
.fence-wall .fence-piece .frame,
.fence-print .fence-full { position: relative; }
.fence-wall .fence-piece .frame::after,
.fence-print .fence-full::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid;
  border-color: #fff1d458 #1b100c75 #110904b3 #fff1d42b;
  pointer-events: none;
}
.fence-print .fence-full { box-shadow: 3px 10px 16px #140a06a6, 5px 22px 28px #140a0670; }
.fence-print .fence-full img { transition: filter .35s ease; }
.fence-print .fence-full:is(:hover, :focus-visible) img { filter: brightness(1.09); }
.fence-print .text-action, .fence-print .piece-paging a {
  background: none; border: 0; padding: .35rem 0; font: 700 1rem/1.4 Palatino, Georgia, serif;
  letter-spacing: .07em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.fence-print .text-action:hover, .fence-print .piece-paging a:hover { text-decoration: underline; }
.fence-print .product-dialog {
  position: fixed; margin: auto; width: min(42rem, calc(100% - 2rem));
  max-height: 84svh; padding: 1.5rem; border: 1px solid #725947; color: #281c13; background: #f4ecdd;
}
.fence-print .product-dialog::backdrop { background: #0d0807b3; }
.fence-print .close-panel { float: right; cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .fence-print .fence-full img { transition: none; }
}

/* The Art Collections light uses the shared art.css timing and footprint.
   On warm leather, temper the same highlights to match its appearance. */
.fence-wall .collection::before {
  filter: opacity(.46);
}
.fence-wall .collection::after {
  filter: drop-shadow(0 3px 3px #fff8) drop-shadow(0 7px 7px #ffe8ba88) opacity(.58);
}

/* Equine product layout: artwork begins at 58px, then the title band at 132px. */
.fence-print .fence-wall { isolation: auto; overflow: visible; }
.fence-print .fence-wall::before { z-index: 0; }
.fence-print .fence-wall::after {
  content: "";
  position: absolute;
  top: var(--header-height);
  inset-inline: 0;
  height: 48px;
  background: linear-gradient(#0002, #0002), url("assets/equine-leather-band.svg") repeat-x left top / auto 48px;
  box-shadow: 0 3px 5px #1d0f0780, 0 8px 12px #35201070;
  pointer-events: none;
}
.fence-print .fence-detail { max-width: none; }
.fence-print .fence-copy { position: relative; z-index: 1; }
.fence-print .fence-copy h1 {
  margin: 0;
  color: #fff1d6;
  font: 400 calc(clamp(23px, 2vw, 30px) + 4pt)/1.1 Papyrus, Palatino, serif;
  text-shadow: 0 3px 2px #080200, 0 4px 3px #080200, 0 0 3px #100400;
}
.fence-print .fence-copy p { max-width: 58ch; }

@media (min-width: 761px) {
  .fence-print { --art-start: 58px; --layout-gap: clamp(18px, 2vw, 28px); --left-rail: clamp(1rem, 3vw, 3rem); }
  .fence-print .site-header { z-index: 24; }
  .fence-print .site-header .brand {
    position: absolute;
    top: 50%;
    right: var(--left-rail);
    width: min(400px, 32vw);
    transform: translateY(-50%);
  }
  .fence-print:has(.fence-full img[width="1468"]) .site-header .brand {
    left: 67%;
    right: auto;
    transform: translate(-50%, -50%);
  }
  .fence-print .fence-wall { padding-top: var(--art-start); }
  .fence-print .fence-detail { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--layout-gap); align-items: start; }
  .fence-print:has(.fence-full img[width="1468"]) .fence-detail {
    grid-template-columns: minmax(0, min(37vw, calc((100svh - 102px) * 1468 / 1900))) minmax(0, 1fr);
  }
  .fence-print .fence-print-art { position: relative; z-index: 25; }
  .fence-print .fence-full { margin-inline: 0 auto; max-width: 100%; }
  .fence-print .fence-full img { max-height: calc(100svh - 102px); }
  .fence-print .fence-copy { margin-top: calc(var(--header-height) - var(--art-start)); }
  .fence-print .fence-copy h1 { display: grid; place-items: center; min-height: 48px; font-size: clamp(19px, 2.1vw, 34px); }
  .fence-print .fence-copy p { margin-block: clamp(1rem, 4svh, 3rem) 0; }
  .fence-print .ordering-actions, .fence-print .piece-paging { justify-content: space-evenly; }
}

@media (max-width: 760px) {
  .fence-print .fence-wall { padding-top: calc(var(--header-height) + 64px); }
  .fence-print .fence-detail { position: relative; }
  .fence-print .fence-print-art { position: relative; z-index: 1; }
  .fence-print .fence-copy { position: static; }
  .fence-print .fence-copy h1 {
    position: absolute;
    z-index: 1;
    inset: -64px 0 auto;
    min-height: 48px;
    display: grid;
    place-items: center;
    font-size: clamp(19px, 5.5vw, 26px);
  }
}
