:root {
  --gutter: clamp(16px, 3.2vw, 44px);
  --space-xs: 6px;
  --space-s: 12px;
  --step-small: clamp(13px, 0.95vw, 15px);
  --step-soon: clamp(20px, 2.3vw, 34px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-enter: 1600ms;
  --dur-fade: 900ms;
}

/* katalyst.lol: ultraviolet lab glass */
html[data-site="k"] {
  --bg-top: #1c0a48;
  --bg-bottom: #04020e;
  --ink: #f4efff;
  --font-display: "Unbounded", system-ui, sans-serif;
  --mark-weight: 800;
  --mark-track: -0.05em;
  --font-text: "Unbounded", system-ui, sans-serif;
  --text-weight: 400;
  --text-style: normal;
  --note-size: var(--step-small);
}

/* thechosenone.wtf: night sky and gold leaf */
html[data-site="c"] {
  --bg-top: #121c40;
  --bg-bottom: #020309;
  --ink: #fff6e0;
  --font-display: "Cinzel", Georgia, serif;
  --mark-weight: 700;
  --mark-track: 0.01em;
  --font-text: "Cormorant Garamond", Georgia, serif;
  --text-weight: 500;
  --text-style: italic;
  --note-size: clamp(16px, 1.2vw, 19px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
p { margin: 0; }

body {
  background: linear-gradient(var(--bg-top), var(--bg-bottom)) fixed;
  color: var(--ink);
  font-family: var(--font-text);
  font-weight: var(--text-weight);
  font-style: var(--text-style);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

canvas {
  position: fixed;
  inset: 0;
  display: block;
  animation: fade 1400ms ease both;
}

.ui {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--gutter) var(--gutter) 0;
  pointer-events: none;
  user-select: none;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-s);
  animation: fade var(--dur-fade) 600ms ease both;
}

.domain {
  font-size: var(--step-small);
  font-style: normal;
  letter-spacing: 0.02em;
}

.status { text-align: right; }
.soon { font-size: var(--step-soon); line-height: 1.1; }

.note {
  margin-top: var(--space-xs);
  font-size: var(--note-size);
  line-height: 1.45;
  opacity: 0.72;
}

.mark {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--mark-weight);
  font-style: normal;
  letter-spacing: var(--mark-track);
  line-height: 0.86;
  padding-bottom: 0.2em;
  white-space: nowrap;
}

.mark span {
  display: inline-block;
  animation: rise var(--dur-enter) var(--ease-out) both;
}

@keyframes rise {
  from { transform: translateY(40%); clip-path: inset(100% -5% -40% -5%); }
  to { transform: none; clip-path: inset(-40% -5% -40% -5%); }
}

@keyframes fade { from { opacity: 0; } }

.no-webgl .note { display: none; }

@media (prefers-reduced-motion: reduce) {
  canvas, .top, .mark span { animation: none; }
}
