@font-face { font-family: 'Departure Mono'; src: url(/fonts/DepartureMono-Regular.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url(/fonts/GeistMono-Regular.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --night: #0E1220;
  --blue: #7183D9;
  --carapace: #3B4BA8;
  --bone: #EFE6D4;
  --rust: #DE5A2B;
  --silt: #242A3D;
  --tide: #8B96B4;
  --s: 4px;
}
@media (min-width: 520px) { :root { --s: 5px; } }
@media (min-width: 900px) { :root { --s: 6px; } }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--night); color: var(--bone); }
body {
  font-family: 'Geist Mono', ui-monospace, Menlo, monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}
::selection { background: var(--carapace); color: var(--bone); }
svg { image-rendering: pixelated; }

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 24px;
}

.lockup {
  display: flex;
  align-items: flex-end;
  gap: calc(3 * var(--s));
  padding: calc(4 * var(--s));
}
#slot { position: relative; flex: none; width: calc(12 * var(--s)); height: calc(8 * var(--s)); }
#crab { display: block; width: calc(12 * var(--s)); height: calc(8 * var(--s)); overflow: visible; }
#crab.loose { position: absolute; left: 0; top: 0; will-change: transform; }
.wordmark { display: block; flex: none; width: calc(53 * var(--s)); height: calc(8 * var(--s)); }

#crab .feet, #crab .tips, #crab .parcel { display: none; }
#crab[data-legs="a"] .feet-a,
#crab[data-legs="b"] .feet-b,
#crab[data-legs="c"] .feet-c,
#crab[data-claw="open"] .tips-open,
#crab[data-claw="hold"] .tips-open,
#crab[data-claw="hold"] .parcel,
#crab[data-claw="shut"] .tips-shut { display: inline; }
#crab[data-eye-l="shut"] .eye-l,
#crab[data-eye-r="shut"] .eye-r { fill: var(--silt); }
#crab[data-eyes="shut"] .eyes { display: none; }
#crab[data-pose="squat"] .upper { transform: translateY(1px); }
#crab[data-pose="squat"] .knees { display: none; }

.tagline {
  font-family: 'Departure Mono', ui-monospace, monospace;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--blue);
  text-align: center;
  margin: 4px 0 40px;
}
@media (min-width: 520px) { .tagline { font-size: 28px; margin-bottom: 48px; } }

#join, #leave { width: min(440px, 100%); }
.field { display: flex; border: 1px solid var(--silt); background: var(--night); }
.field:focus-within { border-color: var(--blue); }
#email {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font: inherit;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
#email::placeholder { color: var(--tide); opacity: 1; }
#email.hush::placeholder { color: transparent; }
#join button, #leave button {
  flex: none;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: var(--blue);
  color: var(--night);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
@media (hover: hover) { #join button:hover, #leave button:hover { background: var(--carapace); color: var(--bone); } }
#join button:focus-visible, #leave button:focus-visible { outline: 1px solid var(--bone); outline-offset: -4px; }
#join button:disabled, #leave button:disabled { cursor: default; background: var(--blue); color: var(--night); }

.label { font-size: 12px; line-height: 1.5; color: var(--tide); text-align: center; }
.terms { max-width: 440px; margin: 14px 0 0; font-size: 12px; line-height: 1.6; color: var(--tide); text-align: center; }
.terms summary { list-style: none; cursor: pointer; display: inline; }
.terms summary::-webkit-details-marker { display: none; }
.terms summary span { text-decoration: underline; text-underline-offset: 3px; }
.terms summary:focus-visible { outline: 1px solid var(--blue); outline-offset: 2px; }
.terms[open] summary span { color: var(--bone); }
@media (hover: hover) { .terms summary:hover span { color: var(--bone); } }
.terms p { margin: 8px 0 0; text-wrap: balance; }
.terms a, .label a { color: var(--blue); text-decoration: none; }
@media (hover: hover) { .terms a:hover, .label a:hover { color: var(--bone); } }
#status { min-height: 36px; margin: 12px 0 0; max-width: 440px; color: var(--bone); }
#status[data-tone="alert"] { color: var(--rust); }
footer { padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); margin: 0; }

#stage { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: visible; pointer-events: none; z-index: 10; }
.ghost {
  position: absolute;
  white-space: nowrap;
  overflow: hidden;
  color: var(--bone);
  transform-origin: 0 50%;
  transform: translateY(-50%);
}
.grain { position: absolute; width: var(--s); height: var(--s); background: var(--tide); }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
