@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #f2f2f2;
  --muted: #a3a3a3;
  --dim: #8a8a8a;
  --line: #242424;
  --bar: #ececec;
  --mark-h: 120px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--bg); color: var(--fg); }

body {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.mono {
  font-family: var(--mono);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "calt" 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

::selection { background: #fff; color: #000; }

#stream {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.stream-on #stream { opacity: 1; }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 58% 60% at 50% 47%,
    rgba(0, 0, 0, 0.96) 0%,
    rgba(0, 0, 0, 0.86) 42%,
    rgba(0, 0, 0, 0.4) 78%,
    rgba(0, 0, 0, 0.18) 100%);
}

.stage {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 20px 40px;
  text-align: center;
}

.mark {
  display: block;
  height: var(--mark-h);
  width: calc(var(--mark-h) * 0.6026);
  overflow: visible;
  fill: #fff;
}
.mark .part { transform-box: view-box; transform-origin: 0 0; }
.mark .blk { display: none; }
.live .mark .bar { animation: pa-blink 1.1s steps(1, end) infinite; }

@keyframes pa-blink { 50% { opacity: 0; } }

.wordmark {
  margin-top: 38px;
  font-size: clamp(34px, 5.2vw, 54px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark .wm { display: inline-block; white-space: pre; }
.wordmark .scr { font-weight: 500; color: var(--dim); letter-spacing: 0; }

.status {
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
}
.status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-radius: 50%;
  background: #fff;
  vertical-align: 1px;
  animation: pa-pulse 2.4s ease-in-out infinite;
}
@keyframes pa-pulse { 50% { opacity: 0.25; } }

.tease {
  margin-top: 30px;
  max-width: 34em;
  font-size: clamp(16px, 1.9vw, 19px);
  line-height: 1.8;
  letter-spacing: -0.01em;
  color: var(--muted);
  text-wrap: balance;
}

.rx {
  display: inline-flex;
  align-items: center;
  height: 0.95em;
  margin: 0 0.06em;
  vertical-align: -0.12em;
  overflow: hidden;
  background: var(--bar);
  color: #000;
  font-family: var(--mono);
  font-size: 0.82em;
  white-space: nowrap;
  transform-origin: left center;
  cursor: default;
  user-select: none;
}
.nw { white-space: nowrap; }
.rx[data-w="6"] { width: 3.6em; }
.rx[data-w="7"] { width: 4.2em; }
.rx[data-w="8"] { width: 4.8em; }
.rx[data-w="9"] { width: 5.4em; }

.term {
  margin-top: 42px;
  width: min(100%, 440px);
  padding: 18px 20px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(6, 6, 6, 0.88);
  text-align: left;
  font-size: 13px;
  line-height: 1.75;
}
.term:has(input:focus-visible) { border-color: #5a5a5a; }
.term .dim { color: var(--dim); }
.term dl { margin-top: 4px; }
.term dl div { display: flex; }
.term dt { width: 12ch; padding-left: 2ch; color: var(--dim); }
.spin { display: inline-block; width: 1ch; }

.log p { overflow-wrap: anywhere; }
.log .entry { margin-top: 10px; }
.log .you { color: var(--fg); }
.log .you .caret { color: var(--dim); }
.log .w { transition: background-color 0.12s, color 0.12s; }
.log .w.redacted { background: var(--bar); color: transparent; }
.log .sys { color: var(--dim); }
.log .ans { color: var(--fg); }

.ask {
  display: flex;
  align-items: center;
  gap: 1ch;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #222;
}
.ask .caret { color: var(--dim); }
.ask input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  caret-color: #fff;
}
.ask input::placeholder { color: #7a7a7a; }
.ask:focus-within .caret { color: #fff; }
html:not(.js) .ask { display: none; }

.foot {
  position: relative;
  z-index: 2;
  padding: 0 20px 28px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.intro .mark .part { opacity: 0; }
.intro .mark .blk { display: inline; }
.intro .wordmark,
.intro .status,
.intro .tease,
.intro .term,
.intro .foot { opacity: 0; }
.intro .status,
.intro .term,
.intro .foot { transform: translateY(8px); }
.intro .tease .rx { transform: scaleX(0); }

.intro .show {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.intro .wordmark.show { transition: none; }
.intro .tease .rx.show {
  transform: none;
  transition: transform 0.45s cubic-bezier(0.7, 0, 0.2, 1);
}

.intro .mark .part,
.intro .wordmark,
.intro .status,
.intro .tease,
.intro .tease .rx,
.intro .term,
.intro .foot { animation: pa-failsafe 1ms 6s forwards; }
@keyframes pa-failsafe { to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  :root { --mark-h: 88px; }
  .vignette {
    background: radial-gradient(ellipse 80% 46% at 50% 48%,
      rgba(0, 0, 0, 0.96) 0%,
      rgba(0, 0, 0, 0.84) 55%,
      rgba(0, 0, 0, 0.3) 85%,
      rgba(0, 0, 0, 0.12) 100%);
  }
  .stage { padding: 56px 16px 32px; }
  .wordmark { margin-top: 30px; }
  .tease br { display: none; }
  .term { margin-top: 34px; padding: 16px 16px 12px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  #stream { display: none; }
  .status::before { animation: none; }
  .live .mark .bar { animation: none; }
}
