/* ==========================================================================
   STREAM·EXP — streamexp.ru
   Concept: "Signal in the dark" — confident, monochrome, AI-first.
   Inspired by the restraint of xAI / Grok and the typographic precision
   of Linear & Vercel. Pure CSS motion + one tiny progressive-enhancement JS.
   ========================================================================== */

:root {
  --bg:        #050506;
  --fg:        #f5f5f7;
  --muted:     #9a9aa3;
  --faint:     #5c5c64;
  --line:      rgba(255,255,255,.08);
  --accent:    #ffffff;
  --ease:      cubic-bezier(.22,.61,.36,1);
  --mx: 50vw;  /* cursor spotlight, updated by JS */
  --my: 38vh;
}

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

html { height: 100%; }

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ---------- Ambient background --------------------------------------------- */

.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .6;
  will-change: transform;
}
.glow--a {
  width: 60vmax; height: 60vmax;
  top: -22vmax; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at center,
              rgba(120,130,150,.20) 0%,
              rgba(90,100,120,.08) 40%,
              transparent 70%);
  animation: drift-a 26s var(--ease) infinite alternate;
}
.glow--b {
  width: 42vmax; height: 42vmax;
  bottom: -18vmax; left: 28%;
  background: radial-gradient(circle at center,
              rgba(200,205,220,.10) 0%,
              transparent 68%);
  animation: drift-b 32s var(--ease) infinite alternate;
}

/* drifting particle field */
.dust {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .9;
}

/* cursor-following soft light */
.spotlight {
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my),
              rgba(255,255,255,.06), transparent 60%);
  transition: background .25s var(--ease);
}

/* fine film grain to kill banding and add texture */
.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .035;
  mix-blend-mode: overlay;
}

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 28%, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ---------- Top bar -------------------------------------------------------- */

.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: .6rem;
  padding: clamp(1.1rem, 3vw, 1.8rem) clamp(1.2rem, 4vw, 2.4rem);
  animation: fade 1.2s var(--ease) both;
}
.topbar .mark {
  width: 13px; height: 13px; border-radius: 3px;
  background: linear-gradient(150deg, #fff, #b7b7c0);
  box-shadow: 0 0 18px 1px rgba(255,255,255,.4);
}
.topbar__id {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--muted);
}

/* ---------- Stage ---------------------------------------------------------- */

.stage {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 2rem clamp(1.2rem, 5vw, 3rem) 3rem;
  gap: clamp(.9rem, 2vw, 1.4rem);
}

.status {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .42rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  backdrop-filter: blur(6px);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--muted);
}
.status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 10px 1px rgba(110,231,168,.7);
  animation: pulse 2.4s var(--ease) infinite;
}

/* ---------- Wordmark ------------------------------------------------------- */

.wordmark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.18em, .4vw, .26em);
  font-size: clamp(3.1rem, 16vw, 13rem);
  font-weight: 700;
  line-height: .9;
  letter-spacing: -.045em;
  margin: clamp(.2rem, 1vw, .6rem) 0;
  cursor: default;
}
.wordmark .word {
  background: linear-gradient(180deg, #ffffff 0%, #d4d4da 52%, #84848d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* trailing padding so background-clip:text doesn't crop the last glyph (P) */
.wordmark .word:last-child { padding-right: .08em; }
.wordmark__glow { padding-right: .08em; }
/* soft luminous halo behind the type */
.wordmark__glow {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -.045em;
  color: transparent;
  text-shadow: 0 0 60px rgba(255,255,255,.22);
  filter: blur(2px);
  z-index: -1;
  user-select: none;
}

/* the square "·" separator */
.sep {
  width: .4em; height: .4em;
  border-radius: .09em;
  flex: none;
  transform: translateY(.02em) rotate(0deg);
  background: linear-gradient(145deg, #ffffff, #c2c2cb);
  box-shadow: 0 0 30px 5px rgba(255,255,255,.45),
              0 0 4px 0 rgba(255,255,255,.9);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.wordmark:hover .sep {
  transform: translateY(.02em) rotate(45deg) scale(1.08);
  box-shadow: 0 0 46px 8px rgba(255,255,255,.6),
              0 0 6px 0 rgba(255,255,255,1);
}

/* ---------- Copy ----------------------------------------------------------- */

.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--fg);
}
.sub {
  max-width: 34ch;
  font-size: clamp(.92rem, 1.6vw, 1.02rem);
  line-height: 1.6;
  color: var(--muted);
}
.credit {
  margin-top: clamp(.6rem, 2vw, 1.2rem);
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--faint);
}
.credit span { color: var(--muted); font-weight: 600; }

/* ---------- Footer --------------------------------------------------------- */

.footer {
  position: relative; z-index: 2;
  text-align: center;
  padding: clamp(1.2rem, 3vw, 2rem);
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--faint);
}

/* ---------- Animations ----------------------------------------------------- */

.reveal {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(14px);
  animation: reveal 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal {
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.8); }
}
@keyframes drift-a {
  from { transform: translateX(-50%) translateY(0)    scale(1); }
  to   { transform: translateX(-46%) translateY(3vmax) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translateY(0)     scale(1); }
  to   { transform: translateY(-4vmax) scale(1.15); }
}

/* ---------- Responsive ----------------------------------------------------- */

@media (max-width: 540px) {
  .sub { max-width: 30ch; }
  .wordmark { letter-spacing: -.04em; }
}

/* ---------- Accessibility -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal { opacity: 1; filter: none; transform: none; }
  .spotlight { display: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #c8c8cf; --faint: #9a9aa3; }
}

::selection { background: rgba(255,255,255,.18); color: #fff; }
