@font-face {
  font-family: "Work Sans";
  src: url("work-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night: #07062a;
  --night-2: #14104f;
  --ink: #f5f2ff;
  --muted: #b9b2de;
  --violet: #b79bff;
  --blue: #2f7bff;
  --amber: #ffcf8a;
  --danger: #ffb4a8;
  --line: rgb(183 155 255 / .34);
  --field: rgb(12 10 58 / .72);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --hero-h: 9.5rem; /* hero height on the pass screen */
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--night); }
html, body { overflow-x: clip; }
::selection { color: var(--night); background: var(--violet); }

body {
  margin: 0;
  min-height: 100svh;
  font: 400 1rem/1.5 "Work Sans", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 80% 0%, rgb(122 77 255 / .28), transparent 60%),
    linear-gradient(var(--night), var(--night-2) 140%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Hero: the event backdrop itself */
.hero { position: relative; overflow: hidden; }
.hero img {
  display: block;
  width: 100%;
  height: min(82vw, 46svh);
  object-fit: cover;
  object-position: 50% 42%;
  mask-image: linear-gradient(#000 62%, transparent);
  @media (prefers-reduced-motion: no-preference) {
    animation: settle 1.8s var(--ease) both;
  }
}
@keyframes settle { from { opacity: 0; scale: 1.08; } }

main { position: relative; margin-top: -1.5rem; padding: 0 1.25rem calc(2.5rem + env(safe-area-inset-bottom)); }

.panel { max-width: 30rem; margin-inline: auto; }
.panel[hidden] { display: none; }

.eyebrow {
  margin: 0 0 .375rem;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--amber);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8.5vw, 2.375rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
  outline: none;
}
h1 em {
  font-style: normal;
  font-weight: 600;
  color: var(--violet);
}

.lede { margin: .75rem 0 0; color: var(--muted); }

/* Form */
form { margin-top: 1.75rem; }

.field { margin-bottom: 1.125rem; }
.field label {
  display: block;
  margin-bottom: .375rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--muted);
}
.field input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: .75rem 1rem;
  font: inherit;
  font-size: max(1rem, 1em);
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: .875rem;
  caret-color: var(--violet);
  transition: border-color .2s, background-color .2s;
}
.field input:hover { border-color: rgb(183 155 255 / .6); }
.field input:focus-visible {
  outline: none;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgb(183 155 255 / .4);
}
.field input:user-invalid { border-color: var(--danger); background-color: rgb(70 14 40 / .6); }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 100px #120e52 inset;
  caret-color: var(--ink);
}

