/* A small, theme-aware dimensional layer on existing visuals. */
.depth-tile {
  --depth-size: 52px;
  width: var(--depth-size);
  height: var(--depth-size);
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
  color: #fff;
  border: 1px solid var(--accent-light);
  border-radius: var(--r-md);
  background: var(--accent-gradient);
  box-shadow: 0 4px 0 var(--accent-dark), 0 11px 20px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .36);
  transform: perspective(260px) rotateX(7deg) rotateY(-8deg);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.depth-tile::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: calc(var(--r-md) - 4px);
  pointer-events: none;
}
.depth-tile svg {
  width: 54%;
  height: 54%;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .14));
}

/* The original four image cards and their copy remain the hero composition. */
.depth-hero-cards { position: relative; isolation: isolate; }
.depth-hero-cards .mini {
  position: relative;
  transform: perspective(900px) rotateX(2deg) rotateY(-3deg);
  box-shadow: 0 4px 0 var(--border-hover), 0 14px 25px rgba(0, 0, 0, .16), inset 0 1px 0 var(--card-sheen);
}
.depth-hero-cards .mini:nth-child(2),
.depth-hero-cards .mini:nth-child(4) { transform: perspective(900px) rotateX(2deg) rotateY(3deg); }
.depth-hero-cards .mini:hover {
  transform: perspective(900px) translateY(-4px) rotateX(0) rotateY(0);
  box-shadow: 0 12px 25px rgba(0, 0, 0, .17), inset 0 1px 0 var(--card-sheen);
}
.depth-hero-icon {
  --depth-size: 48px;
  position: absolute;
  right: 9px;
  bottom: 9px;
}
.depth-hero-cards .mini:hover .depth-tile,
.tab-panel .media:hover .depth-tile,
.ind-card:hover .depth-tile,
.cap-card:hover .depth-tile {
  transform: perspective(260px) translateY(-3px) rotateX(2deg) rotateY(3deg);
  border-color: var(--accent);
  box-shadow: 0 6px 0 var(--accent-dark), 0 16px 25px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .36);
}
.depth-hub {
  width: 60px;
  height: 60px;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent-gradient);
  border: 1px solid var(--accent-light);
  border-radius: var(--r-full);
  box-shadow: 0 5px 0 var(--accent-dark), 0 13px 28px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .36);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: depthBreathe 8s ease-in-out infinite;
}
.depth-hub::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid var(--border-hover);
  border-radius: var(--r-full);
}
.depth-hub::after {
  content: '';
  position: absolute;
  width: 148px;
  height: 148px;
  background: linear-gradient(45deg, transparent 49.5%, var(--border-hover) 50%, transparent 50.5%),
              linear-gradient(-45deg, transparent 49.5%, var(--border-hover) 50%, transparent 50.5%);
  opacity: .65;
  z-index: -1;
}
.depth-hub svg { width: 30px; height: 30px; }
@keyframes depthBreathe {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 2px)); }
}

/* Existing capability card dimensions and icon position are retained. */
.cap-icon:has(.depth-tile) {
  background: transparent;
  border-color: transparent;
}
.depth-capability-icon { --depth-size: 52px; }

/* Industry photos remain visible; the symbols sit inside their existing frames. */
.depth-panel-icon {
  --depth-size: 60px;
  position: absolute;
  right: 18px;
  bottom: 18px;
}
.ind-card .ind-icon:has(.depth-tile) {
  height: 52px;
  display: grid;
  place-items: center;
}
.depth-industry-icon { --depth-size: 50px; }

.theme-light .depth-tile {
  box-shadow: 0 4px 0 var(--accent-dark), 0 11px 20px rgba(15, 23, 42, .2), inset 0 1px 0 rgba(255, 255, 255, .36);
}
.theme-light .depth-hub {
  box-shadow: 0 5px 0 var(--accent-dark), 0 13px 28px rgba(15, 23, 42, .23);
}

/* The contact map uses the same matte brand material as the site icons. */
.map-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text-secondary);
  text-align: center;
}
html:not(.theme-light) #global-presence-map .leaflet-tile-pane {
  filter: invert(.92) hue-rotate(180deg) saturate(.55) brightness(.9);
}
.spar-map-pin { background: transparent; border: 0; }
.spar-map-pin-face {
  position: absolute;
  top: 1px;
  left: 2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--accent-light);
  background: var(--accent-gradient);
  box-shadow: 0 4px 0 var(--accent-dark), 0 10px 17px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .36);
  transform: perspective(120px) rotateX(9deg) rotateY(-7deg);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.spar-map-pin-face::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.spar-map-pin::after {
  content: '';
  position: absolute;
  top: 34px;
  left: 13px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 7px solid var(--accent-dark);
}
.spar-map-pin:hover .spar-map-pin-face {
  transform: perspective(120px) translateY(-2px) rotateX(3deg) rotateY(2deg);
  box-shadow: 0 6px 0 var(--accent-dark), 0 14px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .36);
}

@media (max-width: 860px) {
  .depth-hub { display: none; }
  .depth-hero-icon { --depth-size: 40px; }
  .depth-hero-cards .mini,
  .depth-hero-cards .mini:nth-child(2),
  .depth-hero-cards .mini:nth-child(4),
  .depth-hero-cards .mini:hover { transform: none; }
}
@media (max-width: 560px) {
  .depth-panel-icon { --depth-size: 46px; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .depth-hub, .hero::before, .hero::after { animation: none !important; }
  .depth-tile, .depth-hero-cards .mini { transition: none !important; }
  .depth-hero-cards .mini,
  .depth-hero-cards .mini:nth-child(2),
  .depth-hero-cards .mini:nth-child(3),
  .depth-hero-cards .mini:hover,
  .cap-card:hover,
  .ind-card:hover { transform: none !important; }
  .tab-panel .media:hover img { transform: none !important; }
  .spar-map-pin-face { transition: none !important; }
  .spar-map-pin:hover .spar-map-pin-face { transform: perspective(120px) rotateX(9deg) rotateY(-7deg); }
  .depth-hero-cards .mini:hover .depth-tile,
  .tab-panel .media:hover .depth-tile,
  .ind-card:hover .depth-tile,
  .cap-card:hover .depth-tile { transform: perspective(260px) rotateX(7deg) rotateY(-8deg); }
  .reveal { transition: none !important; }
}
