/* REV JAMi-PROFILE-4.3 — Solve typography alignment + premium focused gallery carousel polish
   Additive CSS only. Loaded last so it does not disturb the base profile CSS. */

/* Match the What We Solve tile typography to the JAMi Operating System tiles. */
.solve-layer {
  align-items: flex-start;
}

.solve-index {
  width: 44px !important;
  height: 44px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  box-shadow:
    0 0 0 6px rgba(72,199,194,0.09),
    0 0 24px rgba(72,199,194,0.34),
    0 14px 26px rgba(0,0,0,0.28) !important;
}

.solve-copy {
  gap: 10px !important;
  padding-top: 2px;
}

.solve-copy strong {
  display: block !important;
  font-family: inherit !important;
  font-size: clamp(21px, 4.8vw, 27px) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.045em !important;
  font-weight: 900 !important;
  margin: 0 !important;
  text-wrap: balance;
}

.solve-copy small {
  display: block !important;
  min-height: auto !important;
  font-family: inherit !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-weight: 700 !important;
  color: rgba(244,248,248,0.70) !important;
}

/* Events Created: stable focused carousel.
   REV 4.2: This is no longer a scroll rail. The JS positions the
   centre/left/right images directly, so the centre image is always bright. */
#work {
  overflow: hidden;
}

.gallery-wall {
  --gallery-card-w: clamp(360px, 48vw, 720px);
  position: relative !important;
  display: block !important;
  width: min(100%, 1120px);
  max-width: calc(100vw - 24px);
  height: clamp(340px, 36vw, 560px);
  margin: clamp(28px, 4vw, 46px) auto 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
  border-radius: 34px;
  border: 1px solid rgba(72,199,194,0.10);
  background:
    radial-gradient(circle at 50% 0%, rgba(72,199,194,0.095), transparent 34%),
    radial-gradient(circle at 50% 100%, rgba(238,42,138,0.050), transparent 40%),
    rgba(0,0,0,0.15);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.018),
    0 26px 90px rgba(0,0,0,0.36);
  mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 13%, #000 87%, transparent 100%);
  isolation: isolate;
}

.gallery-wall::before {
  content: "";
  position: absolute;
  inset: 14% 9%;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 50%, rgba(72,199,194,0.075), transparent 56%),
    radial-gradient(circle at 50% 100%, rgba(238,42,138,0.050), transparent 46%);
  opacity: 0.72;
  pointer-events: none;
}

.gallery-wall::-webkit-scrollbar {
  display: none;
}

.gallery-wall {
  scrollbar-width: none;
}

.gallery-tile {
  position: absolute !important;
  top: 50%;
  left: 50%;
  width: var(--gallery-card-w) !important;
  max-width: 76vw;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 10;
  border-radius: 26px !important;
  opacity: 0;
  filter: saturate(0.45) brightness(0.34) blur(0.2px);
  transform: translate(-50%, -50%) translateX(var(--carousel-x, 0px)) scale(0.68);
  transform-origin: center;
  z-index: var(--carousel-depth, 1);
  cursor: pointer;
  pointer-events: none;
  transition:
    opacity 380ms ease,
    transform 430ms cubic-bezier(.2,.72,.2,1),
    filter 380ms ease,
    box-shadow 380ms ease,
    border-color 380ms ease;
  box-shadow:
    0 12px 36px rgba(0,0,0,0.34),
    0 0 0 1px rgba(72,199,194,0.06) !important;
}

.gallery-tile.is-prev,
.gallery-tile.is-next {
  z-index: 8 !important;
  opacity: 0.34;
  filter: saturate(0.48) brightness(0.34) blur(0.08px);
  transform: translate(-50%, -50%) translateX(var(--carousel-x, 0px)) scale(0.74);
  pointer-events: auto;
}

