/* Homepage-only kinetic visuals. The console is an illustrative process map,
   not a live dashboard or a representation of client data. */
.principle-visual {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 570px;
  margin: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
}

.principle-visual::before {
  content: "";
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(89, 227, 177, 0.1), transparent 68%);
  filter: blur(22px);
}

.principle-console {
  position: relative;
  z-index: 2;
  width: calc(100% - 2rem);
  overflow: hidden;
  border: 1px solid rgba(89, 227, 177, 0.32);
  background: rgba(5, 20, 16, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.pconsole-topbar,
.pconsole-footer {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.9rem;
  color: #78867f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
}

.pconsole-dots {
  display: flex;
  gap: 5px;
  margin-right: auto;
}

.pconsole-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.pconsole-model {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  color: var(--accent);
}

.pconsole-model i {
  width: 5px;
  height: 5px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(89, 227, 177, 0.55);
  animation: pconsole-pulse 2.4s ease-in-out infinite;
}

.pconsole-canvas {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background-image: radial-gradient(rgba(89, 227, 177, 0.22) 0.7px, transparent 0.7px);
  background-size: 15px 15px;
}

.pconsole-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, transparent 25%, rgba(2, 12, 9, 0.34) 100%);
}

.pconsole-scan {
  position: absolute;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: -22%;
  width: 22%;
  opacity: 0.7;
  background: linear-gradient(90deg, transparent, rgba(89, 227, 177, 0.08), rgba(89, 227, 177, 0.25), transparent);
  border-right: 1px solid rgba(118, 255, 204, 0.34);
  animation: pconsole-scan 6.8s linear infinite;
  pointer-events: none;
}

.pconsole-links {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pconsole-links path {
  fill: none;
  stroke: rgba(89, 227, 177, 0.64);
  stroke-width: 0.25;
  stroke-dasharray: 0.04 0.04;
  stroke-linecap: round;
  animation: pconsole-flow 2.8s linear infinite;
}

.pconsole-links path:nth-child(2) {
  animation-delay: -0.9s;
}

.pconsole-links path:nth-child(3) {
  animation-delay: -1.8s;
}

.pconsole-card {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: 37%;
  min-height: 135px;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(6, 22, 17, 0.96);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
  animation: pconsole-card-cycle 8s ease-in-out infinite;
}

.pconsole-card > span {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.14em;
}

.pconsole-card > span b {
  color: var(--acid);
  font-weight: 400;
}

.pconsole-card strong {
  color: #eff8f3;
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.5vw, 1rem);
  line-height: 1.2;
}

.pconsole-card small {
  margin-top: 0.22rem;
  color: #74837c;
  font-size: 0.57rem;
  line-height: 1.4;
}

.pconsole-input {
  top: 7%;
  left: 5%;
}

.pconsole-evidence {
  top: 7%;
  right: 5%;
  animation-delay: -6s;
}

.pconsole-decision {
  bottom: 7%;
  left: 5%;
  animation-delay: -4s;
}

.pconsole-output {
  right: 5%;
  bottom: 7%;
  animation-delay: -2s;
}

.pconsole-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 30px;
  margin-top: auto;
  padding-top: 0.5rem;
}

.pconsole-bars i {
  width: 8px;
  height: 55%;
  background: linear-gradient(var(--accent), rgba(89, 227, 177, 0.2));
  transform-origin: bottom;
  animation: pconsole-bars 2.6s ease-in-out infinite alternate;
}

.pconsole-bars i:nth-child(2) { height: 85%; animation-delay: -0.7s; }
.pconsole-bars i:nth-child(3) { height: 42%; animation-delay: -1.5s; }
.pconsole-bars i:nth-child(4) { height: 100%; animation-delay: -0.35s; }
.pconsole-bars i:nth-child(5) { height: 64%; animation-delay: -2s; }
.pconsole-bars i:nth-child(6) { height: 78%; animation-delay: -1.1s; }

.pconsole-rings {
  position: relative;
  width: 38px;
  height: 38px;
  margin-top: auto;
  border: 1px solid rgba(89, 227, 177, 0.35);
  border-radius: 50%;
}

.pconsole-rings::before,
.pconsole-rings i,
.pconsole-rings b {
  position: absolute;
  border-radius: 50%;
}

