/*
 * HIME theme: the paper on a notice unfolds.
 *
 * The bulletin-board notices (.hime-buy: "Hear one in person", "Book a drop-off appointment", the Guitar Center notice;
 * .hime-vintage-cta; .hime-note) carry a sheet of paper pinned to the board. When a notice scrolls into view its paper
 * arrives folded in half under the pin and opens along the crease: the lower half swings down from where it lay over
 * the upper half (its plain back first, then its face), and the shadow in the crease fades as the sheet flattens.
 * assets/site.js builds the sheet (a copy of the paper cut in two at the crease) and takes it away when it is open.
 *
 * Only transform and opacity move, on a sheet laid over the notice, so nothing round a notice shifts. It plays for
 * everyone, reduced motion included (Stephen, 2026-11-29: "Play on my PC too"): one short movement per notice.
 */

/* waiting below the window: the board, its frame and the pin are there; the paper and its words are not yet */
.hime-unfold::before { opacity: 0; }
.hime-unfold > :not(.hime-buy__zap):not(.hime-sheet) { opacity: 0; }

/* the sheet over the notice (as big as the notice's outside; the pin, drawn by the notice's ::after, stays on top) */
.hime-sheet {
  position: absolute; z-index: 1; pointer-events: none;
  perspective: 1200px; transform-style: preserve-3d;
}
.hime-sheet__half { position: absolute; left: 0; width: 100%; transform-style: preserve-3d; }
.hime-sheet__face { position: absolute; inset: 0; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
/* the copy of the paper and its words inside each half: the notice without its board, frame and pin */
body:not(#_) .hime-sheet .hime-sheet__copy {
  position: absolute !important; left: 0 !important; margin: 0 !important; max-width: none !important;
  background: none !important; border-color: transparent !important; box-shadow: none !important;
  transform: none !important; animation: none !important; opacity: 1 !important;
}
body:not(#_) .hime-sheet .hime-sheet__copy::after { display: none !important; }

/* the lower half: folded up over the upper half (a sheet never lies quite flat), then down along the crease */
.hime-sheet__half--lower {
  transform-origin: 50% 0;
  animation: hime-sheet-open .42s cubic-bezier(.3, .55, .25, 1) both;
}
/* its back: plain paper, a shade darker */
.hime-sheet__back {
  position: absolute; transform: rotateX(180deg);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: linear-gradient(180deg, rgba(120, 90, 40, .12), rgba(255, 255, 255, .18)), #e6dbc0;
  box-shadow: inset 0 0 0 1px rgba(120, 90, 40, .12);
}
/* its face is in shadow while it still leans, and comes into the light as it flattens */
.hime-sheet__shade {
  position: absolute;
  background: linear-gradient(180deg, rgba(60, 38, 10, .34), rgba(60, 38, 10, .1));
  animation: hime-sheet-light .42s ease-out both;
}
/* the shadow in the crease, on the upper half */
.hime-sheet__crease {
  position: absolute; height: 16px;
  background: linear-gradient(0deg, rgba(60, 38, 10, .26), rgba(60, 38, 10, 0));
  animation: hime-sheet-light .42s ease-out both;
}

@keyframes hime-sheet-open {
  from { transform: rotateX(176deg); }
  to   { transform: rotateX(0deg); }
}
@keyframes hime-sheet-light {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ---------- the Guitar Center notices: lightning through the frame ----------
   assets/arc.js draws it (a bolt from the pin down both sides, fast then stuttering, at irregular gaps, orange, cut to
   the frame's ring with its real rounded corners). Here only its place: a canvas as big as the notice's outside. The
   site's own wire, sparks and bolts (span.hime-buy__zap) are not shown. */
html body:not(#_) .hime-buy .hime-buy__zap { display: none !important; }
.hime-buy > .hime-arc { position: absolute; top: -7px; right: -7px; bottom: -7px; left: -7px; z-index: 1; pointer-events: none; }
.hime-arc > canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 768px) { .hime-buy > .hime-arc { top: -6px; right: -6px; bottom: -6px; left: -6px; } }
@media (forced-colors: active) { .hime-buy > .hime-arc { display: none; } }
