/* Guest portal. Matte navy, one key tag, one orange button. */

@font-face {
  font-family: 'Bricolage';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
}

:root {
  --navy: #16213A;
  --navy-deep: #111A2E;
  --haze: #EEF1F5;
  --mist: #AEB7C8;
  --slate: #5B6578;
  --line: #D5DAE3;
  --grommet: #C9D0DC;
  --signal: #F05A28;
  --signal-press: #D94B1C;
  --ok: #1F8A5B;
  --alert: #B3261E;
  --alert-bg: #FBE9E7;
  --font: 'Bricolage', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--navy);
  color: var(--haze);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

.guest-main {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.375rem max(2rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

@media (min-height: 760px) and (min-width: 600px) {
  .guest-main { justify-content: center; }
}

.guest-top {
  display: flex;
  align-items: center;
  gap: .625rem;
  color: var(--mist);
  margin-bottom: 2.75rem;
}
.guest-top .mark { width: 2rem; height: 2rem; color: var(--haze); flex: none; }
.guest-top .net { font-size: .9375rem; font-weight: 500; letter-spacing: .005em; }

.welcome {
  margin: 0;
  font-size: clamp(2.75rem, 12.5vw, 4rem);
  line-height: .98;
  font-weight: 760;
  letter-spacing: -.035em;
  font-variation-settings: 'opsz' 96;
  color: var(--haze);
}

.lede {
  margin: .875rem 0 2rem;
  max-width: 30ch;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--mist);
}

/* The key tag. Chamfered top corners, a grommet eyelet, a write-on line. */
.tag {
  position: relative;
  background: var(--haze);
  color: var(--navy);
  padding: 3.25rem 1.375rem 1.375rem;
  border-radius: 0 0 1.125rem 1.125rem;
  clip-path: polygon(1.75rem 0, calc(100% - 1.75rem) 0, 100% 1.75rem, 100% 100%, 0 100%, 0 1.75rem);
  transform-origin: 50% 1.4rem;
  animation: hang .9s cubic-bezier(.2, .9, .25, 1.15) both .12s;
}

@keyframes hang {
  from { transform: rotate(-5deg) translateY(-6px); opacity: 0; }
  60% { opacity: 1; }
  to { transform: rotate(0) translateY(0); opacity: 1; }
}

.eyelet {
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 1.375rem;
  height: 1.375rem;
  margin-left: -.6875rem;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 .3125rem var(--grommet), inset 0 1px 2px rgba(0, 0, 0, .35);
}

.tag-label {
  display: block;
  font-size: .9375rem;
  font-weight: 560;
  color: var(--slate);
  margin-bottom: .25rem;
}

.code {
  display: block;
  width: 100%;
  margin: 0;
  padding: .25rem 0 .5rem;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: clamp(1.75rem, 8.4vw, 2.125rem);
  font-weight: 680;
  letter-spacing: .045em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  caret-color: var(--signal);
  -webkit-appearance: none;
  appearance: none;
}
.code::placeholder { color: #BCC3CF; opacity: 1; }
.code:focus { outline: none; border-bottom-color: var(--navy); }
.code:focus-visible { outline: none; border-bottom-color: var(--navy); box-shadow: 0 2px 0 0 var(--navy); }

.err {
  margin: .875rem 0 0;
  padding: .625rem .75rem;
  border-radius: .5rem;
  background: var(--alert-bg);
  color: var(--alert);
  font-size: .9375rem;
  line-height: 1.4;
}

.go {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  min-height: 3.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: .75rem;
  background: var(--signal);
  color: #fff;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: .005em;
  cursor: pointer;
  transition: background-color .15s ease, transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.go:hover { background: var(--signal-press); }
.go:active { transform: scale(.985); }
.go:focus-visible { outline: 3px solid var(--haze); outline-offset: 3px; }
.go[disabled] { background: var(--slate); cursor: progress; }

.notes {
  margin-top: 2rem;
  color: var(--mist);
  font-size: .9375rem;
  line-height: 1.5;
  max-width: 34ch;
}
.notes p { margin: 0 0 .5rem; }

.noscript {
  margin: 0;
  padding: 1rem 1.375rem 2rem;
  color: var(--haze);
  text-align: center;
}

/* Welcome page */
.done .done-tag {
  position: relative;
  width: 5.5rem;
  height: 6.5rem;
  margin: 0 0 1.75rem;
  background: var(--haze);
  color: var(--ok);
  border-radius: 0 0 .875rem .875rem;
  clip-path: polygon(1.125rem 0, calc(100% - 1.125rem) 0, 100% 1.125rem, 100% 100%, 0 100%, 0 1.125rem);
  display: grid;
  place-items: end center;
  padding-bottom: .75rem;
  transform-origin: 50% 1.1rem;
  animation: hang .9s cubic-bezier(.2, .9, .25, 1.15) both .1s;
}
.done .done-tag .eyelet { top: .75rem; width: 1rem; height: 1rem; margin-left: -.5rem; box-shadow: 0 0 0 .25rem var(--grommet); }
.done .done-tag svg { width: 3rem; height: 3rem; }

@media (prefers-reduced-motion: reduce) {
  .tag, .done .done-tag { animation: none; }
  .go { transition: none; }
}
