/* Figbloom Command Center: scroll-pinned wall of feeds that assembles into the command center.
   Markup lives in index.html (#fbpin); motion is driven by command-center.js. */

.fbcc {
  --cc-stage-bg: #eceef0;
  --cc-ink: #171717;
  --cc-ink-soft: #575757;
  --cc-chassis: #141915;
  --cc-top: #1b221d;
  --cc-border: #2a332c;
  --cc-divider: #232b25;
  --cc-well: #0c100d;
  --cc-text: #eef2ee;
  --cc-muted: #8f978f;
  --cc-dim: #a5ada4;
  --cc-active: #26302a;
  --cc-accent: #f08a4b;
  --cc-accent-soft: #f5a877;
  --cc-accent-deep: #b8540f;
  --cc-live: #3fbf6f;
  --cc-chip-bg: rgba(12, 16, 13, 0.75);
  --cc-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  position: relative;
  background-color: var(--cc-stage-bg);
  height: 270vh;
}

.fbcc-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.fbcc-stage.wall-pending .fbcc-fly {
  opacity: 0;
}

/* Intro text that fades away as the wall grows */
.fbcc-intro {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: min(9vh, 84px) 48px 0;
  text-align: center;
  pointer-events: none;
  will-change: transform, opacity;
}

.fbcc-eyebrow {
  color: var(--cc-accent-deep);
  font-family: var(--cc-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: min(18px, 2vh);
}

.fbcc-heading {
  max-width: 900px;
  margin: 0;
  color: var(--cc-ink);
  font-size: min(56px, 4vw + 16px, 7.4vh);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.fbcc-heading em {
  color: var(--cc-accent-deep);
  font-style: normal;
}

.fbcc-sub {
  max-width: 640px;
  margin: min(18px, 2vh) auto 0;
  color: var(--cc-ink-soft);
  font-size: min(18px, 2.4vh);
  line-height: 1.55;
}

.fbcc-cue {
  position: absolute;
  inset: auto 0 16px;
  z-index: 40;
  text-align: center;
  color: var(--cc-ink-soft);
  font-family: var(--cc-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Status chip and scan line over the wall */
.fbcc-chip {
  position: absolute;
  inset: 9vh 0 auto;
  z-index: 38;
  display: flex;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}

.fbcc-chip span.fbcc-chip-inner {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border: 1px solid var(--cc-border);
  border-radius: 999px;
  background: var(--cc-chassis);
  color: var(--cc-text);
  font-family: var(--cc-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.fbcc-scan {
  position: absolute;
  top: 10%;
  bottom: 6%;
  left: -10px;
  z-index: 35;
  width: 2px;
  opacity: 0;
  background: linear-gradient(180deg, transparent, var(--cc-accent), transparent);
  box-shadow: 0 0 16px rgba(240, 138, 75, .75);
}

/* The command center window */
.fbcc-wrap {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 48px 40px;
}

.fbcc-window {
  width: min(1120px, 94vw, 168vh - 300px);
  overflow: hidden;
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  background: var(--cc-chassis);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .28);
  opacity: 0;
  will-change: transform, opacity;
  text-align: left;
  line-height: 1.4;
}

.fbcc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-bottom: 1px solid var(--cc-border);
  background: var(--cc-top);
  opacity: 0;
}

.fbcc-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a443c;
}

.fbcc-title {
  margin-left: 14px;
  color: var(--cc-text);
  font-family: var(--cc-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
}

.fbcc-count {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--cc-dim);
  font-family: var(--cc-mono);
  font-size: 11px;
  letter-spacing: .08em;
}

.fbcc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cc-live);
  animation: fbccBlink 2s infinite;
}

.fbcc-body {
  display: grid;
  /* minmax(0, ...) stops long typed text from widening the column */
  grid-template-columns: 225px minmax(0, 1fr);
}

.fbcc-side {
  padding: 14px 0;
  border-right: 1px solid var(--cc-divider);
  opacity: 0;
}

.fbcc-label {
  padding: 0 18px 8px;
  color: var(--cc-muted);
  font-family: var(--cc-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
}

.fbcc-feeds {
  padding: 2px 18px 16px;
  border-bottom: 1px solid var(--cc-divider);
}

.fbcc-feeds-num {
  color: var(--cc-text);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}

.fbcc-feeds-num span {
  color: var(--cc-dim);
  font-size: 13px;
  font-weight: 500;
}

.fbcc-feeds-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--cc-dim);
  font-family: var(--cc-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
}

.fbcc-feeds-status .fbcc-dot {
  width: 6px;
  height: 6px;
}

.fbcc-side .fbcc-label.is-alerts {
  padding-top: 16px;
}

.fbcc-alert {
  overflow: hidden;
  padding: 6px 18px;
  color: var(--cc-dim);
  font-family: var(--cc-mono);
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color .4s, background-color .4s;
}

.fbcc-alert.is-active {
  color: var(--cc-accent-soft);
  background: var(--cc-active);
}

.fbcc-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding: 8px 18px 0;
  border-top: 1px solid var(--cc-divider);
  color: var(--cc-muted);
  font-family: var(--cc-mono);
  font-size: 11px;
  letter-spacing: .08em;
}

