
/* =========================================
   ZIRA SYSTEM CORE STYLES (REBUILD v1)
   FIELD-ALIGNED VISUAL LANGUAGE
========================================= */

html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;

  background: #05060a;
  color: rgba(255,255,255,0.85);

  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================================================
   FIELD CANVAS (js/fieldEngine.js)
================================================== */

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;

  /* IMPORTANT: avoid visual feedback artifacts */
  mix-blend-mode: screen;
}

/* ==================================================
   SIGNAL VISUAL LAYER (js/field/signals.js)
================================================== */

.signal-node {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;

  background: rgba(255,255,255,0.8);

  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

/* dynamic signal intensity (NOT static color rings anymore) */
.signal-node.low {
  opacity: 0.25;
}

.signal-node.mid {
  opacity: 0.55;
}

.signal-node.high {
  opacity: 0.95;
  box-shadow: 0 0 12px rgba(255,255,255,0.15);
}

/* ==================================================
   CURSOR INTERACTION FIELD (js/interaction/cursor.js)
================================================== */

.cursor-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

/* soft influence ripple (NOT aggressive animation) */
.cursor-ripple {
  position: absolute;
  width: 120px;
  height: 120px;

  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.06);

  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;

  transition: transform 900ms ease, opacity 900ms ease;
}

.cursor-ripple.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.2);
}

/* ==================================================
   PERCEPTION OVERLAY (js/perception/overlay.js)
================================================== */

#overlay {
  position: fixed;
  inset: 0;
  z-index: 10;

  pointer-events: none;

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 6vw;
  gap: 14px;
}

/* core perceptual text unit */
.p-text {
  max-width: 620px;

  font-size: 16px;
  line-height: 1.6;

  opacity: 0;

  transform: translateY(10px);

  transition:
    opacity 700ms ease,
    transform 700ms ease;

  will-change: transform, opacity;
}

/* perception states (driven by js/perception/timeline.js) */

.p-text.enter {
  opacity: 1;
  transform: translateY(0);
}

.p-text.stable {
  opacity: 1;
}

.p-text.release {
  opacity: 0.35;
}

.p-text.fade {
  opacity: 0;
  transform: translateY(-6px);
}

/* ==================================================
   ZONE LANGUAGE (js/field/nodes.js semantic grouping)
================================================== */

.zone-apex {
  color: rgba(255, 220, 140, 0.9);
}

.zone-core {
  color: rgba(255, 120, 90, 0.9);
}

.zone-conduit {
  color: rgba(80, 220, 190, 0.85);
}

.zone-perimeter {
  color: rgba(160, 140, 255, 0.85);
}

/* zone emphasis WITHOUT static ring artifacts */
.zone-highlight {
  border-left: 1px solid rgba(255,255,255,0.08);
  padding-left: 12px;
}

/* ==================================================
   TIMELINE / NARRATIVE FLOW (js/perception/timeline.js)
================================================== */

.timeline-marker {
  opacity: 0.4;
  font-size: 12px;
  letter-spacing: 0.3px;
}

/* ==================================================
   SYSTEM STATE FEEDBACK (js/state.js)
================================================== */

.state-loading {
  opacity: 0.6;
  letter-spacing: 0.4px;
}

.state-ready {
  opacity: 1;
}

/* IMPORTANT: avoid static “Loading...” lock feeling */
.state-idle {
  opacity: 0.2;
}

/* ==================================================
   BACKGROUND FIELD (NO FIXED RINGS, ONLY FLOW)
================================================== */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;

  background:
    radial-gradient(circle at 50% 50%, rgba(90,120,255,0.05), transparent 55%),
    radial-gradient(circle at 30% 20%, rgba(255,120,90,0.03), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(80,220,190,0.03), transparent 65%);
}

/* ==================================================
   PERFORMANCE STABILITY
================================================== */

* {
  box-sizing: border-box;
}

canvas, #field {
  will-change: transform;
}

.p-text, .signal-node {
  backface-visibility: hidden;
}
