/* Glass captions and tactile feedback, layered over the existing site theme. */
.visual-caption {
  background: rgba(255, 255, 255, 0.40);
  border-color: rgba(255, 255, 255, 0.70);
  -webkit-backdrop-filter: blur(7px) saturate(115%);
  backdrop-filter: blur(7px) saturate(115%);
  box-shadow: 0 8px 28px rgba(22, 43, 56, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.40);
  color: #20333f;
  transition: background 280ms var(--ease), border-color 280ms var(--ease), box-shadow 280ms var(--ease);
}

.visual-caption small {
  color: #3e5666;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.42);
}

.visual-caption strong {
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.50);
}

.visual-caption > a {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(58, 83, 99, 0.38);
  transition: background 240ms var(--ease), color 240ms var(--ease), border-color 240ms var(--ease), transform 240ms var(--ease);
}

.visual-caption:focus-within {
  background: rgba(255, 255, 255, 0.50);
  border-color: rgba(255, 255, 255, 0.92);
}

.solution-trigger {
  position: relative;
  transition: background 240ms var(--ease);
}

.solution-trigger::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: -12px;
  width: 2px;
  border-radius: 2px;
  background: var(--brand);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
  pointer-events: none;
}

.solution-trigger h3 {
  transition: color 240ms var(--ease), transform 280ms var(--ease);
}

.solution-trigger .plus {
  transition: color 240ms var(--ease), transform 280ms var(--ease);
}

.solution-trigger:focus-visible::before,
.solution-tab.active .solution-trigger::before {
  opacity: 1;
  transform: scaleY(1);
}

.case-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at var(--pointer-x, 20%) var(--pointer-y, 5%), rgba(255, 255, 255, 0.28), transparent 66%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.30);
  opacity: 0;
  transition: opacity 350ms var(--ease);
  pointer-events: none;
}

.case-image .case-category,
.case-image .case-open {
  z-index: 1;
}

.case-card:focus-visible .case-image::after {
  opacity: 1;
}

.contact-card {
  position: relative;
  isolation: isolate;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: -16px;
  z-index: -1;
  border-radius: 14px;
  background: radial-gradient(circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(255, 255, 255, 0.50), transparent 70%);
  opacity: 0;
  transition: opacity 350ms var(--ease);
  pointer-events: none;
}

.contact-card:focus-within::before {
  opacity: 1;
}

.tech-step {
  transition: background 240ms var(--ease), color 240ms var(--ease);
}

.delivery-step .step-node {
  transition: background 240ms var(--ease), color 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}

.delivery-step h3 {
  transition: color 240ms var(--ease);
}

.pill,
.filter,
.back-top {
  transition: background 240ms var(--ease), color 240ms var(--ease), border-color 240ms var(--ease), transform 240ms var(--ease), box-shadow 240ms var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .visual-caption:hover {
    background: rgba(255, 255, 255, 0.50);
    border-color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 30px rgba(22, 43, 56, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  }

  .visual-caption > a:hover {
    color: #fff;
    background: var(--brand);
    border-color: var(--brand);
    transform: translate(2px, -2px);
  }

  .solution-trigger:hover {
    background: linear-gradient(90deg, rgba(204, 55, 50, 0.035), transparent 85%);
  }

  .solution-trigger:hover::before {
    opacity: 1;
    transform: scaleY(1);
  }

  .solution-trigger:hover h3 {
    color: var(--brand);
    transform: translateX(4px);
  }

  .solution-trigger:hover .plus {
    color: var(--brand);
  }

  .solution-tab:not(.active) .solution-trigger:hover .plus {
    transform: rotate(90deg);
  }

  .case-card:hover .case-image::after {
    opacity: 1;
  }

  .contact-card:hover::before {
    opacity: 1;
  }

  .tech-step:hover {
    background: rgba(204, 55, 50, 0.035);
    color: var(--brand);
  }

  .delivery-step:hover .step-node {
    box-shadow: 0 0 0 6px rgba(204, 55, 50, 0.07);
  }

  .delivery-step:hover h3 {
    color: var(--brand);
  }
}

.pill:active,
.filter:active,
.visual-caption > a:active,
.back-top:active {
  transform: translateY(1px) scale(0.97);
}

.solution-trigger:active {
  background: rgba(204, 55, 50, 0.055);
}

@media (max-width: 640px) {
  .visual-caption {
    background: rgba(255, 255, 255, 0.45);
    -webkit-backdrop-filter: blur(6px) saturate(110%);
    backdrop-filter: blur(6px) saturate(110%);
  }

  .visual-caption small {
    font-size: 8px;
    line-height: 1.5;
    letter-spacing: 0.065em;
  }

  .visual-caption > a {
    width: 40px;
    height: 40px;
  }

  .solution-trigger::before {
    left: -9px;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .visual-caption {
    background: rgba(255, 255, 255, 0.64);
  }
}

@media (prefers-reduced-motion: reduce) {
  .visual-caption,
  .visual-caption > a,
  .solution-trigger,
  .solution-trigger::before,
  .solution-trigger h3,
  .solution-trigger .plus,
  .case-image::after,
  .contact-card::before,
  .tech-step,
  .delivery-step .step-node,
  .delivery-step h3,
  .pill,
  .filter,
  .back-top {
    transition: none;
  }

  .solution-trigger:hover h3,
  .solution-tab:not(.active) .solution-trigger:hover .plus,
  .visual-caption > a:hover,
  .pill:active,
  .filter:active,
  .visual-caption > a:active,
  .back-top:active {
    transform: none;
  }
}
