/* ═══════════════════════════════════════════════════════════════════
   What it means — proxy animation
   No cards. Three glyphs float on the dark background with labels
   below. Cumbuca proxy center, infrastructure glyph left, rotating
   bank logo right. Two-line bidirectional mTLS arrows between them.
   ═══════════════════════════════════════════════════════════════════ */

/* Tokens ------------------------------------------------------------ */
.wim {
  --wim-node-w: 200px;        /* glyph reserved footprint */
  --wim-glyph-size: 88px;     /* side glyph box */
  --wim-arrow-len: clamp(160px, 20vw, 320px);

  --wim-line: rgba(255, 255, 255, 0.12);
  --wim-accent: rgba(125, 124, 217, 0.95);

  position: relative;
  width: 100%;
  /* Matches the 3-card .wim-props grid width below so the animation
     spans the same horizontal footprint as the 01/02/03 value cards. */
  max-width: none;
  margin: 0 auto;
  padding: 56px 16px 72px;
  font-family: var(--font-primary);
  color: var(--text-heading);
  isolation: isolate;
}

/* Row --------------------------------------------------------------- */
.wim__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
}
.wim__row > .wim-node   { flex: 0 0 auto; }
.wim__row > .wim-arrows { flex: 1 1 auto; max-width: none; min-width: 120px; }

/* NODE (glyph + label below) --------------------------------------- */
.wim-node {
  width: var(--wim-node-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
  text-align: center;
}

.wim-node__glyph {
  height: 132px;       /* fixed so labels stay aligned across nodes */
  display: grid;
  place-items: center;
}

.wim-node__labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wim-node__title {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.1px;
  color: var(--text-heading);
  line-height: 1.3;
}
.wim-node__sub {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── LEFT — Infra glyph (server rack) ───────────────────────────── */
.wim-infra {
  width: var(--wim-glyph-size);
  height: var(--wim-glyph-size);
  color: rgba(255, 255, 255, 0.65);
}
.wim-infra svg { width: 100%; height: 100%; display: block; }
.wim-infra svg rect.unit-fill { fill: currentColor; opacity: 0.28; }
.wim-infra svg rect.led       { fill: currentColor; opacity: 0.4; }
.wim-infra svg rect.led.is-lit { fill: #c0bfee; opacity: 1; }
.wim-infra svg line           { stroke: currentColor; opacity: 0.35; stroke-width: 0.6; }
.wim-infra svg rect.frame     { stroke: currentColor; stroke-opacity: 0.5; stroke-width: 1.1; fill: none; }

/* blink a couple of LEDs to feel alive */
.wim-infra svg rect.led.is-lit { animation: wim-blink 2.8s ease-in-out infinite; }
.wim-infra svg rect.led.is-lit.delay-1 { animation-delay: -0.9s; }
.wim-infra svg rect.led.is-lit.delay-2 { animation-delay: -1.7s; }

@keyframes wim-blink {
  0%, 40%, 100% { opacity: 1; }
  50%, 55%      { opacity: 0.35; }
  60%           { opacity: 1; }
}

/* ── CENTER — Cumbuca proxy (halo + rings + bowl) ───────────────── */
.wim-cumbuca {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
}

.wim-cumbuca__halo {
  position: absolute;
  inset: -55%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(125, 124, 217, 0.42) 0%,
    rgba(125, 124, 217, 0.14) 32%,
    rgba(125, 124, 217, 0) 64%
  );
  filter: blur(2px);
  z-index: -1;
  animation: wim-breathe 3.2s ease-in-out infinite;
}

.wim-cumbuca__ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(125, 124, 217, 0.42);
  animation: wim-orbit 14s linear infinite;
}
.wim-cumbuca__ring::before {
  content: "";
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #c9c8f1;
  box-shadow: 0 0 10px rgba(201, 200, 241, 0.95);
  top: -3px; left: 50%;
  transform: translateX(-50%);
}
.wim-cumbuca__ring--outer {
  inset: -26px;
  border-color: rgba(125, 124, 217, 0.2);
  animation-duration: 22s;
  animation-direction: reverse;
}
.wim-cumbuca__ring--outer::before {
  width: 4px; height: 4px; top: -2px;
  background: rgba(201, 200, 241, 0.8);
  box-shadow: 0 0 8px rgba(201, 200, 241, 0.7);
}

.wim-cumbuca__bowl {
  width: 82%;
  height: 82%;
  color: #c0bfee;
  filter: drop-shadow(0 0 18px rgba(125, 124, 217, 0.6));
  animation: wim-pulse 3.2s ease-in-out infinite;
}
.wim-cumbuca__bowl svg { width: 100%; height: 100%; display: block; }

/* Center labels get slightly stronger weight */
.wim-node--center .wim-node__title { color: #ffffff; font-weight: 600; }
.wim-node--center .wim-node__sub   { color: rgba(201, 200, 241, 0.88); }

/* ── RIGHT — Rotating institution logo (no card, crossfade) ─────── */
.wim-slot {
  position: relative;
  width: 132px;
  height: 92px;
  display: grid;
  place-items: center;
}

.wim-slot__item {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 720ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 900ms cubic-bezier(0.4, 0, 0.2, 1),
    filter 720ms cubic-bezier(0.4, 0, 0.2, 1);
  filter: blur(2px);
  will-change: opacity, transform;
}
.wim-slot__item.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

.wim-slot__item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  /* Bruno's logos are white-on-transparent; a very soft glow anchors
     them without looking backlit. */
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.05));
}

