/* Full-bleed exhibition poster. The plate selector is part of the poster itself. */
#home.exhibition-cover {
  --cover-paper: #f6f1df;
  --cover-muted: #d4dcbd;
  --cover-line: rgb(217 228 196 / .38);
  isolation: isolate;
  touch-action: pan-y pinch-zoom;
  color: var(--cover-paper);
  background: #122820;
  position: relative;
  height: clamp(630px, calc(100svh - 96px), 900px);
  min-height: 0;
  overflow: hidden;
}
#home.exhibition-cover::after {
  content: '';
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #122820 0%, #122820f0 17%, #1228209e 34%, #12282000 57%), linear-gradient(0deg, #10231f 0%, #11251da6 8%, transparent 29%);
}
.cover-visual {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 24%;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 43%, #40523a, #122820 65%);
}
.cover-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.065);
  transform-origin: 60% 48%;
  transition: opacity .78s ease-in-out, transform 1.65s cubic-bezier(.18,.66,.2,1);
}
.cover-frame.is-front { opacity: 1; transform: scale(1); }
.cover-frame.is-specimen {
  background: radial-gradient(ellipse at 57% 49%, #a7b29b 0%, #8e9a83 18%, #77917b 30%, #405c4b 48%, #172f25 73%);
}
.cover-frame canvas, .cover-frame .cover-photo {
  width: 100%; height: 100%; object-fit: cover; object-position: center 55%;
  position: absolute; inset: 0; display: block; max-width: none;
}
.cover-frame .cover-photo { object-position: 54% 50%; }
.cover-visual { mask-image: linear-gradient(90deg, transparent, #000 17%); }
.cover-caption { padding: 11px 15px; background: #0c211bdc; border-left: 2px solid #c2cfa8; }
.cover-caption .cover-caption-rule { display: none; }
.cover-frame .cover-specimen { object-fit: fill; }
.cover-body {
  position: absolute;
  top: 12%; left: 7.5%;
  max-width: 565px;
  z-index: 2;
}
.cover-label {
  display: flex; align-items: center; gap: 15px;
  font: 500 13px/1.8 var(--sans);
  letter-spacing: .19em; margin: 0 0 clamp(22px, 3.7vh, 47px);
  color: var(--cover-muted);
}
.cover-label i { display: block; width: 34px; height: 2px; background: #bc7955; }
.exhibition-cover .cover-body h1 {
  margin: 0 0 clamp(20px, 2.8vh, 34px);
  font: 400 clamp(78px, 7.7vw, 126px)/1.24 var(--serif);
  letter-spacing: .055em;
}
.exhibition-cover .cover-body h1 span { padding-left: .28em; }
.cover-desc { font-size: clamp(14px, 1.12vw, 18px); letter-spacing: .085em; line-height: 2.18; color: #f1f0dd; }
.cover-actions { display: flex; align-items: center; gap: 23px; margin-top: clamp(18px, 3.5vh, 43px); }
.cover-actions a { font-size: 14px; letter-spacing: .07em; }
.cover-actions a:first-child {
  background: var(--cover-paper); color: #20372b;
  min-height: 53px; padding: 12px 23px; min-width: 163px;
  display: inline-flex; justify-content: space-between; align-items: center; gap: 29px;
  transition: background .2s ease;
}
.cover-actions a:first-child span { font-size: 21px; line-height: 1; }
.cover-actions a:first-child:hover, .cover-actions a:first-child:focus-visible { background: #dce8af; }
.cover-actions a:last-child { padding: 10px 0 4px; color: #ecedd9; border-bottom: 1px solid var(--cover-line); }
.cover-caption {
  position: absolute; right: 6.8%; bottom: 21%; align-items: flex-end;
  display: flex; gap: 14px;
  text-shadow: 0 1px 11px #09160dda, 0 0 4px #102313;
}
.cover-caption-rule { width: 35px; height: 1px; margin-bottom: 10px; background: #dce5c3a6; }
.cover-caption small { display: block; font: 400 12px/1.65 var(--sans); letter-spacing: .13em; color: #e0e7cf; }
.cover-caption strong { display: block; font: 400 clamp(24px, 2.35vw, 36px)/1.55 var(--serif); letter-spacing: .13em; }
.cover-caption p { font: 400 13px/1.7 var(--sans); margin: 0; letter-spacing: .065em; }
.cover-selector {
  position: absolute; left: 7.5%; right: 6.8%; bottom: 0;
  display: grid; grid-template-columns: 1fr minmax(460px, 56%); gap: 25px;
  align-items: center; border-top: 1px solid var(--cover-line); padding: 0; min-height: 81px;
}
.cover-selector-label { color: #c9d3bd; font-size: 12px; letter-spacing: .15em; }
.cover-options { display: grid; grid-template-columns: repeat(4,1fr); height: 100%; }
.cover-options button {
  position: relative; display: flex; gap: 9px; align-items: center; justify-content: center;
  background: transparent; padding: 13px 3px; border: 0; color: #cbd3c4;
  font: 400 14px/1.5 var(--sans); letter-spacing: .035em; min-height: 44px;
}
.cover-options button::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: #e0e8bc; transform: scaleX(0); transition: transform .46s cubic-bezier(.23,.64,.21,1);
}
.cover-options button[aria-pressed=true] { color: #f8faeb; }
.cover-options button[aria-pressed=true]::before { transform: scaleX(1); }
.cover-options button i { display: inline-block; width: 7px; height: 7px; border: 1px solid #adbaab; border-radius: 50%; }
.cover-options button[aria-pressed=true] i { background: #dce7ae; border-color: #dce7ae; }
.cover-options button:hover { color: white; }
@keyframes cover-enter { from {opacity:0;transform:translateY(16px)} to {opacity:1;transform:translateY(0)} }
@keyframes cover-print { from {opacity:.28; transform:scale(1.045)} to {opacity:1;transform:scale(1)} }
@media(prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .exhibition-cover .cover-body > * { animation: cover-enter .85s both cubic-bezier(.21,.62,.24,1); }
  html:not([data-motion="off"]) .exhibition-cover .cover-body h1 { animation-delay: .09s; }
  html:not([data-motion="off"]) .exhibition-cover .cover-desc { animation-delay: .19s; }
  html:not([data-motion="off"]) .exhibition-cover .cover-actions { animation-delay: .26s; }
  html:not([data-motion="off"]) .exhibition-cover .cover-visual { animation: cover-print 1.8s both ease-out; }
}
html[data-motion="off"] .exhibition-cover *, html[data-motion="off"] .exhibition-cover *::before { animation: none !important; transition: none !important; }
@media(prefers-reduced-motion: reduce) {
  .exhibition-cover *, .exhibition-cover *::before { animation: none !important; transition: none !important; }
}
@media(max-width: 1000px) {
  .cover-body {left: 6%; top: 12%}
  .cover-selector {left: 6%; right: 6%; grid-template-columns: 1fr minmax(410px,65%)}
  .cover-caption {right: 6%}
}

/* On a phone the text, caption and palette occupy separate rows. The photograph
   stays full bleed while the poster grows to accommodate wrapped Japanese text. */
@media (max-width: 750px) {
  #home.exhibition-cover {
    --gutter: clamp(18px, 5.6vw, 34px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "title" "." "caption" "palette";
    grid-template-rows: auto minmax(52px, 1fr) auto auto;
    row-gap: 12px;
    height: auto;
    min-height: clamp(540px, calc(100svh - 98px), 890px);
    max-height: none;
    padding: clamp(22px, 4.6svh, 42px) var(--gutter) max(6px, env(safe-area-inset-bottom));
  }
  #home.exhibition-cover::after {
    background: linear-gradient(180deg, rgb(10 28 20 / .22), transparent 52%, #0c211bec 100%),
      linear-gradient(100deg, #10251de8 0%, #11271daf 29%, #12282042 64%, transparent 100%);
  }
  .cover-visual { inset: 0; mask-image: none; }
  .cover-frame .cover-photo { object-position: 55% 48%; }
  .cover-body, .cover-caption, .cover-selector { position: relative; inset: auto; min-width: 0; }
  .cover-body { grid-area: title; max-width: 100%; align-self: start; }
  .cover-label { font-size: 12px; margin: 0 0 14px; gap: 11px; }
  .cover-label i { width: 24px; }
  .exhibition-cover .cover-body h1 {
    font-size: clamp(56px, 15vw, 86px);
    line-height: 1.13;
    letter-spacing: .055em;
    margin: 0 0 16px;
  }
  .cover-desc { font-size: 14px; line-height: 1.85; letter-spacing: .035em; margin: 0; text-shadow: 0 1px 7px #071d12; }
  .cover-actions { margin-top: 16px; gap: 17px; display: flex; flex-wrap: wrap; }
  .cover-actions a { font-size: 14px; }
  .cover-actions a:first-child { min-width: 137px; min-height: 48px; padding: 10px 17px; gap: 16px; }
  .cover-actions a:last-child { display: inline-flex; align-items: center; min-height: 44px; padding: 0 3px; }
  .cover-caption {
    grid-area: caption;
    justify-self: end;
    max-width: min(100%, 260px);
    padding: 8px 12px;
    background: #10251ee8;
  }
  .cover-caption small { font-size: 12px; letter-spacing: .06em; }
  .cover-caption strong { font-size: 24px; line-height: 1.4; }
  .cover-caption p { font-size: 13px; letter-spacing: .025em; }
  .cover-selector { grid-area: palette; display: block; min-height: 0; }
  .cover-selector-label { display: none; }
  .cover-options { grid-template-columns: minmax(0, .86fr) minmax(0, .72fr) minmax(0, 1fr) minmax(0, 1.36fr); height: auto; }
  .cover-options button { min-height: 48px; font-size: 13px; padding: 10px 1px; gap: 5px; white-space: nowrap; letter-spacing: 0; }
  .cover-options button i { width: 5px; height: 5px; flex: 0 0 5px; }
}
@media (max-width: 365px) {
  .cover-options button { gap: 3px; }
  .cover-actions { gap: 11px; }
  .cover-desc { letter-spacing: 0; }
}

/* A short landscape screen becomes a two-column poster: the legend sits beside
   the title, with a full-width selector underneath both. */
@media (min-width: 500px) and (max-width: 960px) and (max-height: 550px) and (orientation: landscape) {
  #home.exhibition-cover {
    --gutter: max(4vw, env(safe-area-inset-left), env(safe-area-inset-right));
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-areas: "title caption" "palette palette";
    grid-template-rows: 1fr auto;
    gap: 12px 16px;
    min-height: calc(100svh - 58px);
    height: auto;
    max-height: none;
    padding: 16px var(--gutter) max(3px, env(safe-area-inset-bottom));
  }
  .cover-body, .cover-caption, .cover-selector { position: relative; inset: auto; min-width: 0; }
  .cover-body { grid-area: title; align-self: center; max-width: none; }
  .cover-visual { inset: 0 0 0 17%; mask-image: linear-gradient(90deg, transparent, #000 24%); }
  #home.exhibition-cover::after { background: linear-gradient(90deg, #132a22 0%, #132a22f2 16%, #132a2260 46%, transparent 76%), linear-gradient(0deg,#10231f 0%,transparent 30%); }
  .cover-label { margin: 0 0 6px; font-size: 12px; }
  .exhibition-cover .cover-body h1 { font-size: clamp(39px, 7.4vw, 61px); line-height: 1.1; margin: 0 0 7px; }
  .cover-desc { font-size: 13px; line-height: 1.6; margin: 0; letter-spacing: 0; }
  .cover-actions { margin-top: 9px; gap: 10px; flex-wrap: wrap; }
  .cover-actions a { font-size: 13px; }
  .cover-actions a:first-child { min-width: 115px; min-height: 44px; padding: 8px 13px; gap: 12px; }
  .cover-actions a:last-child { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 1px; }
  .cover-caption { grid-area: caption; justify-self: end; align-self: end; max-width: 100%; padding: 7px 11px; }
  .cover-caption strong { font-size: 22px; line-height: 1.4; }
  .cover-caption p, .cover-caption small { font-size: 12px; }
  .cover-selector { grid-area: palette; display: block; min-height: 0; }
  .cover-selector-label { display: none; }
  .cover-options { height: auto; }
  .cover-options button { min-height: 44px; padding: 6px 2px; }
}
