:root {
  --bg: #08080a;
  --page: #111114;
  --ink: #f4f1ea;
  --soft: #8d8a93;
  --faint: #4a4950;
  --line: rgba(244, 241, 234, 0.08);
  --tile: #222227;
  --tile-low: #18181c;
  --accent: #ff7a2f;
  --accent-hi: #ffb067;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(90% 70% at 50% 0%, #121216 0%, rgba(18, 18, 22, 0) 70%),
    var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }

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

/* the page: every measure is in em, and the em follows both the width and the height of the window */
.page {
  position: relative;
  font-size: clamp(8px, min(2.9vw, 3.3vh), 17px);
  width: min(32em, 100%);
  padding: 1.1em 1.4em 1.4em;
  border-radius: 1.5em;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #16161a 0%, var(--page) 46%, #0e0e11 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 1px 0 0 rgba(255, 255, 255, 0.09) inset,
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 18px 40px -16px rgba(0, 0, 0, 0.7),
    0 40px 90px -40px rgba(255, 122, 47, 0.18);
}
.page__glow {
  position: absolute;
  z-index: -1;
  inset: -30% -20% auto 30%;
  height: 80%;
  pointer-events: none;
  background: radial-gradient(50% 50% at 60% 40%, rgba(255, 122, 47, 0.16), rgba(255, 122, 47, 0) 70%);
}
.page__grain {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* the top bar of the event page */
.bar {
  display: flex;
  align-items: center;
  gap: 1em;
  padding-bottom: 1em;
  margin-bottom: 1.5em;
  border-bottom: 1px solid var(--line);
  font-size: 0.86em;
}
.bar__brand { display: flex; align-items: center; gap: 0.5em; font-weight: 650; font-stretch: 108%; letter-spacing: -0.005em; }
.bar__mark { width: 1.35em; height: 1.35em; fill: var(--accent); }
.bar__cut { fill: none; stroke: var(--page); stroke-width: 1.6; stroke-linecap: round; }
.bar__nav { display: flex; gap: 1.1em; margin-left: auto; color: var(--soft); font-weight: 500; }
.bar__nav .is-on { color: var(--ink); }
.bar__sign {
  padding: 0.42em 0.85em;
  border-radius: 99em;
  font-weight: 560;
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: box-shadow 0.25s;
}
@media (hover: hover) {
  .bar__nav a:hover { color: var(--ink); }
  .bar__sign:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.26) inset; }
}

.hero__when {
  display: flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.8em;
  color: var(--soft);
  font-weight: 500;
  white-space: nowrap;
}
.hero__when svg { width: 1.15em; height: 1.15em; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; }
.hero__sep { color: var(--faint); }
.hero__title {
  margin-top: 0.5em;
  font-size: 2.15em;
  line-height: 1.02;
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: -0.025em;
}
.hero__lead {
  margin: 1.1em 0 0.6em;
  font-size: 0.8em;
  font-weight: 560;
  color: var(--soft);
  letter-spacing: 0.02em;
}

