@font-face {
  font-family: Anybody;
  src: url('/fonts/anybody.woff2') format('woff2');
  font-stretch: 50% 150%;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url('/fonts/geist.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: 'Charles Wright';
  src: url('/fonts/charles-wright.woff2') format('woff2');
  font-weight: 700;
  font-display: block;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  min-height: 100%;
}
body {
  font-family: Geist, system-ui, sans-serif;
  background: #e9e6df;
  color: #141414;
  -webkit-font-smoothing: antialiased;
}

/* the gate page */
:root {
  --ink: #151515;
  --paper: #f1eadb;
  --blue: #1d3f94;
  --cap: #dccdac;
}
.app {
  position: relative;
  overflow: hidden;
  min-height: 100dvh;
  max-width: 420px;
  margin: 0 auto;
  background: var(--paper);
  color: var(--ink);
}

/* the scene: two brick piers and a sliding gate, a bold frame with ten bars a third its weight */
.pier {
  position: absolute;
  top: 96px;
  height: 204px;
  width: 48px;
  z-index: 4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24'%3E%3Crect width='48' height='24' fill='%23E7DABD'/%3E%3Cpath d='M0 .75H48M0 12.75H48M24 0V12M12 12V24M36 12V24' stroke='%23F1EADB' stroke-width='1.5'/%3E%3C/svg%3E");
}
.pier::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -4px;
  right: -4px;
  height: 10px;
  background: var(--cap);
  border-radius: 2px;
}
.pier.l {
  left: 0;
}
.pier.r {
  right: 0;
}
.opening {
  position: absolute;
  left: 48px;
  right: 48px;
  top: 122px;
  height: 178px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  transition: background-color 0.6s 0.45s;
}
.opening span {
  font-family: Anybody;
  font-size: 46px;
  line-height: 0.86;
  text-transform: uppercase;
  text-align: center;
  color: var(--paper);
  opacity: 0;
  font-variation-settings:
    'wdth' 50,
    'wght' 900;
  transition:
    font-variation-settings 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s,
    opacity 0.5s 0.3s;
}
.leaf {
  position: absolute;
  left: 48px;
  right: 48px;
  top: 122px;
  height: 178px;
  z-index: 3;
  border: 9px solid var(--ink);
  display: flex;
  justify-content: space-evenly;
  transition: transform 1.3s cubic-bezier(0.65, 0, 0.25, 1);
}
.leaf i {
  width: 3px;
  background: var(--ink);
}

/* waiting: a band of blue sweeps behind the bars, the way the gate slides */
.app.waiting .opening {
  background-image: linear-gradient(90deg, transparent 46%, var(--blue) 46% 54%, transparent 54%);
  background-size: 220% 100%;
  animation: sweep 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes sweep {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 100% 0;
  }
}

/* ack: the gate slides left behind the pier, the gap floods blue, and "Open sesame" widens */
.app.ack:not(.shut) .leaf {
  transform: translateX(calc(-100% - 6px));
}
.app.ack:not(.shut) .opening {
  background-color: var(--blue);
}
.app.ack:not(.shut) .opening span {
  opacity: 1;
  font-variation-settings:
    'wdth' 125,
    'wght' 900;
}

.body {
  position: absolute;
  left: 0;
  right: 0;
  top: 300px;
  bottom: 0;
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--ink);
  background: var(--paper);
  z-index: 5;
}
/* The form only carries Enter to the button; its children lay out in .body. */
.press {
  display: contents;
}
.lbl {
  font: 600 11px 'Geist Mono';
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b6458;
}
.plate {
  margin-top: 10px;
  position: relative;
  display: flex;
  height: 84px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
}
.plate .band {
  flex: 0 0 38px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 9px;
  font:
    700 18px 'Charles Wright',
    'Geist Mono',
    monospace;
  letter-spacing: 0.02em;
}
.plate input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  text-align: center;
  font:
    700 60px/1 'Charles Wright',
    'Geist Mono',
    monospace;
  text-transform: uppercase;
  color: var(--ink);
  padding: 6px 2px 0 0;
}
.plate input::placeholder {
  color: rgba(21, 21, 21, 0.15);
}
.go {
  margin-top: 16px;
  height: 64px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: Anybody;
  font-size: 21px;
  font-variation-settings:
    'wdth' 115,
    'wght' 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  transition: transform 0.12s;
}
.go:active {
  transform: scale(0.98);
}
.note {
  margin-top: 12px;
  font: 400 13.5px Geist;
  color: #6b6458;
  min-height: 20px;
}
.note a {
  color: var(--ink);
  font-weight: 600;
}
.fine {
  margin-top: auto;
  font: 400 12.5px/1.45 Geist;
  color: #8a8273;
}

/* the contact card rises as a sheet */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(105%);
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 28px 24px 30px;
  border-radius: 26px 26px 0 0;
}
.app.fail .sheet,
.app.help .sheet {
  transform: translateY(0);
}
.sheet .lead {
  font-family: Anybody;
  font-size: 30px;
  line-height: 0.95;
  text-transform: uppercase;
  font-variation-settings:
    'wdth' 70,
    'wght' 900;
}
.sheet .lead + p {
  margin-top: 8px;
  font: 400 14.5px Geist;
  color: #bdb4a3;
}
.sheet .who {
  margin: 18px 0;
  font: 400 15px Geist;
  display: flex;
  justify-content: space-between;
}
.sheet .who b {
  font-weight: 600;
}
.sheet .acts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.sheet .acts a {
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: Anybody;
  font-size: 15px;
  font-variation-settings:
    'wdth' 110,
    'wght' 700;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  border: 2px solid var(--paper);
}
.sheet .acts a:first-child {
  background: var(--paper);
  color: var(--ink);
}
.close {
  position: absolute;
  top: 18px;
  right: 20px;
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
}
.app:is(.later, .none, .locked, .wait, .limit, .retry) #note {
  color: var(--ink);
}
.app .notmoving {
  display: none;
}
.app:is(.ack, .wait.held) .notmoving {
  display: inline;
}
.app.wait.held .notmoving {
  margin-left: 0.35em;
}
.app.nudge .plate {
  animation: shake 0.4s;
}
@keyframes shake {
  20%,
  60% {
    transform: translateX(-7px);
  }
  40%,
  80% {
    transform: translateX(7px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app *,
  .app *::before {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
