
/* Quantgroup circuit portfolio.
   The document stays one viewport high. Wheel/trackpad gestures drive one
   internal spatial transition at a time; the browser page itself does not scroll. */

.page-circuit {
  --header-height: 0px;
  --footer-clearance: 66px;
  --circuit-background: #000000;
  --circuit-text: #f2f2ef;
  --circuit-copy: #b8b8bc;
  --circuit-muted: #85898d;
  --circuit-border: #1c2327;
  --circuit-blue: #2b8eac;
  --camera-x: 0px;
  --camera-y: 0px;
  --camera-scale: 1;
  --journey-progress: 0;
  --read-opacity: 1;
  height: 100vh;
  height: 100svh;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--circuit-background);
  color: var(--circuit-text);
}

.circuit-stage {
  position: fixed;
  inset: var(--header-height) 0 0;
  overflow: hidden;
  isolation: isolate;
  background: var(--circuit-background);
  touch-action: none;
  overscroll-behavior: none;
}

.circuit-board {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: 0 0;
  transform: translate3d(var(--camera-x), var(--camera-y), 0) scale(var(--camera-scale));
  will-change: transform;
}

.circuit-art {
  position: absolute;
  inset: 0;
  z-index: 1;
}

svg.circuit-path {
  display: block;
  width: 100%;
  height: 100%;
}

svg.circuit-path .path {
  animation: none !important;
  stroke-dasharray: none !important;
  stroke-dashoffset: 0 !important;
  stroke-opacity: .08;
  transition: stroke-opacity 180ms ease;
}

.circuit-stage.has-focus svg.circuit-path .path {
  stroke-opacity: .08;
}

svg.circuit-path .signal-trace {
  fill: none;
  stroke: #edfaff;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: .92;
  filter: drop-shadow(0 0 2px rgba(194, 238, 255, .58));
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

.circuit-orb {
  position: absolute;
  left: var(--orb-x, 50%);
  top: var(--orb-y, 47%);
  width: 15px;
  height: 15px;
  z-index: 30;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,.98) 0 15%, rgba(43,142,172,.82) 34%, rgba(43,142,172,.28) 56%, rgba(43,142,172,0) 75%);
  box-shadow: 0 0 22px rgba(43,142,172,.22), 0 0 54px rgba(43,142,172,.09);
}

.circuit-orb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(43,142,172,.16), rgba(43,142,172,0) 72%);
  filter: blur(3px);
}

.circuit-nodes {
  position: absolute;
  inset: 0;
  z-index: 20;
}

.circuit-node {
  --node-x: 50%;
  --node-y: 50%;
  position: absolute;
  left: var(--node-x);
  top: var(--node-y);
  width: 1px;
  height: 1px;
  z-index: 1;
}

.circuit-node.is-active,
.circuit-node.is-selected { z-index: 32; }

.circuit-node__trigger {
  position: absolute;
  left: 0;
  top: 0;
  width: 82px;
  height: 82px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  box-shadow: none;
  cursor: pointer;
}

.circuit-node__trigger::before,
.circuit-node__trigger::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
}

.circuit-node__trigger::before {
  width: 112px;
  height: 92px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse at 35% 56%, rgba(43,142,172,.14) 0 12%, rgba(43,142,172,.065) 36%, rgba(43,142,172,0) 72%),
    radial-gradient(ellipse at 64% 41%, rgba(43,142,172,.10), rgba(43,142,172,0) 64%);
  filter: blur(10px);
  opacity: .46;
  animation: node-breathe 8.6s ease-in-out infinite;
}

.circuit-node__trigger::after {
  width: 4px;
  height: 4px;
  transform: translate(-50%, -50%);
  background: rgba(43,142,172,.50);
  box-shadow: 0 0 12px rgba(43,142,172,.17);
  animation: node-core 6.8s ease-in-out infinite;
}