.fbcc-pager span:last-child {
  color: var(--cc-accent-soft);
}

.fbcc-main {
  min-width: 0;
  padding: 12px;
}

.fbcc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fbcc-slot {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9.4;
  border-radius: 8px;
  background: var(--cc-well);
}

.fbcc-slot img,
.fbcc-fly img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fbcc-slot [data-slotimg],
.fbcc-slot [data-slotui] {
  opacity: 0;
  transition: opacity .5s;
}

/* Overlay chips shared by slots and flying tiles */
.fbcc-cam {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--cc-chip-bg);
  color: var(--cc-text);
  font-family: var(--cc-mono);
  font-size: 11px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.fbcc-rec {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #e5484d;
  animation: fbccBlink 1.6s infinite;
}

.fbcc-det {
  position: absolute;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--cc-accent);
  color: #171717;
  font-family: var(--cc-mono);
  font-size: 11px;
  white-space: nowrap;
}

.fbcc-det.is-pulse {
  animation: fbccPulse 2.4s infinite;
}

.fbcc-clock {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--cc-chip-bg);
  color: var(--cc-text);
  font-family: var(--cc-mono);
  font-size: 10.5px;
}

/* Ask Bloom bar */
.fbcc-ask {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 11px 16px;
  border: 1px solid var(--cc-border);
  border-radius: 8px;
  background: var(--cc-top);
  opacity: 0;
}

.fbcc-ask-base,
.fbcc-ask-voice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-family: var(--cc-mono);
  font-size: 12.5px;
  white-space: nowrap;
  transition: opacity .35s;
}

.fbcc-ask-label {
  flex-shrink: 0;
  color: var(--cc-text);
  font-family: var(--cc-mono);
  font-size: 12.5px;
  font-weight: 400;
  white-space: nowrap;
}

/* Typed query and voice transcript share this slot, so the label never disappears */
.fbcc-ask-field {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  height: 20px;
  overflow: hidden;
}

.fbcc-ask-base span {
  color: var(--cc-dim);
}

.fbcc-ask-base > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fbcc-ask-voice {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  overflow: hidden;
  color: var(--cc-text);
  opacity: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.fbcc-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.fbcc-wave i {
  width: 3px;
  border-radius: 2px;
  background: var(--cc-accent);
  animation: fbccWave .9s ease-in-out infinite;
}

.fbcc-caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 2px;
  vertical-align: middle;
  background: var(--cc-accent);
  animation: fbccCaret 1s infinite;
}