/* the clock: four groups of split-flap tiles */
.clock {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.group { --w: 700; display: flex; flex-direction: column; align-items: flex-start; }
.group__tiles { display: flex; gap: 0.18em; }
.group__lab {
  margin-top: 0.55em;
  font-size: 0.68em;
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
}
.group[data-group="s"] .group__lab { color: var(--accent-hi); }
.colon {
  flex: none;
  width: 1px;
  height: 2.2em;
  margin-top: 0.6em;
  background: linear-gradient(180deg, rgba(244, 241, 234, 0), rgba(244, 241, 234, 0.22), rgba(244, 241, 234, 0));
}

.tile {
  position: relative;
  width: 2.45em;
  height: 3.5em;
  border-radius: 0.42em;
  perspective: 9em;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 1px 1px rgba(0, 0, 0, 0.5),
    0 6px 12px -4px rgba(0, 0, 0, 0.6);
}
.half, .leaf__face {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
  overflow: hidden;
}
.half--top, .leaf__front {
  top: 0;
  border-radius: 0.42em 0.42em 0 0;
  background: linear-gradient(180deg, #2a2a30 0%, var(--tile) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset;
}
.half--bot, .leaf__back {
  bottom: 0;
  border-radius: 0 0 0.42em 0.42em;
  background: linear-gradient(180deg, #1c1c21 0%, var(--tile-low) 100%);
}
.half b, .leaf__face b {
  position: absolute;
  left: 0;
  right: 0;
  height: 200%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.35em;
  font-weight: var(--w);
  font-stretch: 88%;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.half--top b, .leaf__front b { top: 0; }
.half--bot b, .leaf__back b { bottom: 0; }
.group[data-group="s"] .half b, .group[data-group="s"] .leaf__face b { color: #fff4ea; }
.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.1));
  opacity: 0;
}
.leaf {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 2;
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  visibility: hidden;
}
.leaf__face { height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.leaf__back { transform: rotateX(180deg); }
.leaf__lit {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
  opacity: 0;
}
/* the hinge: a dark seam with two little pins on the sides */
.tile::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: calc(50% - 0.5px);
  height: 1px;
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.tile::before {
  content: "";
  position: absolute;
  z-index: 4;
  left: -1px;
  right: -1px;
  top: calc(50% - 0.18em);
  height: 0.36em;
  border-left: 2px solid #0b0b0d;
  border-right: 2px solid #0b0b0d;
  pointer-events: none;
}

/* the tape of the seconds sliding under the clock */
.tape {
  position: relative;
  height: 2.2em;
  margin: 1.1em 0 1.3em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.tape__run { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }
.tape__t {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 0.45em;
  background: rgba(244, 241, 234, 0.2);
}
.tape__t.is-big { height: 0.9em; background: rgba(244, 241, 234, 0.45); }
.tape__n {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.66em;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  color: var(--soft);
}
.tape__mark {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1.5px;
  height: 1.35em;
  margin-left: -0.75px;
  border-radius: 1px;
  background: var(--accent);
  box-shadow: 0 0 0.6em rgba(255, 122, 47, 0.35);
}

/* the foot: Get tickets and the tickets left */
.foot { display: flex; align-items: center; gap: 1.1em; }
.buy {
  --mx: 30%;
  --my: 50%;
  flex: none;
  font: inherit;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 99em;
  -webkit-tap-highlight-color: transparent;
}
.buy__body {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55em;
  height: 3.1em;
  padding: 0 1.15em 0 1.35em;
  border-radius: 99em;
  overflow: hidden;
  color: #1c0d03;
  font-weight: 650;
  font-stretch: 104%;
  font-size: 0.95em;
  background: linear-gradient(180deg, var(--accent-hi) 0%, var(--accent) 55%, #f0641c 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 -1px 0 rgba(120, 40, 0, 0.35) inset,
    0 0 0 1px rgba(255, 140, 70, 0.6),
    0 6px 16px -6px rgba(255, 110, 30, 0.6),
    0 16px 32px -14px rgba(255, 110, 30, 0.45);
}
.buy__light {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(5em 4em at var(--mx) var(--my), rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: soft-light;
}
.buy__sweep {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 2.6em;
  transform: translateX(-4em) skewX(-18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
  opacity: 0.85;
}
.buy__label { position: relative; display: grid; white-space: nowrap; }
.buy__idle, .buy__done { grid-area: 1 / 1; }
.buy__done { opacity: 0; }
.buy__ico { position: relative; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.buy:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

.left { flex: 1; min-width: 0; }
.left__top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6em; font-size: 0.76em; white-space: nowrap; }
.left__tier { color: var(--soft); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.left__n { font-weight: 640; font-variant-numeric: tabular-nums; display: inline-flex; }
.left__roll { display: inline-block; }
.left__bar {
  position: relative;
  display: block;
  height: 0.28em;
  margin: 0.5em 0 0.45em;
  border-radius: 99em;
  background: rgba(244, 241, 234, 0.08);
  overflow: hidden;
}
.left__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, #c9541a, var(--accent) 70%, var(--accent-hi));
}
.left__price { font-size: 0.72em; color: var(--soft); font-weight: 500; }
.left__was { margin-left: 0.3em; color: var(--faint); text-decoration: line-through; }

.ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 -4px;
  fill: #ffffff;
  stroke: #111114;
  stroke-width: 1.3;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 420px) {
  .bar__far { display: none; }
}
