/* ============================================================
   yourcustomprofile.app — the empty stage
   The screen for an address with nobody on it: a profile link that is
   unclaimed, not live yet, private or failed to load (profile.html's quiet
   zone), and a page that does not exist (404.html).

   One idea: a single spotlight falls on the ghost of a profile card. The
   card has a real card's proportions but nothing in it — a dashed ring where
   the portrait goes, the address written where the name goes, empty pills
   where the links go — so a visitor reads "this is a page, and nobody is
   here" before reading a word. For an unclaimed name it is also the page they
   would get.
   ============================================================ */
.quiet-stage-page,
body.is-quiet {
  --qs-night: #07070a;
  --qs-light: #f3ede2;
  --qs-ink: #ece8f1;
  --qs-muted: #9b96a6;
  --qs-rule: rgb(243 237 226 / 0.22);
  --qs-serif: "Instrument Serif", "Playfair Display", Georgia, serif;
  --qs-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  background: var(--qs-night);
}

/* on a profile address the page's own scenery steps aside: there is no page */
body.is-quiet :is(.pg-bg, .pg-art, .pg-orbs, .noise-overlay, .fx-canvas, .cursor-glow, .pg-actions, .pg-credit) { display: none !important; }
/* and so does the room the stage keeps for the action bar and the credit,
   which on a small phone pushed the stage up and made it scroll */
body.is-quiet .pg-stage {
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)) !important;
  align-content: center;
}

/* ------------------------------------------------------------- the stage */
.quiet-zone {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 0 4px;
  color: var(--qs-ink);
  font-family: var(--qs-sans);
  text-align: center;
  /* the old glass panel and its entrance are gone: the stage is the frame */
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: none;
  filter: none !important;
}
.quiet-zone[hidden] { display: none; }

/* the cone: one light from above the viewport, narrowing onto the card */
.quiet-stage__light {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 30% at 50% 47%, rgb(243 237 226 / 0.11), transparent 70%),
    conic-gradient(from 180deg at 50% -18%, transparent 0 166deg, rgb(243 237 226 / 0.085) 172deg 188deg, transparent 194deg 360deg);
  -webkit-mask-image: linear-gradient(180deg, #000 0 62%, transparent 92%);
  mask-image: linear-gradient(180deg, #000 0 62%, transparent 92%);
  animation: qs-light-on 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* the light catches once, dips, then holds. Like the profile card's entrances,
   every frame keeps a visible floor, so a phone that stalls on the first frame
   still shows a lit stage, not a blank one. */
@keyframes qs-light-on {
  0% { opacity: 0.3; }
  30% { opacity: 0.8; }
  42% { opacity: 0.45; }
  100% { opacity: 1; }
}

/* ------------------------------------------------------------- the ghost card */
.ghost-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(300px, 82vw);
  margin-bottom: 34px;
  padding: 30px 26px 26px;
  border: 1.5px dashed var(--qs-rule);
  border-radius: 26px;
  background: linear-gradient(180deg, rgb(243 237 226 / 0.045), rgb(243 237 226 / 0.01));
  animation: qs-card-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* the floor under it, where the light lands */
.ghost-card::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -26px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(243 237 226 / 0.16), transparent);
}
@keyframes qs-card-in {
  from { opacity: 0.5; transform: translateY(10px); }
}
.ghost-card__portrait {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 1.5px dashed var(--qs-rule);
  border-radius: 50%;
  color: var(--qs-muted);
}
.ghost-card__portrait svg { width: 26px; height: 26px; }
.ghost-card__name {
  max-width: 100%;
  overflow: hidden;
  color: var(--qs-light);
  font-family: var(--qs-serif);
  font-size: 1.55rem;
  font-style: italic;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ghost-card__line { width: 62%; height: 1px; background: var(--qs-rule); }
.ghost-card__line--short { width: 38%; margin-top: -4px; }
.ghost-card__pill {
  width: 100%;
  height: 34px;
  border: 1.5px dashed rgb(243 237 226 / 0.14);
  border-radius: 999px;
}
.ghost-card__pill:first-of-type { margin-top: 6px; }

/* ------------------------------------------------------------- the words */
.quiet-zone__title {
  margin: 0;
  font-family: var(--qs-serif);
  font-size: clamp(2.1rem, 6vw, 2.9rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--qs-ink);
  text-wrap: balance;
}
.quiet-zone__text {
  max-width: 36ch;
  margin: 14px auto 0;
  color: var(--qs-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.quiet-zone__text b { color: var(--qs-ink); font-weight: 600; }
.quiet-zone__actions {
  justify-self: stretch;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 22px;
  margin-top: 28px;
}
.quiet-zone__go {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  max-width: 100%;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--qs-light);
  color: #17131c;
  font: 600 1rem/1 var(--qs-sans);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 10px 40px -14px rgb(243 237 226 / 0.55);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.quiet-zone__go:hover { transform: translateY(-1px); box-shadow: 0 14px 44px -12px rgb(243 237 226 / 0.7); }
.quiet-zone__go[hidden], .quiet-zone__back[hidden] { display: none; }
.quiet-zone__go:disabled { opacity: 0.6; cursor: progress; }
.quiet-zone__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--qs-ink);
  font: 500 0.98rem/1 var(--qs-sans);
  text-decoration: underline;
  text-decoration-color: var(--qs-rule);
  text-underline-offset: 6px;
  cursor: pointer;
}
.quiet-zone__back:hover { text-decoration-color: var(--qs-light); }
/* when going home is the only way on (not live yet, private) it is the main
   button, drawn in outline so it does not shout over an empty page */
.quiet-zone__actions:not(:has(.quiet-zone__go:not([hidden]))) .quiet-zone__back {
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--qs-rule);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.quiet-zone__actions:not(:has(.quiet-zone__go:not([hidden]))) .quiet-zone__back:hover { border-color: var(--qs-light); }
.quiet-zone :is(a, button):focus-visible { outline: 2px solid var(--qs-light); outline-offset: 4px; }
.quiet-zone__note {
  max-width: 34ch;
  margin: 22px auto 0;
  color: var(--qs-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.quiet-zone__note:empty, .quiet-zone__note[hidden] { display: none; }

@media (max-width: 480px) {
  .ghost-card { margin-bottom: 28px; padding: 24px 20px 20px; }
  .ghost-card__portrait { width: 64px; height: 64px; }
  .ghost-card__pill { height: 30px; }
  .quiet-zone__go { width: 100%; justify-content: center; }
}
@media (max-height: 700px) {
  .ghost-card__pill:last-of-type { display: none; }
}
@media (max-height: 600px) {
  .ghost-card { gap: 10px; margin-bottom: 24px; padding: 18px 18px 16px; }
  .ghost-card__portrait { width: 52px; height: 52px; }
  .ghost-card__portrait svg { width: 22px; height: 22px; }
  .ghost-card__pill { display: none; }
  .quiet-zone__title { font-size: 2rem; }
  .quiet-zone__actions { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .quiet-stage__light, .ghost-card { animation: none; }
}

/* ------------------------------------------------------------- 404.html */
.quiet-stage-page { min-height: 100svh; margin: 0; color: var(--qs-ink); font-family: var(--qs-sans); }
.quiet-stage-page .quiet-stage-main { display: grid; place-items: center; min-height: 100svh; padding: 48px 20px; box-sizing: border-box; }