.circuit-node:nth-child(2n) .circuit-node__trigger::before { animation-delay: -3.1s; }
.circuit-node:nth-child(3n) .circuit-node__trigger::before { animation-duration: 10.2s; }
.circuit-node:nth-child(3n + 1) .circuit-node__trigger::after { animation-delay: -2.4s; }

.circuit-node__trigger span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.circuit-node--core .circuit-node__trigger {
  width: 92px;
  height: 92px;
}

.circuit-node--core .circuit-node__trigger::before {
  width: 126px;
  height: 104px;
}

.circuit-node.is-selected .circuit-node__trigger::before,
.circuit-node.is-active .circuit-node__trigger::before,
.circuit-node__trigger:hover::before,
.circuit-node__trigger:focus-visible::before {
  opacity: .82;
  filter: blur(7px);
  background:
    radial-gradient(ellipse at 39% 55%, rgba(43,142,172,.22), rgba(43,142,172,.085) 38%, rgba(43,142,172,0) 74%),
    radial-gradient(ellipse at 66% 42%, rgba(43,142,172,.15), rgba(43,142,172,0) 66%);
}

.circuit-node.is-selected .circuit-node__trigger::after,
.circuit-node.is-active .circuit-node__trigger::after,
.circuit-node__trigger:hover::after,
.circuit-node__trigger:focus-visible::after {
  background: rgba(43,142,172,.88);
  box-shadow: 0 0 18px rgba(43,142,172,.32);
}

.circuit-focus {
  position: absolute;
  z-index: 55;
  inset: 0 0 var(--footer-clearance);
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 72px);
  pointer-events: none;
}

.concept-card {
  position: relative;
  grid-area: 1 / 1;
  width: min(880px, calc(100vw - 112px));
  max-height: min(72vh, 690px);
  overflow: auto;
  padding: clamp(42px, 5vw, 70px) clamp(42px, 6vw, 84px);
  border: 0;
  background: transparent;
  color: var(--circuit-text);
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(.988);
  pointer-events: none;
  isolation: isolate;
}

.concept-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -30px -46px;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0,0,0,.66) 0 30%,
    rgba(0,0,0,.54) 50%,
    rgba(0,0,0,.36) 68%,
    rgba(0,0,0,.14) 82%,
    rgba(0,0,0,0) 100%
  );
  filter: blur(7px);
}

.concept-card.is-active {
  opacity: var(--read-opacity);
  visibility: visible;
  transform: translateY(calc((1 - var(--read-opacity)) * 9px)) scale(calc(.982 + var(--read-opacity) * .018));
  pointer-events: auto;
}

.concept-card h1,
.concept-card h2,
.concept-card p {
  margin-top: 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 100% 0%, 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
}

.concept-card h1,
.concept-card h2 {
  background-image:
    linear-gradient(var(--circuit-text), var(--circuit-text)),
    linear-gradient(rgba(0,0,0,.98), rgba(0,0,0,.98));
}

.concept-card p {
  background-image:
    linear-gradient(var(--circuit-copy), var(--circuit-copy)),
    linear-gradient(rgba(0,0,0,.98), rgba(0,0,0,.98));
}

