/* The ticket to tear: a cream paper ticket on a white page, the band and the stamp in wine red. */
:root {
  --page: #ffffff;          /* the page */
  --paper: #f7efe1;         /* the ticket's paper */
  --ink: #2a1a1f;
  --muted: #8b7a6f;
  --wine: #7a1f3d;          /* the band, the stamp */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Azeret Mono Variable', ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.stage {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 28px 16px;
}

.entry {
  width: min(560px, 100%);
}

/* ---------------------------------------------------------------- the ticket */
.ticket {
  display: flex;
  user-select: none;
  -webkit-user-select: none;
}

/* each piece: its paper drawn in an SVG behind (the torn edge and the notches are in the drawing), its words above */
.ticket__body,
.ticket__stub {
  position: relative;
}

.ticket__body {
  z-index: 2;
  flex: 1 1 auto;
  min-width: 0;
}

.ticket__stub {
  z-index: 1;
  flex: 0 0 29%;
  touch-action: none;
  cursor: grab;
}

.ticket__stub.is-held {
  cursor: grabbing;
}

.stub__layer {
  position: absolute;
  inset: 0;
}

.paper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.ticket__main {
  position: relative;
  padding: 22px 18px 22px 34px;
}

.ticket__kind {
  margin: 0;
  color: var(--wine);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ticket__title {
  margin: 6px 0 14px;
  font-family: 'League Gothic Variable', 'Arial Narrow', sans-serif;
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.ticket__facts {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 6px 18px;
  margin: 0;
}

.ticket__facts dt {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ticket__facts dd {
  margin: 1px 0 0;
  font-family: 'League Gothic Variable', 'Arial Narrow', sans-serif;
  font-size: 21px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ticket__side {
  position: relative;
  display: grid;
  height: 100%;
  align-content: space-between;
  justify-items: center;
  padding: 20px 12px 18px 16px;
  text-align: center;
}

.ticket__admit {
  margin: 0;
  color: var(--wine);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ticket__seat {
  margin: 0;
  font-family: 'League Gothic Variable', 'Arial Narrow', sans-serif;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1;
}

.ticket__code {
  width: 100%;
  max-width: 96px;
  height: 30px;
}

/* the stamp, waiting off the ticket until the stub is torn */
.stamp {
  position: absolute;
  right: 8%;
  bottom: 18%;
  margin: 0;
  padding: 4px 12px 2px;
  border: 3px solid #b8323f;
  border-radius: 6px;
  color: #b8323f;
  font-family: 'League Gothic Variable', 'Arial Narrow', sans-serif;
  font-size: 34px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  mix-blend-mode: multiply;
  opacity: 0;
  pointer-events: none;
  transform: rotate(-12deg);
}

/* ---------------------------------------------------------------- under the ticket */
.entry__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 0 4px;
}

.entry__hint {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  text-wrap: balance;
}

.entry__act {
  flex: none;
  padding: 10px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 600 12.5px 'Azeret Mono Variable', ui-monospace, monospace;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s, color 0.25s;
}

@media (hover: hover) {
  .entry__act:hover {
    background: var(--ink);
    color: #ffffff;
  }
}

.entry__act:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

html[data-using='pointer'] .entry__act:focus-visible {
  outline: none;
}

@media (max-width: 520px) {
  .ticket__main {
    padding: 18px 12px 18px 26px;
  }

  .ticket__facts {
    grid-template-columns: repeat(2, auto);
  }

  .stamp {
    font-size: 26px;
    right: 4%;
    bottom: 14%;
  }

  .ticket__side {
    padding: 16px 8px 14px 12px;
  }
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
