:root {
  --paper: #f3ecdd;
  --cream: #fbf6ec;
  --ink: #211c16;
  --muted: #746a59;
  --line: #d3c5a8;
  --stamp: #e0492c;
  --teal: #2f6f61;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgb(255 255 255 / 7%) 0 1px, transparent 2px),
    radial-gradient(circle at 74% 71%, rgb(255 255 255 / 5%) 0 1px, transparent 2px),
    var(--ink);
  background-size: 22px 22px, 29px 29px;
  font-family: "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
}

button,
a {
  font: inherit;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(18px, 5vw, 52px);
}

.ticket {
  position: relative;
  width: min(100%, 560px);
  min-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  padding: clamp(30px, 8vw, 66px);
  border: 1px solid rgb(255 255 255 / 18%);
  background:
    linear-gradient(105deg, transparent 0 48%, rgb(33 28 22 / 3%) 49% 50%, transparent 51%),
    var(--paper);
  box-shadow: 0 30px 80px rgb(0 0 0 / 42%);
  animation: arrive 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ticket::before,
.ticket::after {
  position: absolute;
  left: -12px;
  width: calc(100% + 24px);
  height: 24px;
  content: "";
  background: radial-gradient(circle at 12px 0, transparent 11px, var(--paper) 12px) 0 0 / 24px 24px repeat-x;
}

.ticket::before {
  top: -12px;
  transform: rotate(180deg);
}

.ticket::after {
  bottom: -12px;
}

.eyebrow {
  color: var(--stamp);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.wordmark {
  margin-top: 2px;
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-size: clamp(3.2rem, 13vw, 5.6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.wordmark::first-letter {
  text-decoration-color: var(--stamp);
}

.copy {
  margin-top: clamp(68px, 14vh, 126px);
}

h1 {
  max-width: 9ch;
  margin: 0;
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 11vw, 5.25rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

#status {
  max-width: 34ch;
  min-height: 3em;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.primary-action,
.store-action {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  color: var(--cream);
  background: var(--ink);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, background 160ms ease;
}

.store-action {
  border-color: var(--teal);
  background: var(--teal);
}

.primary-action:hover,
.store-action:hover {
  transform: translateY(-2px);
}

.primary-action:focus-visible,
.store-action:focus-visible,
.text-action:focus-visible {
  outline: 3px solid var(--stamp);
  outline-offset: 3px;
}

.text-action {
  justify-self: center;
  padding: 10px;
  border: 0;
  color: var(--teal);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}

.ticket-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.ticket-code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.16em;
}

.route {
  position: absolute;
  top: clamp(38px, 8vw, 72px);
  right: clamp(30px, 8vw, 66px);
  display: flex;
  width: clamp(80px, 22vw, 140px);
  align-items: center;
}

.pin {
  position: relative;
  display: block;
  width: 19px;
  height: 19px;
  flex: none;
  border-radius: 50% 50% 50% 3px;
  background: var(--stamp);
  transform: rotate(-45deg);
}

.pin i {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--paper);
}

.route-line {
  width: 100%;
  margin: 0 7px;
  border-top: 2px dashed var(--stamp);
}

.destination-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border: 2px solid var(--stamp);
  border-radius: 50%;
}

[hidden] {
  display: none !important;
}

noscript {
  position: fixed;
  inset: auto 16px 16px;
  color: var(--cream);
  text-align: center;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-0.5deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0);
  }
}

@media (max-height: 690px) {
  .ticket {
    min-height: auto;
  }

  .copy {
    margin-top: 44px;
  }

  .ticket-footer {
    margin-top: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