.pconsole-rings::before {
  content: "";
  inset: 7px;
  border: 1px solid rgba(89, 227, 177, 0.65);
}

.pconsole-rings i {
  inset: -1px;
  border-top: 1px solid var(--acid);
  animation: pconsole-rotate 3s linear infinite;
}

.pconsole-rings b {
  width: 6px;
  height: 6px;
  top: 50%;
  left: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transform: translate(-50%, -50%);
}

.pconsole-meters {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 0.55rem;
}

.pconsole-meters i {
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.pconsole-meters b {
  display: block;
  width: 78%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--acid));
  transform-origin: left;
  animation: pconsole-meter 3.4s ease-in-out infinite alternate;
}

.pconsole-meters i:nth-child(2) b { width: 56%; animation-delay: -1s; }
.pconsole-meters i:nth-child(3) b { width: 89%; animation-delay: -2s; }

.pconsole-terminal {
  position: relative;
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 0.55rem;
}

.pconsole-terminal i {
  width: 82%;
  height: 2px;
  background: rgba(89, 227, 177, 0.5);
}

.pconsole-terminal i:nth-child(2) { width: 58%; }
.pconsole-terminal i:nth-child(3) { width: 70%; }

.pconsole-terminal b {
  position: absolute;
  width: 5px;
  height: 7px;
  right: 8%;
  bottom: 0;
  background: var(--acid);
  animation: pconsole-cursor 1s steps(1) infinite;
}

.pconsole-footer {
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 0;
}

.pconsole-footer > i {
  width: 15px;
  height: 1px;
  background: rgba(89, 227, 177, 0.42);
}

.principle-visual figcaption {
  position: absolute;
  right: 1rem;
  bottom: 0.75rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #68766f;
  font-family: var(--font-mono);
  font-size: 0.53rem;
  letter-spacing: 0.13em;
}

.principle-visual figcaption span {
  width: 25px;
  height: 1px;
  background: var(--accent);
}

@keyframes pconsole-scan {
  to { transform: translateX(560%); }
}

@keyframes pconsole-flow {
  to { stroke-dashoffset: -0.16; }
}

@keyframes pconsole-card-cycle {
  0%, 18%, 100% {
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.24);
  }
  8% {
    border-color: rgba(89, 227, 177, 0.65);
    box-shadow: 0 0 28px rgba(89, 227, 177, 0.1);
  }
}

@keyframes pconsole-bars {
  50% { transform: scaleY(0.45); }
}

@keyframes pconsole-rotate {
  to { transform: rotate(360deg); }
}

@keyframes pconsole-meter {
  50% { transform: scaleX(0.68); }
}

@keyframes pconsole-cursor {
  50% { opacity: 0; }
}

@keyframes pconsole-pulse {
  50% {
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
  }
}

@media (max-width: 1040px) {
  .principle-visual {
    width: min(100%, 650px);
  }
}

@media (max-width: 620px) {
  .principle-visual {
    min-height: 720px;
  }

  .principle-console {
    width: calc(100% - 1rem);
  }

  .pconsole-topbar {
    min-height: 42px;
    padding-inline: 0.7rem;
  }

  .pconsole-topbar > span:not(.pconsole-model) {
    display: none;
  }

  .pconsole-canvas {
    display: grid;
    gap: 0.7rem;
    min-height: 620px;
    padding: 1rem;
  }

  .pconsole-canvas::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 8%;
    bottom: 8%;
    left: 1.45rem;
    border-left: 1px dashed rgba(89, 227, 177, 0.48);
  }

  .pconsole-links {
    display: none;
  }

  .pconsole-card {
    position: relative;
    inset: auto;
    width: auto;
    min-height: 130px;
    margin-left: 1.2rem;
  }

  .pconsole-footer {
    gap: 0.35rem;
    font-size: 0.47rem;
  }

  .pconsole-footer > i {
    width: 8px;
  }

  .principle-visual figcaption {
    font-size: 0.47rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pconsole-model i,
  .pconsole-scan,
  .pconsole-links path,
  .pconsole-card,
  .pconsole-bars i,
  .pconsole-rings i,
  .pconsole-meters b,
  .pconsole-terminal b {
    animation: none !important;
  }
}
