/* ═══════════════════════════════════════════════════════════════════════
   V2 — Section Transitions & Dividers ("Signal Corridor")
   Class prefix: .v2-div-  (divider), .v2-entry-  (section entry)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Section Divider: Signal Node Line ── */
.v2-div {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

/* Horizontal lines extending from center */
.v2-div-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--z-accent-glow, rgba(245, 158, 11, 0.15)) 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 1s var(--v2-ease, cubic-bezier(0.4, 0, 0.2, 1));
}

.v2-div-line:last-child {
  background: linear-gradient(
    90deg,
    var(--z-accent-glow, rgba(245, 158, 11, 0.15)) 0%,
    transparent 100%
  );
}

/* Center node (Islamic geometric star) */
.v2-div-node {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin: 0 8px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.5s var(--v2-ease), transform 0.5s var(--v2-ease-spring);
}

/* 8-pointed star via two rotated squares */
.v2-div-node::before,
.v2-div-node::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid var(--z-accent, #f59e0b);
  opacity: 0.4;
}

.v2-div-node::before {
  transform: rotate(0deg);
}

.v2-div-node::after {
  transform: rotate(45deg);
}

/* Pulse ring around node */
.v2-div-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--z-accent, #f59e0b);
  opacity: 0;
  animation: none;
}

/* ── ACTIVATED STATE (via JS IntersectionObserver) ── */
.v2-div.v2-div--visible .v2-div-line {
  transform: scaleX(1);
}

.v2-div.v2-div--visible .v2-div-node {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.4s;
}

.v2-div.v2-div--visible .v2-div-pulse {
  animation: v2-divPulse 3s ease-out infinite 1s;
}

@keyframes v2-divPulse {
  0%   { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── Data Particles along divider line ── */
.v2-div-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--z-accent, #f59e0b);
  opacity: 0;
  top: 50%;
  transform: translateY(-50%);
}

.v2-div.v2-div--visible .v2-div-particle {
  animation: v2-particleFlow 4s linear infinite;
}

.v2-div-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.v2-div-particle:nth-child(2) { left: 30%; animation-delay: 1.3s; }
.v2-div-particle:nth-child(3) { right: 30%; animation-delay: 2.6s; }
.v2-div-particle:nth-child(4) { right: 10%; animation-delay: 0.8s; }

@keyframes v2-particleFlow {
  0%   { opacity: 0; transform: translateY(-50%) translateX(0); }
  10%  { opacity: 0.3; }
  90%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-50%) translateX(80px); }
}

/* ══════════════════════════════════════════
   Section Entry Scan (top-border reveal)
   ══════════════════════════════════════════ */
.v2-entry-scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.v2-entry-scan::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--v2-scan-color, var(--z-accent, #f59e0b)) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  opacity: 0;
}

.v2-entry-scan.v2-entry-scan--active::after {
  animation: v2-entryScan 0.8s ease-out forwards;
}

@keyframes v2-entryScan {
  0%   { transform: translateX(-100%); opacity: 0.6; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ══════════════════════════════════════════
   Divider Color Variants (per-section)
   ══════════════════════════════════════════ */
.v2-div--amber .v2-div-node::before,
.v2-div--amber .v2-div-node::after { border-color: var(--v2-sector-amber); }
.v2-div--amber .v2-div-pulse { border-color: var(--v2-sector-amber); }
.v2-div--amber .v2-div-particle { background: var(--v2-sector-amber); }

.v2-div--cyan .v2-div-node::before,
.v2-div--cyan .v2-div-node::after { border-color: var(--v2-sector-cyan); }
.v2-div--cyan .v2-div-pulse { border-color: var(--v2-sector-cyan); }
.v2-div--cyan .v2-div-particle { background: var(--v2-sector-cyan); }

.v2-div--green .v2-div-node::before,
.v2-div--green .v2-div-node::after { border-color: var(--v2-sector-green); }
.v2-div--green .v2-div-pulse { border-color: var(--v2-sector-green); }
.v2-div--green .v2-div-particle { background: var(--v2-sector-green); }

.v2-div--purple .v2-div-node::before,
.v2-div--purple .v2-div-node::after { border-color: var(--v2-sector-purple); }
.v2-div--purple .v2-div-pulse { border-color: var(--v2-sector-purple); }
.v2-div--purple .v2-div-particle { background: var(--v2-sector-purple); }

/* ══════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .v2-div { height: 32px; }
  .v2-div-node { width: 14px; height: 14px; }
  .v2-div-particle { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-div-line { transform: scaleX(1); transition: none; }
  .v2-div-node { opacity: 1; transform: scale(1); transition: none; }
  .v2-div-pulse { animation: none !important; }
  .v2-div-particle { display: none; }
  .v2-entry-scan::after { animation: none !important; }
}
