/* chaggi.gg — cryptic terminal landing page
   Palette and font are exposed as CSS variables so they are easy to swap. */

:root {
  --bg:        #000000;
  --fg:        #c8d6cf; /* primary text — soft cool phosphor white  */
  --fg-bright: #eaf3ee; /* headline                                */
  --accent:    #4fe0a6; /* prompt, cursor, record dot — phosphor    */
  --muted:     #4b5a54; /* status line, footer                      */
  --glow:      rgba(79, 224, 166, 0.30);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
               Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Vignette — deepens the void toward the edges */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.85) 100%);
}

/* Subtle CRT scanlines */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 1px,
    rgba(0, 0, 0, 0.18) 1px,
    rgba(0, 0, 0, 0.18) 2px
  );
  mix-blend-mode: multiply;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

.terminal {
  position: relative;
  z-index: 2;
  max-width: min(92vw, 46rem);
  padding: 1.5rem;
  text-align: left;
}

.headline {
  margin: 0;
  font-weight: 500;
  font-size: clamp(1.15rem, 4.6vw, 2.4rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--fg-bright);
  text-shadow: 0 0 4px rgba(79, 224, 166, 0.18), 0 0 18px rgba(79, 224, 166, 0.10);
}

.prompt {
  color: var(--accent);
  margin-right: 0.6ch;
  text-shadow: 0 0 8px var(--glow);
}

/* Block cursor */
.cursor {
  display: inline-block;
  width: 0.62ch;
  height: 1.05em;
  margin-left: 0.12ch;
  vertical-align: -0.16em;
  background: var(--accent);
  box-shadow: 0 0 8px var(--glow);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  0%, 50%      { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.status {
  margin: 1.5rem 0 0;
  font-size: clamp(0.72rem, 2.2vw, 0.9rem);
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: var(--muted);
  min-height: 1.2em;
  transition: opacity 0.6s ease;
}
.status::before { content: "[ "; }
.status::after  { content: " ]"; }

.statusbar {
  position: fixed;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.rec {
  color: var(--accent);
  font-size: 0.7em;
  vertical-align: 0.15em;
  margin-right: 0.4ch;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

/* 404 helpers */
.dim { color: var(--muted); }
.back { margin-top: 2rem; font-size: 0.8rem; letter-spacing: 0.12em; }
.back a {
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 8px var(--glow);
}
.back a:hover { text-shadow: 0 0 14px var(--glow); }

@media (max-width: 480px) {
  .statusbar { letter-spacing: 0.1em; font-size: 0.62rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; opacity: 1; }
  .rec    { animation: none; opacity: 0.8; }
  body::after { display: none; }
}