.concept-card.is-revealed h1,
.concept-card.is-revealed h2 {
  color: var(--circuit-text);
  -webkit-text-fill-color: var(--circuit-text);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

.concept-card.is-revealed p {
  color: var(--circuit-copy);
  -webkit-text-fill-color: var(--circuit-copy);
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

.concept-card.is-revealing h1 {
  animation: reveal-text-lines .22s linear forwards;
}

.concept-card.is-revealing h2 {
  animation: reveal-text-lines .34s .20s linear forwards;
}

.concept-card.is-revealing p {
  animation: reveal-text-lines .52s .48s linear forwards;
}

.concept-card h1 {
  margin-bottom: 18px;
  font-size: clamp(46px, 5.5vw, 82px);
  line-height: 1.01;
  letter-spacing: -.058em;
  font-weight: 640;
}

.concept-card h2 {
  max-width: 720px;
  margin-bottom: 24px;
  font-size: clamp(26px, 2.9vw, 40px);
  line-height: 1.11;
  letter-spacing: -.04em;
  font-weight: 600;
}

.concept-card p {
  max-width: 680px;
  margin-bottom: 0;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.65;
}

@keyframes reveal-text-lines {
  from { background-size: 100% 0%, 100% 100%; }
  to { background-size: 100% 100%, 100% 100%; }
}


@keyframes node-breathe {
  0%, 100% {
    opacity: .32;
    transform: translate(-50%, -50%) scale(.9) rotate(-3deg);
  }
  30% {
    opacity: .5;
    transform: translate(-46%, -53%) scale(1.06) rotate(1.4deg);
  }
  62% {
    opacity: .4;
    transform: translate(-53%, -47%) scale(.98) rotate(.4deg);
  }
  82% {
    opacity: .55;
    transform: translate(-49%, -51%) scale(1.1) rotate(-1deg);
  }
}

@keyframes node-core {
  0%, 100% { opacity: .28; transform: translate(-50%, -50%) scale(.72); }
  42% { opacity: .62; transform: translate(-50%, -50%) scale(1.12); }
  72% { opacity: .4; transform: translate(-50%, -50%) scale(.9); }
}

@media (max-width: 900px) {
  .concept-card {
    width: min(780px, calc(100vw - 64px));
  }
}

@media (max-width: 700px) {
  .page-circuit {
    --header-height: 0px;
  }

  .circuit-focus {
    padding: 18px 22px 28px;
  }

  .concept-card {
    width: min(100%, 660px);
    max-height: calc(100svh - var(--header-height) - var(--footer-clearance) - 30px);
    padding: 34px 26px 36px;
  }

  .concept-card::before {
    inset: -24px -30px;
  }

  .concept-card h1 {
    margin-bottom: 14px;
    font-size: clamp(39px, 11vw, 58px);
  }

  .concept-card h2 {
    margin-bottom: 18px;
    font-size: clamp(22px, 6.5vw, 31px);
  }

  .concept-card p {
    font-size: 16px;
    line-height: 1.6;
  }

  .circuit-node__trigger {
    width: 90px;
    height: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .circuit-art { transition: none; }

  .circuit-node__trigger::before,
  .circuit-node__trigger::after { animation: none; }

  .concept-card.is-revealing h1,
  .concept-card.is-revealing h2,
  .concept-card.is-revealing p {
    animation: none;
    background-size: 100% 100%, 100% 100%;
  }
}


/* Home-page footer behaviour layered onto the shared footer component. */
.page-circuit .site-footer--system {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  min-height: var(--footer-clearance);
  border-color: var(--circuit-border);
  color: var(--circuit-muted);
  pointer-events: auto;
}

.page-circuit .site-footer__journey {
  display: grid;
  grid-template-columns: max-content minmax(90px, 160px);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-circuit .site-footer__journey[hidden] {
  display: none;
}

.page-circuit .site-footer__count {
  min-width: 2.8em;
  color: #9aa2a6;
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.page-circuit .site-footer__progress {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  overflow: hidden;
  background: rgba(43,142,172,.17);
}

.page-circuit .site-footer__progress-fill {
  position: absolute;
  inset: 0;
  transform: scaleX(1);
  transform-origin: left;
  background: var(--circuit-blue);
  opacity: .72;
}

.page-circuit .site-footer__journey.is-cooling .site-footer__progress-fill {
  animation: circuit-footer-ready var(--wheel-ready-duration, 1800ms) linear forwards;
}

@keyframes circuit-footer-ready {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (max-width: 700px) {
  .page-circuit {
    --footer-clearance: 92px;
  }

  .page-circuit .site-footer__journey {
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px;
    width: 100%;
  }

  .page-circuit .site-footer__count {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-circuit .site-footer__journey.is-cooling .site-footer__progress-fill {
    animation-duration: var(--wheel-ready-duration, 320ms);
  }
}



