/* Zerqor apex — coming soon. Noir black + red, matches Zerqor Labs. */

:root {
  --red: #ff2b2b;
  --red-soft: rgba(255, 43, 43, 0.55);
  --ink: #f2efef;
  --dim: #9a8f8f;
  --font-display: 'Michroma', 'Rajdhani', 'Arial Black', sans-serif;
  --font-body: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
}

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

html, body {
  height: 100%;
  background: #020203;
  overflow: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: #000; }

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- atmosphere overlays ---- */

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 52%, transparent 38%, rgba(0, 0, 0, 0.55) 76%, rgba(0, 0, 0, 0.93) 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.30) 0 1px, transparent 1px 4px);
}

/* ---- centered lockup ---- */

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  pointer-events: none;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 11vw, 7rem);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--ink);
  font-weight: 400;
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { text-shadow: 0 0 18px rgba(255, 43, 43, 0.22), 0 0 70px rgba(255, 43, 43, 0.10); }
  50%      { text-shadow: 0 0 30px rgba(255, 43, 43, 0.45), 0 0 110px rgba(255, 43, 43, 0.20); }
}

/* rare glitch flicker — mysterious, not constant */
.glitch { position: relative; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch::before { animation: glitch-a 9s infinite; }
.glitch::after  { animation: glitch-b 9s infinite; }

@keyframes glitch-a {
  0%, 91%, 100% { opacity: 0; }
  92% { opacity: 0.85; transform: translate(-5px, 2px); color: #7df9ff; clip-path: inset(8% 0 62% 0); }
  94% { opacity: 0.85; transform: translate(4px, -1px); color: #ff2b2b; clip-path: inset(58% 0 12% 0); }
  96% { opacity: 0; transform: none; }
}

@keyframes glitch-b {
  0%, 91%, 100% { opacity: 0; }
  92.5% { opacity: 0.7; transform: translate(5px, 1px); color: #ff2b2b; clip-path: inset(30% 0 40% 0); }
  94.5% { opacity: 0; transform: none; }
}

.rule {
  position: relative;
  width: min(380px, 58vw);
  height: 1px;
  margin: 1.7rem 0 1.5rem;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  box-shadow: 0 0 14px var(--red-soft);
}

.rule::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
}

.coming {
  font-size: clamp(0.7rem, 2.6vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.65em;
  text-indent: 0.65em;
  color: var(--dim);
}

.cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 0.9em;
  vertical-align: -0.12em;
  background: var(--red);
  box-shadow: 0 0 10px rgba(255, 43, 43, 0.9);
  animation: blink 1.15s steps(1) infinite;
}

@keyframes blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* ---- sound toggle ---- */

.sound-toggle {
  pointer-events: auto;
  margin-top: 2.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  border: 1px solid rgba(255, 43, 43, 0.35);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-indent: 0.1em;
  color: var(--dim);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.sound-toggle:hover {
  border-color: var(--red);
  color: var(--ink);
  box-shadow: 0 0 16px rgba(255, 43, 43, 0.25);
}

.sound-toggle .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  transition: background 0.3s, box-shadow 0.3s;
}

.sound-toggle.on { color: var(--ink); border-color: var(--red); }

.sound-toggle.on .dot {
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---- quote: fades in with the voice, dissolves after ---- */

.quote {
  margin-top: 2.6rem;
  max-width: min(620px, 84vw);
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
}

.quote.visible { opacity: 1; }

.quote blockquote {
  font-family: var(--font-body);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1rem, 3.4vw, 1.5rem);
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--ink);
  text-shadow: 0 0 18px rgba(255, 43, 43, 0.28);
}

.quote figcaption {
  margin-top: 0.9rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--red);
  text-shadow: 0 0 12px rgba(255, 43, 43, 0.5);
}

/* ---- door to the lab ---- */

.lab-link {
  position: fixed;
  top: 1.4rem;
  right: 1.6rem;
  z-index: 10;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.1em;
  color: var(--dim);
  text-decoration: none;
  border: 1px solid rgba(255, 43, 43, 0.25);
  border-radius: 999px;
  padding: 0.55rem 1rem 0.55rem 1.2rem;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.lab-link:hover {
  color: var(--ink);
  border-color: var(--red);
  box-shadow: 0 0 16px rgba(255, 43, 43, 0.25);
}

/* ---- reduced motion: still frame, no flicker ---- */

@media (prefers-reduced-motion: reduce) {
  .brand,
  .glitch::before,
  .glitch::after,
  .cursor {
    animation: none;
  }
  .brand { text-shadow: 0 0 22px rgba(255, 43, 43, 0.30); }
  .glitch::before, .glitch::after { display: none; }
  .cursor { opacity: 1; }
  .quote { transition: none; }
}
