/* ==========================================================
   Order ticket rail
   ========================================================== */
main > .gallery,
main > .motion {
  display: none !important;
}

.rail {
  position: relative;
  background: #141716;
}

.rail-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 10%, #22282a 0%, #141716 60%);
}

.rail-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 15vh;
  height: 16px;
  background: linear-gradient(180deg,#d9dcdd 0%,#8b9194 35%,#4b5154 60%,#a9afb1 100%);
  box-shadow: 0 6px 14px rgba(0,0,0,.5);
  z-index: 2;
}

.rail-head {
  position: absolute;
  left: clamp(20px,5vw,80px);
  right: clamp(20px,5vw,80px);
  top: 6vh;
  display: flex;
  justify-content: space-between;
  color: #e9e6df;
  font: 700 11px/1 Arial,Helvetica,sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  z-index: 3;
}

.rail-track {
  position: absolute;
  top: calc(15vh + 4px);
  left: 0;
  display: flex;
  align-items: flex-start;
  gap: clamp(22px,2.6vw,46px);
  padding: 0 30vw 0 clamp(20px,6vw,100px);
  will-change: transform;
  z-index: 1;
}

.ticket {
  position: relative;
  flex: 0 0 auto;
  transform-origin: 50% 0;
  margin: 0;
  filter: drop-shadow(0 18px 22px rgba(0,0,0,.5));
}

.ticket-paper {
  position: relative;
  background: #f6f3ea;
  color: #1b1b1b;
  padding: 26px 14px 16px;
  font-family: "Courier New",ui-monospace,Menlo,monospace;
  /* torn bottom edge */
  -webkit-mask: linear-gradient(#000 0 0) top/100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/12px 8px repeat-x;
  mask: linear-gradient(#000 0 0) top/100% calc(100% - 8px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom/12px 8px repeat-x;
}

.ticket-clip {
  position: absolute;
  top: -10px;
  z-index: 2;
  left: 50%;
  translate: -50% 0;
  width: 46px;
  height: 22px;
  background: linear-gradient(180deg,#c9cdcf,#6d7376);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,.4);
}

.ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  border-bottom: 1px dashed rgba(0,0,0,.45);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

.ticket-media {
  display: block;
  height: 54vh;
  width: auto;
  max-width: 74vw;
  object-fit: cover;
  background: #222;
}

.ticket-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ticket--bill .ticket-paper {
  width: clamp(230px,20vw,320px);
  padding-bottom: 26px;
}

.ticket--bill address {
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0;
}

.ticket--bill a {
  font-size: 13px;
  font-weight: 700;
  color: #b0181f;
  text-decoration: underline;
}

.ticket--bill .total {
  border-top: 1px dashed rgba(0,0,0,.45);
  margin-top: 18px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 12px;
}

@media (max-width:760px) {
  .ticket-media { height: 52vh; max-width: 84vw; }
  .rail-head span:last-child { display: none; }
}

/* ==========================================================
   Match the rest of the site: cream paper, Arial, red square
   ========================================================== */
.rail-pin {
  background: #141716;
}

.rail-bar {
  height: 3px;
  background: #e9e6df;
  box-shadow: none;
}

.ticket {
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.45));
}

.ticket-paper {
  background: #f5f3ee;
  font-family: Arial,Helvetica,sans-serif;
  padding: 22px 14px 16px;
  -webkit-mask: none;
  mask: none;
}

.ticket-clip {
  top: -7px;
  width: 30px;
  height: 14px;
  background: #111;
  border-radius: 0;
  box-shadow: none;
}

.ticket-head {
  font: 800 10px/1 Arial,Helvetica,sans-serif;
  letter-spacing: .14em;
  border-bottom: 1px solid rgba(17,17,17,.18);
}

.ticket-head span:first-child::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  background: #D0212B;
}

.ticket-line {
  font: 800 10px/1.2 Arial,Helvetica,sans-serif;
  letter-spacing: .12em;
}

.ticket-line span:first-child {
  font: 900 15px/1.1 Arial,Helvetica,sans-serif;
  letter-spacing: -.03em;
  text-transform: none;
}

.ticket--bill .ticket-paper,
.ticket--bill address,
.ticket--bill a,
.ticket--bill .total {
  font-family: Arial,Helvetica,sans-serif;
}

.ticket--bill a {
  color: #D0212B;
}

.ticket--bill .total {
  border-top: 1px solid rgba(17,17,17,.18);
  letter-spacing: .12em;
  font-size: 10px;
}

.rail .ticket:not(.ticket--bill) { cursor: zoom-in; }
.rail .ticket:focus-visible { outline: 2px solid #D0212B; outline-offset: 6px; }
.ticket .ticket-media + .ticket-line span:last-child::before { content: none; }

.norma-viewer {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  background: rgba(12,14,13,.97);
  color: #f5f3ee;
}

.norma-viewer::backdrop { background: rgba(0,0,0,.6); }

.norma-viewer[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.norma-viewer-stage video,
.norma-viewer-stage img {
  display: block;
  max-width: 92vw;
  max-height: 84vh;
  background: #000;
}

.norma-viewer-caption {
  margin: 0;
  font: 800 11px/1 Arial,Helvetica,sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.norma-viewer-close {
  position: absolute;
  top: 16px;
  right: 22px;
  border: 0;
  background: none;
  color: #f5f3ee;
  font-size: 44px;
  cursor: pointer;
}

.norma-viewer-close:hover { color: #D0212B; }

.norma-viewer-stage video {
  height: 84vh;
  width: auto;
}
@media (max-aspect-ratio: 1/1) {
  .norma-viewer-stage video { height: auto; width: 92vw; }
}

/* ---- viewer fixes ---- */
/* never stretch: keep each photo and film at its own shape */
html body .norma-viewer-stage img,
html body .norma-viewer-stage video {
  width: auto !important;
  height: auto !important;
  max-width: 92vw !important;
  max-height: 84vh !important;
  object-fit: contain !important;
  aspect-ratio: auto !important;
  min-height: 0 !important;
}

/* a close button you can always see */
html body .norma-viewer-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f5f3ee;
  color: #111;
  font: 400 30px/46px Arial,Helvetica,sans-serif;
  text-align: center;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
  transition: background .2s ease, color .2s ease;
}
html body .norma-viewer-close:hover {
  background: #D0212B;
  color: #fff;
}
html body .norma-viewer-close:focus { outline: none; }
html body .norma-viewer-close:focus-visible { outline: 2px solid #D0212B; outline-offset: 3px; }

/* no boxes around the tickets after clicking */
html body .rail .ticket:focus,
html body .rail .ticket:focus-visible {
  outline: none !important;
}
