/* Range / Domain Breadth Section */

.section__range {
  background: var(--dark);
  overflow: visible;
}

/* Cloud container — height set by JS */
.breadth__tags {
  position: relative;
  overflow: visible;
  padding: 0 var(--pad-x) 3.5rem;
  min-height: 260px;
}

/* Canvas web overlay */
.breadth__web {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.section__range.visible .breadth__web {
  opacity: 1;
}

/* Base tag */
.breadth__tag {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--text-inv);
  border-radius: 2px;
  cursor: default;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-normal);
  border: 1.5px solid rgba(240, 236, 216, 0.1);
  transition: border-color 260ms ease;
  white-space: nowrap;
  max-width: 220px;
}

.breadth__tag__label {
  font-family: var(--mono);
}

.breadth__tag__label::before {
  content: '// ';
  opacity: 0.5;
}

.breadth__tag__outcome {
  display: none;
}

/* Featured boxes: description always visible, consistent width */
.breadth__tag--featured {
  padding: 0.9rem 1.25rem;
  white-space: normal;
  width: 220px;
}

.breadth__tag--featured .breadth__tag__outcome {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-light);
  color: rgba(240, 236, 216, 0.52);
  margin-top: 0.35rem;
  line-height: 1.45;
}

/* Meta tags (domain + tech stack) — hidden until hover/tap */
.breadth__tag__meta {
  display: none;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.5rem;
  align-items: center;
}

.breadth__tag__domain-tag,
.breadth__tag__stack-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  line-height: 1.4;
}

.breadth__tag__domain-tag {
  color: var(--brand);
  border: 1px solid currentColor;
  opacity: 0.85;
}

.breadth__tag__stack-tag {
  color: rgba(240, 236, 216, 0.5);
  border: 1px solid rgba(240, 236, 216, 0.15);
}

/* Desktop: on hover all tags expand to featured style */
@media (min-width: 1101px) {
  .breadth__tag:hover {
    border-color: var(--brand);
    outline: 1.5px solid var(--brand);
    background: var(--dark);
    z-index: 100;
  }

  .breadth__tag:not(.breadth__tag--featured):hover {
    white-space: normal;
    width: 220px;
    padding: 0.4rem 1rem 0.9rem;
  }

  .breadth__tag:hover .breadth__tag__outcome {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-light);
    color: rgba(240, 236, 216, 0.52);
    margin-top: 0.35rem;
    line-height: 1.45;
  }

  .breadth__tag:hover .breadth__tag__meta {
    display: flex;
  }
}


/* Mobile: revert to static wrapping layout */
@media (max-width: 1100px) {
  .breadth__tags {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: flex-start;
    min-height: 0;
    height: auto !important;
    padding: 1rem var(--pad-x) 3.5rem;
    overflow: visible;
  }

  .breadth__tag {
    position: static;
    white-space: normal;
    cursor: pointer;
  }

  /* featured boxes: collapse to same size as small boxes */
  .breadth__tag--featured {
    width: auto;
    padding: 0.4rem 1rem;
  }

  .breadth__tag--featured .breadth__tag__outcome {
    display: none;
  }

  .breadth__web { display: none; }

  /* tap to reveal outcome on all boxes */
  .breadth__tag.active {
    outline: 1.5px solid var(--brand);
  }

  .breadth__tag.active .breadth__tag__outcome {
    display: block;
    font-size: 0.78rem;
    font-weight: var(--font-weight-light);
    color: var(--muted-inv);
    margin-top: 0.3rem;
    line-height: 1.4;
  }

  .breadth__tag.active .breadth__tag__meta {
    display: flex;
  }
}

/* Medium screens: extra breathing room between tags */
@media (min-width: 540px) and (max-width: 1100px) {
  .breadth__tags {
    gap: 1.4rem;
    padding: 1.25rem var(--pad-x) 4rem;
  }
}
