/* The waiting screen every page ships with until the launch records exist in DNS.
   Scoped to .waiting so the live page's own stylesheet is untouched once it swaps in. */

@font-face {
  font-family: "Gloock";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/gloock-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Besley";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/besley-latin.woff2") format("woff2");
}

body:has(> .waiting) {
  margin: 0;
  background: #3f1420;
}

.waiting {
  --w-field: #3f1420;
  --w-ink: #f6efec;
  --w-soft: #e2c7cd;
  --w-perf: #b48892;
  --w-thread: #d08a5a;

  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 48px 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  background: var(--w-field) url("plate-wine.webp") center top / max(100%, 1100px) auto repeat-y;
  color: var(--w-ink);
  font-family: "Besley", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

.waiting ::selection {
  background: var(--w-thread);
  color: #2a0e07;
}

.waiting-mark {
  width: clamp(72px, 9vw, 108px);
  height: auto;
}

.waiting-name {
  margin: 28px 0 0;
  font-size: clamp(2.75rem, 7vw, 5rem);
  font-family: "Gloock", Georgia, serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* A torn edge of dashes that prints once, from the left. */
.waiting-rule {
  position: relative;
  width: 168px;
  height: 4px;
  margin: 30px 0 22px;
  border: 0;
  background: linear-gradient(90deg, var(--w-perf) 0 5px, transparent 5px) left center / 9px 1.5px repeat-x;
  overflow: visible;
}

.waiting-rule::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--w-thread) 0 5px, transparent 5px) left center / 9px 1.5px repeat-x;
  clip-path: inset(0 0 0 0);
  animation: waiting-print 1.6s cubic-bezier(0.16, 1, 0.3, 1) both 0.2s;
}

.waiting-line {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  line-height: 1.5;
  color: var(--w-soft);
}

@keyframes waiting-print {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .waiting-rule::before { animation: none; }
}
