/* Dust & Drafts v0.3: cover page */

.page-cover { overflow-x: hidden; }

.attract {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #000;
}
.attract canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  filter: brightness(0.6) saturate(0.95);
}
.attract::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 70% 60% at 50% 46%, rgba(11, 11, 24, 0.25), rgba(11, 11, 24, 0.92) 82%);
}

.cover {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(36px, env(safe-area-inset-top)) var(--gutter) max(24px, env(safe-area-inset-bottom));
  text-align: center;
}

.cover-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.16em;
  margin: 0 0 clamp(34px, 6vh, 56px);
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(38px, 9.5vw, 108px);
  line-height: 1;
  text-transform: uppercase;
}
.cl-dust { color: var(--yellow); text-shadow: 0.05em 0.05em 0 #c2410c, 0.1em 0.1em 0 #000; }
.cl-amp { color: #fff; font-size: 0.42em; text-shadow: 0.1em 0.1em 0 #000; }
.cl-drafts { color: var(--cyan); text-shadow: 0.05em 0.05em 0 #1d4ed8, 0.1em 0.1em 0 #000; }

.cover-form,
.cover-welcome { width: min(520px, 100%); }
.cover-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
.cover-row .input { flex: 1; min-width: 0; }
.cover-row .btn { flex: none; }

/* A light field, so it stands out against the dark race backdrop. */
.cover-form .input {
  color: var(--bg);
  caret-color: var(--bg);
  background: var(--ink);
  box-shadow: inset 0 0 0 2px #000, 4px 4px 0 #000;
}
.cover-form .input::placeholder { color: #5f5c85; opacity: 1; }
.cover-form .input:hover { background: #fff; box-shadow: inset 0 0 0 2px #000, 4px 4px 0 #000; }
.cover-form .input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 2px #000, 4px 4px 0 #000;
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.cover-form .input[aria-invalid="true"] { box-shadow: inset 0 0 0 3px #e11d48, 4px 4px 0 #000; }
.cover-form .form-error { min-height: 1.5em; margin: 10px 0 0; text-align: left; }

.cover-welcome-name {
  margin: 0 0 18px;
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow: 2px 2px 0 #000;
}
.cover-welcome-name strong { color: var(--yellow); }
.cover-row-welcome { justify-content: center; align-items: center; gap: 18px; }

.cover-fine {
  max-width: 720px;
  margin: clamp(22px, 5vh, 40px) 0 0;
  color: #b9b7d6;
  font-size: 12.5px;
  line-height: 1.6;
  text-shadow: 1px 1px 0 #000;
}
.cover-fine a { color: var(--ink); }
.cover-fine .dot { margin: 0 4px; color: var(--muted); }

@media (max-width: 520px) {
  .cover { justify-content: flex-start; padding-top: max(56px, env(safe-area-inset-top)); }
  .cover-form .cover-row { flex-direction: column; }
  .cover-form .cover-row .btn { width: 100%; }
}

@media (max-height: 640px) and (min-width: 521px) {
  .cover { justify-content: flex-start; }
  .cover-logo { font-size: clamp(30px, 7vh, 64px); margin-bottom: 26px; }
}