.fbcc-mic,
.fbcc-send {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.fbcc-mic {
  position: relative;
  margin-left: auto;
  border: 1px solid var(--cc-accent);
  color: var(--cc-accent-soft);
  opacity: 0;
  transition: background .3s, color .3s, opacity .3s, transform .15s, box-shadow .15s;
}

.fbcc-ring {
  position: absolute;
  inset: -1px;
  border: 1.5px solid var(--cc-accent);
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
}

.fbcc-send {
  background: var(--cc-accent);
  color: #171717;
  font-size: 14px;
}

/* Flying tiles that start as the wall of feeds */
.fbcc-fly {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 176px;
  margin: -88px 0 0 -150px;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 23, .3);
  border-radius: 8px;
  background: var(--cc-well);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
  pointer-events: none;
  will-change: transform, opacity, filter;
  z-index: 29;
}

.fbcc-fly.is-hot {
  z-index: 30;
  border-color: rgba(23, 23, 23, .35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .24);
}

.fbcc-fly .fbcc-cam {
  top: 8px;
  left: 8px;
  font-size: 12px;
}

.fbcc-fly .fbcc-det {
  font-size: 12px;
  opacity: 0;
}

.fbcc-fly .fbcc-clock {
  right: 8px;
  bottom: 8px;
}

.fbcc-glow {
  position: absolute;
  inset: 0;
  border: 2px solid var(--cc-accent);
  border-radius: 8px;
  opacity: 0;
}

@keyframes fbccBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

@keyframes fbccCaret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes fbccWave {
  0%, 100% { transform: scaleY(.45); }
  50% { transform: scaleY(1); }
}

@keyframes fbccPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 138, 75, .55); }
  70% { box-shadow: 0 0 0 8px rgba(240, 138, 75, 0); }
}

/* Phones and tablets, or reduced motion: no pin, just the finished command center */
.fbcc.is-static {
  height: auto;
  padding: 80px 0;
}

.fbcc.is-static .fbcc-stage {
  position: static;
  height: auto;
  overflow: visible;
}

.fbcc.is-static .fbcc-intro {
  position: static;
  padding: 0 20px 36px;
}

.fbcc.is-static .fbcc-wrap {
  position: static;
  padding: 0 20px;
}

.fbcc.is-static .fbcc-window,
.fbcc.is-static .fbcc-top,
.fbcc.is-static .fbcc-side,
.fbcc.is-static .fbcc-ask,
.fbcc.is-static .fbcc-mic,
.fbcc.is-static .fbcc-slot [data-slotimg],
.fbcc.is-static .fbcc-slot [data-slotui] {
  opacity: 1;
  transform: none;
}

.fbcc.is-static .fbcc-window {
  width: min(1120px, 100%);
}

.fbcc.is-static .fbcc-fly,
.fbcc.is-static .fbcc-cue,
.fbcc.is-static .fbcc-chip,
.fbcc.is-static .fbcc-scan {
  display: none;
}

@media screen and (max-width: 767px) {
  .fbcc.is-static {
    padding: 60px 0;
  }

  .fbcc-heading {
    font-size: 34px;
  }

  .fbcc-sub {
    font-size: 16px;
  }

  .fbcc-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .fbcc-side {
    display: none;
  }

  .fbcc-main {
    padding: 8px;
  }

  .fbcc-grid {
    gap: 6px;
  }

  .fbcc-top {
    padding: 0 12px;
  }

  .fbcc-title {
    margin-left: 6px;
    font-size: 10px;
  }

  .fbcc-count {
    font-size: 9.5px;
  }

  .fbcc-cam,
  .fbcc-det,
  .fbcc-clock {
    font-size: 8.5px;
    letter-spacing: .04em;
  }

  .fbcc-cam {
    top: 5px;
    left: 5px;
    padding: 2px 5px;
  }

  .fbcc-det {
    padding: 1px 4px;
  }

  .fbcc-clock {
    right: 5px;
    bottom: 5px;
  }

  .fbcc-ask {
    padding: 9px 10px;
  }

  .fbcc-ask-label,
  .fbcc-ask-base,
  .fbcc-ask-voice {
    font-size: 11px;
  }

  .fbcc-ask-base span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
