@font-face {
  font-family: 'Apercu';
  src: url("../assets/fonts/apercu.ttf") format('truetype');
  font-weight: 400 800;
}

/* Names referenced inside the Illustrator-exported badge SVGs — same
   variable font file, the browser picks the right instance per weight. */
@font-face { font-family: 'ApercuPro'; src: url("../assets/fonts/apercu.ttf") format('truetype'); font-weight: 400 800; }
@font-face { font-family: 'ApercuPro-Medium'; src: url("../assets/fonts/apercu.ttf") format('truetype'); font-weight: 400 800; }
@font-face { font-family: 'ApercuPro-Bold'; src: url("../assets/fonts/apercu.ttf") format('truetype'); font-weight: 400 800; }

:root {
  --ink: #0a0a0a;
  --muted: #666666;
  --faint: #999999;
  --border: #d8d8d6;
  --bg: #fafaf8;
  --blue: #4f7fff;
  --pink: #ff2e93;
  --blue-bg: #eef1ff;
  --pink-bg: #fdeaf2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Apercu', ui-sans-serif, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}

a { color: var(--blue); }
a:hover { color: var(--pink); }

/* Locks the kiosk to a fixed 1080x1920 portrait canvas, scaled to fit
   whatever screen it's shown on. A real kiosk display runs at exactly
   this resolution fullscreen; on anything else this letterboxes instead
   of reflowing, so the layout is never at the mercy of the window size. */
.kiosk-viewport {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #161616;
}

.kiosk {
  flex: none;
  width: 1080px;
  height: 1920px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  transform: scale(min(calc(100vw / 1080px), calc(100vh / 1920px)));
}

/* header */

.kiosk-header {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 64px;
}

.kiosk-logo { height: 38px; width: auto; display: block; }

.kiosk-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* screens */

.kiosk-main { flex: 1; position: relative; min-height: 0; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 46px;
  padding: 0 80px;
  text-align: center;
}

/* idle + scanning */

.scan-frame {
  position: relative;
  width: 520px;
  height: 520px;
  animation: slideUp .5s ease both;
}

.scan-frame--active { overflow: hidden; border-radius: 24px; }

.scan-corner {
  position: absolute;
  width: 64px;
  height: 64px;
  border: 7px solid var(--ink);
  animation: pulseRing 2.4s ease-in-out infinite;
}
.scan-corner--tl { top: 0; left: 0; border-right: none; border-bottom: none; border-radius: 22px 0 0 0; }
.scan-corner--tr { top: 0; right: 0; border-left: none; border-bottom: none; border-radius: 0 22px 0 0; }
.scan-corner--bl { bottom: 0; left: 0; border-right: none; border-top: none; border-radius: 0 0 0 22px; }
.scan-corner--br { bottom: 0; right: 0; border-left: none; border-top: none; border-radius: 0 0 22px 0; }
.scan-corner--blue { border-color: var(--blue); animation: none; }

.scan-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scanVideo {
  position: absolute;
  inset: 32px;
  width: calc(100% - 64px);
  height: calc(100% - 64px);
  border-radius: 16px;
  object-fit: cover;
  transform: scaleX(-1);
  background: #000;
}

.scan-line {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 6px;
  height: 4px;
  border-radius: 2px;
  background: var(--blue);
  box-shadow: 0 0 18px 4px rgba(79, 127, 255, .7);
  animation: scanLine 1.3s ease-in-out infinite;
}

.idle-copy { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: slideUp .55s ease .05s both; }
.idle-copy h1 { font-size: 52px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.idle-copy p { font-size: 22px; color: var(--muted); line-height: 1.5; max-width: 640px; }

.tap-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  animation: tapPulse 2.2s ease-in-out infinite, slideUp .55s ease .1s both;
}

.tap-cta-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.idle-help {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 70px;
  font-size: 16px;
  color: var(--faint);
}

.scanning-copy { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.scanning-copy h1 { font-size: 40px; font-weight: 800; letter-spacing: -.02em; }
.scanning-copy p { font-size: 20px; color: var(--muted); }

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), var(--pink), var(--blue));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  animation: spinRing 1s linear infinite;
}
.spinner--small { width: 30px; height: 30px; flex: none; }

/* confirm */

.confirm-heading { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 56px; animation: slideUp .4s ease both; }
.confirm-heading h1 { font-size: 48px; font-weight: 800; letter-spacing: -.02em; }
.confirm-heading p { font-size: 20px; color: var(--muted); }

.confirm-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 60px 56px;
  background: #fff;
  border-radius: 32px;
  border: 1.5px solid #e6e6e6;
  box-shadow: 0 34px 80px -30px rgba(10, 10, 10, .22);
  width: 100%;
  max-width: 760px;
  animation: popIn .35s cubic-bezier(.2, .8, .2, 1) .05s both;
}

.confirm-avatar {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: 800;
  color: #fff;
}

.confirm-card h2 { font-size: 56px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.confirm-role { font-size: 24px; color: var(--muted); }

.ticket-pill {
  display: inline-flex;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.confirm-actions { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 760px; margin-top: 44px; }

.btn { border: none; font-family: inherit; cursor: pointer; }
.btn--primary {
  height: 104px;
  border-radius: 52px;
  background: var(--ink);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 18px 36px -16px rgba(10, 10, 10, .45);
}
.btn--secondary {
  height: 88px;
  border-radius: 44px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
}
.btn--dark {
  height: 88px;
  padding: 0 52px;
  border-radius: 44px;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin-top: 12px;
}

/* badge / printing */

.badge-title { font-size: 44px; font-weight: 800; letter-spacing: -.02em; }

.badge-preview {
  width: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 34px 80px -30px rgba(10, 10, 10, .3);
  line-height: 0;
}
.badge-preview svg { display: block; width: 100%; height: auto; }

.print-status {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 88px;
  padding: 0 42px;
  border-radius: 44px;
  background: var(--ink);
  color: #fff;
  white-space: nowrap;
}
.print-status span:last-child { font-size: 24px; font-weight: 700; }

/* success / error */

.result-icon {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn .4s cubic-bezier(.2, .8, .2, 1) both;
}
.result-icon--blue { background: var(--blue); }

.result-copy { display: flex; flex-direction: column; gap: 16px; max-width: 700px; animation: slideUp .5s ease .05s both; }
.result-copy h1 { font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
#successTitle { font-size: 54px; }
#errorTitle { font-size: 44px; line-height: 1.2; }
.result-copy p { font-size: 24px; color: var(--muted); line-height: 1.5; }

.reset-note { font-size: 15px; color: var(--faint); }

/* staff-only affordance: quick way into the admin dashboard from the kiosk */

.admin-link {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e6e6e6;
  opacity: .22;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity .15s ease;
}
.admin-link:hover { opacity: 1; }

@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pulseRing { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes scanLine { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translateY(508px); opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes tapPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* print-only badge — everything else in the kiosk is suppressed at print
   time. Front and back print as two separate 75x100mm pages, matching the
   Illustrator artboards exactly (see assets/badge-templates). */

.print-badge { display: none; }

@media print {
  @page { size: 75mm 100mm; margin: 0; }

  body > *:not(#printBadge) { display: none !important; }

  .print-badge { display: block; }

  .print-badge-side { width: 75mm; height: 100mm; page-break-after: always; }
  .print-badge-side:last-child { page-break-after: auto; }
  .print-badge-side svg { display: block; width: 75mm; height: 100mm; }
}
