/* ==========================================================================
   STREAM·EXP — nl.streamexp.ru
   Concept: "The node wakes" — graphite + electric blue-violet, a living
   network mesh. Futuristic data-center / infrastructure mood, distinct
   from the monochrome main site but unmistakably the same brand.
   ========================================================================== */

:root {
  --bg:        #080a0f;
  --bg-2:      #0c0f17;
  --fg:        #eef1fb;
  --muted:     #9aa3c0;
  --faint:     #5d6580;
  --accent:    #7c8cff;   /* electric indigo */
  --accent-2:  #4cc7ff;   /* cyan signal     */
  --line:      rgba(140,160,255,.12);
  --ease:      cubic-bezier(.22,.61,.36,1);
  --mx: 50vw;
  --my: 38vh;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

body {
  min-height: 100svh;
  background:
    radial-gradient(140% 110% at 50% -10%, var(--bg-2) 0%, var(--bg) 60%);
  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 -------------------------------------------------------- */

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

.net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }

/* faint blueprint grid */
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(140,160,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(140,160,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(120% 90% at 50% 35%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 35%, #000 30%, transparent 80%);
}

.glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px); will-change: transform;
}
.glow--a {
  width: 55vmax; height: 55vmax; top: -20vmax; left: 38%;
  background: radial-gradient(circle at center, rgba(124,140,255,.28), transparent 68%);
  animation: drift-a 28s var(--ease) infinite alternate;
}
.glow--b {
  width: 40vmax; height: 40vmax; bottom: -16vmax; right: 6%;
  background: radial-gradient(circle at center, rgba(76,199,255,.18), transparent 70%);
  animation: drift-b 34s var(--ease) infinite alternate;
}

/* slow vertical scan line — quiet "system live" cue */
.scan {
  position: absolute; left: 0; right: 0; height: 38vh;
  top: -38vh;
  background: linear-gradient(to bottom, transparent, rgba(124,140,255,.05) 60%, transparent);
  animation: scan 9s linear infinite;
}

.vignette {
  position: absolute; inset: 0;
  background: radial-gradient(120% 95% at 50% 30%, transparent 52%, rgba(2,3,7,.7) 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, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px 1px rgba(124,140,255,.6);
}
.topbar__id {
  font-size: .82rem; font-weight: 600;
  letter-spacing: .14em; color: var(--muted);
}
.topbar__region {
  margin-left: auto;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .18em;
  color: var(--faint);
  padding: .25rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---------- 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(124,140,255,.06);
  backdrop-filter: blur(6px);
  font-size: .8rem; letter-spacing: .04em;
  color: var(--muted);
}
.status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px 1px rgba(76,199,255,.8);
  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%, #cdd6ff 50%, #7e8bd6 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; }
.wordmark__glow {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -.045em; color: transparent;
  text-shadow: 0 0 70px rgba(124,140,255,.4);
  filter: blur(3px); z-index: -1; user-select: none;
}

/* square separator — a glowing network node */
.sep {
  width: .4em; height: .4em; border-radius: .09em; flex: none;
  transform: translateY(.02em);
  background: linear-gradient(145deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 34px 6px rgba(124,140,255,.6),
              0 0 6px 0 rgba(76,199,255,.9);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.wordmark:hover .sep {
  transform: translateY(.02em) rotate(45deg) scale(1.1);
  box-shadow: 0 0 50px 9px rgba(124,140,255,.8),
              0 0 8px 0 rgba(76,199,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: 36ch;
  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(--accent); 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: translate(0,0)        scale(1); }
  to   { transform: translate(-3vmax,3vmax) scale(1.12); }
}
@keyframes drift-b {
  from { transform: translate(0,0)         scale(1); }
  to   { transform: translate(2vmax,-3vmax) scale(1.16); }
}
@keyframes scan {
  from { transform: translateY(0); }
  to   { transform: translateY(160vh); }
}

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

@media (max-width: 540px) {
  .sub { max-width: 30ch; }
  .grid { background-size: 44px 44px; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; filter: none; transform: none; }
  .scan { display: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #c4ccea; --faint: #9aa3c0; }
}

::selection { background: rgba(124,140,255,.28); color: #fff; }