.error { display: none; margin: .375rem 0 0; font-size: .875rem; color: var(--danger); }
.error span {
  display: inline-grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  margin-right: .25rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--night);
  background: var(--danger);
  border-radius: 50%;
}
.field input:user-invalid ~ .error { display: block; }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1.5rem;
  padding: .75rem 1.5rem;
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--night);
  background: var(--violet);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgb(4 2 30 / .5), inset 0 1px 0 rgb(255 255 255 / .5);
  cursor: pointer;
  transition: scale .15s var(--ease), filter .2s;
}
.cta:hover { filter: brightness(1.08); }
.cta:active { scale: .98; }
.cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.cta[disabled] { cursor: progress; filter: saturate(.7); }
.cta svg {
  display: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cta[data-state="sending"] .spin { display: block; animation: spin .7s linear infinite; }
.cta[data-state="done"] .tick { display: block; }
@keyframes spin { to { rotate: 1turn; } }

.status { min-height: 1.5rem; margin: .875rem 0 0; font-size: .9375rem; color: var(--danger); text-align: center; }
.notice { margin: .5rem 0 0; font-size: .8125rem; color: var(--muted); text-align: center; }

.ghost {
  display: block;
  min-height: 3rem;
  margin: 1rem auto 0;
  padding: .5rem 1.25rem;
  font: inherit;
  font-size: .9375rem;
  white-space: nowrap;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.ghost:hover { color: var(--ink); border-color: var(--violet); }
.ghost:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
  #checkin > *, #checkin .field, #checkin .cta { animation: rise .7s var(--ease) both; }
  #checkin .field:nth-child(1) { animation-delay: .10s; }
  #checkin .field:nth-child(2) { animation-delay: .16s; }
  #checkin .field:nth-child(3) { animation-delay: .22s; }
  #checkin .field:nth-child(4) { animation-delay: .28s; }
  #checkin .field:nth-child(5) { animation-delay: .34s; }
  #checkin .cta { animation-delay: .42s; }
}
@keyframes rise { from { opacity: 0; translate: 0 14px; } }

/* Delegate pass */
#pass { text-align: center; }
#pass .lede { margin-top: 1rem; }
#pass h1 { position: relative; z-index: 1; } /* light arcs pass behind the title */

/* The pass and its desk instruction fit one screen: card height = viewport minus --chrome */
body[data-view="pass"] { --chrome: calc(var(--hero-h) + 11rem); }
body[data-view="pass"] .hero img { height: var(--hero-h); object-position: 50% 30%; }

.pass-stage {
  position: relative;
  margin: 1.25rem auto 0;
  width: min(21rem, 100%, max(15rem, (100svh - var(--chrome, 0px)) * 5 / 7));
  perspective: 900px;
}

.arcs {
  position: absolute;
  inset: -18% -22%;
  width: 144%;
  height: 136%;
  overflow: visible;
  filter: drop-shadow(0 0 6px rgb(183 155 255 / .55));
  pointer-events: none;
}
.arcs path {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  @media (prefers-reduced-motion: no-preference) {
    animation: draw 1.4s var(--ease) both;
  }
}
.arcs path + path { animation-delay: .25s; }
@keyframes draw { from { stroke-dashoffset: 1; } }

.pass {
  --mx: 50%;
  --my: 0%;
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 5 / 7;
  padding: 1.5rem;
  text-align: left;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.5rem;
  border: 1px solid rgb(205 184 255 / .55);
  background:
    radial-gradient(140% 90% at 100% 0%, rgb(122 77 255 / .55), transparent 55%),
    radial-gradient(120% 80% at 0% 100%, rgb(47 123 255 / .45), transparent 60%),
    linear-gradient(160deg, #1a1466, #0a0838 70%);
  box-shadow: 0 30px 80px rgb(4 2 30 / .8), 0 12px 40px rgb(122 77 255 / .2), inset 0 1px 0 rgb(255 255 255 / .25);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s var(--ease);
  touch-action: pan-y;
  @media (prefers-reduced-motion: no-preference) {
    animation: reveal 1.1s var(--ease) both;
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(48px) rotateX(38deg) scale(.92); } }

.pass header { display: flex; align-items: baseline; justify-content: space-between; }
.pass header strong { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.pass header span { font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); }

.pass-name {
  margin: 0;
  font-size: clamp(1.625rem, 8vw, 2.125rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.pass-org { margin: .5rem 0 0; color: #d7d0f5; overflow-wrap: anywhere; }

.pass dl { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem 1rem; margin: 0; padding-top: 1rem; border-top: 1px solid rgb(205 184 255 / .3); }
.pass dt { font-size: .75rem; font-weight: 500; color: var(--muted); }
.pass dd { margin: .125rem 0 0; font-size: .9375rem; font-weight: 500; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.foil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgb(255 255 255 / .38), transparent 42%),
    linear-gradient(115deg, transparent 25%, rgb(255 207 138 / .28) 42%, rgb(183 155 255 / .4) 50%, rgb(47 123 255 / .3) 58%, transparent 75%);
  background-size: 100% 100%, 250% 100%;
  background-position: 0 0, var(--mx) 0;
  mix-blend-mode: screen;
  pointer-events: none;
  @media (prefers-reduced-motion: no-preference) {
    animation: sheen 1.6s .5s var(--ease) both;
  }
}
@keyframes sheen { from { background-position: 0 0, 120% 0; } }

/* Tablet up: wider hero band */
@media (min-width: 48rem) {
  :root { --hero-h: 28svh; }
  .hero img { height: 44svh; object-position: 50% 38%; }
  main { margin-top: -4.5rem; }
}

/* Desktop: backdrop left, form right */
@media (min-width: 64rem) {
  body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(26rem, 1fr); }
  .hero { position: sticky; top: 0; height: 100svh; }
  .hero img,
  body[data-view="pass"] .hero img {
    height: 100%;
    object-position: 50% 50%;
    mask-image: linear-gradient(90deg, #000 70%, transparent);
  }
  body[data-view="pass"] { --chrome: 19rem; }
  main { margin: 0; padding: 2rem 2.5rem; display: grid; align-content: center; min-height: 100svh; }
  .panel { width: 100%; }
}