.gallery-tile.is-active {
  opacity: 1 !important;
  filter: saturate(1.05) brightness(1.06) blur(0) !important;
  transform: translate(-50%, -50%) translateX(0) scale(1) !important;
  z-index: 30 !important;
  cursor: zoom-in;
  pointer-events: auto;
  border-color: rgba(111,247,239,0.32) !important;
  background: #03090afd;
  box-shadow:
    0 24px 72px rgba(0,0,0,0.52),
    0 0 0 1px rgba(111,247,239,0.28),
    0 0 36px rgba(72,199,194,0.18) !important;
}

.gallery-tile.is-hidden {
  opacity: 0 !important;
  transform: translate(-50%, -50%) translateX(var(--carousel-x, 0px)) scale(0.58);
  pointer-events: none !important;
}

.gallery-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 28%),
    radial-gradient(circle at 50% 112%, rgba(72,199,194,0.10), transparent 48%);
  opacity: 0.48;
  transition: opacity 380ms ease;
}

.gallery-tile.is-active::after {
  opacity: 0.12;
}

.gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 380ms cubic-bezier(.2,.72,.2,1), filter 380ms ease;
}

.gallery-tile.is-prev:hover,
.gallery-tile.is-next:hover,
.gallery-tile.is-prev:focus-visible,
.gallery-tile.is-next:focus-visible {
  opacity: 0.48;
  filter: saturate(0.58) brightness(0.46) blur(0.04px);
  border-color: rgba(111,247,239,0.20) !important;
}

.gallery-tile.is-active:hover,
.gallery-tile.is-active:focus-visible {
  opacity: 1 !important;
  filter: saturate(1.08) brightness(1.10) blur(0) !important;
}

.gallery-tile.is-active:hover img,
.gallery-tile.is-active:focus-visible img {
  transform: scale(1.018);
}

.gallery-tile:focus-visible {
  outline: 2px solid rgba(111,247,239,0.55);
  outline-offset: 5px;
}

.gallery-carousel-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 520px);
  margin: 18px auto 0;
  padding: 10px 18px 4px;
}

.gallery-carousel-controls::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(111,247,239,0.35), rgba(238,42,138,0.38), rgba(244,248,248,0.10));
  opacity: 0.55;
  pointer-events: none;
}

.gallery-carousel-btn {
  display: none !important;
}

.gallery-carousel-dots {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: min(100%, 420px);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.34);
  box-shadow: 0 0 20px rgba(0,0,0,0.18);
}

.gallery-carousel-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(244,248,248,0.24);
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.gallery-carousel-dot:hover,
.gallery-carousel-dot:focus-visible {
  transform: scale(1.3);
  background: rgba(111,247,239,0.68);
  outline: none;
}

.gallery-carousel-dot.is-active {
  width: 24px;
  background: linear-gradient(90deg, rgba(111,247,239,0.95), rgba(238,42,138,0.76));
  box-shadow: 0 0 16px rgba(111,247,239,0.24);
}

@media (max-width: 720px) {
  .solve-layer {
    align-items: flex-start;
  }

  .solve-copy strong {
    font-size: clamp(21px, 7vw, 26px) !important;
  }

  .solve-copy small {
    font-size: 14px !important;
  }

  .gallery-wall {
    --gallery-card-w: min(82vw, 430px);
    max-width: calc(100vw - 12px);
    height: clamp(330px, 82vw, 520px);
    border-radius: 28px;
    margin-top: 26px !important;
    mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
  }

  .gallery-tile {
    border-radius: 21px !important;
    aspect-ratio: 4 / 3;
  }

  .gallery-tile.is-prev,
  .gallery-tile.is-next {
    transform: translate(-50%, -50%) translateX(var(--carousel-x, 0px)) scale(0.78);
    opacity: 0.38;
  }

  .gallery-carousel-controls {
    margin-top: 14px;
    width: min(100%, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-wall {
    scroll-behavior: auto !important;
  }

  .gallery-tile,
  .gallery-tile img,
  .gallery-carousel-dot {
    transition: none !important;
  }
}
