/* SITE-07: the catalogue itself is beneath this progressively enhanced opening. */
body[data-rreako-geo="catalogue"] { --opening-peek: clamp(12px, 4.4svh, 47px); }
.catalog-opening {
  --catalog-opening-ready: 1;
  --opening-paper: #f1efe7;
  --opening-ink: #141d31;
  --opening-blue: #243fba;
  --opening-light: #faf8f1;
  --opening-edge: clamp(19px, 5vw, 96px);
  --opening-angle: 17deg;
  position: fixed;
  z-index: 20;
  inset: var(--bar-height,64px) 0 var(--opening-peek);
  isolation: isolate;
  overflow: clip;
  display: grid;
  grid-template: minmax(0, 1fr) auto minmax(0, .7fr) / minmax(280px, .82fr) minmax(0, 1.18fr);
  grid-template-areas: 'copy art' 'action art' '. art';
  align-items: end;
  column-gap: clamp(20px,3.1vw,58px);
  row-gap: clamp(13px,2.6svh,30px);
  padding: clamp(23px,4.8svh,62px) var(--opening-edge);
  color: var(--opening-ink);
  background: var(--opening-paper);
  border-block-end: 1px solid #a9a69f;
  clip-path: polygon(0 0,100% 0,100% 100%,0 100%);
  touch-action: pan-x pinch-zoom;
  user-select: none;
  cursor: pointer;
}
/* The peek is deliberately visible but it must not be the inert catalogue's hit target. */
#catalog-opening-hit { display: none; }
body[data-catalog-opening="open"] #catalog-opening-hit:not([hidden]) {
  position: fixed;
  z-index: 20;
  inset: auto 0 0;
  display: block;
  block-size: var(--opening-peek);
  background: transparent;
  touch-action: pan-x pinch-zoom;
  cursor: pointer;
}
.catalog-opening[hidden] { display: none; }
.catalog-opening::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--opening-blue);
  clip-path: polygon(66% 0,100% 0,100% 100%,44% 100%);
}
.catalog-opening-copy { grid-area: copy; align-self: end; align-content: end; z-index: 1; }
.catalog-opening-copy :is(h1,h2) {
  margin: 0 0 clamp(10px,2.4svh,25px);
  max-width: 32ch;
  font-size: clamp(.87rem,1.48vw,1.38rem);
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -.016em;
}
.catalog-opening-copy > p {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(41px,5.5vw,98px);
  font-weight: 810;
  line-height: .93;
  letter-spacing: -.067em;
  text-wrap: balance;
}
.catalog-opening-art {
  position: relative;
  grid-area: art;
  align-self: stretch;
  isolation: isolate;
  pointer-events: none;
  min-width: 0;
  min-height: 0;
}
.catalog-opening-art .catalog-opening-product {
  display: block;
  position: absolute;
  width: 42%;
  height: 74%;
  bottom: 5%;
  object-fit: contain;
  transform: rotate(var(--opening-angle));
  object-position: center;
  max-width: none;
  pointer-events: none;
}
.catalog-opening-art .catalog-opening-product--handheld { left: 4%; z-index: 1; }
.catalog-opening-art .catalog-opening-product--extended { left: 50%; bottom: 3%; height: 92%; }
.catalog-opening-action {
  grid-area: action;
  justify-self: start;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  max-width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--opening-blue);
  background: var(--opening-blue);
  color: var(--opening-light);
  font: 720 clamp(.88rem, 1.1vw, 1.04rem)/1.24 Inter,Arial,sans-serif;
  text-decoration: none;
  text-align: start;
}
.catalog-opening-action:hover { background: #1a2e92; }
.catalog-opening-action:focus-visible { outline: 3px solid #ba3514; outline-offset: 5px; }
body[data-catalog-opening="revealed"] .catalog-opening {
  pointer-events: none;
  animation: catalogue-slice 310ms cubic-bezier(.21,.78,.2,1) both;
  transition: display 310ms allow-discrete;
}
@keyframes catalogue-slice {
  from { clip-path: polygon(0 0,100% 0,100% 100%,0 100%); }
  46% { clip-path: polygon(0 0,100% 0,100% 61%,0 25%); }
  to { clip-path: polygon(0 0,100% 0,100% 0,0 0); }
}
@media (max-width: 760px) {
  body[data-rreako-geo="catalogue"] { --opening-peek: clamp(16px,4.4svh,42px); }
  .catalog-opening {
    --opening-edge: clamp(17px,5vw,32px);
    --opening-angle: 10deg;
    grid-template: auto minmax(0,1fr) auto / minmax(0,1fr);
    grid-template-areas: 'copy' 'art' 'action';
    align-items: start;
    gap: 8px;
    padding: clamp(16px,3.3svh,32px) var(--opening-edge) clamp(12px,3svh,24px);
  }
  .catalog-opening-copy { align-self: start; }
  .catalog-opening-copy :is(h1,h2) { margin-block-end: 10px; font-size: .88rem; max-width: 100%; }
  .catalog-opening-copy > p { font-size: clamp(34px,10.6vw,66px); max-width: 13ch; }
  .catalog-opening::before { clip-path: polygon(100% 19%,100% 100%,62% 100%); }
  .catalog-opening-art .catalog-opening-product { height: 76%; width: 47%; bottom: 5%; }
  .catalog-opening-art .catalog-opening-product--handheld { left: 2%; }
  .catalog-opening-art .catalog-opening-product--extended { left: 44%; width: 46%; height: 83%; bottom: 6%; }
}
@media (max-height: 510px) {
  body[data-rreako-geo="catalogue"] { --opening-peek: 11px; }
  .catalog-opening { padding-block: 10px; row-gap: 7px; }
  .catalog-opening-copy > p { font-size: clamp(25px,5.5svh,45px); line-height: .98; }
  .catalog-opening-copy :is(h1,h2) { margin-block-end: 6px; }
  .catalog-opening-action { min-height: 44px; padding-block: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-catalog-opening="revealed"] .catalog-opening { animation: none; transition: none; }
}