/* Right-side glyph is wider than the square side-glyph box — so
   let the glyph slot itself size, but keep the labels baseline aligned
   by using the same node__glyph height. */
.wim-node--right .wim-node__glyph { width: 132px; }

/* ── ARROWS ─────────────────────────────────────────────────────── */
.wim-arrows {
  width: var(--wim-arrow-len);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  padding: 0 6px;
  /* nudge up so arrows hit the glyph centerline, not the labels */
  margin-bottom: 62px;
}

.wim-arrow {
  position: relative;
  height: 2px;
  background: var(--wim-line);
  border-radius: 999px;
  overflow: hidden;
}

.wim-arrow__flow {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(125, 124, 217, 0) 22%,
    rgba(125, 124, 217, 0.9) 48%,
    rgba(230, 228, 255, 1) 50%,
    rgba(125, 124, 217, 0.9) 52%,
    rgba(125, 124, 217, 0) 78%,
    transparent 100%
  );
  animation: wim-flow-forward 2.4s linear infinite;
}
.wim-arrow--back .wim-arrow__flow {
  animation: wim-flow-back 2.4s linear infinite;
  animation-delay: -1.2s;
}

.wim-arrow__tip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.wim-arrow:not(.wim-arrow--back) .wim-arrow__tip {
  right: -1px;
  border-left: 6px solid rgba(125, 124, 217, 0.55);
}
.wim-arrow--back .wim-arrow__tip {
  left: -1px;
  border-right: 6px solid rgba(125, 124, 217, 0.55);
}

.wim-arrows__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 4px 8px;
  background: var(--bg-primary);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.wim-lock { width: 10px; height: 10px; color: var(--accent-purple); display: grid; place-items: center; }
.wim-lock svg { width: 100%; height: 100%; }
.wim-lock__shackle {
  transform-origin: 50% 60%;
  animation: wim-lock-click 2.4s linear infinite;
}

/* ── KEYFRAMES ──────────────────────────────────────────────────── */
@keyframes wim-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.95; transform: scale(1.06); }
}
@keyframes wim-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
@keyframes wim-orbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes wim-flow-forward {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}
@keyframes wim-flow-back {
  from { transform: translateX(100%); }
  to   { transform: translateX(-100%); }
}
@keyframes wim-lock-click {
  0%, 44%   { transform: translateY(-1.2px) scaleY(1.15); opacity: 0.55; }
  50%, 100% { transform: translateY(0)      scaleY(1);    opacity: 1;    }
}

/* ── MOBILE ─────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .wim { --wim-node-w: 140px; }
  .wim__row { flex-direction: column; gap: 0; }
  .wim-arrows {
    width: 2px;
    height: 80px;
    flex-direction: row;
    padding: 6px 0;
    margin: 0;
  }
  .wim-arrow { width: 1px; height: 100%; flex: 1; }
  .wim-arrow__flow {
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(125, 124, 217, 0.9) 50%,
      transparent 100%
    );
    animation-name: wim-flow-v;
  }
  .wim-arrow--back .wim-arrow__flow { animation-name: wim-flow-v-back; }
  @keyframes wim-flow-v {
    from { transform: translateY(-100%); }
    to   { transform: translateY(100%); }
  }
  @keyframes wim-flow-v-back {
    from { transform: translateY(100%); }
    to   { transform: translateY(-100%); }
  }
}

/* ── REDUCED MOTION ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .wim-cumbuca__halo,
  .wim-cumbuca__bowl,
  .wim-cumbuca__ring,
  .wim-arrow__flow,
  .wim-lock__shackle,
  .wim-infra svg rect.led.is-lit { animation: none; }
}

/* ══════════ EXPLORATION PAGE CHROME (dev-only) ══════════════════ */
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-heading);
  font-family: var(--font-primary);
  min-height: 100vh;
}
.page { display: flex; flex-direction: column; gap: 24px; padding: 48px 0 96px; }
.page__intro {
  max-width: 760px;
  margin: 0 auto 8px;
  padding: 0 32px;
  text-align: center;
}
.page__eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-purple);
  margin: 0 0 12px;
}
.page__title {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
}
.page__desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   What It Means — section-level overrides for the already-existing
   proxy animation. The core animation CSS lives in what-it-means.css
   copied from the exploration. This file wraps it for the homepage.
   ═══════════════════════════════════════════════════════════════════ */

.wim-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--line-1);
}
.wim-section .wim {
  margin-top: 20px;
  margin-bottom: 72px;
}

.wim-props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.wim-prop {
  background: var(--bg-section-alt-1);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wim-prop__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-purple);
  letter-spacing: 0.08em;
}
.wim-prop h3 {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  margin: 0;
}
.wim-prop p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
}

@media (max-width: 820px) {
  .wim-props { grid-template-columns: 1fr; }
}
